20 Feb, 2019

1 commit

  • [ Upstream commit d0df00e30e4bf9bc27ddbd092ad683ff6121b360 ]

    The BPF library is not built on 64-bit RISC-V, as the BPF feature is
    not detected. Looking more in details, feature/test-bpf.c fails to build
    with the following error:

    | In file included from /tmp/linux-4.19.12/tools/include/uapi/asm/bitsperlong.h:17,
    | from /tmp/linux-4.19.12/tools/include/uapi/asm-generic/unistd.h:2,
    | from /usr/include/riscv64-linux-gnu/asm/unistd.h:1,
    | from test-bpf.c:2:
    | /tmp/linux-4.19.12/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h
    | #error Inconsistent word size. Check asm/bitsperlong.h
    | ^~~~~

    The UAPI from the tools directory is missing RISC-V support, therefore
    bitsperlong.h from asm-generic is used, defaulting to 32 bits.

    Fix that by adding tools/arch/riscv/include/uapi/asm/bitsperlong.h as
    a copy of arch/riscv/include/uapi/asm/bitsperlong.h and by updating
    tools/include/uapi/asm/bitsperlong.h.

    Signed-off-by: Aurelien Jarno
    Signed-off-by: Palmer Dabbelt
    Signed-off-by: Sasha Levin

    Aurelien Jarno
     

08 Oct, 2018

1 commit

  • To get the changes in:

    d1766202779e ("x86/kvm/lapic: always disable MMIO interface in x2APIC mode")

    That at this time will not generate changes in tools such as 'perf trace',
    that still needs more work in tools/perf/examples/bpf/augmented_syscalls.c
    to need such id -> string tables.

    This silences the following perf build warning:

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

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Vitaly Kuznetsov
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-yadntj2ok6zpzjwi656onuh0@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

12 Sep, 2018

1 commit

  • To get the changes in:

    a449938297e5 ("KVM: s390: Add huge page enablement control")
    8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE")
    be26b3a73413 ("arm64: KVM: export the capability to set guest SError syndrome")
    b7b27facc7b5 ("arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS")
    b0960b9569db ("KVM: arm: Add 32bit get/set events support")
    a3da7b4a3be5 ("KVM: s390: add etoken support for guests")

    This makes 'perf trace' automagically get aware of these new ioctls:

    $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h
    $ tools/perf/trace/beauty/kvm_ioctl.sh > /tmp/after
    $ diff -u /tmp/before /tmp/after
    --- /tmp/before 2018-09-11 11:18:29.173207586 -0300
    +++ /tmp/after 2018-09-11 11:18:38.488200446 -0300
    @@ -84,6 +84,8 @@
    [0xbb] = "MEMORY_ENCRYPT_REG_REGION",
    [0xbc] = "MEMORY_ENCRYPT_UNREG_REGION",
    [0xbd] = "HYPERV_EVENTFD",
    + [0xbe] = "GET_NESTED_STATE",
    + [0xbf] = "SET_NESTED_STATE",
    [0xe0] = "CREATE_DEVICE",
    [0xe1] = "SET_DEVICE_ATTR",
    [0xe2] = "G

    And cures the following warning during perf's build:

    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

    Cc: Adrian Hunter
    Cc: Christian Borntraeger
    Cc: Cornelia Huck
    Cc: David Ahern
    Cc: David Hildenbrand
    Cc: Dongjiu Geng
    Cc: Eduardo Habkost
    Cc: James Morse
    Cc: Janosch Frank
    Cc: Jim Mattson
    Cc: Jiri Olsa
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-2vvwh2o19orn56di0ksrtgzr@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

27 Aug, 2018

1 commit

  • Pull perf updates from Thomas Gleixner:
    "Kernel:
    - Improve kallsyms coverage
    - Add x86 entry trampolines to kcore
    - Fix ARM SPE handling
    - Correct PPC event post processing

    Tools:
    - Make the build system more robust
    - Small fixes and enhancements all over the place
    - Update kernel ABI header copies
    - Preparatory work for converting libtraceevnt to a shared library
    - License cleanups"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits)
    tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'
    tools arch x86: Update tools's copy of cpufeatures.h
    perf python: Fix pyrf_evlist__read_on_cpu() interface
    perf mmap: Store real cpu number in 'struct perf_mmap'
    perf tools: Remove ext from struct kmod_path
    perf tools: Add gzip_is_compressed function
    perf tools: Add lzma_is_compressed function
    perf tools: Add is_compressed callback to compressions array
    perf tools: Move the temp file processing into decompress_kmodule
    perf tools: Use compression id in decompress_kmodule()
    perf tools: Store compression id into struct dso
    perf tools: Add compression id into 'struct kmod_path'
    perf tools: Make is_supported_compression() static
    perf tools: Make decompress_to_file() function static
    perf tools: Get rid of dso__needs_decompress() call in __open_dso()
    perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble()
    perf tools: Get rid of dso__needs_decompress() call in read_object_code()
    tools lib traceevent: Change to SPDX License format
    perf llvm: Allow passing options to llc in addition to clang
    perf parser: Improve error message for PMU address filters
    ...

    Linus Torvalds
     

20 Aug, 2018

2 commits

  • To bring in the change made in this cset:

    Fixes: a7bea8308933 ("x86/asm/64: Use 32-bit XOR to zero registers")

    CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
    LD /tmp/build/perf/bench/perf-in.o
    LD /tmp/build/perf/perf-in.o
    LINK /tmp/build/perf/perf

    Silencing this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
    diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jan Beulich
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-sad22dudoz71qr3tsnlqtkia@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To get the changes in the following csets:

    301d328a6f8b ("x86/cpufeatures: Add EPT_AD feature bit")
    706d51681d63 ("x86/speculation: Support Enhanced IBRS on future CPUs")

    No tools were affected, copy it to silence this perf tool 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
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Feiner
    Cc: Sai Praneeth
    Cc: Thomas Gleixner
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-bvs8wgd5wp4lz9f0xf1iug5r@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

15 Aug, 2018

1 commit

  • Merge L1 Terminal Fault fixes from Thomas Gleixner:
    "L1TF, aka L1 Terminal Fault, is yet another speculative hardware
    engineering trainwreck. It's a hardware vulnerability which allows
    unprivileged speculative access to data which is available in the
    Level 1 Data Cache when the page table entry controlling the virtual
    address, which is used for the access, has the Present bit cleared or
    other reserved bits set.

    If an instruction accesses a virtual address for which the relevant
    page table entry (PTE) has the Present bit cleared or other reserved
    bits set, then speculative execution ignores the invalid PTE and loads
    the referenced data if it is present in the Level 1 Data Cache, as if
    the page referenced by the address bits in the PTE was still present
    and accessible.

    While this is a purely speculative mechanism and the instruction will
    raise a page fault when it is retired eventually, the pure act of
    loading the data and making it available to other speculative
    instructions opens up the opportunity for side channel attacks to
    unprivileged malicious code, similar to the Meltdown attack.

    While Meltdown breaks the user space to kernel space protection, L1TF
    allows to attack any physical memory address in the system and the
    attack works across all protection domains. It allows an attack of SGX
    and also works from inside virtual machines because the speculation
    bypasses the extended page table (EPT) protection mechanism.

    The assoicated CVEs are: CVE-2018-3615, CVE-2018-3620, CVE-2018-3646

    The mitigations provided by this pull request include:

    - Host side protection by inverting the upper address bits of a non
    present page table entry so the entry points to uncacheable memory.

    - Hypervisor protection by flushing L1 Data Cache on VMENTER.

    - SMT (HyperThreading) control knobs, which allow to 'turn off' SMT
    by offlining the sibling CPU threads. The knobs are available on
    the kernel command line and at runtime via sysfs

    - Control knobs for the hypervisor mitigation, related to L1D flush
    and SMT control. The knobs are available on the kernel command line
    and at runtime via sysfs

    - Extensive documentation about L1TF including various degrees of
    mitigations.

    Thanks to all people who have contributed to this in various ways -
    patches, review, testing, backporting - and the fruitful, sometimes
    heated, but at the end constructive discussions.

    There is work in progress to provide other forms of mitigations, which
    might be less horrible performance wise for a particular kind of
    workloads, but this is not yet ready for consumption due to their
    complexity and limitations"

    * 'l1tf-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (75 commits)
    x86/microcode: Allow late microcode loading with SMT disabled
    tools headers: Synchronise x86 cpufeatures.h for L1TF additions
    x86/mm/kmmio: Make the tracer robust against L1TF
    x86/mm/pat: Make set_memory_np() L1TF safe
    x86/speculation/l1tf: Make pmd/pud_mknotpresent() invert
    x86/speculation/l1tf: Invert all not present mappings
    cpu/hotplug: Fix SMT supported evaluation
    KVM: VMX: Tell the nested hypervisor to skip L1D flush on vmentry
    x86/speculation: Use ARCH_CAPABILITIES to skip L1D flush on vmentry
    x86/speculation: Simplify sysfs report of VMX L1TF vulnerability
    Documentation/l1tf: Remove Yonah processors from not vulnerable list
    x86/KVM/VMX: Don't set l1tf_flush_l1d from vmx_handle_external_intr()
    x86/irq: Let interrupt handlers set kvm_cpu_l1tf_flush_l1d
    x86: Don't include linux/irq.h from asm/hardirq.h
    x86/KVM/VMX: Introduce per-host-cpu analogue of l1tf_flush_l1d
    x86/irq: Demote irq_cpustat_t::__softirq_pending to u16
    x86/KVM/VMX: Move the l1tf_flush_l1d test to vmx_l1d_flush()
    x86/KVM/VMX: Replace 'vmx_l1d_flush_always' with 'vmx_l1d_flush_cond'
    x86/KVM/VMX: Don't set l1tf_flush_l1d to true from vmx_l1d_flush()
    cpu/hotplug: detect SMT disabled by BIOS
    ...

    Linus Torvalds
     

14 Aug, 2018

1 commit

  • Pull parisc updates from Helge Deller:

    - parisc now uses the generic dma_noncoherent_ops implementation
    (Christoph Hellwig)

    - further memory barrier and spinlock improvements (John David Anglin)

    - prepare removal of current_text_addr() functions (Nick Desaulniers)

    - improve kernel stack unwinding on parisc (me)

    - drop ENOTSUP which was defined on parisc only (me)

    * 'parisc-4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix and improve kernel stack unwinding
    parisc: Remove unnecessary barriers from spinlock.h
    parisc: Remove ordered stores from syscall.S
    parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions
    parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature
    parisc: Drop architecture-specific ENOTSUP define
    parisc: use generic dma_noncoherent_ops
    parisc: always use flush_kernel_dcache_range for DMA cache maintainance
    parisc: merge pcx_dma_ops and pcxl_dma_ops

    Linus Torvalds
     

13 Aug, 2018

1 commit

  • parisc is the only Linux architecture which has defined a value for ENOTSUP.
    All other architectures #define ENOTSUP as EOPNOTSUPP in their libc headers.

    Having an own value for ENOTSUP which is different than EOPNOTSUPP often gives
    problems with userspace programs which expect both to be the same. One such
    example is a build error in the libuv package, as can be seen in
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900237.

    Since we dropped HP-UX support, there is no real benefit in keeping an own
    value for ENOTSUP. This patch drops the parisc value for ENOTSUP from the
    kernel sources. glibc needs no patch, it reuses the exported headers.

    Signed-off-by: Helge Deller

    Helge Deller
     

09 Aug, 2018

1 commit


02 Aug, 2018

1 commit


30 Jul, 2018

2 commits

  • To cope with the changes in:

    12c89130a56a ("x86/asm/memcpy_mcsafe: Add write-protection-fault handling")
    60622d68227d ("x86/asm/memcpy_mcsafe: Return bytes remaining")
    bd131544aa7e ("x86/asm/memcpy_mcsafe: Add labels for __memcpy_mcsafe() write fault handling")
    da7bc9c57eb0 ("x86/asm/memcpy_mcsafe: Remove loop unrolling")

    This needed introducing a file with a copy of the mcsafe_handle_tail()
    function, that is used in the new memcpy_64.S file, as well as a dummy
    mcsafe_test.h header.

    Testing it:

    $ nm ~/bin/perf | grep mcsafe
    0000000000484130 T mcsafe_handle_tail
    0000000000484300 T __memcpy_mcsafe
    $
    $ perf bench mem memcpy
    # Running 'mem/memcpy' benchmark:
    # function 'default' (Default memcpy() provided by glibc)
    # Copying 1MB bytes ...

    44.389205 GB/sec
    # function 'x86-64-unrolled' (unrolled memcpy() in arch/x86/lib/memcpy_64.S)
    # Copying 1MB bytes ...

    22.710756 GB/sec
    # function 'x86-64-movsq' (movsq-based memcpy() in arch/x86/lib/memcpy_64.S)
    # Copying 1MB bytes ...

    42.459239 GB/sec
    # function 'x86-64-movsb' (movsb-based memcpy() in arch/x86/lib/memcpy_64.S)
    # Copying 1MB bytes ...

    42.459239 GB/sec
    $

    This silences this perf tools build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'

    Cc: Adrian Hunter
    Cc: Dan Williams
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Mika Penttilä
    Cc: Namhyung Kim
    Cc: Tony Luck
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-igdpciheradk3gb3qqal52d0@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The new 'io_pgetevents' syscall was wired up in PowerPC in the following
    cset:

    b2f82565f2ca ("powerpc: Wire up io_pgetevents")

    Update tools/arch/powerpc/ copy of the asm/unistd.h file so that 'perf
    trace' on PowerPC gets it in its syscall table.

    This elliminated the following perf build warning:

    Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/unistd.h' differs from latest version at 'arch/powerpc/include/uapi/asm/unistd.h'

    Cc: Alexander Shishkin
    Cc: Breno Leitao
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Ravi Bangoria
    Cc: Thomas Richter
    Link: https://lkml.kernel.org/n/tip-9uvu7tz4ud3bxxfyxwryuz47@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

25 Jul, 2018

1 commit

  • Will be used for generating the syscall id/string translation table.

    The arm64 unistd.h file simply #includes the asm-generic/unistd.h, so,
    since we will want to know whether either change, we grab both:

    arch/arm64/include/uapi/asm/unistd.h

    and

    include/uapi/asm-generic/unistd.h

    Signed-off-by: Kim Phillips
    Cc: Alexander Shishkin
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Ravi Bangoria
    Cc: Thomas Richter
    Link: http://lkml.kernel.org/r/20180706163434.1b64ffbcc0284fb79982f53b@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Kim Phillips
     

26 Jun, 2018

1 commit

  • Sync KVM ABI additions and x86 CPU features additions - neither of which
    has any impact on the tooling build.

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: Jiri Olsa
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

25 Jun, 2018

1 commit

  • This updates the tools/perf/ copy of the powerpc file used to generate
    the syscall table file used to make 'perf trace' become aware of the new
    'rseq' syscall, no matter in which system it gets built, i.e. older
    systems where the syscalls are not available in the running kernel (via
    tracefs) or in the system headers will still be aware of these
    syscalls/.

    From this commit:

    bb862b021d75 ("powerpc: Wire up restartable sequences system call")

    Silencing this tools/perf build warning:

    Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/unistd.h' differs from latest version at 'arch/powerpc/include/uapi/asm/unistd.h'

    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Boqun Feng
    Cc: David Ahern
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Mathieu Desnoyers
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Ravi Bangoria
    Cc: Thomas Gleixner
    Cc: Thomas Richter
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-adtgz6u3apd76tghiu9w0k19@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

02 Jun, 2018

1 commit

  • To pick up changes found in these csets:

    11fb0683493b x86/speculation: Add virtualized speculative store bypass disable support
    d1035d971829 x86/cpufeatures: Add FEATURE_ZEN
    52817587e706 x86/cpufeatures: Disentangle SSBD enumeration
    7eb8956a7fec x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS
    e7c587da1252 x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP
    9f65fb29374e x86/bugs: Rename _RDS to _SSBD
    764f3c21588a x86/bugs/AMD: Add support to disable RDS on Fam[15,16,17]h if requested
    24f7fc83b920 x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation
    0cc5fa00b0a8 x86/cpufeatures: Add X86_FEATURE_RDS
    c456442cd3a5 x86/bugs: Expose /sys/../spec_store_bypass

    The usage of this file in tools doesn't use the newly added X86_FEATURE_
    defines:

    CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
    CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o
    LD /tmp/build/perf/bench/perf-in.o
    LD /tmp/build/perf/perf-in.o

    Silencing 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'

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Konrad Rzeszutek Wilk
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Cc: Tom Lendacky
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-mrwyauyov8c7s048abg26khg@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

08 May, 2018

2 commits

  • To sync with the changes made in 85bd0ba1ff98 ("arm/arm64: KVM: Add PSCI
    version selection API"), that do not cause any changes in the tools,
    just to silence the build warning:

    Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/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'

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-7u37pv09xtvet1ll27840w73@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The 912413057395 ("x86/cpufeatures: Enumerate cldemote instruction")
    doesn't requires changes in the tools, just copy it to silence this
    warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Fenghua Yu
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-1vo20y5z2drlujfpltjudwk8@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

17 Apr, 2018

1 commit

  • Sync the following tooling headers with the latest kernel version:

    tools/arch/arm/include/uapi/asm/kvm.h
    - New ABI: KVM_REG_ARM_*

    tools/arch/x86/include/asm/required-features.h
    - Removal of NEED_LA57 dependency

    tools/arch/x86/include/uapi/asm/kvm.h
    - New KVM ABI: KVM_SYNC_X86_*

    tools/include/uapi/asm-generic/mman-common.h
    - New ABI: MAP_FIXED_NOREPLACE flag

    tools/include/uapi/linux/bpf.h
    - New ABI: BPF_F_SEQ_NUMBER functions

    tools/include/uapi/linux/if_link.h
    - New ABI: IFLA tun and rmnet support

    tools/include/uapi/linux/kvm.h
    - New ABI: hyperv eventfd and CONN_ID_MASK support plus header cleanups

    tools/include/uapi/sound/asound.h
    - New ABI: SNDRV_PCM_FORMAT_FIRST PCM format specifier

    tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
    - The x86 system call table description changed due to the ptregs changes and the renames, in:

    d5a00528b58c: syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()
    5ac9efa3c50d: syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention
    ebeb8c82ffaf: syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32

    Also fix the x86 syscall table warning:

    -Warning: Kernel ABI header at 'tools/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
    +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'

    None of these changes impact existing tooling code, so we only have to copy the kernel version.

    Signed-off-by: Ingo Molnar
    Cc: Adrian Hunter
    Cc: Alexander Potapenko
    Cc: Alexander Shishkin
    Cc: Alexei Starovoitov
    Cc: Alexey Budankov
    Cc: Andi Kleen
    Cc: Andrey Ryabinin
    Cc: Andy Lutomirski
    Cc: Arnd Bergmann
    Cc: Brian Robbins
    Cc: Clark Williams
    Cc: Daniel Borkmann
    Cc: David Ahern
    Cc: Dmitriy Vyukov
    Cc: Heiko Carstens
    Cc: Hendrik Brueckner
    Cc: Jesper Dangaard Brouer
    Cc: Jin Yao
    Cc: Jiri Olsa
    Cc: Josh Poimboeuf
    Cc: Kan Liang
    Cc: Kim Phillips
    Cc: Linus Torvalds
    Cc: Li Zhijian
    Cc: Mark Rutland
    Cc: Martin Liška
    Cc: Martin Schwidefsky
    Cc: Matthias Kaehlcke
    Cc: Miguel Bernal Marin
    Cc: Namhyung Kim
    Cc: Naveen N. Rao
    Cc: Peter Zijlstra
    Cc: Ravi Bangoria
    Cc: Sandipan Das
    Cc: Stephane Eranian
    Cc: Stephen Rothwell
    Cc: Takuya Yamamoto
    Cc: Thomas Gleixner
    Cc: Thomas Richter
    Cc: Wang Nan
    Cc: William Cohen
    Cc: Yonghong Song
    Link: http://lkml.kernel.org/r/20180416064024.ofjtrz5yuu3ykhvl@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

04 Apr, 2018

1 commit

  • …nux/kernel/git/acme/linux into perf/core

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo)

    e.g: See what 'openat' syscalls are failing:

    # perf trace --failure -e openat
    762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory
    <SNIP N /dev/videoN open attempts... sigh, where is that improvised camera lid?!? >
    790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory
    ^C#

    - Show information about the event (freq, nr_samples, total period/nr_events) in
    the annotate --tui and --stdio2 'perf annotate' output, similar to the
    first line in the 'perf report --tui', but just for the samples for a
    the annotated symbol (Arnaldo Carvalho de Melo)

    - Introduce 'perf version --build-options' to show what features were
    linked, aliased as well as a shorter 'perf -vv' (Jin Yao)

    - Add a "dso_size" sort order (Kim Phillips)

    - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du)

    - Synchronize x86's cpufeatures.h, no effect on toolss (Arnaldo Carvalho de Melo)

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

03 Apr, 2018

1 commit

  • Pul removal of obsolete architecture ports from Arnd Bergmann:
    "This removes the entire architecture code for blackfin, cris, frv,
    m32r, metag, mn10300, score, and tile, including the associated device
    drivers.

    I have been working with the (former) maintainers for each one to
    ensure that my interpretation was right and the code is definitely
    unused in mainline kernels. Many had fond memories of working on the
    respective ports to start with and getting them included in upstream,
    but also saw no point in keeping the port alive without any users.

    In the end, it seems that while the eight architectures are extremely
    different, they all suffered the same fate: There was one company in
    charge of an SoC line, a CPU microarchitecture and a software
    ecosystem, which was more costly than licensing newer off-the-shelf
    CPU cores from a third party (typically ARM, MIPS, or RISC-V). It
    seems that all the SoC product lines are still around, but have not
    used the custom CPU architectures for several years at this point. In
    contrast, CPU instruction sets that remain popular and have actively
    maintained kernel ports tend to all be used across multiple licensees.

    [ See the new nds32 port merged in the previous commit for the next
    generation of "one company in charge of an SoC line, a CPU
    microarchitecture and a software ecosystem" - Linus ]

    The removal came out of a discussion that is now documented at
    https://lwn.net/Articles/748074/. Unlike the original plans, I'm not
    marking any ports as deprecated but remove them all at once after I
    made sure that they are all unused. Some architectures (notably tile,
    mn10300, and blackfin) are still being shipped in products with old
    kernels, but those products will never be updated to newer kernel
    releases.

    After this series, we still have a few architectures without mainline
    gcc support:

    - unicore32 and hexagon both have very outdated gcc releases, but the
    maintainers promised to work on providing something newer. At least
    in case of hexagon, this will only be llvm, not gcc.

    - openrisc, risc-v and nds32 are still in the process of finishing
    their support or getting it added to mainline gcc in the first
    place. They all have patched gcc-7.3 ports that work to some
    degree, but complete upstream support won't happen before gcc-8.1.
    Csky posted their first kernel patch set last week, their situation
    will be similar

    [ Palmer Dabbelt points out that RISC-V support is in mainline gcc
    since gcc-7, although gcc-7.3.0 is the recommended minimum - Linus ]"

    This really says it all:

    2498 files changed, 95 insertions(+), 467668 deletions(-)

    * tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits)
    MAINTAINERS: UNICORE32: Change email account
    staging: iio: remove iio-trig-bfin-timer driver
    tty: hvc: remove tile driver
    tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
    serial: remove tile uart driver
    serial: remove m32r_sio driver
    serial: remove blackfin drivers
    serial: remove cris/etrax uart drivers
    usb: Remove Blackfin references in USB support
    usb: isp1362: remove blackfin arch glue
    usb: musb: remove blackfin port
    usb: host: remove tilegx platform glue
    pwm: remove pwm-bfin driver
    i2c: remove bfin-twi driver
    spi: remove blackfin related host drivers
    watchdog: remove bfin_wdt driver
    can: remove bfin_can driver
    mmc: remove bfin_sdh driver
    input: misc: remove blackfin rotary driver
    input: keyboard: remove bf54x driver
    ...

    Linus Torvalds
     

02 Apr, 2018

1 commit

  • Due to these commits:

    1da961d72ab0 ("x86/cpufeatures: Add Intel Total Memory Encryption cpufeature")
    7958b2246fad ("x86/cpufeatures: Add Intel PCONFIG cpufeature")

    To silence 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'

    Nothing in those csets requires changes in tools/perf/, so just
    sync it to silence the build.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Kirill A. Shutemov
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-m2yl8wj0uxs8pncq2ncfcx46@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

16 Mar, 2018

1 commit

  • The Tile architecture port was added by Chris Metcalf in 2010, and
    maintained until early 2018 when he orphaned it due to his departure
    from Mellanox, and nobody else stepped up to maintain it. The product
    line is still around in the form of the BlueField SoC, but no longer
    uses the Tile architecture.

    There are also still products for sale with Tile-GX SoCs, notably the
    Mikrotik CCR router family. The products all use old (linux-3.3) kernels
    with lots of patches and won't be upgraded by their manufacturers. There
    have been efforts to port both OpenWRT and Debian to these, but both
    projects have stalled and are very unlikely to be continued in the future.

    Given that we are reasonably sure that nobody is still using the port
    with an upstream kernel any more, it seems better to remove it now while
    the port is in a good shape than to let it bitrot for a few years first.

    Cc: Chris Metcalf
    Cc: John Paul Adrian Glaubitz
    Link: http://www.mellanox.com/page/npu_multicore_overview
    Link: https://jenkins.debian.net/view/rebootstrap/job/rebootstrap_tilegx_gcc7/
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

10 Mar, 2018

4 commits

  • The Sunplus S+core architecture was added in 2009 by Chen Liqin,
    who has been co-maintaining it with Lennox Wu
    since then, but after they both left the company, nobody else has shown
    any interest in the port and it has seen almost no activity other than
    tree-wide changes.

    The gcc port was removed a few years ago due to the inactivity.

    While the sunplus website still advertises products with unspecified
    RISC cores that might be S+core based, it's very clear that the Linux
    port is completely abandoned at this point.

    This removes all files related to the architecture.

    Acked-by: Lennox Wu
    Link: http://www.sunplus.com/
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • The Mitsubishi/Renesas m32r architecture has been around for many years,
    but the Linux port has been obsolete for a very long time as well, with
    the last significant updates done for linux-2.6.14.

    While some m32r microcontrollers are still being marketed by Renesas,
    those are apparently no longer possible to support, mainly due to the
    lack of an external memory interface.

    Hirokazu Takata was the maintainer until the architecture got marked
    Orphaned in 2014.

    Link: http://www.linux-m32r.org/
    Link: https://www.renesas.com/en-eu/products/microcontrollers-microprocessors/m32r.html
    Cc: Hirokazu Takata
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • The Fujitsu FRV kernel port has been around for a long time, but has not
    seen regular updates in several years and instead was marked 'Orphaned'
    in 2016 by long-time maintainer David Howells.

    The SoC product line apparently is apparently still around in the form
    of the Socionext Milbeaut image processor, but this one no longer uses
    the FRV CPU cores.

    This removes all FRV specific files from the kernel.

    Link: http://www.socionext.com/en/products/assp/milbeaut/
    Cc: David Howells
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • Remove the MN10300 arch as the hardware is defunct.

    Suggested-by: Arnd Bergmann
    Signed-off-by: David Howells
    cc: Masahiro Yamada
    cc: linux-am33-list@redhat.com
    Signed-off-by: Arnd Bergmann

    David Howells
     

07 Mar, 2018

1 commit


05 Mar, 2018

1 commit

  • The changes in dd84441a7971 ("x86/speculation: Use IBRS if available
    before calling into firmware") don't need any kind of special treatment
    in the current tools/perf/ codebase, so just update the copy to get rid
    of the perf build warning:

    BUILD: Doing 'make -j4' parallel build
    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: David Woodhouse
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-mzmuxocrf96v922xkerey3ns@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

17 Feb, 2018

1 commit

  • Will be used for generating the syscall id/string translation table.

    Committer notes:

    Update it already to catch with these csets applied since Ravi first
    submitted this patch:

    3350eb2ea127 powerpc: sys_pkey_mprotect() system call
    9499ec1b5e82 powerpc: sys_pkey_alloc() and sys_pkey_free() system calls

    So now 'perf trace' on ppc now knows about the pkey_ syscals.

    Signed-off-by: Ravi Bangoria
    Cc: Alexander Shishkin
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Thomas Richter
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20180129083417.31240-2-ravi.bangoria@linux.vnet.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ravi Bangoria
     

15 Feb, 2018

2 commits

  • This reverts commit f120c7b187e6c418238710b48723ce141f467543 which is no
    longer required with the introduction of a syscall.tbl on s390.

    Signed-off-by: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Michael Petlan
    Cc: Thomas Richter
    Cc: linux-s390@vger.kernel.org
    LPU-Reference: 1518090470-2899-2-git-send-email-brueckner@linux.vnet.ibm.com
    Link: https://lkml.kernel.org/n/tip-q1lg0nvhha1tk39ri9aqalcb@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Hendrik Brueckner
     
  • Sync the following tooling headers with the latest kernel version:

    tools/arch/powerpc/include/uapi/asm/kvm.h
    tools/arch/x86/include/asm/cpufeatures.h
    tools/include/uapi/drm/i915_drm.h
    tools/include/uapi/linux/if_link.h
    tools/include/uapi/linux/kvm.h

    All the changes are new ABI additions which don't impact their use
    in existing tooling.

    Cc: Arnaldo Carvalho de Melo
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Namhyung Kim
    Cc: Jiri Olsa
    Cc: Stephen Rothwell
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

03 Feb, 2018

3 commits

  • Sync tools/arch/x86/include/asm/{cpu,disabled-,required-}features.h with
    the changes in:

    2961298efe1e ("x86/cpufeatures: Clean up Spectre v2 related CPUID flags")
    20ffa1caecca ("x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) support")
    5d10cbc91d9e ("x86/cpufeatures: Add AMD feature bits for Speculation Control")
    fc67dd70adb7 ("x86/cpufeatures: Add Intel feature bits for Speculation Control")
    95ca0ee86360 ("x86/cpufeatures: Add CPUID_7_EDX CPUID leaf")
    a511e7935378 ("x86/intel_rdt: Enumerate L2 Code and Data Prioritization (CDP) feature")
    4fdec2034b75 ("x86/cpufeature: Move processor tracing out of scattered features")
    c995efd5a740 ("x86/retpoline: Fill RSB on context switch for affected CPUs")
    76b043848fd2 ("x86/retpoline: Add initial retpoline support")
    99c6fa2511d8 ("x86/cpufeatures: Add X86_BUG_SPECTRE_V[12]")
    de791821c295 ("x86/pti: Rename BUG_CPU_INSECURE to BUG_CPU_MELTDOWN")
    6cff64b86aaa ("x86/mm: Use INVPCID for __native_flush_tlb_single()")

    None will entail changes in the tools/perf/, synchronizing to elliminate
    these perf build warnings:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/required-features.h' differs from latest version at 'arch/x86/include/asm/required-features.h'
    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'

    Cc: Adrian Hunter
    Cc: Dave Hansen
    Cc: David Ahern
    Cc: David Woodhouse
    Cc: Fenghua Yu
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Thomas Gleixner
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-dbdjack1k92xar5ccuq4el1h@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The changes in the 3214d01f139b ("KVM: PPC: Book3S: Provide information
    about hardware/firmware CVE workarounds") commit right now will not
    produce any change in the tools, but that is because we still need to
    improve tools/perf/trace/beauty/kvm_ioctl.sh to build per arch string
    tables, so that we avoid assigning multiple times to the same command
    string entry, i.e. multiple defines, for different arches, have the same
    value, causing this:

    In file included from trace/beauty/ioctl.c:82:0:
    /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c: In function ‘ioctl__scnprintf_kvm_cmd’:
    /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c:76:11: error: initialized field overwritten [-Werror=override-init]
    /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c:88:11: note: (near initialization for ‘kvm_ioctl_cmds[165]’)
    /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c:90:11: error: initialized field overwritten [-Werror=override-init]
    [0xa6] = "PPC_GET_SMMU_INFO",
    ^~~~~~~~~~~~~~~~~~~

    So the onlye effect of updating the tools/ copy of ppc's kvm.h header
    is to silence these perf build warnings:

    Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at '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'

    At some point we should do what we did for the errno tables and create
    per-arch string translation tables for the KVM ioctl commands for the
    architectures supporting KVM, such as s/390, PowerPC, x86_64 and ARM.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Ravi Bangoria
    Cc: Thomas Richter
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-jmcf78tqiudgn46zqfw2tgt2@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The 35b3fde6203b ("KVM: s390: wire up bpb feature") was noticed by the
    perf build process:

    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'

    The changes in this cset don't cause or require changes in tools/perf/,
    so just update the copy to silence the build warning.

    Cc: Adrian Hunter
    Cc: Christian Borntraeger
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Radim Krčmář
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-kif2fdkcaewj8iqw6lwyil8s@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

23 Jan, 2018

1 commit

  • For each arch in tools/perf/arch, grab a copy of errno.h.

    This is a pre-req to generate an architecture specific mapping of errno
    numbers to their names. This errno mapping can be used by perf trace to
    support cross-architecture trace reports and to get rid of the
    audit-libs dependency.

    Signed-off-by: Hendrik Brueckner
    Reviewed-by: Thomas Richter
    Cc: Jiri Olsa
    Cc: Michael Petlan
    Cc: linux-s390@vger.kernel.org
    LPU-Reference: 1516352177-11106-2-git-send-email-brueckner@linux.vnet.ibm.com
    Link: https://lkml.kernel.org/n/tip-73azjhrzpjsskwi129020i2u@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Hendrik Brueckner
     

10 Jan, 2018

1 commit

  • Two kernel headers got modified recently due to meltdown/spectre, in:

    a89f040fa34e ("x86/cpufeatures: Add X86_BUG_CPU_INSECURE")

    which are used by tooling as well:

    arch/x86/include/asm/cpufeatures.h
    arch/x86/include/asm/disabled-features.h

    None of those changes have an effect on tooling, so do a plain copy.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-qqzcs8ri3vks8cypg0puk0ae@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

06 Jan, 2018

1 commit


01 Jan, 2018

1 commit

  • Pull perf fixes from Thomas Gleixner:

    - plug a memory leak in the intel pmu init code

    - clang fixes

    - tooling fix to avoid including kernel headers

    - a fix for jvmti to generate correct debug information for inlined
    code

    - replace backtick with a regular shell function

    - fix the build in hardened environments

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel: Plug memory leak in intel_pmu_init()
    x86/asm: Allow again using asm.h when building for the 'bpf' clang target
    tools arch s390: Do not include header files from the kernel sources
    perf jvmti: Generate correct debug information for inlined code
    perf tools: Fix up build in hardened environments
    perf tools: Use shell function for perl cflags retrieval

    Linus Torvalds