diff options
author | Arnaldo Carvalho de Melo | 2020-12-17 15:01:08 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo | 2020-12-18 17:32:28 -0300 |
commit | d6dbfceec5dd41becbe8c47c402240925d31036a (patch) | |
tree | 67de74567241131eb5bb51b39e4267b8bfa0b3b5 | |
parent | 4a443a51776ca9847942523cf987a330894d3a31 (diff) |
tools headers UAPI: Sync linux/prctl.h with the kernel sources
To pick a new prctl introduced in:
1446e1df9eb183fd ("kernel: Implement selective syscall userspace redirection")
That results in:
$ tools/perf/trace/beauty/prctl_option.sh > before
$ cp include/uapi/linux/prctl.h tools/include/uapi/linux/prctl.h
$ tools/perf/trace/beauty/prctl_option.sh > after
$ diff -u before after
--- before 2020-12-17 15:00:42.012537367 -0300
+++ after 2020-12-17 15:00:49.832699463 -0300
@@ -53,6 +53,7 @@
[56] = "GET_TAGGED_ADDR_CTRL",
[57] = "SET_IO_FLUSHER",
[58] = "GET_IO_FLUSHER",
+ [59] = "SET_SYSCALL_USER_DISPATCH",
};
static const char *prctl_set_mm_options[] = {
[1] = "START_CODE",
$
Now users can do:
# perf trace -e syscalls:sys_enter_prctl --filter "option==SET_SYSCALL_USER_DISPATCH"
^C#
# trace -v -e syscalls:sys_enter_prctl --filter "option==SET_SYSCALL_USER_DISPATCH"
New filter for syscalls:sys_enter_prctl: (option==0x3b) && (common_pid != 5519 && common_pid != 3404)
^C#
And also when prctl appears in a session, its options will be
translated to the string.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/include/uapi/linux/prctl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/prctl.h b/tools/include/uapi/linux/prctl.h index 7f0827705c9a..90deb41c8a34 100644 --- a/tools/include/uapi/linux/prctl.h +++ b/tools/include/uapi/linux/prctl.h @@ -247,4 +247,9 @@ struct prctl_mm_map { #define PR_SET_IO_FLUSHER 57 #define PR_GET_IO_FLUSHER 58 +/* Dispatch syscalls to a userspace handler */ +#define PR_SET_SYSCALL_USER_DISPATCH 59 +# define PR_SYS_DISPATCH_OFF 0 +# define PR_SYS_DISPATCH_ON 1 + #endif /* _LINUX_PRCTL_H */ |