lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171130030110.GA18880@kernel.org>
Date:   Thu, 30 Nov 2017 00:01:10 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Martin KaFai Lau <kafai@...com>
Cc:     Matthias Kaehlcke <mka@...omium.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Yonghong Song <yhs@...com>, Alexei Starovoitov <ast@...com>,
        "David S. Miller" <davem@...emloft.net>,
        Daniel Borkmann <daniel@...earbox.net>,
        Wang Nan <wangnan0@...wei.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: Re: 'perf test BPF' failing, libbpf regression wrt "basic API for
 BPF obj name"

Em Wed, Nov 29, 2017 at 02:31:36PM -0800, Martin KaFai Lau escreveu:
> On Wed, Nov 29, 2017 at 06:15:43PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Nov 29, 2017 at 01:07:34PM -0800, Martin KaFai Lau escreveu:
> > > On Tue, Nov 28, 2017 at 04:05:19PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > [root@...et ~]# perf test -v bpf
> > > > 39: BPF filter                                            :
> > > > 39.1: Basic BPF filtering                                 :
> > > > --- start ---
> > > > test child forked, pid 12198
> > > > Kernel build dir is set to /lib/modules/4.14.0+/build
> > > > set env: KBUILD_DIR=/lib/modules/4.14.0+/build
> > > [ ... ]
> > > > libbpf: failed to create map (name: 'flip_table'): Invalid argument
> > > > libbpf: failed to load object '[basic_bpf_test]'
> > > > bpf: load objects failed
> > > 88cda1c9da02 ("bpf: libbpf: Provide basic API support to specify BPF obj name")
> > > is introduced in 4.15.

> > > I think the perf@...nel-4.15 broke on older kernels like 4.14 because
> > > the new bpf prog/map name is only introduced since 4.15.

> > > The newer perf needs to be compatible with an older kernel?

> > Sure :-)

> Would the latest features introduced in perf/libbpf supposed to be
> available in the latest kernel only?  What may be the reason that the

Yes, then the new perf binary should try to use the new stuff, if it
fails, use the old one, there is no requirement that one uses perf 4.14
in lockstep with the kernel 4.14 (or any other version), perf 4.15
should work with the 4.14 kernel as well as with 4.15 (or any other
future kernel), only limited by what it can grok up to when it was
released.

I'll test with a 4.15 kernel to confirm this, thanks for the
explanation!

> latest perf is installed with an older kernel while it does not gain new
> functionality? 

See, for instance tools/perf/util/evsel.c, function perf_evsel__open(),
and all those fallbacks for features a new tool doesn't find on an older
kernel.

When the user asks for some feature that is not present in the older
kernel, then it fails and the tool calling perf_evsel__open() will use
perf_evlist__strerror_open() to provide as best an explanation to what
took place as possible.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ