[PATCH v3] kbuild: Show marked Kconfig fragments in "help"
Masahiro Yamada
masahiroy at kernel.org
Sat Sep 2 16:17:37 AEST 2023
On Sat, Sep 2, 2023 at 4:50 AM Kees Cook <keescook at chromium.org> wrote:
>
> On Fri, Sep 01, 2023 at 04:58:37PM +0900, Masahiro Yamada wrote:
> > On Fri, Sep 1, 2023 at 4:13 AM Kees Cook <keescook at chromium.org> wrote:
> > >
> > > Currently the Kconfig fragments in kernel/configs and arch/*/configs
> > > that aren't used internally aren't discoverable through "make help",
> > > which consists of hard-coded lists of config fragments. Instead, list
> > > all the fragment targets that have a "# Help: " comment prefix so the
> > > targets can be generated dynamically.
> > >
> > > Add logic to the Makefile to search for and display the fragment and
> > > comment. Add comments to fragments that are intended to be direct targets.
> > >
> > > Cc: Nicolas Schier <nicolas at fjasle.eu>
> > > Cc: Michael Ellerman <mpe at ellerman.id.au>
> > > Cc: Christophe Leroy <christophe.leroy at csgroup.eu>
> > > Cc: Randy Dunlap <rdunlap at infradead.org>
> > > Cc: linux-kernel at vger.kernel.org
> > > Cc: x86 at kernel.org
> > > Cc: linux-arm-kernel at lists.infradead.org
> > > Cc: linuxppc-dev at lists.ozlabs.org
> > > Cc: linux-riscv at lists.infradead.org
> > > Cc: linux-s390 at vger.kernel.org
> > > Cc: linux-kbuild at vger.kernel.org
> > > Cc: linux-hardening at vger.kernel.org
> > > Signed-off-by: Kees Cook <keescook at chromium.org>
> > > Co-developed-by: Masahiro Yamada <masahiroy at kernel.org>
> > > ---
> > > v3:
> > > - Use Makefile logic from Masahiro Yamada
> > > - Use "# Help: " prefix, but only on desired fragment targets
> > > v2: https://lore.kernel.org/all/20230825194329.gonna.911-kees@kernel.org
> > > v1: https://lore.kernel.org/all/20230824223606.never.762-kees@kernel.org
> > > ---
> > > Makefile | 1 -
> > > arch/arm/configs/dram_0x00000000.config | 1 +
> > > arch/arm/configs/dram_0xc0000000.config | 1 +
> > > arch/arm/configs/dram_0xd0000000.config | 1 +
> > > arch/arm/configs/lpae.config | 1 +
> > > arch/arm64/configs/virt.config | 1 +
> > > arch/powerpc/configs/disable-werror.config | 1 +
> > > arch/powerpc/configs/security.config | 4 +++-
> > > arch/riscv/configs/32-bit.config | 1 +
> > > arch/riscv/configs/64-bit.config | 1 +
> > > arch/s390/configs/btf.config | 1 +
> > > arch/s390/configs/kasan.config | 1 +
> > > arch/x86/Makefile | 4 ----
> > > kernel/configs/debug.config | 2 ++
> > > kernel/configs/kvm_guest.config | 1 +
> > > kernel/configs/nopm.config | 2 ++
> > > kernel/configs/rust.config | 1 +
> > > kernel/configs/tiny.config | 2 ++
> > > kernel/configs/x86_debug.config | 1 +
> > > kernel/configs/xen.config | 2 ++
> > > scripts/kconfig/Makefile | 15 ++++++++++++---
> > > 21 files changed, 36 insertions(+), 9 deletions(-)
> > >
> >
> >
> > Just one thing.
> >
> >
> >
> >
> >
> > > diff --git a/kernel/configs/tiny.config b/kernel/configs/tiny.config
> > > index 00009f7d0835..60a4b6d80b36 100644
> > > --- a/kernel/configs/tiny.config
> > > +++ b/kernel/configs/tiny.config
> > > @@ -1,3 +1,5 @@
> > > +# Help: Size-optimized kernel image
> >
> >
> > I will drop this.
> >
> >
> > We already have a hard-coded help message.
> >
> > tinyconfig - Configure the tiniest possible kernel
> >
> >
> >
> >
> > Then, some lines below, again.
> >
> > tiny.config - Size-optimized kernel image
> >
> >
> >
> > tiny.config is for internal use for tinyconfig.
>
> Shall I send a v4, or did you fix this up already?
Locally fixed-up.
If nobody points out anything else,
you do not need to send v4.
--
Best Regards
Masahiro Yamada
More information about the Linuxppc-dev
mailing list