]> git.baikalelectronics.ru Git - kernel.git/commit
tools headers UAPI: Sync x86 arch prctl headers with the kernel sources
authorArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 13 Nov 2021 13:43:52 +0000 (10:43 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Jan 2022 17:41:29 +0000 (14:41 -0300)
commitc0a021065df7726321f672ee9afeca4937af240b
tree092e6dd740f495901b68bf497ad739baab299e8a
parent950efc8300307d017aeedd5cacbeaa6d22e1d27b
tools headers UAPI: Sync x86 arch prctl headers with the kernel sources

To pick the changes in this cset:

  fd76107e1d3d1049 ("x86/fpu: Extend fpu_xstate_prctl() with guest permissions")

This picks these new prctls:

  $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/before
  $ cp arch/x86/include/uapi/asm/prctl.h tools/arch/x86/include/uapi/asm/prctl.h
  $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/after
  $ diff -u /tmp/before /tmp/after
  --- /tmp/before 2022-01-19 14:40:05.049394977 -0300
  +++ /tmp/after 2022-01-19 14:40:35.628154565 -0300
  @@ -9,6 +9,8 @@
    [0x1021 - 0x1001]= "GET_XCOMP_SUPP",
    [0x1022 - 0x1001]= "GET_XCOMP_PERM",
    [0x1023 - 0x1001]= "REQ_XCOMP_PERM",
  + [0x1024 - 0x1001]= "GET_XCOMP_GUEST_PERM",
  + [0x1025 - 0x1001]= "REQ_XCOMP_GUEST_PERM",
   };

   #define x86_arch_prctl_codes_2_offset 0x2001
  $

With this 'perf trace' can translate those numbers into strings and use
the strings in filter expressions:

  # perf trace -e prctl
       0.000 ( 0.011 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9c014b7df5)     = 0
       0.032 ( 0.002 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9bb6b51580)     = 0
       5.452 ( 0.003 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfeb70) = 0
       5.468 ( 0.002 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfea70) = 0
      24.494 ( 0.009 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f562a32ae28) = 0
      24.540 ( 0.002 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f563c6d4b30) = 0
     670.281 ( 0.008 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30805c8) = 0
     670.293 ( 0.002 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30800f0) = 0
  ^C#

This addresses these perf build warnings:

  Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/prctl.h' differs from latest version at 'arch/x86/include/uapi/asm/prctl.h'
  diff -u tools/arch/x86/include/uapi/asm/prctl.h arch/x86/include/uapi/asm/prctl.h

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/arch/x86/include/uapi/asm/prctl.h