07 Oct, 2020

1 commit

  • [ Upstream commit 21e9ba5373fc2cec608fd68301a1dbfd14df3172 ]

    Ubuntu mainline builds for ppc64le are failing with the below error (*):
    CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh
    DESCEND bpf/resolve_btfids

    Auto-detecting system features:
    ... libelf: [ [32mon[m ]
    ... zlib: [ [32mon[m ]
    ... bpf: [ [31mOFF[m ]

    BPF API too old
    make[6]: *** [Makefile:295: bpfdep] Error 1
    make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2
    make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2
    make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2
    make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2
    make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic'
    make[1]: *** [Makefile:185: __sub-make] Error 2
    make[1]: Leaving directory '/home/kernel/COD/linux'

    resolve_btfids needs to be build as a host binary and it needs libbpf.
    However, libbpf Makefile hardcodes an include path utilizing $(ARCH).
    This results in mixing of cross-architecture headers resulting in a
    build failure.

    The specific header include path doesn't seem necessary for a libbpf
    build. Hence, remove the same.

    (*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log

    Reported-by: Vaidyanathan Srinivasan
    Signed-off-by: Naveen N. Rao
    Signed-off-by: Daniel Borkmann
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20200902084246.1513055-1-naveen.n.rao@linux.vnet.ibm.com
    Signed-off-by: Sasha Levin

    Naveen N. Rao
     

11 Aug, 2020

1 commit

  • [ Upstream commit e24c6447ccb7b1a01f9bf0aec94939e6450c0b4d ]

    I compiled with AddressSanitizer and I had these memory leaks while I
    was using the tep_parse_format function:

    Direct leak of 28 byte(s) in 4 object(s) allocated from:
    #0 0x7fb07db49ffe in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dffe)
    #1 0x7fb07a724228 in extend_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:985
    #2 0x7fb07a724c21 in __read_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1140
    #3 0x7fb07a724f78 in read_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1206
    #4 0x7fb07a725191 in __read_expect_type /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1291
    #5 0x7fb07a7251df in read_expect_type /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1299
    #6 0x7fb07a72e6c8 in process_dynamic_array_len /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:2849
    #7 0x7fb07a7304b8 in process_function /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3161
    #8 0x7fb07a730900 in process_arg_token /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3207
    #9 0x7fb07a727c0b in process_arg /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:1786
    #10 0x7fb07a731080 in event_read_print_args /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3285
    #11 0x7fb07a731722 in event_read_print /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:3369
    #12 0x7fb07a740054 in __tep_parse_format /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:6335
    #13 0x7fb07a74047a in __parse_event /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:6389
    #14 0x7fb07a740536 in tep_parse_format /home/pduplessis/repo/linux/tools/lib/traceevent/event-parse.c:6431
    #15 0x7fb07a785acf in parse_event ../../../src/fs-src/fs.c:251
    #16 0x7fb07a785ccd in parse_systems ../../../src/fs-src/fs.c:284
    #17 0x7fb07a786fb3 in read_metadata ../../../src/fs-src/fs.c:593
    #18 0x7fb07a78760e in ftrace_fs_source_init ../../../src/fs-src/fs.c:727
    #19 0x7fb07d90c19c in add_component_with_init_method_data ../../../../src/lib/graph/graph.c:1048
    #20 0x7fb07d90c87b in add_source_component_with_initialize_method_data ../../../../src/lib/graph/graph.c:1127
    #21 0x7fb07d90c92a in bt_graph_add_source_component ../../../../src/lib/graph/graph.c:1152
    #22 0x55db11aa632e in cmd_run_ctx_create_components_from_config_components ../../../src/cli/babeltrace2.c:2252
    #23 0x55db11aa6fda in cmd_run_ctx_create_components ../../../src/cli/babeltrace2.c:2347
    #24 0x55db11aa780c in cmd_run ../../../src/cli/babeltrace2.c:2461
    #25 0x55db11aa8a7d in main ../../../src/cli/babeltrace2.c:2673
    #26 0x7fb07d5460b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

    The token variable in the process_dynamic_array_len function is
    allocated in the read_expect_type function, but is not freed before
    calling the read_token function.

    Free the token variable before calling read_token in order to plug the
    leak.

    Signed-off-by: Philippe Duplessis-Guindon
    Reviewed-by: Steven Rostedt (VMware)
    Link: https://lore.kernel.org/linux-trace-devel/20200730150236.5392-1-pduplessis@efficios.com
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Philippe Duplessis-Guindon
     

05 Aug, 2020

1 commit

  • commit 39efdd94e314336f4acbac4c07e0f37bdc3bef71 upstream.

    In binutils 2.35, 'nm -D' changed to show symbol versions along with
    symbol names, with the usual @@ separator. When generating
    libtraceevent-dynamic-list we need just the names, so strip off the
    version suffix if present.

    Signed-off-by: Ben Hutchings
    Tested-by: Salvatore Bonaccorso
    Reviewed-by: Steven Rostedt
    Cc: linux-trace-devel@vger.kernel.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     

09 Jul, 2020

2 commits

  • [ Upstream commit 74621d929d944529a5e2878a84f48bfa6fb69a66 ]

    Commit c61f13eaa1ee1 ("gcc-plugins: Add structleak for more stack
    initialization") added "__attribute__((user))" to the user when
    stackleak detector is enabled. This now appears in the field format of
    system call trace events for system calls that have user buffers. The
    "__attribute__((user))" breaks the parsing in libtraceevent. That needs
    to be handled.

    Signed-off-by: Steven Rostedt (VMware)
    Cc: Andrew Morton
    Cc: Jaewon Kim
    Cc: Jiri Olsa
    Cc: Kees Kook
    Cc: Namhyung Kim
    Cc: Vlastimil Babka
    Cc: linux-mm@kvack.org
    Cc: linux-trace-devel@vger.kernel.org
    Link: http://lore.kernel.org/lkml/20200324200956.663647256@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Steven Rostedt (VMware)
     
  • [ Upstream commit 27d4d336f2872193e90ee5450559e1699fae0f6d ]

    There's several locations that open code realloc and strcat() to append
    text to strings. Add an append() function that takes a delimiter and a
    string to append to another string.

    Signed-off-by: Steven Rostedt (VMware)
    Cc: Andrew Morton
    Cc: Jaewon Lim
    Cc: Jiri Olsa
    Cc: Kees Kook
    Cc: linux-mm@kvack.org
    Cc: linux-trace-devel@vger.kernel.org
    Cc: Namhyung Kim
    Cc: Vlastimil Babka
    Link: http://lore.kernel.org/lkml/20200324200956.515118403@goodmis.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Steven Rostedt (VMware)
     

24 Jun, 2020

1 commit

  • [ Upstream commit 32022fd97ed34f6812802bf1288db27c313576f4 ]

    Handle a GCC quirk of emitting extra volatile modifier in DWARF (and
    subsequently preserved in BTF by pahole) for function pointers marked as
    __attribute__((noreturn)). This was the way to mark such functions before GCC
    2.5 added noreturn attribute. Drop such func_proto modifiers, similarly to how
    it's done for array (also to handle GCC quirk/bug).

    Such volatile attribute is emitted by GCC only, so existing selftests can't
    express such test. Simple repro is like this (compiled with GCC + BTF
    generated by pahole):

    struct my_struct {
    void __attribute__((noreturn)) (*fn)(int);
    };
    struct my_struct a;

    Without this fix, output will be:

    struct my_struct {
    voidvolatile (*fn)(int);
    };

    With the fix:

    struct my_struct {
    void (*fn)(int);
    };

    Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion")
    Reported-by: Jean-Philippe Brucker
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Tested-by: Jean-Philippe Brucker
    Link: https://lore.kernel.org/bpf/20200610052335.2862559-1-andriin@fb.com
    Signed-off-by: Sasha Levin

    Andrii Nakryiko
     

22 Jun, 2020

3 commits

  • [ Upstream commit 601b05ca6edb0422bf6ce313fbfd55ec7bbbc0fd ]

    In case the cpu_bufs are sparsely allocated they are not all
    free'ed. These changes will fix this.

    Fixes: fb84b8224655 ("libbpf: add perf buffer API")
    Signed-off-by: Eelco Chaudron
    Signed-off-by: Daniel Borkmann
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/159056888305.330763.9684536967379110349.stgit@ebuild
    Signed-off-by: Alexei Starovoitov
    Signed-off-by: Sasha Levin

    Eelco Chaudron
     
  • [ Upstream commit c6fddb28bad26e5472cb7acf7b04cd5126f1a4ab ]

    The xxx_mountpoint() interface provided by fs.c finds mount points for
    common pseudo filesystems. The first time xxx_mountpoint() is invoked,
    it scans the mount table (/proc/mounts) looking for a match. If found,
    it is cached. The price to scan /proc/mounts is paid once if the mount
    is found.

    When the mount point is not found, subsequent calls to xxx_mountpoint()
    scan /proc/mounts over and over again. There is no caching.

    This causes a scaling issue in perf record with hugeltbfs__mountpoint().
    The function is called for each process found in
    synthesize__mmap_events(). If the machine has thousands of processes
    and if the /proc/mounts has many entries this could cause major overhead
    in perf record. We have observed multi-second slowdowns on some
    configurations.

    As an example on a laptop:

    Before:

    $ sudo umount /dev/hugepages
    $ strace -e trace=openat -o /tmp/tt perf record -a ls
    $ fgrep mounts /tmp/tt
    285

    After:

    $ sudo umount /dev/hugepages
    $ strace -e trace=openat -o /tmp/tt perf record -a ls
    $ fgrep mounts /tmp/tt
    1

    One could argue that the non-caching in case the moint point is not
    found is intentional. That way subsequent calls may discover a moint
    point if the sysadmin mounts the filesystem. But the same argument could
    be made against caching the mount point. It could be unmounted causing
    errors. It all depends on the intent of the interface. This patch
    assumes it is expected to scan /proc/mounts once. The patch documents
    the caching behavior in the fs.h header file.

    An alternative would be to just fix perf record. But it would solve the
    problem with hugetlbs__mountpoint() but there could be similar issues
    (possibly down the line) with other xxx_mountpoint() calls in perf or
    other tools.

    Signed-off-by: Stephane Eranian
    Reviewed-by: Ian Rogers
    Acked-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Andrey Zhizhikin
    Cc: Kan Liang
    Cc: Kefeng Wang
    Cc: Mark Rutland
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Petr Mladek
    Cc: Thomas Gleixner
    Link: http://lore.kernel.org/lkml/20200402154357.107873-3-irogers@google.com
    Signed-off-by: Ian Rogers
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Stephane Eranian
     
  • [ Upstream commit 229bf8bf4d910510bc1a2fd0b89bd467cd71050d ]

    Fix memory leak in hashmap_clear() not freeing hashmap_entry structs for each
    of the remaining entries. Also NULL-out bucket list to prevent possible
    double-free between hashmap__clear() and hashmap__free().

    Running test_progs-asan flavor clearly showed this problem.

    Reported-by: Alston Tang
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200429012111.277390-5-andriin@fb.com
    Signed-off-by: Sasha Levin

    Andrii Nakryiko
     

20 May, 2020

1 commit

  • commit 6803ee25f0ead1e836808acb14396bb9a9849113 upstream.

    This logic is re-used for parsing a set of online CPUs. Having it as an
    isolated piece of code working with input string makes it conveninent to test
    this logic as well. While refactoring, also improve the robustness of original
    implementation.

    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20191212013548.1690564-1-andriin@fb.com
    Signed-off-by: Greg Kroah-Hartman

    Andrii Nakryiko
     

10 May, 2020

1 commit

  • commit aa915931ac3e53ccf371308e6750da510e3591dd upstream.

    Fedora binutils has been patched to show "other info" for a symbol at the
    end of the line. This was done in order to support unmaintained scripts
    that would break with the extra info. [1]

    [1] https://src.fedoraproject.org/rpms/binutils/c/b8265c46f7ddae23a792ee8306fbaaeacba83bf8

    This in turn has been done to fix the build of ruby, because of checksec.
    [2] Thanks Michael Ellerman for the pointer.

    [2] https://bugzilla.redhat.com/show_bug.cgi?id=1479302

    As libbpf Makefile is not unmaintained, we can simply deal with either
    output format, by just removing the "other info" field, as it always comes
    inside brackets.

    Fixes: 3464afdf11f9 (libbpf: Fix readelf output parsing on powerpc with recent binutils)
    Reported-by: Justin Forbes
    Signed-off-by: Thadeu Lima de Souza Cascardo
    Signed-off-by: Alexei Starovoitov
    Acked-by: Andrii Nakryiko
    Cc: Aurelien Jarno
    Link: https://lore.kernel.org/bpf/20191213101114.GA3986@calabresa
    Signed-off-by: Greg Kroah-Hartman

    Thadeu Lima de Souza Cascardo
     

02 May, 2020

1 commit

  • [ Upstream commit 4734b0fefbbf98f8c119eb8344efa19dac82cd2c ]

    Builds of Fedora's kernel-tools package started to fail with "may be
    used uninitialized" warnings for nl_pid in bpf_set_link_xdp_fd() and
    bpf_get_link_xdp_info() on the s390 architecture.

    Although libbpf_netlink_open() always returns a negative number when it
    does not set *nl_pid, the compiler does not determine this and thus
    believes the variable might be used uninitialized. Assuage gcc's fears
    by explicitly initializing nl_pid.

    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1807781

    Signed-off-by: Jeremy Cline
    Signed-off-by: Daniel Borkmann
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20200404051430.698058-1-jcline@redhat.com
    Signed-off-by: Sasha Levin

    Jeremy Cline
     

29 Apr, 2020

1 commit

  • [ Upstream commit 3464afdf11f9a1e031e7858a05351ceca1792fea ]

    On powerpc with recent versions of binutils, readelf outputs an extra
    field when dumping the symbols of an object file. For example:

    35: 0000000000000838 96 FUNC LOCAL DEFAULT [: 8] 1 btf_is_struct

    The extra "[: 8]" prevents the GLOBAL_SYM_COUNT variable to
    be computed correctly and causes the check_abi target to fail.

    Fix that by looking for the symbol name in the last field instead of the
    8th one. This way it should also cope with future extra fields.

    Signed-off-by: Aurelien Jarno
    Signed-off-by: Daniel Borkmann
    Tested-by: Michael Ellerman
    Link: https://lore.kernel.org/bpf/20191201195728.4161537-1-aurelien@aurel32.net
    Signed-off-by: Sasha Levin

    Aurelien Jarno
     

24 Feb, 2020

1 commit

  • [ Upstream commit 6794200fa3c9c3e6759dae099145f23e4310f4f7 ]

    GCC9 introduced string hardening mechanisms, which exhibits the error
    during fs api compilation:

    error: '__builtin_strncpy' specified bound 4096 equals destination size
    [-Werror=stringop-truncation]

    This comes when the length of copy passed to strncpy is is equal to
    destination size, which could potentially lead to buffer overflow.

    There is a need to mitigate this potential issue by limiting the size of
    destination by 1 and explicitly terminate the destination with NULL.

    Signed-off-by: Andrey Zhizhikin
    Reviewed-by: Petr Mladek
    Acked-by: Jiri Olsa
    Cc: Alexei Starovoitov
    Cc: Andrii Nakryiko
    Cc: Daniel Borkmann
    Cc: Kefeng Wang
    Cc: Martin KaFai Lau
    Cc: Petr Mladek
    Cc: Sergey Senozhatsky
    Cc: Song Liu
    Cc: Yonghong Song
    Cc: bpf@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Link: http://lore.kernel.org/lkml/20191211080109.18765-1-andrey.zhizhikin@leica-geosystems.com
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Andrey Zhizhikin
     

11 Feb, 2020

1 commit

  • commit 35b9211c0a2427e8f39e534f442f43804fc8d5ca upstream.

    Fix bug requesting invalid size of reallocated array when constructing CO-RE
    relocation candidate list. This can cause problems if there are many potential
    candidates and a very fine-grained memory allocator bucket sizes are used.

    Fixes: ddc7c3042614 ("libbpf: implement BPF CO-RE offset relocation algorithm")
    Reported-by: William Smith
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Acked-by: Yonghong Song
    Link: https://lore.kernel.org/bpf/20200124201847.212528-1-andriin@fb.com
    Signed-off-by: Greg Kroah-Hartman

    Andrii Nakryiko
     

06 Feb, 2020

2 commits

  • [ Upstream commit f84ae29a6169318f9c929720c49d96323d2bbab9 ]

    It is necessary to call free_arg(arg) when add_filter_type() returns NULL
    in filter_event().

    Signed-off-by: Hewenliang
    Reviewed-by: Steven Rostedt (VMware)
    Cc: Feilong Lin
    Cc: Tzvetomir Stoyanov
    Link: http://lore.kernel.org/lkml/20191209063549.59941-1-hewenliang4@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Hewenliang
     
  • commit 6c4798d3f08b81c2c52936b10e0fa872590c96ae upstream.

    Disable a couple of compilation warnings (which are treated as errors)
    on strlcpy() definition and declaration, allowing users to compile perf
    and kernel (objtool) when:

    1. glibc have strlcpy() (such as in ALT Linux since 2004) objtool and
    perf build fails with this (in gcc):

    In file included from exec-cmd.c:3:
    tools/include/linux/string.h:20:15: error: redundant redeclaration of ‘strlcpy’ [-Werror=redundant-decls]
    20 | extern size_t strlcpy(char *dest, const char *src, size_t size);

    2. clang ignores `-Wredundant-decls', but produces another warning when
    building perf:

    CC util/string.o
    ../lib/string.c:99:8: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
    size_t __weak strlcpy(char *dest, const char *src, size_t size)
    ../../tools/include/linux/compiler.h:66:34: note: expanded from macro '__weak'
    # define __weak __attribute__((weak))
    /usr/include/bits/string_fortified.h:151:8: note: previous definition is here
    __NTH (strlcpy (char *__restrict __dest, const char *__restrict __src,

    Committer notes:

    The

    #pragma GCC diagnostic

    directive was introduced in gcc 4.6, so check for that as well.

    Fixes: ce99091 ("perf tools: Move strlcpy() from perf to tools/lib/string.c")
    Fixes: 0215d59 ("tools lib: Reinstate strlcpy() header guard with __UCLIBC__")
    Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=118481
    Signed-off-by: Vitaly Chikunov
    Reviewed-by: Dmitry Levin
    Cc: Dmitry Levin
    Cc: Josh Poimboeuf
    Cc: kbuild test robot
    Cc: Peter Zijlstra
    Cc: stable@vger.kernel.org
    Cc: Vineet Gupta
    Link: http://lore.kernel.org/lkml/20191224172029.19690-1-vt@altlinux.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Chikunov
     

26 Jan, 2020

6 commits

  • [ Upstream commit a566e35f1e8b4b3be1e96a804d1cca38b578167c ]

    u32 is a kernel-side typedef. User-space library is supposed to use __u32.
    This breaks Github's projection of libbpf. Do u32 -> __u32 fix.

    Fixes: 94ff9ebb49a5 ("libbpf: Fix compatibility for kernels without need_wakeup")
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Alexei Starovoitov
    Acked-by: Björn Töpel
    Cc: Magnus Karlsson
    Link: https://lore.kernel.org/bpf/20191029055953.2461336-1-andriin@fb.com
    Signed-off-by: Sasha Levin

    Andrii Nakryiko
     
  • commit 994021a7e08477f7e51285920aac99fc967fae8a upstream.

    Perform size check always in btf__resolve_size. Makes the logic a bit more
    robust against corrupted BTF and silences LGTM/Coverity complaining about
    always true (size < 0) check.

    Fixes: 69eaab04c675 ("btf: extract BTF type size calculation")
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Link: https://lore.kernel.org/bpf/20191107020855.3834758-5-andriin@fb.com
    Signed-off-by: Greg Kroah-Hartman

    Andrii Nakryiko
     
  • commit dd3ab126379ec040b3edab8559f9c72de6ef9d29 upstream.

    Fix few issues found by Coverity and LGTM.

    Fixes: b053b439b72a ("bpf: libbpf: bpftool: Print bpf_line_info during prog dump")
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Link: https://lore.kernel.org/bpf/20191107020855.3834758-4-andriin@fb.com
    Signed-off-by: Greg Kroah-Hartman

    Andrii Nakryiko
     
  • commit 4ee1135615713387b869dfd099ffdf8656be6784 upstream.

    Fix a potential overflow issue found by LGTM analysis, based on Github libbpf
    source code.

    Fixes: 3d65014146c6 ("bpf: libbpf: Add btf_line_info support to libbpf")
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Link: https://lore.kernel.org/bpf/20191107020855.3834758-3-andriin@fb.com
    Signed-off-by: Greg Kroah-Hartman

    Andrii Nakryiko
     
  • commit 3dc5e059821376974177cc801d377e3fcdac6712 upstream.

    Coverity scan against Github libbpf code found the issue of not freeing memory and
    leaving already freed memory still referenced from bpf_program. Fix it by
    re-assigning successfully reallocated memory sooner.

    Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections")
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Link: https://lore.kernel.org/bpf/20191107020855.3834758-2-andriin@fb.com
    Signed-off-by: Greg Kroah-Hartman

    Andrii Nakryiko
     
  • commit 94ff9ebb49a546b7f009ed840bafa235c96d4c4b upstream.

    When the need_wakeup flag was added to AF_XDP, the format of the
    XDP_MMAP_OFFSETS getsockopt was extended. Code was added to the
    kernel to take care of compatibility issues arrising from running
    applications using any of the two formats. However, libbpf was
    not extended to take care of the case when the application/libbpf
    uses the new format but the kernel only supports the old
    format. This patch adds support in libbpf for parsing the old
    format, before the need_wakeup flag was added, and emulating a
    set of static need_wakeup flags that will always work for the
    application.

    v2 -> v3:
    * Incorporated code improvements suggested by Jonathan Lemon

    v1 -> v2:
    * Rebased to bpf-next
    * Rewrote the code as the previous version made you blind

    Fixes: a4500432c2587cb2a ("libbpf: add support for need_wakeup flag in AF_XDP part")
    Reported-by: Eloy Degen
    Signed-off-by: Magnus Karlsson
    Signed-off-by: Alexei Starovoitov
    Acked-by: Jonathan Lemon
    Link: https://lore.kernel.org/bpf/1571995035-21889-1-git-send-email-magnus.karlsson@intel.com
    Signed-off-by: Greg Kroah-Hartman

    Magnus Karlsson
     

18 Jan, 2020

1 commit

  • commit b568405856906ee4d9ba6284fd36f2928653a623 upstream.

    Fix Makefile's diagnostic diff output when there is LIBBPF_API-versioned
    symbols mismatch.

    Fixes: 1bd63524593b ("libbpf: handle symbol versioning properly for libbpf.a")
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Acked-by: Yonghong Song
    Link: https://lore.kernel.org/bpf/20191127200134.1360660-1-andriin@fb.com
    Signed-off-by: Greg Kroah-Hartman

    Andrii Nakryiko
     

12 Jan, 2020

2 commits

  • [ Upstream commit 15b3904f8e884e0d34d5f09906cf6526d0b889a2 ]

    When we use 'O=' with make to build libtraceevent in a separate folder
    it still copies 'libtraceevent.pc' to its source folder. Modify the
    Makefile so that it uses the output folder to copy the pkg-config file
    and install from there.

    Signed-off-by: Sudipm Mukherjee
    Reviewed-by: Steven Rostedt (VMware)
    Cc: linux-trace-devel@vger.kernel.org
    Link: http://lore.kernel.org/lkml/20191115113610.21493-2-sudipm.mukherjee@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Sudip Mukherjee
     
  • [ Upstream commit 587db8ebdac2c5eb3a8851e16b26f2e2711ab797 ]

    When we use 'O=' with make to build libtraceevent in a separate folder
    it fails to install libtraceevent.a and libtraceevent.so.1.1.0 with the
    error:

    INSTALL /home/sudip/linux/obj-trace/libtraceevent.a
    INSTALL /home/sudip/linux/obj-trace/libtraceevent.so.1.1.0

    cp: cannot stat 'libtraceevent.a': No such file or directory
    Makefile:225: recipe for target 'install_lib' failed
    make: *** [install_lib] Error 1

    I used the command:

    make O=../../../obj-trace DESTDIR=~/test prefix==/usr install

    It turns out libtraceevent Makefile, even though it builds in a separate
    folder, searches for libtraceevent.a and libtraceevent.so.1.1.0 in its
    source folder.

    So, add the 'OUTPUT' prefix to the source path so that 'make' looks for
    the files in the correct place.

    Signed-off-by: Sudipm Mukherjee
    Reviewed-by: Steven Rostedt (VMware)
    Cc: linux-trace-devel@vger.kernel.org
    Link: http://lore.kernel.org/lkml/20191115113610.21493-1-sudipm.mukherjee@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Sudip Mukherjee
     

31 Dec, 2019

7 commits

  • [ Upstream commit 10992af6bf46a2048ad964985a5b77464e5563b1 ]

    It is necessary to free the memory that we have allocated when error occurs.

    Fixes: ef3072cd1d5c ("tools lib traceevent: Get rid of die in add_filter_type()")
    Signed-off-by: Hewenliang
    Reviewed-by: Steven Rostedt (VMware)
    Cc: Tzvetomir Stoyanov
    Link: http://lore.kernel.org/lkml/20191119014415.57210-1-hewenliang4@huawei.com
    Signed-off-by: Steven Rostedt (VMware)
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Hewenliang
     
  • [ Upstream commit 3de88c9113f88c04abda339f1aa629397bf89e02 ]

    Drivers use different fields to report the number of channels, so take
    the maximum of all data channels (rx, tx, combined) when determining the
    size of the xsk map. The current code used only 'combined' which was set
    to 0 in some drivers e.g. mlx4.

    Tested: compiled and run xdpsock -q 3 -r -S on mlx4

    Signed-off-by: Luigi Rizzo
    Signed-off-by: Alexei Starovoitov
    Reviewed-by: Jakub Kicinski
    Acked-by: Magnus Karlsson
    Link: https://lore.kernel.org/bpf/20191119001951.92930-1-lrizzo@google.com
    Signed-off-by: Sasha Levin

    Luigi Rizzo
     
  • [ Upstream commit 9656b346b280c3e49c8a116c3a715f966633b161 ]

    Fix issue reported by static analysis (Coverity). If bpf_prog_get_fd_by_id()
    fails, xsk_lookup_bpf_maps() will fail as well and clean-up code will attempt
    close() with fd=-1. Fix by checking bpf_prog_get_fd_by_id() return result and
    exiting early.

    Fixes: 10a13bb40e54 ("libbpf: remove qidconf and better support external bpf programs.")
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Link: https://lore.kernel.org/bpf/20191107054059.313884-1-andriin@fb.com
    Signed-off-by: Sasha Levin

    Andrii Nakryiko
     
  • [ Upstream commit 22bd8f1b5a1dd168ba4eba27cb17643a11012f5d ]

    When a 'make DEBUG=1' build is done, the command parser is still built
    with -O6 and is hard to step through, fix it making it use -O0 in that
    case.

    Signed-off-by: James Clark
    Cc: Adrian Hunter
    Cc: Ian Rogers
    Cc: Jiri Olsa
    Cc: Josh Poimboeuf
    Cc: Namhyung Kim
    Cc: nd
    Link: http://lore.kernel.org/lkml/20191028113340.4282-1-james.clark@arm.com
    [ split from a larger patch ]
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    James Clark
     
  • [ Upstream commit d1b4574a4b86565325ef2e545eda8dfc9aa07c60 ]

    bpf_map__reuse_fd() was calling close() in the error path before returning
    an error value based on errno. However, close can change errno, so that can
    lead to potentially misleading error messages. Instead, explicitly store
    errno in the err variable before each goto.

    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Alexei Starovoitov
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/157269297769.394725.12634985106772698611.stgit@toke.dk
    Signed-off-by: Sasha Levin

    Toke Høiland-Jørgensen
     
  • [ Upstream commit 25bfef430e960e695403b5d9c8dcc11b9f5d62be ]

    'struct xdp_umem_reg' has 4 bytes of padding at the end that makes
    valgrind complain about passing uninitialized stack memory to the
    syscall:

    Syscall param socketcall.setsockopt() points to uninitialised byte(s)
    at 0x4E7AB7E: setsockopt (in /usr/lib64/libc-2.29.so)
    by 0x4BDE035: xsk_umem__create@@LIBBPF_0.0.4 (xsk.c:172)
    Uninitialised value was created by a stack allocation
    at 0x4BDDEBA: xsk_umem__create@@LIBBPF_0.0.4 (xsk.c:140)

    Padding bytes appeared after introducing of a new 'flags' field.
    memset() is required to clear them.

    Fixes: 10d30e301732 ("libbpf: add flags to umem config")
    Signed-off-by: Ilya Maximets
    Signed-off-by: Alexei Starovoitov
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20191009164929.17242-1-i.maximets@ovn.org
    Signed-off-by: Sasha Levin

    Ilya Maximets
     
  • [ Upstream commit b4099769f3321a8d258a47a8b4b9d278dad28a73 ]

    Fix a case where explicit padding at the end of a struct is necessary
    due to non-standart alignment requirements of fields (which BTF doesn't
    capture explicitly).

    Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion")
    Reported-by: John Fastabend
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Alexei Starovoitov
    Tested-by: John Fastabend
    Link: https://lore.kernel.org/bpf/20191008231009.2991130-2-andriin@fb.com
    Signed-off-by: Sasha Levin

    Andrii Nakryiko
     

20 Oct, 2019

1 commit

  • Pull networking fixes from David Miller:
    "I was battling a cold after some recent trips, so quite a bit piled up
    meanwhile, sorry about that.

    Highlights:

    1) Fix fd leak in various bpf selftests, from Brian Vazquez.

    2) Fix crash in xsk when device doesn't support some methods, from
    Magnus Karlsson.

    3) Fix various leaks and use-after-free in rxrpc, from David Howells.

    4) Fix several SKB leaks due to confusion of who owns an SKB and who
    should release it in the llc code. From Eric Biggers.

    5) Kill a bunc of KCSAN warnings in TCP, from Eric Dumazet.

    6) Jumbo packets don't work after resume on r8169, as the BIOS resets
    the chip into non-jumbo mode during suspend. From Heiner Kallweit.

    7) Corrupt L2 header during MPLS push, from Davide Caratti.

    8) Prevent possible infinite loop in tc_ctl_action, from Eric
    Dumazet.

    9) Get register bits right in bcmgenet driver, based upon chip
    version. From Florian Fainelli.

    10) Fix mutex problems in microchip DSA driver, from Marek Vasut.

    11) Cure race between route lookup and invalidation in ipv4, from Wei
    Wang.

    12) Fix performance regression due to false sharing in 'net'
    structure, from Eric Dumazet"

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (145 commits)
    net: reorder 'struct net' fields to avoid false sharing
    net: dsa: fix switch tree list
    net: ethernet: dwmac-sun8i: show message only when switching to promisc
    net: aquantia: add an error handling in aq_nic_set_multicast_list
    net: netem: correct the parent's backlog when corrupted packet was dropped
    net: netem: fix error path for corrupted GSO frames
    macb: propagate errors when getting optional clocks
    xen/netback: fix error path of xenvif_connect_data()
    net: hns3: fix mis-counting IRQ vector numbers issue
    net: usb: lan78xx: Connect PHY before registering MAC
    vsock/virtio: discard packets if credit is not respected
    vsock/virtio: send a credit update when buffer size is changed
    mlxsw: spectrum_trap: Push Ethernet header before reporting trap
    net: ensure correct skb->tstamp in various fragmenters
    net: bcmgenet: reset 40nm EPHY on energy detect
    net: bcmgenet: soft reset 40nm EPHYs before MAC init
    net: phy: bcm7xxx: define soft_reset for 40nm EPHY
    net: bcmgenet: don't set phydev->link from MAC
    net: Update address for MediaTek ethernet driver in MAINTAINERS
    ipv4: fix race condition between route lookup and invalidation
    ...

    Linus Torvalds
     

07 Oct, 2019

1 commit

  • …inux/kernel/git/acme/linux into perf/urgent

    Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    perf script:

    Andi Kleen:

    - Fix recovery from LBR/binary mismatch in the "brstackinsn" --field.

    perf annotate:

    Arnaldo Carvalho de Melo:

    - Propagate errors so that meaningful messages can be presented to the
    user in case of problems.

    perf map:

    Steve MacLean:

    - Fix handling of maps partially overlapped, resolving symbols in the
    ranges not replaced by new mmaps.

    perf tests:

    Ian Rogers:

    - Use raise() instead of NULL derefs to avoid causing a SIGILL rather than a
    SIGSEGV for optimized builds that turn NULL derefs into ud2 instructions.

    perf LLVM:

    Ian Rogers:

    - Don't access out-of-scope array.

    perf inject:

    Steve MacLean:

    - Fix JIT_CODE_MOVE filename, that was having a u64 truncaded into a 32-bit
    snprintf format and also a missing ".so" suffix in another case.

    libsubcmd:

    Ian Rogers:

    - Make _FORTIFY_SOURCE defines dependent on the feature, avoiding
    false positives with with memory sanitizers such as LLVM's ASan.

    Vendor specific events:

    Intel:

    Andi Kleen:

    - Fix period for Intel fixed counters.

    s390:

    Thomas Richter (2):

    - Fix some event details transaction for machine type 8561.

    tools headers UAPI:

    Arnaldo Carvalho de Melo:

    - Sync headers with the kernel, catching new usbdevfs ioctls and
    madvise behaviours to properly decode in 'perf trace' output.

    Documentation:

    Steve MacLean:

    - Correct and clarify jitdump spec.

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

    Ingo Molnar
     

01 Oct, 2019

1 commit

  • bcc uses libbpf repo as a submodule. It brings in libbpf source
    code and builds everything together to produce shared libraries.
    With latest libbpf, I got the following errors:
    /bin/ld: libbcc_bpf.so.0.10.0: version node not found for symbol xsk_umem__create@LIBBPF_0.0.2
    /bin/ld: failed to set dynamic section sizes: Bad value
    collect2: error: ld returned 1 exit status
    make[2]: *** [src/cc/libbcc_bpf.so.0.10.0] Error 1

    In xsk.c, we have
    asm(".symver xsk_umem__create_v0_0_2, xsk_umem__create@LIBBPF_0.0.2");
    asm(".symver xsk_umem__create_v0_0_4, xsk_umem__create@@LIBBPF_0.0.4");
    The linker thinks the built is for LIBBPF but cannot find proper version
    LIBBPF_0.0.2/4, so emit errors.

    I also confirmed that using libbpf.a to produce a shared library also
    has issues:
    -bash-4.4$ cat t.c
    extern void *xsk_umem__create;
    void * test() { return xsk_umem__create; }
    -bash-4.4$ gcc -c -fPIC t.c
    -bash-4.4$ gcc -shared t.o libbpf.a -o t.so
    /bin/ld: t.so: version node not found for symbol xsk_umem__create@LIBBPF_0.0.2
    /bin/ld: failed to set dynamic section sizes: Bad value
    collect2: error: ld returned 1 exit status
    -bash-4.4$

    Symbol versioning does happens in commonly used libraries, e.g., elfutils
    and glibc. For static libraries, for a versioned symbol, the old definitions
    will be ignored, and the symbol will be an alias to the latest definition.
    For example, glibc sched_setaffinity is versioned.
    -bash-4.4$ readelf -s /usr/lib64/libc.so.6 | grep sched_setaffinity
    756: 000000000013d3d0 13 FUNC GLOBAL DEFAULT 13 sched_setaffinity@GLIBC_2.3.3
    757: 00000000000e2e70 455 FUNC GLOBAL DEFAULT 13 sched_setaffinity@@GLIBC_2.3.4
    1800: 0000000000000000 0 FILE LOCAL DEFAULT ABS sched_setaffinity.c
    4228: 00000000000e2e70 455 FUNC LOCAL DEFAULT 13 __sched_setaffinity_new
    4648: 000000000013d3d0 13 FUNC LOCAL DEFAULT 13 __sched_setaffinity_old
    7338: 000000000013d3d0 13 FUNC GLOBAL DEFAULT 13 sched_setaffinity@GLIBC_2
    7380: 00000000000e2e70 455 FUNC GLOBAL DEFAULT 13 sched_setaffinity@@GLIBC_
    -bash-4.4$
    For static library, the definition of sched_setaffinity aliases to the new definition.
    -bash-4.4$ readelf -s /usr/lib64/libc.a | grep sched_setaffinity
    File: /usr/lib64/libc.a(sched_setaffinity.o)
    8: 0000000000000000 455 FUNC GLOBAL DEFAULT 1 __sched_setaffinity_new
    12: 0000000000000000 455 FUNC WEAK DEFAULT 1 sched_setaffinity

    For both elfutils and glibc, additional macros are used to control different handling
    of symbol versioning w.r.t static and shared libraries.
    For elfutils, the macro is SYMBOL_VERSIONING
    (https://sourceware.org/git/?p=elfutils.git;a=blob;f=lib/eu-config.h).
    For glibc, the macro is SHARED
    (https://sourceware.org/git/?p=glibc.git;a=blob;f=include/shlib-compat.h;hb=refs/heads/master)

    This patch used SHARED as the macro name. After this patch, the libbpf.a has
    -bash-4.4$ readelf -s libbpf.a | grep xsk_umem__create
    372: 0000000000017145 1190 FUNC GLOBAL DEFAULT 1 xsk_umem__create_v0_0_4
    405: 0000000000017145 1190 FUNC GLOBAL DEFAULT 1 xsk_umem__create
    499: 00000000000175eb 103 FUNC GLOBAL DEFAULT 1 xsk_umem__create_v0_0_2
    -bash-4.4$
    No versioned symbols for xsk_umem__create.
    The libbpf.a can be used to build a shared library succesfully.
    -bash-4.4$ cat t.c
    extern void *xsk_umem__create;
    void * test() { return xsk_umem__create; }
    -bash-4.4$ gcc -c -fPIC t.c
    -bash-4.4$ gcc -shared t.o libbpf.a -o t.so
    -bash-4.4$

    Fixes: 10d30e301732 ("libbpf: add flags to umem config")
    Cc: Kevin Laatz
    Cc: Arnaldo Carvalho de Melo
    Cc: Andrii Nakryiko
    Acked-by: Andrii Nakryiko
    Signed-off-by: Yonghong Song
    Signed-off-by: Alexei Starovoitov

    Yonghong Song
     

30 Sep, 2019

1 commit

  • make TARGETS=bpf kselftest fails with:

    Makefile:127: tools/build/Makefile.include: No such file or directory

    When the bpf tool make is invoked from tools Makefile, srctree is
    cleared and the current logic check for srctree equals to empty
    string to determine srctree location from CURDIR.

    When the build in invoked from selftests/bpf Makefile, the srctree
    is set to "." and the same logic used for srctree equals to empty is
    needed to determine srctree.

    Check building_out_of_srctree undefined as the condition for both
    cases to fix "make TARGETS=bpf kselftest" build failure.

    Signed-off-by: Shuah Khan
    Signed-off-by: Daniel Borkmann
    Acked-by: Song Liu
    Link: https://lore.kernel.org/bpf/20190927011344.4695-1-skhan@linuxfoundation.org

    Shuah Khan
     

29 Sep, 2019

1 commit

  • Pull networking fixes from David Miller:

    1) Sanity check URB networking device parameters to avoid divide by
    zero, from Oliver Neukum.

    2) Disable global multicast filter in NCSI, otherwise LLDP and IPV6
    don't work properly. Longer term this needs a better fix tho. From
    Vijay Khemka.

    3) Small fixes to selftests (use ping when ping6 is not present, etc.)
    from David Ahern.

    4) Bring back rt_uses_gateway member of struct rtable, it's semantics
    were not well understood and trying to remove it broke things. From
    David Ahern.

    5) Move usbnet snaity checking, ignore endpoints with invalid
    wMaxPacketSize. From Bjørn Mork.

    6) Missing Kconfig deps for sja1105 driver, from Mao Wenan.

    7) Various small fixes to the mlx5 DR steering code, from Alaa Hleihel,
    Alex Vesker, and Yevgeny Kliteynik

    8) Missing CAP_NET_RAW checks in various places, from Ori Nimron.

    9) Fix crash when removing sch_cbs entry while offloading is enabled,
    from Vinicius Costa Gomes.

    10) Signedness bug fixes, generally in looking at the result given by
    of_get_phy_mode() and friends. From Dan Crapenter.

    11) Disable preemption around BPF_PROG_RUN() calls, from Eric Dumazet.

    12) Don't create VRF ipv6 rules if ipv6 is disabled, from David Ahern.

    13) Fix quantization code in tcp_bbr, from Kevin Yang.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (127 commits)
    net: tap: clean up an indentation issue
    nfp: abm: fix memory leak in nfp_abm_u32_knode_replace
    tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state
    sk_buff: drop all skb extensions on free and skb scrubbing
    tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth
    mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions
    Documentation: Clarify trap's description
    mlxsw: spectrum: Clear VLAN filters during port initialization
    net: ena: clean up indentation issue
    NFC: st95hf: clean up indentation issue
    net: phy: micrel: add Asym Pause workaround for KSZ9021
    net: socionext: ave: Avoid using netdev_err() before calling register_netdev()
    ptp: correctly disable flags on old ioctls
    lib: dimlib: fix help text typos
    net: dsa: microchip: Always set regmap stride to 1
    nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
    nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
    net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N
    vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
    net: sched: sch_sfb: don't call qdisc_put() while holding tree lock
    ...

    Linus Torvalds
     

27 Sep, 2019

2 commits

  • Unconditionally defining _FORTIFY_SOURCE can break tools that don't work
    with it, such as memory sanitizers:

    https://github.com/google/sanitizers/wiki/AddressSanitizer#faq

    Fixes: 4b6ab94eabe4 ("perf subcmd: Create subcmd library")
    Signed-off-by: Ian Rogers
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Jiri Olsa
    Cc: Josh Poimboeuf
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lore.kernel.org/lkml/20190925195924.152834-1-irogers@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ian Rogers
     
  • Pull more perf updates from Ingo Molnar:
    "The only kernel change is comment typo fixes.

    The rest is mostly tooling fixes, but also new vendor event additions
    and updates, a bigger libperf/libtraceevent library and a header files
    reorganization that came in a bit late"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (108 commits)
    perf unwind: Fix libunwind build failure on i386 systems
    perf parser: Remove needless include directives
    perf build: Add detection of java-11-openjdk-devel package
    perf jvmti: Include JVMTI support for s390
    perf vendor events: Remove P8 HW events which are not supported
    perf evlist: Fix access of freed id arrays
    perf stat: Fix free memory access / memory leaks in metrics
    perf tools: Replace needless mmap.h with what is needed, event.h
    perf evsel: Move config terms to a separate header
    perf evlist: Remove unused perf_evlist__fprintf() method
    perf evsel: Introduce evsel_fprintf.h
    perf evsel: Remove need for symbol_conf in evsel_fprintf.c
    perf copyfile: Move copyfile routines to separate files
    libperf: Add perf_evlist__poll() function
    libperf: Add perf_evlist__add_pollfd() function
    libperf: Add perf_evlist__alloc_pollfd() function
    libperf: Add libperf_init() call to the tests
    libperf: Merge libperf_set_print() into libperf_init()
    libperf: Add libperf dependency for tests targets
    libperf: Use sys/types.h to get ssize_t, not unistd.h
    ...

    Linus Torvalds