]> Git Repo - linux.git/commitdiff
uretprobe: change syscall number, again
authorArnd Bergmann <[email protected]>
Tue, 30 Jul 2024 15:30:40 +0000 (17:30 +0200)
committerArnd Bergmann <[email protected]>
Fri, 2 Aug 2024 13:18:49 +0000 (15:18 +0200)
Despite multiple attempts to get the syscall number assignment right
for the newly added uretprobe syscall, we ended up with a bit of a mess:

 - The number is defined as 467 based on the assumption that the
   xattrat family of syscalls would use 463 through 466, but those
   did not make it into 6.11.

 - The include/uapi/asm-generic/unistd.h file still lists the number
   463, but the new scripts/syscall.tbl that was supposed to have the
   same data lists 467 instead as the number for arc, arm64, csky,
   hexagon, loongarch, nios2, openrisc and riscv. None of these
   architectures actually provide a uretprobe syscall.

 - All the other architectures (powerpc, arm, mips, ...) don't list
   this syscall at all.

There are two ways to make it consistent again: either list it with
the same syscall number on all architectures, or only list it on x86
but not in scripts/syscall.tbl and asm-generic/unistd.h.

Based on the most recent discussion, it seems like we won't need it
anywhere else, so just remove the inconsistent assignment and instead
move the x86 number to the next available one in the architecture
specific range, which is 335.

Fixes: 5c28424e9a34 ("syscalls: Fix to add sys_uretprobe to syscall.tbl")
Fixes: 190fec72df4a ("uprobe: Wire up uretprobe system call")
Fixes: 63ded110979b ("uprobe: Change uretprobe syscall scope and number")
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
arch/x86/entry/syscalls/syscall_64.tbl
include/uapi/asm-generic/unistd.h
scripts/syscall.tbl
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c

index 83073fa3c9891ebfc8d769a8e7a1ee13706a2496..7093ee21c0d1c0410dbf17a77cb70a6bc6736f04 100644 (file)
 332    common  statx                   sys_statx
 333    common  io_pgetevents           sys_io_pgetevents
 334    common  rseq                    sys_rseq
+335    common  uretprobe               sys_uretprobe
 # don't use numbers 387 through 423, add new calls after the last
 # 'common' entry
 424    common  pidfd_send_signal       sys_pidfd_send_signal
 460    common  lsm_set_self_attr       sys_lsm_set_self_attr
 461    common  lsm_list_modules        sys_lsm_list_modules
 462    common  mseal                   sys_mseal
-467    common  uretprobe               sys_uretprobe
 
 #
 # Due to a historical design error, certain syscalls are numbered differently
index 985a262d0f9eee32cfb0b55b8a331c379b015403..5bf6148cac2b93e36f362236545e2e6eb473d5ff 100644 (file)
@@ -841,11 +841,8 @@ __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
 #define __NR_mseal 462
 __SYSCALL(__NR_mseal, sys_mseal)
 
-#define __NR_uretprobe 463
-__SYSCALL(__NR_uretprobe, sys_uretprobe)
-
 #undef __NR_syscalls
-#define __NR_syscalls 464
+#define __NR_syscalls 463
 
 /*
  * 32 bit systems traditionally used different
index 591d85e8ca7e357ac80ab99eecfcba4cc2985423..797e20ea99a2d53cf01def5802cd648a9db2f0ba 100644 (file)
 460    common  lsm_set_self_attr               sys_lsm_set_self_attr
 461    common  lsm_list_modules                sys_lsm_list_modules
 462    common  mseal                           sys_mseal
-467    common  uretprobe                       sys_uretprobe
index bd8c75b620c29d20c358ecf5c57cd9f54d9aa9a4..5f78edca6540f4f8429f7af32184c53208653e47 100644 (file)
@@ -216,7 +216,7 @@ static void test_uretprobe_regs_change(void)
 }
 
 #ifndef __NR_uretprobe
-#define __NR_uretprobe 467
+#define __NR_uretprobe 335
 #endif
 
 __naked unsigned long uretprobe_syscall_call_1(void)
This page took 0.081979 seconds and 4 git commands to generate.