selftests/x86: Add missing .note.GNU-stack sections
authorAndy Lutomirski <luto@kernel.org>
Mon, 2 Nov 2020 19:51:11 +0000 (11:51 -0800)
committerBorislav Petkov <bp@suse.de>
Tue, 24 Nov 2020 12:55:39 +0000 (13:55 +0100)
Several of the x86 selftests end up with executable stacks because
the asm was missing the annotation that says that they are modern
and don't need executable stacks.  Add the annotations.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/6f043c03e9e0e4557e1e975a63b07a4d18965a68.1604346596.git.luto@kernel.org
tools/testing/selftests/x86/raw_syscall_helper_32.S
tools/testing/selftests/x86/thunks.S

index 94410fa2b5ed3efe631ec478c9737cb711d36474..a10d36afdca0a67ae24d63005e03b8219a477f3b 100644 (file)
@@ -45,3 +45,5 @@ int80_and_ret:
 
        .type int80_and_ret, @function
        .size int80_and_ret, .-int80_and_ret
+
+.section .note.GNU-stack,"",%progbits
index 1bb5d62c16a424a2aac14b70fb64546743019b80..a2d47d8344d40a02f3ebdbaf7281019b8b197de8 100644 (file)
@@ -57,3 +57,5 @@ call32_from_64:
        ret
 
 .size call32_from_64, .-call32_from_64
+
+.section .note.GNU-stack,"",%progbits