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: <YJPsM0McnVgsHS15@krava>
Date:   Thu, 6 May 2021 15:16:35 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Martin KaFai Lau <kafai@...com>
Cc:     Jiri Slaby <jirislaby@...nel.org>,
        Michal Suchánek <msuchanek@...e.de>,
        Yonghong Song <yhs@...com>, linux-kernel@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Song Liu <songliubraving@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>, netdev@...r.kernel.org,
        bpf@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        dwarves@...r.kernel.org, Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Wed, May 05, 2021 at 10:31:52PM -0700, Martin KaFai Lau wrote:
> On Tue, May 04, 2021 at 08:41:47AM +0200, Jiri Slaby wrote:
> > On 03. 05. 21, 12:08, Jiri Olsa wrote:
> > > On Mon, May 03, 2021 at 10:59:44AM +0200, Jiri Slaby wrote:
> > > > CCing pahole people.
> > > > 
> > > > On 03. 05. 21, 9:59, Jiri Slaby wrote:
> > > > > On 03. 05. 21, 8:11, Jiri Slaby wrote:
> > > > > > > > > > > looks like vfs_truncate did not get into BTF data,
> > > > > > > > > > > I'll try to reproduce
> > > > > > > 
> > > > > > > _None_ of the functions are generated by pahole -J from
> > > > > > > debuginfo on ppc64. debuginfo appears to be correct. Neither
> > > > > > > pahole -J fs/open.o works correctly. collect_functions in
> > > > > > > dwarves seems to be defunct on ppc64... "functions" array is
> > > > > > > bogus (so find_function -- the bsearch -- fails).
> > > > > > 
> > > > > > It's not that bogus. I forgot an asterisk:
> > > > > > > #0  find_function (btfe=0x100269f80, name=0x10024631c
> > > > > > > "stream_open") at
> > > > > > > /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> > > > > > > (gdb) p (*functions)@84
> > > > > > > $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr
> > > > > > > = 75232, size = 72, sh_addr = 65536, generated = false}, {
> > > > > > >      name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592,
> > > > > > > size = 216, sh_addr = 65536, generated = false}, {
> > > > > > >      name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr =
> > > > > > > 80816, size = 232, sh_addr = 65536, generated = false}, {
> > > > > > >      name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr =
> > > > > > > 74304, size = 100, sh_addr = 65536, generated = false}, {
> > > > > > ...
> > > > > > >      name = 0x7ffff68e0808 ".stream_open", addr = 65824, size =
> > > > > > > 72, sh_addr = 65536, generated = false}, {
> > > > > > ...
> > > > > > >      name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size =
> > > > > > > 544, sh_addr = 65536, generated = false}}
> > > > > > 
> > > > > > The dot makes the difference, of course. The question is why is it
> > > > > > there? I keep looking into it. Only if someone has an immediate
> > > > > > idea...
> > > > > 
> > > > > Well, .vfs_truncate is in .text (and contains an ._mcount call). And
> > > > > vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
> > > > > excludes all functions without the ._mcount call, is_ftrace_func later
> > > > > returns false for such functions and they are filtered before the BTF
> > > > > processing.
> > > > > 
> > > > > Technically, get_vmlinux_addrs looks at a list of functions between
> > > > > __start_mcount_loc and __stop_mcount_loc and considers only the listed.
> > > > > 
> > > > > I don't know what the correct fix is (exclude .opd functions from the
> > > > > filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
> > > > > this too.
> > > > 
> > > > Attaching a patch for pahole which fixes the issue, but I have no idea
> > > > whether it is the right fix at all.
> > > 
> > > hi,
> > > we're considering to disable ftrace filter completely,
> > > I guess that would solve this issue for ppc as well
> > > 
> > >    https://lore.kernel.org/bpf/20210501001653.x3b4rk4vk4iqv3n7@kafai-mbp.dhcp.thefacebook.com/
> > 
> > Right, the attached patch fixes it for me too.
> Ah, I just noticed the attachment while replying an earlier message in
> this thread.
> 
> Please feel free to add SOB to mine or
> repost yours and toss mine.  Either way works for me.
> 

I think this patch is missing the same removal I just commented
on your patch.. either way is ok for me

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ