13 Aug, 2019

1 commit

  • Add utilities to help checking capabilities of the running procss. Make
    perf link with libcap, if it is available. If no libcap-dev[el], assume
    no capabilities.

    Committer testing:

    $ make O=/tmp/build/perf -C tools/perf install-bin
    make: Entering directory '/home/acme/git/perf/tools/perf'
    BUILD: Doing 'make -j8' parallel build

    Auto-detecting system features:

    ... libbfd: [ on ]
    ... libcap: [ OFF ]
    ... libelf: [ on ]

    Makefile.config:833: No libcap found, disables capability support, please install libcap-devel/libcap-dev

    $ grep libcap /tmp/build/perf/FEATURE-DUMP
    feature-libcap=0
    $ cat /tmp/build/perf/feature/test-libcap.make.output
    test-libcap.c:2:10: fatal error: sys/capability.h: No such file or directory
    2 | #include
    | ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    $

    Now install libcap-devel and try again:

    $ make O=/tmp/build/perf -C tools/perf install-bin
    make: Entering directory '/home/acme/git/perf/tools/perf'
    BUILD: Doing 'make -j8' parallel build
    Warning: Kernel ABI header at 'tools/include/linux/bits.h' differs from latest version at 'include/linux/bits.h'
    diff -u tools/include/linux/bits.h include/linux/bits.h
    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

    Auto-detecting system features:

    ... libbfd: [ on ]
    ... libcap: [ on ]
    ... libelf: [ on ]
    >
    CC /tmp/build/perf/jvmti/libjvmti.o
    >
    $ grep libcap /tmp/build/perf/FEATURE-DUMP
    feature-libcap=1
    $ cat /tmp/build/perf/feature/test-libcap.make.output
    $ ldd /tmp/build/perf/feature/test-libcap.make.bin
    ldd: /tmp/build/perf/feature/test-libcap.make.bin: No such file or directory
    $ ldd /tmp/build/perf/feature/test-libcap.bin
    linux-vdso.so.1 (0x00007ffc35bfe000)
    libcap.so.2 => /lib64/libcap.so.2 (0x00007ff9c62ff000)
    libc.so.6 => /lib64/libc.so.6 (0x00007ff9c6139000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff9c6326000)
    $

    Signed-off-by: Igor Lubashev
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Alexey Budankov
    Cc: James Morris
    Cc: Mathieu Poirier
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Suzuki Poulouse
    [ split from a larger patch ]
    Link: http://lkml.kernel.org/r/8a1e76cf5c7c9796d0d4d240fbaa85305298aafa.1565188228.git.ilubashe@akamai.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Igor Lubashev
     

19 Jun, 2019

2 commits

  • We were renanimg 'main' to 'main_zstd' but then using 'main_libzstd();'
    in the main() for test-all.c, causing this:

    $ cat /tmp/build/perf/feature/test-all.make.output
    test-all.c: In function ‘main’:
    test-all.c:236:2: error: implicit declaration of function ‘main_test_libzstd’; did you mean ‘main_test_zstd’? [-Werror=implicit-function-declaration]
    main_test_libzstd();
    ^~~~~~~~~~~~~~~~~
    main_test_zstd
    cc1: all warnings being treated as errors
    $

    I.e. what was supposed to be the fast path feature test was _always_
    failing, duh, fix it.

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Alexey Budankov
    Fixes: 3b1c5d965971 ("tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines")
    Link: https://lkml.kernel.org/n/tip-ma4abk0utroiw4mwpmvnjlru@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • A few odd old distros (rhel5, 6, yeah, lots of those out in use, in many
    cases we want to use upstream perf on it) have the slang header files in
    /usr/include/slang/, so add a test that will be performed only when
    test-all.c (the one with the most common sane settings) fails, either
    because we're in one of these odd distros with slang/slang.h or because
    something else failed (say libelf is not present).

    So for the common case nothing changes, no additional test is performed.

    Next step is to check in perf the result of these tests.

    Cc: Adrian Hunter
    Cc: Florian Fainelli
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Fixes: 1955c8cf5e26 ("perf tools: Don't hardcode host include path for libslang")
    Link: https://lkml.kernel.org/n/tip-2sy7hbwkx68jr6n97qxgg0c6@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

18 Jun, 2019

3 commits

  • Hardcoding /usr/include/slang is fundamentally incompatible with cross
    compilation and will lead to the inability for a cross-compiled
    environment to properly detect whether slang is available or not.

    If /usr/include/slang is necessary that is a distribution specific
    knowledge that could be solved with either a standard pkg-config .pc
    file (which slang has) or simply overriding CFLAGS accordingly, but the
    default perf Makefile should be clean of all of that.

    Signed-off-by: Florian Fainelli
    Cc: Alexander Shishkin
    Cc: Alexey Budankov
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: Jakub Kicinski
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Quentin Monnet
    Cc: Stanislav Fomichev
    Fixes: ef7b93a11904 ("perf report: Librarize the annotation code and use it in the newt browser")
    Link: http://lkml.kernel.org/r/20190614183949.5588-1-f.fainelli@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Florian Fainelli
     
  • Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-3h6fa866w6ao0wsbyqz9nrm8@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Laura reported that the perf build failed in fedora when we got a glibc
    that provides gettid(), which I reproduced using fedora rawhide with the
    glibc-devel-2.29.9000-26.fc31.x86_64 package.

    Add a feature check to avoid providing a gettid() helper in such
    systems.

    On a fedora rawhide system with this patch applied we now get:

    [root@7a5f55352234 perf]# grep gettid /tmp/build/perf/FEATURE-DUMP
    feature-gettid=1
    [root@7a5f55352234 perf]# cat /tmp/build/perf/feature/test-gettid.make.output
    [root@7a5f55352234 perf]# ldd /tmp/build/perf/feature/test-gettid.bin
    linux-vdso.so.1 (0x00007ffc6b1f6000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f04e0a74000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f04e0c47000)
    [root@7a5f55352234 perf]# nm /tmp/build/perf/feature/test-gettid.bin | grep -w gettid
    U gettid@@GLIBC_2.30
    [root@7a5f55352234 perf]#

    While on a fedora:29 system:

    [acme@quaco perf]$ grep gettid /tmp/build/perf/FEATURE-DUMP
    feature-gettid=0
    [acme@quaco perf]$ cat /tmp/build/perf/feature/test-gettid.make.output
    test-gettid.c: In function ‘main’:
    test-gettid.c:8:9: error: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Werror=implicit-function-declaration]
    return gettid();
    ^~~~~~
    getgid
    cc1: all warnings being treated as errors
    [acme@quaco perf]$

    Reported-by: Laura Abbott
    Tested-by: Laura Abbott
    Acked-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Florian Weimer
    Cc: Namhyung Kim
    Cc: Stephane Eranian
    Link: https://lkml.kernel.org/n/tip-yfy3ch53agmklwu9o7rlgf9c@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

21 May, 2019

1 commit


02 Apr, 2019

1 commit

  • Implement libzstd feature check, NO_LIBZSTD and LIBZSTD_DIR defines to
    override Zstd library sources or disable the feature from the command
    line:

    $ make -C tools/perf LIBZSTD_DIR=/path/to/zstd/sources/ clean all
    $ make -C tools/perf NO_LIBZSTD=1 clean all

    Auto detection feature status is reported just before compilation
    starts. If your system has some version of the zstd library
    preinstalled then the build system finds and uses it during the build.

    If you still prefer to compile with some other version of zstd library
    you have capability to refer the compilation to that version using
    LIBZSTD_DIR define.

    Signed-off-by: Alexey Budankov
    Reviewed-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/9b4cd8b0-10a3-1f1e-8d6b-5922a7ca216b@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Alexey Budankov
     

29 Mar, 2019

1 commit

  • The following error was thrown when compiling `tools/perf` using OpenCSD
    v0.11.1. This patch fixes said error.

    CC util/intel-pt-decoder/intel-pt-log.o
    CC util/cs-etm-decoder/cs-etm-decoder.o
    util/cs-etm-decoder/cs-etm-decoder.c: In function
    ‘cs_etm_decoder__buffer_range’:
    util/cs-etm-decoder/cs-etm-decoder.c:370:2: error: enumeration value
    ‘OCSD_INSTR_WFI_WFE’ not handled in switch [-Werror=switch-enum]
    switch (elem->last_i_type) {
    ^~~~~~
    CC util/intel-pt-decoder/intel-pt-decoder.o
    cc1: all warnings being treated as errors

    Because `OCSD_INSTR_WFI_WFE` case was added only in v0.11.0, the minimum
    required OpenCSD library version for this patch is no longer v0.10.0.

    Signed-off-by: Solomon Tan
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Mathieu Poirier
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Robert Walker
    Cc: Suzuki K Poulouse
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/20190322052255.GA4809@w-OptiPlex-7050
    Signed-off-by: Arnaldo Carvalho de Melo

    Solomon Tan
     

21 Mar, 2019

1 commit

  • Commit 003ca0fd2286 ("Refactor disassembler selection") in the binutils
    repo, which changed the disassembler() function signature, so we must
    use the feature test introduced in fb982666e380 ("tools/bpftool: fix
    bpftool build with bintutils >= 2.9") to deal with that.

    Committer testing:

    After adding the missing function call to test-all.c, and:

    FEATURE_CHECK_LDFLAGS-disassembler-four-args = -bfd -lopcodes

    And the fallbacks for cases where we need -liberty and sometimes -lz to
    tools/perf/Makefile.config, we get:

    $ make -C tools/perf O=/tmp/build/perf install-bin
    make: Entering directory '/home/acme/git/perf/tools/perf'
    BUILD: Doing 'make -j8' parallel build

    Auto-detecting system features:
    ... dwarf: [ on ]
    ... dwarf_getlocations: [ on ]
    ... glibc: [ on ]
    ... gtk2: [ on ]
    ... libaudit: [ on ]
    ... libbfd: [ on ]
    ... libelf: [ on ]
    ... libnuma: [ on ]
    ... numa_num_possible_cpus: [ on ]
    ... libperl: [ on ]
    ... libpython: [ on ]
    ... libslang: [ on ]
    ... libcrypto: [ on ]
    ... libunwind: [ on ]
    ... libdw-dwarf-unwind: [ on ]
    ... zlib: [ on ]
    ... lzma: [ on ]
    ... get_cpuid: [ on ]
    ... bpf: [ on ]
    ... libaio: [ on ]
    ... disassembler-four-args: [ on ]
    CC /tmp/build/perf/jvmti/libjvmti.o
    CC /tmp/build/perf/builtin-bench.o

    $
    $

    The feature detection test-all.bin gets successfully built and linked:

    $ ls -la /tmp/build/perf/feature/test-all.bin
    -rwxrwxr-x. 1 acme acme 2680352 Mar 19 11:07 /tmp/build/perf/feature/test-all.bin
    $ nm /tmp/build/perf/feature/test-all.bin | grep -w disassembler
    0000000000061f90 T disassembler
    $

    Time to move on to the patches that make use of this disassembler()
    routine in binutils's libopcodes.

    Signed-off-by: Song Liu
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Cc: Jakub Kicinski
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Roman Gushchin
    Cc: Stanislav Fomichev
    Link: http://lkml.kernel.org/r/20190312053051.2690567-13-songliubraving@fb.com
    [ split from a larger patch, added missing FEATURE_CHECK_LDFLAGS-disassembler-four-args ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Song Liu
     

15 Feb, 2019

5 commits

  • Since this feature test is included in test-all.c, the feature detection
    fast path compile/link phase, it can't leave any defines behind, as it
    can affect the tests included after it, so remove it.

    Reported-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Alexei Starovoitov
    Cc: Andrii Nakryiko
    Cc: Daniel Borkmann
    Cc: Jakub Kicinski
    Cc: Jin Yao
    Cc: Namhyung Kim
    Cc: Song Liu
    Cc: Yonghong Song
    Link: https://lkml.kernel.org/n/tip-lg3kpd9tzypc797vb1f42u6k@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • When a test is in the FEATURE_TESTS_BASIC list in tools/build/Makefile.feature
    must be added to tools/build/feature/test-all.c, because the successfull
    compilation and linking of that test-all.bin file means that all the
    features listed in FEATURE_TESTS_BASIC are present in the system, so we
    don't have to go on feature by feature test building them.

    Since reallocarray() is expected to be present in modern systems, it has
    a place in FEATURE_TESTS_BASIC, so that we speed up the build process
    building just that file.

    For older systems, such as ubuntu:16.04 (build failure reported by Jin
    Yao) debian:8, and for the current flagship RHEL distro, RHEL7, the
    build will fail as test-all.bin (without test-reallocarray.c included)
    passes but reallocarray() isn't present, making the build fail with:

    CC /tmp/build/perf/libbpf.o
    MKDIR /tmp/build/perf/fs/
    CC /tmp/build/perf/fs/tracing_path.o
    LD /tmp/build/perf/fd/libapi-in.o
    CC /tmp/build/perf/bpf.o
    libbpf.c: In function 'bpf_object__add_program':
    libbpf.c:367:10: error: implicit declaration of function 'reallocarray' [-Werror=implicit-function-declaration]
    progs = reallocarray(progs, nr_progs + 1, sizeof(progs[0]));
    ^
    libbpf.c:367:2: error: nested extern declaration of 'reallocarray' [-Werror=nested-externs]
    progs = reallocarray(progs, nr_progs + 1, sizeof(progs[0]));
    ^
    libbpf.c:367:8: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
    progs = reallocarray(progs, nr_progs + 1, sizeof(progs[0]));
    ^
    libbpf.c: In function 'bpf_object__elf_collect':
    libbpf.c:887:10: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
    reloc = reallocarray(reloc, nr_reloc,
    ^
    libbpf.c: In function 'bpf_program__reloc_text':
    libbpf.c:1394:12: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
    new_insn = reallocarray(prog->insns, new_cnt, sizeof(*insn));
    ^
    CC /tmp/build/perf/nlattr.o

    Even with:

    $ grep reallocarray /tmp/build/perf/FEATURE-DUMP
    feature-reallocarray=1
    $

    Which ubuntu:16.04.5 LTS doesn't have:

    perfbuilder@38a153a1bba8:/$ head -2 /etc/os-release
    NAME="Ubuntu"
    VERSION="16.04.5 LTS (Xenial Xerus)"
    perfbuilder@38a153a1bba8:/$ find /usr/include/ -name "*.h" | xargs grep -w reallocarray
    perfbuilder@38a153a1bba8:/$

    Fix it by including it to test-all.c, which ends up forcing the
    individual tests to be triggered and for the build process to notice
    that indeed reallocarray() is not there:

    perfbuilder@38a153a1bba8:/$ cat /tmp/build/perf/feature/test-all.make.output
    In file included from test-all.c:178:0:
    test-reallocarray.c: In function 'main_test_reallocarray':
    test-reallocarray.c:7:11: error: implicit declaration of function 'reallocarray' [-Werror=implicit-function-declaration]
    return !!reallocarray(NULL, 1, 1);
    ^
    cc1: all warnings being treated as errors
    perfbuilder@38a153a1bba8:/$

    That is the only test that is failing on Ubuntu 16.03.5 LTS, so all
    tests are forced:

    perfbuilder@38a153a1bba8:/tmp/build/perf/feature$ ls -lSr *.make.output

    -rw-r--r--. 1 perfbuilder perfbuilder 0 Feb 14 15:00 test-dwarf.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 0 Feb 14 14:16 test-cplus-demangle.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 0 Feb 14 15:00 test-bpf.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 0 Feb 14 15:00 test-backtrace.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 104 Feb 14 15:00 test-bionic.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 107 Feb 14 15:00 test-libunwind-x86.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 115 Feb 14 15:00 test-libunwind-aarch64.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 122 Feb 14 15:00 test-libbabeltrace.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 254 Feb 14 15:00 test-reallocarray.make.output
    -rw-r--r--. 1 perfbuilder perfbuilder 312 Feb 14 15:00 test-all.make.output
    perfbuilder@38a153a1bba8:/tmp/build/perf/feature$

    And that reallocarray() one shows:

    perfbuilder@38a153a1bba8:/tmp/build/perf/feature$ cat test-reallocarray.make.output
    test-reallocarray.c: In function 'main':
    test-reallocarray.c:7:11: error: implicit declaration of function 'reallocarray' [-Werror=implicit-function-declaration]
    return !!reallocarray(NULL, 1, 1);
    ^
    cc1: all warnings being treated as errors
    perfbuilder@38a153a1bba8:/tmp/build/perf/feature$

    Which now generates the expected result:

    perfbuilder@38a153a1bba8:~$ grep reallocarray /tmp/build/perf/FEATURE-DUMP
    feature-reallocarray=0
    perfbuilder@38a153a1bba8:~$

    The fallback mechanism kicks in and libbpf and perf are again buildable
    in systems without reallocarray():

    $ cat tools/include/tools/libc_compat.h
    // SPDX-License-Identifier: (LGPL-2.0+ OR BSD-2-Clause)
    /* Copyright (C) 2018 Netronome Systems, Inc. */

    #ifndef __TOOLS_LIBC_COMPAT_H
    #define __TOOLS_LIBC_COMPAT_H

    #include
    #include

    #ifdef COMPAT_NEED_REALLOCARRAY
    static inline void *reallocarray(void *ptr, size_t nmemb, size_t size)
    {
    size_t bytes;

    if (unlikely(check_mul_overflow(nmemb, size, &bytes)))
    return NULL;
    return realloc(ptr, bytes);
    }
    #endif
    #endif
    $

    Reported-by: Jin Yao
    Acked-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Alexei Starovoitov
    Cc: Andrii Nakryiko
    Cc: Daniel Borkmann
    Cc: Jakub Kicinski
    Cc: Namhyung Kim
    Cc: Song Liu
    Cc: Yonghong Song
    Fixes: 531b014e7a2f ("tools: bpf: make use of reallocarray")
    Link: https://lkml.kernel.org/n/tip-aonqku8axii8rxki5g11w40b@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • As it is not normally available on x86_64 not being tested on test-all.c
    but being in FEATURE_TESTS_BASIC ends up implying that those features
    are present, which leads to trying to link with those libraries and a
    build failure now that test-all.c is finally again building
    successfully:

    /usr/bin/ld: cannot find -lunwind-x86
    /usr/bin/ld: cannot find -lunwind-aarch64
    collect2: error: ld returned 1 exit status
    make[3]: *** [Makefile:199: /tmp/build/perf/plugin_jbd2.so] Error 1
    make[3]: *** Waiting for unfinished jobs....
    /usr/bin/ld: cannot find -lunwind-x86
    /usr/bin/ld: cannot find -lunwind-aarch64

    So remove those features from there and explicitely test them.

    And then move this patch to just before the last one that allows this to
    be exposed, so that we keep the tree bisectable.

    With all this in place we get, at this point:

    $ ldd /tmp/build/perf/feature/test-libunwind.bin
    linux-vdso.so.1 (0x00007fffa09c6000)
    libunwind-x86_64.so.8 => /lib64/libunwind-x86_64.so.8 (0x00007fbcf4451000)
    libunwind.so.8 => /lib64/libunwind.so.8 (0x00007fbcf4435000)
    liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fbcf440c000)
    libelf.so.1 => /lib64/libelf.so.1 (0x00007fbcf43f2000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fbcf422c000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fbcf4211000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fbcf4491000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbcf41ed000)
    libz.so.1 => /lib64/libz.so.1 (0x00007fbcf41d3000)
    $ cat /tmp/build/perf/feature/test-libunwind-x86.make.output
    test-libunwind-x86.c:2:10: fatal error: libunwind-x86.h: No such file or directory
    #include
    ^~~~~~~~~~~~~~~~~
    compilation terminated.
    $ cat /tmp/build/perf/feature/test-libunwind-aarch64.make.output
    test-libunwind-aarch64.c:2:10: fatal error: libunwind-aarch64.h: No such file or directory
    #include
    ^~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    $
    $ ldd ~/bin/perf | grep unwind
    libunwind-x86_64.so.8 => /lib64/libunwind-x86_64.so.8 (0x00007f5ceb24b000)
    libunwind.so.8 => /lib64/libunwind.so.8 (0x00007f5ceb22f000)
    $

    Cc: Adrian Hunter
    Cc: He Kuang
    Cc: Jean Pihet
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Cc: Will Deacon
    Link: https://lkml.kernel.org/n/tip-vs6kwqsvwk7oxhs6z9mq87pp@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Since it is not yet that generally available, avoid testing for the
    presence of libcoresight in the fast path test-all.bin feature test.

    # dnf search opencsd
    No matches found.
    # dnf search OpenCSD
    No matches found.
    # cat /etc/fedora-release
    Fedora release 29 (Twenty Nine)
    #

    I.e. right now, in my system test-all.bin is failing all the time since
    Fedora29 doesn't have libopencsd available:

    $ cat /tmp/build/perf/feature/test-all.make.output
    In file included from test-all.c:174:
    test-libopencsd.c:2:10: fatal error: opencsd/c_api/opencsd_c_api.h: No such file or directory
    #include
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.

    See:

    6ab2b762befd ("perf build: Disable libbabeltrace check by default")

    For the rationale, as soon as libopencsd becomes more generally packaged
    and available, we do the same thing we did with babeltrace, enabling it
    by default, as done in:

    24787afbcd01 ("perf tools: Enable LIBBABELTRACE by default")

    For now, to explicitely ask for opencsd, make sure you have it installed
    and use:

    make -C tools/perf CORESIGHT=1

    The feature test output will be there as an empty file:

    $ ls -la /tmp/build/perf/feature/test-libopencsd.make.output

    Because the binary used for the feature check was successfully built:

    $ ls -la /tmp/build/perf/feature/test-libopencsd.bin
    -rwxrwxr-x. 1 acme acme 18336 Feb 12 14:49 /tmp/build/perf/feature/test-libopencsd.bin
    $ ldd /tmp/build/perf/feature/test-libopencsd.bin
    linux-vdso.so.1 (0x00007fffe18cc000)
    libopencsd_c_api.so.0 => /lib64/libopencsd_c_api.so.0 (0x00007fb8e67f6000)
    libopencsd.so.0 => /lib64/libopencsd.so.0 (0x00007fb8e676f000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fb8e65a9000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fb8e6411000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fb8e628d000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fb8e6272000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fb8e6828000)
    $

    And the resulting perf binary will be linked with it:

    -rw-rw-r--. 1 acme acme 0 Feb 12 14:49 /tmp/build/perf/feature/test-libopencsd.make.output
    $ ldd ~/bin/perf | grep opencsd
    libopencsd_c_api.so.0 => /lib64/libopencsd_c_api.so.0 (0x00007fd43097f000)
    libopencsd.so.0 => /lib64/libopencsd.so.0 (0x00007fd4308f8000)
    $

    To make sure this gets built before pushing things upstream I have a
    ubuntu:19.04-x-arm64 container that has:

    [root@quaco x-arm64]# grep CORESIGHT Dockerfile
    ENV EXTRA_MAKE_ARGS=CORESIGHT=1
    [root@quaco x-arm64]#

    So that I always build with libopencsd before pushing things upstream.

    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Kim Phillips
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Mathieu Poirier
    Cc: Mike Leach
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Suzuki Poulouse
    Link: https://lkml.kernel.org/n/tip-20vyy39jw9jgrijesi30fgox@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Since we get all the tests in a single .c file for a first test,
    tools/build/feature/test-all.c, if individual tests set that define and
    fail to undef it at its end, then it the test-all.c build will fail due
    to defining _GNU_SOURCE multiple times, getting us to the slow path,
    so undef it at the end in tests that define it.

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-w6s00jfo1xabgphzczadl59b@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

21 Dec, 2018

1 commit

  • Current libbfd feature test unconditionally links against -liberty and -lz.
    While it's required on some systems (e.g. opensuse), it's completely
    unnecessary on the others, where only -lbdf is sufficient (debian).
    This patch streamlines (and renames) the following feature checks:

    feature-libbfd - only link against -lbfd (debian),
    see commit 2cf9040714f3 ("perf tools: Fix bfd
    dependency libraries detection")
    feature-libbfd-liberty - link against -lbfd and -liberty
    feature-libbfd-liberty-z - link against -lbfd, -liberty and -lz (opensuse),
    see commit 280e7c48c3b8 ("perf tools: fix BFD
    detection on opensuse")

    (feature-liberty{,-z} were renamed to feature-libbfd-liberty{,z}
    for clarity)

    The main motivation is to fix this feature test for bpftool which is
    currently broken on debian (libbfd feature shows OFF, but we still
    unconditionally link against -lbfd and it works).

    Tested on debian with only -lbfd installed (without -liberty); I'd
    appreciate if somebody on the other systems can test this new detection
    method.

    Signed-off-by: Stanislav Fomichev
    Acked-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Mathieu Poirier
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/4dfc634cfcfb236883971b5107cf3c28ec8a31be.1542328222.git.sdf@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Stanislav Fomichev
     

18 Dec, 2018

2 commits

  • This patch adds support for generating instruction samples from trace of
    AArch32 programs using the A32 and T32 instruction sets.

    T32 has variable 2 or 4 byte instruction size, so the conversion between
    addresses and instruction counts requires extra information from the
    trace decoder, requiring version 0.10.0 of OpenCSD. A check for the
    OpenCSD library version has been added to the feature check for OpenCSD.

    Signed-off-by: Robert Walker
    Reviewed-by: Mathieu Poirier
    Tested-by: Leo Yan
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: coresight@lists.linaro.org
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1543839526-30348-1-git-send-email-robert.walker@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Robert Walker
     
  • This will be used by 'perf record' to speed up reading the perf ring
    buffer.

    Committer testing:

    $ make -C tools/perf O=/tmp/build/perf
    make: Entering directory '/home/acme/git/perf/tools/perf'
    BUILD: Doing 'make -j8' parallel build

    Auto-detecting system features:
    ... dwarf: [ on ]
    ... dwarf_getlocations: [ on ]
    ... glibc: [ on ]
    ... gtk2: [ OFF ]
    ... libaudit: [ OFF ]
    ... libbfd: [ OFF ]
    ... libelf: [ on ]
    ... libnuma: [ OFF ]
    ... numa_num_possible_cpus: [ OFF ]
    ... libperl: [ OFF ]
    ... libpython: [ OFF ]
    ... libslang: [ on ]
    ... libcrypto: [ on ]
    ... libunwind: [ on ]
    ... libdw-dwarf-unwind: [ on ]
    ... zlib: [ on ]
    ... lzma: [ on ]
    ... get_cpuid: [ on ]
    ... bpf: [ on ]
    ... libaio: [ on ]

    $ ls -la /tmp/build/perf/feature/test-libaio.*
    -rwxrwxr-x. 1 acme acme 18296 Nov 26 08:49 /tmp/build/perf/feature/test-libaio.bin
    -rw-rw-r--. 1 acme acme 1165 Nov 26 08:49 /tmp/build/perf/feature/test-libaio.d
    -rw-rw-r--. 1 acme acme 0 Nov 26 08:49 /tmp/build/perf/feature/test-libaio.make.output
    $
    $ grep -i aio /tmp/build/perf/FEATURE-DUMP
    feature-libaio=1
    $

    Signed-off-by: Alexey Budankov
    Tested-by: Arnaldo Carvalho de Melo
    Reviewed-by: Jiri Olsa
    Acked-by: Namhyung Kim
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/5fcda10c-6c63-68df-383a-c6d9e5d1f918@linux.intel.com
    [ split from a larger patch ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Alexey Budankov
     

22 Nov, 2018

2 commits

  • The Compiled Method Load Record (cmlr) is JDK specific interface to
    access JVM stack info. This makes the jvmti agent code not compile under
    another jdk, which does not support that.

    Separating jvmti cmlr check into special feature check, and adding
    HAVE_JVMTI_CMLR macro to indicate that.

    Mark cmlr code in jvmti/libjvmti.c with HAVE_JVMTI_CMLR, so we can
    compile it on system without cmlr support.

    This change makes the jvmti compile with java-1.8.0-ibm package. It's
    without the line numbers support, but the rest works.

    Adding NO_JVMTI_CMLR compile variable for testing.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Ben Gainey
    Cc: Gustavo Luiz Duarte
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/20181121154341.21521-1-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • A new 'perf bench epoll' will use this, and to disable it for older
    systems, add a feature test for this API.

    This is just a simple program that if successfully compiled, means that
    the feature is present, at least at the library level, in a build that
    sets the output directory to /tmp/build/perf (using O=/tmp/build/perf),
    we end up with:

    $ ls -la /tmp/build/perf/feature/test-eventfd*
    -rwxrwxr-x. 1 acme acme 8176 Nov 21 15:58 /tmp/build/perf/feature/test-eventfd.bin
    -rw-rw-r--. 1 acme acme 588 Nov 21 15:58 /tmp/build/perf/feature/test-eventfd.d
    -rw-rw-r--. 1 acme acme 0 Nov 21 15:58 /tmp/build/perf/feature/test-eventfd.make.output
    $ ldd /tmp/build/perf/feature/test-eventfd.bin
    linux-vdso.so.1 (0x00007fff3bf3f000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fa984061000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa984417000)
    $ grep eventfd -A 2 -B 2 /tmp/build/perf/FEATURE-DUMP
    feature-dwarf=1
    feature-dwarf_getlocations=1
    feature-eventfd=1
    feature-fortify-source=1
    feature-sync-compare-and-swap=1
    $

    The main thing here is that in the end we'll have -DHAVE_EVENTFD in
    CFLAGS, and then the 'perf bench' entry needing that API can be
    selectively pruned.

    Cc: Adrian Hunter
    Cc: Andrew Morton
    Cc: David Ahern
    Cc: Davidlohr Bueso
    Cc: Jason Baron
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-wkeldwob7dpx6jvtuzl8164k@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

20 Nov, 2018

1 commit


16 Aug, 2018

1 commit

  • Pull networking updates from David Miller:
    "Highlights:

    - Gustavo A. R. Silva keeps working on the implicit switch fallthru
    changes.

    - Support 802.11ax High-Efficiency wireless in cfg80211 et al, From
    Luca Coelho.

    - Re-enable ASPM in r8169, from Kai-Heng Feng.

    - Add virtual XFRM interfaces, which avoids all of the limitations of
    existing IPSEC tunnels. From Steffen Klassert.

    - Convert GRO over to use a hash table, so that when we have many
    flows active we don't traverse a long list during accumluation.

    - Many new self tests for routing, TC, tunnels, etc. Too many
    contributors to mention them all, but I'm really happy to keep
    seeing this stuff.

    - Hardware timestamping support for dpaa_eth/fsl-fman from Yangbo Lu.

    - Lots of cleanups and fixes in L2TP code from Guillaume Nault.

    - Add IPSEC offload support to netdevsim, from Shannon Nelson.

    - Add support for slotting with non-uniform distribution to netem
    packet scheduler, from Yousuk Seung.

    - Add UDP GSO support to mlx5e, from Boris Pismenny.

    - Support offloading of Team LAG in NFP, from John Hurley.

    - Allow to configure TX queue selection based upon RX queue, from
    Amritha Nambiar.

    - Support ethtool ring size configuration in aquantia, from Anton
    Mikaev.

    - Support DSCP and flowlabel per-transport in SCTP, from Xin Long.

    - Support list based batching and stack traversal of SKBs, this is
    very exciting work. From Edward Cree.

    - Busyloop optimizations in vhost_net, from Toshiaki Makita.

    - Introduce the ETF qdisc, which allows time based transmissions. IGB
    can offload this in hardware. From Vinicius Costa Gomes.

    - Add parameter support to devlink, from Moshe Shemesh.

    - Several multiplication and division optimizations for BPF JIT in
    nfp driver, from Jiong Wang.

    - Lots of prepatory work to make more of the packet scheduler layer
    lockless, when possible, from Vlad Buslov.

    - Add ACK filter and NAT awareness to sch_cake packet scheduler, from
    Toke Høiland-Jørgensen.

    - Support regions and region snapshots in devlink, from Alex Vesker.

    - Allow to attach XDP programs to both HW and SW at the same time on
    a given device, with initial support in nfp. From Jakub Kicinski.

    - Add TLS RX offload and support in mlx5, from Ilya Lesokhin.

    - Use PHYLIB in r8169 driver, from Heiner Kallweit.

    - All sorts of changes to support Spectrum 2 in mlxsw driver, from
    Ido Schimmel.

    - PTP support in mv88e6xxx DSA driver, from Andrew Lunn.

    - Make TCP_USER_TIMEOUT socket option more accurate, from Jon
    Maxwell.

    - Support for templates in packet scheduler classifier, from Jiri
    Pirko.

    - IPV6 support in RDS, from Ka-Cheong Poon.

    - Native tproxy support in nf_tables, from Máté Eckl.

    - Maintain IP fragment queue in an rbtree, but optimize properly for
    in-order frags. From Peter Oskolkov.

    - Improvde handling of ACKs on hole repairs, from Yuchung Cheng"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1996 commits)
    bpf: test: fix spelling mistake "REUSEEPORT" -> "REUSEPORT"
    hv/netvsc: Fix NULL dereference at single queue mode fallback
    net: filter: mark expected switch fall-through
    xen-netfront: fix warn message as irq device name has '/'
    cxgb4: Add new T5 PCI device ids 0x50af and 0x50b0
    net: dsa: mv88e6xxx: missing unlock on error path
    rds: fix building with IPV6=m
    inet/connection_sock: prefer _THIS_IP_ to current_text_addr
    net: dsa: mv88e6xxx: bitwise vs logical bug
    net: sock_diag: Fix spectre v1 gadget in __sock_diag_cmd()
    ieee802154: hwsim: using right kind of iteration
    net: hns3: Add vlan filter setting by ethtool command -K
    net: hns3: Set tx ring' tc info when netdev is up
    net: hns3: Remove tx ring BD len register in hns3_enet
    net: hns3: Fix desc num set to default when setting channel
    net: hns3: Fix for phy link issue when using marvell phy driver
    net: hns3: Fix for information of phydev lost problem when down/up
    net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero
    net: hns3: Add support for serdes loopback selftest
    bnxt_en: take coredump_record structure off stack
    ...

    Linus Torvalds
     

21 Jul, 2018

1 commit


18 Jul, 2018

2 commits


14 Jul, 2018

1 commit

  • perf propagates its feature check results to libbpf. This means
    features for which perf probes must be a superset of libbpf's
    required features. perf depends on FEATURE_TESTS_BASIC for its list
    of features.

    commit 531b014e7a2f ("tools: bpf: make use of reallocarray") added
    reallocarray use to libbpf, make perf also perform the reallocarray
    feature check.

    Fixes: 531b014e7a2f ("tools: bpf: make use of reallocarray")
    Reported-by: Guenter Roeck
    Signed-off-by: Jakub Kicinski
    Tested-by: Guenter Roeck
    Signed-off-by: Daniel Borkmann

    Jakub Kicinski
     

12 Jul, 2018

4 commits

  • The final link of fixdep uses LDFLAGS but not the existing HOSTLDFLAGS.
    Fix this.

    Signed-off-by: Laura Abbott
    Acked-by: Jiri Olsa
    Signed-off-by: Masahiro Yamada

    Laura Abbott
     
  • Commit 0c3b7e42616f ("tools build: Add support for host programs format")
    introduced host_c_flags which referenced CHOSTFLAGS. The actual name of the
    variable is HOSTCFLAGS. Fix this up.

    Fixes: 0c3b7e42616f ("tools build: Add support for host programs format")
    Signed-off-by: Laura Abbott
    Acked-by: Jiri Olsa
    Signed-off-by: Masahiro Yamada

    Laura Abbott
     
  • In 2016 GNU Make made a backwards incompatible change to the way '#'
    characters were handled in Makefiles when used inside functions or
    macros:

    http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57

    Due to this change, when attempting to run `make prepare' I get a
    spurious make syntax error:

    /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator. Stop.

    When inspecting `.fixdep.o.cmd' it includes two lines which use
    unescaped comment characters at the top:

    \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
    \# using basic dep data

    This is because `tools/build/Build.include' prints these '\#'
    characters:

    printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
    printf '\# using basic dep data\n\n' >> $(dot-target).cmd; \

    This completes commit 9564a8cf422d ("Kbuild: fix # escaping in .cmd files
    for future Make").

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
    Cc: Randy Dunlap
    Cc: Rasmus Villemoes
    Cc: stable@vger.kernel.org
    Signed-off-by: Paul Menzel
    Signed-off-by: Masahiro Yamada

    Paul Menzel
     
  • reallocarray() is a safer variant of realloc which checks for
    multiplication overflow in case of array allocation. Since it's
    not available in Glibc < 2.26 import kernel's overflow.h and
    add a static inline implementation when needed. Use feature
    detection to probe for existence of reallocarray.

    Signed-off-by: Jakub Kicinski
    Reviewed-by: Quentin Monnet
    Reviewed-by: Jiong Wang
    Signed-off-by: Daniel Borkmann

    Jakub Kicinski
     

10 Apr, 2018

1 commit

  • I tried building using a freshly built Make (4.2.1-69-g8a731d1), but
    already the objtool build broke with

    orc_dump.c: In function ‘orc_dump’:
    orc_dump.c:106:2: error: ‘elf_getshnum’ is deprecated [-Werror=deprecated-declarations]
    if (elf_getshdrnum(elf, &nr_sections)) {

    Turns out that with that new Make, the backslash was not removed, so cpp
    didn't see a #include directive, grep found nothing, and
    -DLIBELF_USE_DEPRECATED was wrongly put in CFLAGS.

    Now, that new Make behaviour is documented in their NEWS file:

    * WARNING: Backward-incompatibility!
    Number signs (#) appearing inside a macro reference or function invocation
    no longer introduce comments and should not be escaped with backslashes:
    thus a call such as:
    foo := $(shell echo '#')
    is legal. Previously the number sign needed to be escaped, for example:
    foo := $(shell echo '\#')
    Now this latter will resolve to "\#". If you want to write makefiles
    portable to both versions, assign the number sign to a variable:
    C := \#
    foo := $(shell echo '$C')
    This was claimed to be fixed in 3.81, but wasn't, for some reason.
    To detect this change search for 'nocomment' in the .FEATURES variable.

    This also fixes up the two make-cmd instances to replace # with $(pound)
    rather than with \#. There might very well be other places that need
    similar fixup in preparation for whatever future Make release contains
    the above change, but at least this builds an x86_64 defconfig with the
    new make.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
    Cc: Randy Dunlap
    Signed-off-by: Rasmus Villemoes
    Signed-off-by: Masahiro Yamada

    Rasmus Villemoes
     

08 Mar, 2018

3 commits

  • So we can see the output of feature compile in following files:

    tools/build/feature/test-llvm.make.output
    tools/build/feature/test-llvm-version.make.output
    tools/build/feature/test-clang.make.output

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180307155020.32613-20-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • So they can follow the OUTPUT variable setup as the rest of the
    features.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180307155020.32613-19-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • So we can see the status when we build perf, like:

    $ make LIBCLANGLLVM=1 VF=1
    ... cxx: [ on ]
    ... llvm: [ on ]
    ... llvm-version: [ on ]
    ... clang: [ on ]

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180307155020.32613-18-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

01 Feb, 2018

1 commit

  • Pull networking updates from David Miller:

    1) Significantly shrink the core networking routing structures. Result
    of http://vger.kernel.org/~davem/seoul2017_netdev_keynote.pdf

    2) Add netdevsim driver for testing various offloads, from Jakub
    Kicinski.

    3) Support cross-chip FDB operations in DSA, from Vivien Didelot.

    4) Add a 2nd listener hash table for TCP, similar to what was done for
    UDP. From Martin KaFai Lau.

    5) Add eBPF based queue selection to tun, from Jason Wang.

    6) Lockless qdisc support, from John Fastabend.

    7) SCTP stream interleave support, from Xin Long.

    8) Smoother TCP receive autotuning, from Eric Dumazet.

    9) Lots of erspan tunneling enhancements, from William Tu.

    10) Add true function call support to BPF, from Alexei Starovoitov.

    11) Add explicit support for GRO HW offloading, from Michael Chan.

    12) Support extack generation in more netlink subsystems. From Alexander
    Aring, Quentin Monnet, and Jakub Kicinski.

    13) Add 1000BaseX, flow control, and EEE support to mvneta driver. From
    Russell King.

    14) Add flow table abstraction to netfilter, from Pablo Neira Ayuso.

    15) Many improvements and simplifications to the NFP driver bpf JIT,
    from Jakub Kicinski.

    16) Support for ipv6 non-equal cost multipath routing, from Ido
    Schimmel.

    17) Add resource abstration to devlink, from Arkadi Sharshevsky.

    18) Packet scheduler classifier shared filter block support, from Jiri
    Pirko.

    19) Avoid locking in act_csum, from Davide Caratti.

    20) devinet_ioctl() simplifications from Al viro.

    21) More TCP bpf improvements from Lawrence Brakmo.

    22) Add support for onlink ipv6 route flag, similar to ipv4, from David
    Ahern.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1925 commits)
    tls: Add support for encryption using async offload accelerator
    ip6mr: fix stale iterator
    net/sched: kconfig: Remove blank help texts
    openvswitch: meter: Use 64-bit arithmetic instead of 32-bit
    tcp_nv: fix potential integer overflow in tcpnv_acked
    r8169: fix RTL8168EP take too long to complete driver initialization.
    qmi_wwan: Add support for Quectel EP06
    rtnetlink: enable IFLA_IF_NETNSID for RTM_NEWLINK
    ipmr: Fix ptrdiff_t print formatting
    ibmvnic: Wait for device response when changing MAC
    qlcnic: fix deadlock bug
    tcp: release sk_frag.page in tcp_disconnect
    ipv4: Get the address of interface correctly.
    net_sched: gen_estimator: fix lockdep splat
    net: macb: Handle HRESP error
    net/mlx5e: IPoIB, Fix copy-paste bug in flow steering refactoring
    ipv6: addrconf: break critical section in addrconf_verify_rtnl()
    ipv6: change route cache aging logic
    i40e/i40evf: Update DESC_NEEDED value to reflect larger value
    bnxt_en: cleanup DIM work on device shutdown
    ...

    Linus Torvalds
     

25 Jan, 2018

1 commit

  • The Open CoreSight Decoding Library (openCSD) is a free and open library
    to decode traces collected by the CoreSight hardware infrastructure.

    This patch adds the required mechanic to recognise the presence of the
    openCSD library on a system and set up miscellaneous flags to be used in
    the compilation of the trace decoding feature.

    Signed-off-by: Mathieu Poirier
    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Kim Phillips
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Mike Leach
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Suzuki Poulouse
    Link: http://lkml.kernel.org/r/1516211539-5166-2-git-send-email-mathieu.poirier@linaro.org
    Link: http://lkml.kernel.org/r/1516635644-24819-1-git-send-email-mathieu.poirier@linaro.org
    [ Merged missing test-libopencsd.c file, provided later by Mathieu ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Mathieu Poirier
     

17 Jan, 2018

1 commit

  • bfd.h is requiring including of config.h except when PACKAGE or
    PACKAGE_VERSION are defined.

    /* PR 14072: Ensure that config.h is included first. */
    #if !defined PACKAGE && !defined PACKAGE_VERSION
    #error config.h must be included before this header
    #endif

    This check has been introduced since May-2012. It doesn't show up in bfd.h
    on some Linux distribution, probably because distributions have remove it
    when building the package.

    However, sometimes the user might just build libfd from source code then
    link bpftool against it. For this case, bfd.h will be original that we need
    to define PACKAGE or PACKAGE_VERSION.

    Acked-by: Jakub Kicinski
    Signed-off-by: Jiong Wang
    Signed-off-by: Daniel Borkmann

    Jiong Wang
     

30 Dec, 2017

1 commit

  • Bpftool build is broken with binutils version 2.29 and later.
    The cause is commit 003ca0fd2286 ("Refactor disassembler selection")
    in the binutils repo, which changed the disassembler() function
    signature.

    Fix this by adding a new "feature" to the tools/build/features
    infrastructure and make it responsible for decision which
    disassembler() function signature to use.

    Signed-off-by: Roman Gushchin
    Cc: Jakub Kicinski
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Acked-by: Jakub Kicinski
    Signed-off-by: Daniel Borkmann

    Roman Gushchin
     

05 Dec, 2017

1 commit

  • As 'perf bench futex wake-parallel" will use this, which is not
    available in older systems such as versions of the android NDK used in
    my container build tests (r12b and r15c at the moment).

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Davidlohr Bueso
    Cc: James Yang
    Cc: Kim Phillips
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-1i7iv54in4wj08lwo55b0pzv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman