[PATCH] selftests/x86: Update map_shadow_stack syscall nr

From: Rick Edgecombe
Date: Fri Sep 01 2023 - 14:17:14 EST


Shadow stack's selftest utilizes the map_shadow_stack syscall. The
syscall is new with the feature, but the selftests cannot automatically
find the headers for the kernel source tree they are located in. This
resulted in the shadow stack test failing to build until the brand new
headers were installed.

To avoid this, a copy of the new uapi defines needed by the test were
included in the selftest (see link for discussion). When shadow stack was
merged the syscall number was changed, but the copy in the selftest was
not updated.

So update the copy of the syscall number define used when the required
headers are not installed, to have the final syscall number from the
merge.

Link: https://lore.kernel.org/lkml/Y%2FijdXoTAATt0+Ct@xxxxxxx/
Signed-off-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx>
---
tools/testing/selftests/x86/test_shadow_stack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/x86/test_shadow_stack.c b/tools/testing/selftests/x86/test_shadow_stack.c
index 2188968674cb..757e6527f67e 100644
--- a/tools/testing/selftests/x86/test_shadow_stack.c
+++ b/tools/testing/selftests/x86/test_shadow_stack.c
@@ -40,7 +40,7 @@
* without building the headers.
*/
#ifndef __NR_map_shadow_stack
-#define __NR_map_shadow_stack 452
+#define __NR_map_shadow_stack 453

#define SHADOW_STACK_SET_TOKEN (1ULL << 0)

--
2.34.1