Skip to content

Commit 1f54dbb

Browse files
move float safe/unsafe queries to kmdf folder and fix output strings
1 parent 13a2c3d commit 1f54dbb

11 files changed

Lines changed: 1219 additions & 910 deletions

File tree

src/drivers/general/queries/FloatSafeExit/FloatSafeExit.sarif

Lines changed: 0 additions & 367 deletions
This file was deleted.

src/drivers/general/queries/FloatUnsafeExit/FloatUnsafeExit.sarif

Lines changed: 0 additions & 534 deletions
This file was deleted.

src/drivers/general/queries/FloatSafeExit/FloatSafeExit.qhelp renamed to src/drivers/kmdf/queries/FloatSafeExit/FloatSafeExit.qhelp

File renamed without changes.

src/drivers/general/queries/FloatSafeExit/FloatSafeExit.ql renamed to src/drivers/kmdf/queries/FloatSafeExit/FloatSafeExit.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ where
8989
safeFloatRestoreFuncCall.getEnclosingFunction() = kernelFloatFunc
9090
) and
9191
msg =
92-
"Function annotated with _Kernel_float_restored_ but does not call a safe float access function for some path(s)"
92+
"Function annotated with _Kernel_float_restored_ but may not call/check return value of a safe float access function for some path(s)"
9393
or
9494
// Paths have call to safe float access function but return value is not used
9595
unusedFc instanceof SafeFloatRestoreFuncCall and
9696
unusedFc.getEnclosingFunction() = kernelFloatFunc and
9797
msg =
98-
"Function annotated with _Kernel_float_restored_ but does not check a safe float access function return value for some path(s)" and
98+
"Function annotated with _Kernel_float_restored_ but may not call/check return value of a safe float access function for some path(s)" and
9999
(
100100
// return value isn't used at all
101101
unused(unusedFc)

src/drivers/kmdf/queries/FloatSafeExit/FloatSafeExit.sarif

Lines changed: 610 additions & 0 deletions
Large diffs are not rendered by default.

src/drivers/general/queries/FloatSafeExit/driver_snippet.c renamed to src/drivers/kmdf/queries/FloatSafeExit/driver_snippet.c

File renamed without changes.

src/drivers/general/queries/FloatUnsafeExit/FloatUnsafeExit.qhelp renamed to src/drivers/kmdf/queries/FloatUnsafeExit/FloatUnsafeExit.qhelp

File renamed without changes.

src/drivers/general/queries/FloatUnsafeExit/FloatUnsafeExit.ql renamed to src/drivers/kmdf/queries/FloatUnsafeExit/FloatUnsafeExit.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ where
8181
safeFloatAccessFuncCall.getEnclosingFunction() = kernelFloatFunc
8282
) and
8383
msg =
84-
"Function annotated with _Kernel_float_saved_ but does not call a safe float access function for some path(s)"
84+
"Function annotated with _Kernel_float_saved_ but may not call/check return values of safe float access function for some path(s)"
8585
or
8686
// Paths have call to safe float access function but return value is not used
8787
unusedFc instanceof SafeFloatAccessFuncCall and
8888
unusedFc.getEnclosingFunction() = kernelFloatFunc and
8989
msg =
90-
"Function annotated with _Kernel_float_saved_ but does not check a safe float access function return value for some path(s)" and
90+
"Function annotated with _Kernel_float_saved_ but may not call/check return values of safe float access function for some path(s)" and
9191
(
9292
// return value isn't used at all
9393
unused(unusedFc)

src/drivers/kmdf/queries/FloatUnsafeExit/FloatUnsafeExit.sarif

Lines changed: 579 additions & 0 deletions
Large diffs are not rendered by default.

src/drivers/general/queries/FloatUnsafeExit/driver_snippet.c renamed to src/drivers/kmdf/queries/FloatUnsafeExit/driver_snippet.c

File renamed without changes.

0 commit comments

Comments
 (0)