Skip to content

Commit 90b5432

Browse files
committed
Add a test case on a known false positive
1 parent 3bf4d6f commit 90b5432

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

bolt/test/binary-analysis/AArch64/gs-pauth-authentication-oracles.s

+13
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,19 @@ good_unknown_overwrite:
187187
ret
188188
.size good_unknown_overwrite, .-good_unknown_overwrite
189189

190+
// This is a false positive: when a general-purpose register is written to as
191+
// a 32-bit register, its top 32 bits are zeroed, but according to LLVM
192+
// representation, the instruction only overwrites the Wn register.
193+
.globl good_unknown_wreg_overwrite
194+
.type good_unknown_wreg_overwrite,@function
195+
good_unknown_wreg_overwrite:
196+
// CHECK-LABEL: GS-PAUTH: authentication oracle found in function good_unknown_wreg_overwrite, basic block {{[^,]+}}, at address
197+
// CHECK-NEXT: The instruction is {{[0-9a-f]+}}: autia x0, x1
198+
autia x0, x1
199+
mul w0, w1, w2
200+
ret
201+
.size good_unknown_wreg_overwrite, .-good_unknown_wreg_overwrite
202+
190203
.globl good_address_arith
191204
.type good_address_arith,@function
192205
good_address_arith:

0 commit comments

Comments
 (0)