Skip to content
Snippets Groups Projects
  1. Jun 05, 2019
    • Christian Brauner's avatar
      tests: fix pidfd-test compilation · 1fcd0eb3
      Christian Brauner authored
      
      Define __NR_pidfd_send_signal if it isn't to prevent a potential
      compilation error.
      
      To make pidfd-test compile on all arches, irrespective of whether
      or not syscall numbers are assigned, define the syscall number to -1.
      If it isn't defined this will cause the kernel to return -ENOSYS.
      
      Fixes: 575a0ae9 ("selftests: add tests for pidfd_send_signal()")
      Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
      1fcd0eb3
  2. May 30, 2019
  3. May 29, 2019
    • Stefano Brivio's avatar
      selftests: pmtu: Fix encapsulating device in pmtu_vti6_link_change_mtu · 73f51d15
      Stefano Brivio authored
      
      In the pmtu_vti6_link_change_mtu test, both local and remote addresses
      for the vti6 tunnel are assigned to the same address given to the dummy
      interface that we use as encapsulating device with a known MTU.
      
      This works as long as the dummy interface is actually selected, via
      rt6_lookup(), as encapsulating device. But if the remote address of the
      tunnel is a local address too, the loopback interface could also be
      selected, and there's nothing wrong with it.
      
      This is what some older -stable kernels do (3.18.z, at least), and
      nothing prevents us from subtly changing FIB implementation to revert
      back to that behaviour in the future.
      
      Define an IPv6 prefix instead, and use two separate addresses as local
      and remote for vti6, so that the encapsulating device can't be a
      loopback interface.
      
      Reported-by: default avatarXiumei Mu <xmu@redhat.com>
      Fixes: 1fad59ea ("selftests: pmtu: Add pmtu_vti6_link_change_mtu test")
      Signed-off-by: default avatarStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      73f51d15
  4. May 28, 2019
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync kvm.h headers with the kernel sources · a7350998
      Arnaldo Carvalho de Melo authored
        dd53f610 ("Merge tag 'kvmarm-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD")
        59c5c58c ("Merge tag 'kvm-ppc-next-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD")
        d7547c55 ("KVM: Introduce KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2")
        6520ca64 ("KVM: PPC: Book3S HV: XIVE: Add a mapping for the source ESB pages")
        39e9af3d ("KVM: PPC: Book3S HV: XIVE: Add a TIMA mapping")
        e4945b9d ("KVM: PPC: Book3S HV: XIVE: Add get/set accessors for the VP XIVE state")
        e6714bd1 ("KVM: PPC: Book3S HV: XIVE: Add a control to dirty the XIVE EQ pages")
        7b46b616 ("KVM: PPC: Book3S HV: XIVE: Add a control to sync the sources")
        5ca80647 ("KVM: PPC: Book3S HV: XIVE: Add a global reset control")
        13ce3297 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration")
        e8676ce5 ("KVM: PPC: Book3S HV: XIVE: Add a control to configure a source")
        4131f83c ("KVM: PPC: Book3S HV: XIVE: add a control to initialize a source")
        eacc56bb ("KVM: PPC: Book3S HV: XIVE: Introduce a new capability KVM_CAP_PPC_IRQ_XIVE")
        90c73795 ("KVM: PPC: Book3S HV: Add a new KVM device for the XIVE native exploitation mode")
        4f45b90e ("KVM: s390: add deflate conversion facilty to cpu model")
        a243c16d ("KVM: arm64: Add capability to advertise ptrauth for guest")
        a22fa321 ("KVM: arm64: Add userspace flag to enable pointer authentication")
        4bd774e5 ("KVM: arm64/sve: Simplify KVM_REG_ARM64_SVE_VLS array sizing")
        8ae6efdd ("KVM: arm64/sve: Clean up UAPI register ID definitions")
        173aec2d ("KVM: s390: add enhanced sort facilty to cpu model")
        555f3d03 ("KVM: arm64: Add a capability to advertise SVE support")
        9033bba4 ("KVM: arm64/sve: Add pseudo-register for the guest's vector lengths")
        7dd32a0d ("KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl")
        e1c9c983 ("KVM: arm64/sve: Add SVE support to register access ioctl interface")
        2b953ea3 ("KVM: Allow 2048-bit register access via ioctl interface")
      
      None entails changes in tooling, the closest to that were some new arch
      specific ioctls, that are still not handled by the tools/perf/trace/beauty/
      library, that needs to create per-arch tables to convert ioctl cmd->string (and
      back).
      
      From a quick look the arch specific kvm-stat.c files at:
      
        $ ls -1 tools/perf/arch/*/util/kvm-stat.c
        tools/perf/arch/powerpc/util/kvm-stat.c
        tools/perf/arch/s390/util/kvm-stat.c
        tools/perf/arch/x86/util/kvm-stat.c
        $
      
      Are not affected.
      
      This silences these perf building warnings:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
        Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
        diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
        diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
        diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Cédric Le Goater <clg@kaod.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Dave Martin <Dave.Martin@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Peter Xu <peterx@redhat.com>
      Link: https://lkml.kernel.org/n/tip-3msmqjenlmb7eygcdnmlqaq1@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a7350998
    • Thomas Richter's avatar
      perf record: Fix s390 missing module symbol and warning for non-root users · 6738028d
      Thomas Richter authored
      
      Command 'perf record' and 'perf report' on a system without kernel
      debuginfo packages uses /proc/kallsyms and /proc/modules to find
      addresses for kernel and module symbols. On x86 this works for root and
      non-root users.
      
      On s390, when invoked as non-root user, many of the following warnings
      are shown and module symbols are missing:
      
          proc/{kallsyms,modules} inconsistency while looking for
              "[sha1_s390]" module!
      
      Command 'perf record' creates a list of module start addresses by
      parsing the output of /proc/modules and creates a PERF_RECORD_MMAP
      record for the kernel and each module. The following function call
      sequence is executed:
      
        machine__create_kernel_maps
          machine__create_module
            modules__parse
              machine__create_module --> for each line in /proc/modules
                arch__fix_module_text_start
      
      Function arch__fix_module_text_start() is s390 specific. It opens
      file /sys/module/<name>/sections/.text to extract the module's .text
      section start address. On s390 the module loader prepends a header
      before the first section, whereas on x86 the module's text section
      address is identical the the module's load address.
      
      However module section files are root readable only. For non-root the
      read operation fails and machine__create_module() returns an error.
      Command perf record does not generate any PERF_RECORD_MMAP record
      for loaded modules. Later command perf report complains about missing
      module maps.
      
      To fix this function arch__fix_module_text_start() always returns
      success. For root users there is no change, for non-root users
      the module's load address is used as module's text start address
      (the prepended header then counts as part of the text section).
      
      This enable non-root users to use module symbols and avoid the
      warning when perf report is executed.
      
      Output before:
      
        [tmricht@m83lp54 perf]$ ./perf report -D | fgrep MMAP
        0 0x168 [0x50]: PERF_RECORD_MMAP ... x [kernel.kallsyms]_text
      
      Output after:
      
        [tmricht@m83lp54 perf]$ ./perf report -D | fgrep MMAP
        0 0x168 [0x50]: PERF_RECORD_MMAP ... x [kernel.kallsyms]_text
        0 0x1b8 [0x98]: PERF_RECORD_MMAP ... x /lib/modules/.../autofs4.ko.xz
        0 0x250 [0xa8]: PERF_RECORD_MMAP ... x /lib/modules/.../sha_common.ko.xz
        0 0x2f8 [0x98]: PERF_RECORD_MMAP ... x /lib/modules/.../des_generic.ko.xz
      
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Link: http://lkml.kernel.org/r/20190522144601.50763-4-tmricht@linux.ibm.com
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6738028d
    • Jiri Olsa's avatar
      perf machine: Read also the end of the kernel · ed9adb20
      Jiri Olsa authored
      
      We mark the end of kernel based on the first module, but that could
      cover some bpf program maps. Reading _etext symbol if it's present to
      get precise kernel map end.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Acked-by: default avatarSong Liu <songliubraving@fb.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stanislav Fomichev <sdf@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Link: http://lkml.kernel.org/r/20190508132010.14512-6-jolsa@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ed9adb20
    • Arnaldo Carvalho de Melo's avatar
      perf test vmlinux-kallsyms: Ignore aliases to _etext when searching on kallsyms · 93f678b9
      Arnaldo Carvalho de Melo authored
      
      No need to search for aliases for the symbol that marks the end of the
      kernel text segment, the following patch will make such symbols not to
      be found when searching in the kallsyms maps causing this test to fail.
      
      So as a prep patch to avoid breaking bisection, ignore such symbols.
      
      Tested-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Cc: Stanislav Fomichev <sdf@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Link: https://lkml.kernel.org/n/tip-qfwuih8cvmk9doh7k5k244eq@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      93f678b9
    • Namhyung Kim's avatar
      perf session: Add missing swap ops for namespace events · acd244b8
      Namhyung Kim authored
      
      In case it's recorded in a different arch.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Hari Bathini <hbathini@linux.vnet.ibm.com> <hbathini@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Krister Johansen <kjlx@templeofstupid.com>
      Fixes: f3b3614a ("perf tools: Add PERF_RECORD_NAMESPACES to include namespaces related info")
      Link: http://lkml.kernel.org/r/20190522053250.207156-3-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      acd244b8
    • Namhyung Kim's avatar
      perf namespace: Protect reading thread's namespace · 6584140b
      Namhyung Kim authored
      
      It seems that the current code lacks holding the namespace lock in
      thread__namespaces().  Otherwise it can see inconsistent results.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Krister Johansen <kjlx@templeofstupid.com>
      Link: http://lkml.kernel.org/r/20190522053250.207156-2-namhyung@kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6584140b
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync drm/drm.h with the kernel · 9903c64f
      Arnaldo Carvalho de Melo authored
      
      To pick up the changes in these csets:
      
        060cebb2 ("drm: introduce a capability flag for syncobj timeline support")
        50d1ebef ("drm/syncobj: add timeline signal ioctl for syncobj v5")
        ea569910 ("drm/syncobj: add transition iotcls between binary and timeline v2")
        27b575a9 ("drm/syncobj: add timeline payload query ioctl v6")
        01d6c357 ("drm/syncobj: add support for timeline point wait v8")
        783195ec ("drm/syncobj: disable the timeline UAPI for now v2")
        48197bc5 ("drm: add syncobj timeline support v9")
      
      Which automagically results in the following new ioctls being recognized
      by the 'perf trace' ioctl cmd arg beautifier:
      
        $ tools/perf/trace/beauty/drm_ioctl.sh > /tmp/before
        $ cp include/uapi/drm/drm.h tools/include/uapi/drm/drm.h
        $ tools/perf/trace/beauty/drm_ioctl.sh > /tmp/after
        $ diff -u /tmp/before /tmp/after
        --- /tmp/before	2019-05-22 10:25:31.443151182 -0300
        +++ /tmp/after	2019-05-22 10:25:46.449354819 -0300
        @@ -103,6 +103,10 @@
         	[0xC7] = "MODE_LIST_LESSEES",
         	[0xC8] = "MODE_GET_LEASE",
         	[0xC9] = "MODE_REVOKE_LEASE",
        +	[0xCA] = "SYNCOBJ_TIMELINE_WAIT",
        +	[0xCB] = "SYNCOBJ_QUERY",
        +	[0xCC] = "SYNCOBJ_TRANSFER",
        +	[0xCD] = "SYNCOBJ_TIMELINE_SIGNAL",
         	[DRM_COMMAND_BASE + 0x00] = "I915_INIT",
         	[DRM_COMMAND_BASE + 0x01] = "I915_FLUSH",
         	[DRM_COMMAND_BASE + 0x02] = "I915_FLIP",
          $
      
      I.e. the strace like raw_tracepoint:sys_enter handler in 'perf trace'
      will get the cmd integer value and map it to the string.
      
      At some point it should be possible to translate from string to integer
      and use to filter using expressions such as:
      
         # perf trace -e ioctl/cmd==DRM_IOCTL_SYNCOBJ*/
      
      Or some more suitable syntax to express that only these ioctls when
      acting on DRM fds should be shown.
      
      Acked-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Chunming Zhou <david1.zhou@amd.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-jrc9ogw33w4zgqc3pu7o1l3g@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9903c64f
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync drm/i915_drm.h with the kernel · e6aff9f8
      Arnaldo Carvalho de Melo authored
      To pick up the changes from:
      
        d1172ab3 ("drm/i915: Introduce struct class_instance for engines across the uAPI")
        96fd2c66 ("drm/i915: Drop new chunks of context creation ABI (for now)")
        ea593dbb ("drm/i915: Allow contexts to share a single timeline across all engines")
        b9171541 ("drm/i915: Extend CONTEXT_CREATE to set parameters upon construction")
        e0695db7 ("drm/i915: Create/destroy VM (ppGTT) for use with contexts")
        9d1305ef ("drm/i915: Introduce the i915_user_extension_method")
        c8b50242 ("drm/i915: Remove last traces of exec-id (GEM_BUSY)")
        d90c06d5 ("drm/i915: Fix I915_EXEC_RING_MASK")
        e8861964 ("drm/i915: Use HW semaphores for inter-engine synchronisation on gen8+")
        be03564b ("drm/i915: Include reminders about leaving no holes in uAPI enums")
        ba4fda62 ("drm/i915: Optionally disable automatic recovery after a GPU reset")
      
      We still don't take into account the _IOC_SIZE() to differentiate ioctl cmds,
      so more work is needed to support the extension mechanism that is being used
      here so that we can differentiate DRM_IOCTL_I915_GEM_CONTEXT_CREATE from the
      newly introduced DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT cmd.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h'
        diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Link: https://lkml.kernel.org/n/tip-csn0vanmc7pevyka5qcg0xyw@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e6aff9f8
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/fs.h with the kernel · b5b999dc
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        c553ea4f ("fs/sync.c: sync_file_range(2) may use WB_SYNC_ALL writeback")
      
      That should be used to beautify the 'sync_file_range' syscall 'flags'
      arg.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/fs.h' differs from latest version at 'include/uapi/linux/fs.h'
        diff -u tools/include/uapi/linux/fs.h include/uapi/linux/fs.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Amir Goldstein <amir73il@gmail.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-at3uoqcvmqdkwaysmvbj1wpv@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b5b999dc
    • Arnaldo Carvalho de Melo's avatar
      tools headers UAPI: Sync linux/sched.h with the kernel · c27de2b8
      Arnaldo Carvalho de Melo authored
      To pick up the change in:
      
        b3e58382 ("clone: add CLONE_PIDFD")
      
      This requires changes in the 'perf trace' beautification routines for
      the 'clone' syscall args, which is done in a followup patch.
      
      This silences the following perf build warning:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h'
        diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Christian Brauner <christian@brauner.io>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-lenja6gmy26dkt0ybk747qgq@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c27de2b8
    • Arnaldo Carvalho de Melo's avatar
      tools arch x86: Sync asm/cpufeatures.h with the with the kernel · b979540a
      Arnaldo Carvalho de Melo authored
      To pick up the changes in:
      
        ed5194c2 ("x86/speculation/mds: Add basic bug infrastructure for MDS")
        e261f209 ("x86/speculation/mds: Add BUG_MSBDS_ONLY")
      
      That don't affect anything in tools/.
      
      This silences this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
        diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/n/tip-jp1afecx3ql1jkuirpgkqfad@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b979540a
    • Arnaldo Carvalho de Melo's avatar
      tools include UAPI: Update copy of files related to new fspick, fsmount,... · fba29f18
      Arnaldo Carvalho de Melo authored
      tools include UAPI: Update copy of files related to new fspick, fsmount, fsconfig, fsopen, move_mount and open_tree syscalls
      
      Copy the headers changed by these csets:
      
        d8076bdb ("uapi: Wire up the mount API syscalls on non-x86 arches [ver #2]")
        9c8ad7a2 ("uapi, x86: Fix the syscall numbering of the mount API syscalls [ver #2]")
        cf3cba4a ("vfs: syscall: Add fspick() to select a superblock for reconfiguration")
        93766fbd ("vfs: syscall: Add fsmount() to create a mount for a superblock")
        ecdab150 ("vfs: syscall: Add fsconfig() for configuring and managing a context")
        24dcb3d9 ("vfs: syscall: Add fsopen() to prepare for superblock creation")
        2db154b3 ("vfs: syscall: Add move_mount(2) to move mounts around")
        a07b2000 ("vfs: syscall: Add open_tree(2) to reference or clone a mount")
      
      We need to create tables for all the flags argument in the new syscalls,
      in followup patches.
      
      This silences these perf build warnings:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/mount.h' differs from latest version at 'include/uapi/linux/mount.h'
        diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h
        Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
        diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
        Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
        diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-knpqr1u2ffvz6641056z2mwu@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fba29f18
    • Vitaly Chikunov's avatar
      perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel · f95d050c
      Vitaly Chikunov authored
      
      When a host system has kernel headers that are newer than a compiling
      kernel, mksyscalltbl fails with errors such as:
      
        <stdin>: In function 'main':
        <stdin>:271:44: error: '__NR_kexec_file_load' undeclared (first use in this function)
        <stdin>:271:44: note: each undeclared identifier is reported only once for each function it appears in
        <stdin>:272:46: error: '__NR_pidfd_send_signal' undeclared (first use in this function)
        <stdin>:273:43: error: '__NR_io_uring_setup' undeclared (first use in this function)
        <stdin>:274:43: error: '__NR_io_uring_enter' undeclared (first use in this function)
        <stdin>:275:46: error: '__NR_io_uring_register' undeclared (first use in this function)
        tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: line 48: /tmp/create-table-xvUQdD: Permission denied
      
      mksyscalltbl is compiled with default host includes, but run with
      compiling kernel tree includes, causing some syscall numbers to being
      undeclared.
      
      Committer testing:
      
      Before this patch, in my cross build environment, no build problems, but
      these new syscalls were not in the syscalls.c generated from the
      unistd.h file, which is a bug, this patch fixes it:
      
      perfbuilder@6e20056ed532:/git/perf$ tail /tmp/build/perf/arch/arm64/include/generated/asm/syscalls.c
      	[292] = "io_pgetevents",
      	[293] = "rseq",
      	[294] = "kexec_file_load",
      	[424] = "pidfd_send_signal",
      	[425] = "io_uring_setup",
      	[426] = "io_uring_enter",
      	[427] = "io_uring_register",
      	[428] = "syscalls",
      };
      perfbuilder@6e20056ed532:/git/perf$ strings /tmp/build/perf/perf | egrep '^(io_uring_|pidfd_|kexec_file)'
      kexec_file_load
      pidfd_send_signal
      io_uring_setup
      io_uring_enter
      io_uring_register
      perfbuilder@6e20056ed532:/git/perf$
      $
      
      Well, there is that last "syscalls" thing, but that looks like some
      other bug.
      
      Signed-off-by: default avatarVitaly Chikunov <vt@altlinux.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: default avatarMichael Petlan <mpetlan@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/20190521030203.1447-1-vt@altlinux.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f95d050c
    • Shawn Landden's avatar
      perf data: Fix 'strncat may truncate' build failure with recent gcc · 97acec7d
      Shawn Landden authored
      
      This strncat() is safe because the buffer was allocated with zalloc(),
      however gcc doesn't know that. Since the string always has 4 non-null
      bytes, just use memcpy() here.
      
          CC       /home/shawn/linux/tools/perf/util/data-convert-bt.o
        In file included from /usr/include/string.h:494,
                         from /home/shawn/linux/tools/lib/traceevent/event-parse.h:27,
                         from util/data-convert-bt.c:22:
        In function ‘strncat’,
            inlined from ‘string_set_value’ at util/data-convert-bt.c:274:4:
        /usr/include/powerpc64le-linux-gnu/bits/string_fortified.h:136:10: error: ‘__builtin_strncat’ output may be truncated copying 4 bytes from a string of length 4 [-Werror=stringop-truncation]
          136 |   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
              |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Signed-off-by: default avatarShawn Landden <shawn@git.icu>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      LPU-Reference: 20190518183238.10954-1-shawn@git.icu
      Link: https://lkml.kernel.org/n/tip-289f1jice17ta7tr3tstm9jm@git.kernel.org
      
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      97acec7d
  5. May 27, 2019
  6. May 24, 2019
Loading