]> git.baikalelectronics.ru Git - kernel.git/commit
tools headers UAPI: Sync linux/prctl.h with the kernel sources
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 Dec 2020 18:01:08 +0000 (15:01 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 18 Dec 2020 20:32:28 +0000 (17:32 -0300)
commitd6dbfceec5dd41becbe8c47c402240925d31036a
tree67de74567241131eb5bb51b39e4267b8bfa0b3b5
parent4a443a51776ca9847942523cf987a330894d3a31
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>
tools/include/uapi/linux/prctl.h