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: <CAEf4BzbW2i4Y-i3TXW7x42PqEpw5_nNeReSXS77m4GC3uqD3wg@mail.gmail.com>
Date:   Thu, 27 May 2021 09:36:35 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Mel Gorman <mgorman@...hsingularity.net>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Hellwig <hch@...radead.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Michal Suchanek <msuchanek@...e.de>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Jiri Olsa <jolsa@...nel.org>,
        Hritik Vijay <hritikxx8@...il.com>,
        Linux-BPF <bpf@...r.kernel.org>,
        Linux-Net <netdev@...r.kernel.org>, Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH v2] mm/page_alloc: Work around a pahole limitation with
 zero-sized struct pagesets

On Thu, May 27, 2021 at 7:54 AM Mel Gorman <mgorman@...hsingularity.net> wrote:
>
> On Thu, May 27, 2021 at 07:37:05AM -0700, Andrii Nakryiko wrote:
> > > This patch checks for older versions of pahole and only allows
> > > DEBUG_INFO_BTF_MODULES if pahole supports zero-sized per-cpu structures.
> > > DEBUG_INFO_BTF is still allowed as a KVM boot test passed with pahole
> >
> > Unfortunately this won't work. The problem is that vmlinux BTF is
> > corrupted, which results in module BTFs to be rejected as well, as
> > they depend on it.
> >
> > But vmlinux BTF corruption makes BPF subsystem completely unusable. So
> > even though kernel boots, nothing BPF-related works. So we'd need to
> > add dependency for DEBUG_INFO_BTF on pahole 1.22+.
> >
>
> While bpf usage would be broken, the kernel will boot and the effect
> should be transparent to any kernel build based on "make oldconfig".

I think if DEBUG_INFO_BTF=y has no chance of generating valid vmlinux
BTF it has to be forced out. So if we are doing this at all, we should
do it for CONFIG_DEBUG_INFO_BTF, not CONFIG_DEBUG_INFO_BTF_MODULES.
CONFIG_DEBUG_INFO_BTF_MODULES will follow automatically.

> CONFIG_DEBUG_INFO_BTF defaults N so if that is forced out, it will be
> easily missed by a distribution kernel maintainer.

We actually had previous discussions on forcing build failure in cases
when CONFIG_DEBUG_INFO_BTF=y can't be satisfied, but no one followed
up. I'll look into this and will try to change the behavior. It's
caused too much confusion previously and now with changes like this we
are going to waste even more people's time.

>
> Yes, users of BPF will be affected and it may generate bug reports but
> the fix will be to build with a working pahole. Breaking boot on the other
> hand is a lot more visible and hacking around this with a non-zero struct
> size has been shot down.
>
> --
> Mel Gorman
> SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ