Skip to content

Commit 190fec7

Browse files
olsajirimhiramat
authored andcommitted
uprobe: Wire up uretprobe system call
Wiring up uretprobe system call, which comes in following changes. We need to do the wiring before, because the uretprobe implementation needs the syscall number. Note at the moment uretprobe syscall is supported only for native 64-bit process. Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Oleg Nesterov <[email protected]> Reviewed-by: Masami Hiramatsu (Google) <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent 1713b63 commit 190fec7

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

arch/x86/entry/syscalls/syscall_64.tbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@
384384
460 common lsm_set_self_attr sys_lsm_set_self_attr
385385
461 common lsm_list_modules sys_lsm_list_modules
386386
462 common mseal sys_mseal
387+
463 64 uretprobe sys_uretprobe
387388

388389
#
389390
# Due to a historical design error, certain syscalls are numbered differently

include/linux/syscalls.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,8 @@ asmlinkage long sys_lsm_list_modules(u64 *ids, u32 *size, u32 flags);
973973
/* x86 */
974974
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on);
975975

976+
asmlinkage long sys_uretprobe(void);
977+
976978
/* pciconfig: alpha, arm, arm64, ia64, sparc */
977979
asmlinkage long sys_pciconfig_read(unsigned long bus, unsigned long dfn,
978980
unsigned long off, unsigned long len,

include/uapi/asm-generic/unistd.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,11 @@ __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
845845
#define __NR_mseal 462
846846
__SYSCALL(__NR_mseal, sys_mseal)
847847

848+
#define __NR_uretprobe 463
849+
__SYSCALL(__NR_uretprobe, sys_uretprobe)
850+
848851
#undef __NR_syscalls
849-
#define __NR_syscalls 463
852+
#define __NR_syscalls 464
850853

851854
/*
852855
* 32 bit systems traditionally used different

kernel/sys_ni.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,5 @@ COND_SYSCALL(setuid16);
392392

393393
/* restartable sequence */
394394
COND_SYSCALL(rseq);
395+
396+
COND_SYSCALL(uretprobe);

0 commit comments

Comments
 (0)