All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3] kbuild: Show marked Kconfig fragments in "help"
Date: Fri, 1 Sep 2023 12:50:29 -0700	[thread overview]
Message-ID: <202309011250.AB0DAA03@keescook> (raw)
In-Reply-To: <CAK7LNATENQQy6LrWS10S-EXsyAvTraSj2WA=O7rFsS9Ht6a+3g@mail.gmail.com>

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@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@fjasle.eu>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> > Cc: Randy Dunlap <rdunlap@infradead.org>
> > Cc: linux-kernel@vger.kernel.org
> > Cc: x86@kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: linux-riscv@lists.infradead.org
> > Cc: linux-s390@vger.kernel.org
> > Cc: linux-kbuild@vger.kernel.org
> > Cc: linux-hardening@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > Co-developed-by: Masahiro Yamada <masahiroy@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?

-- 
Kees Cook

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3] kbuild: Show marked Kconfig fragments in "help"
Date: Fri, 1 Sep 2023 12:50:29 -0700	[thread overview]
Message-ID: <202309011250.AB0DAA03@keescook> (raw)
In-Reply-To: <CAK7LNATENQQy6LrWS10S-EXsyAvTraSj2WA=O7rFsS9Ht6a+3g@mail.gmail.com>

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@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@fjasle.eu>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> > Cc: Randy Dunlap <rdunlap@infradead.org>
> > Cc: linux-kernel@vger.kernel.org
> > Cc: x86@kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: linux-riscv@lists.infradead.org
> > Cc: linux-s390@vger.kernel.org
> > Cc: linux-kbuild@vger.kernel.org
> > Cc: linux-hardening@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > Co-developed-by: Masahiro Yamada <masahiroy@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?

-- 
Kees Cook

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-s390@vger.kernel.org, Randy Dunlap <rdunlap@infradead.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	linux-kbuild@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
	linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3] kbuild: Show marked Kconfig fragments in "help"
Date: Fri, 1 Sep 2023 12:50:29 -0700	[thread overview]
Message-ID: <202309011250.AB0DAA03@keescook> (raw)
In-Reply-To: <CAK7LNATENQQy6LrWS10S-EXsyAvTraSj2WA=O7rFsS9Ht6a+3g@mail.gmail.com>

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@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@fjasle.eu>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> > Cc: Randy Dunlap <rdunlap@infradead.org>
> > Cc: linux-kernel@vger.kernel.org
> > Cc: x86@kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: linux-riscv@lists.infradead.org
> > Cc: linux-s390@vger.kernel.org
> > Cc: linux-kbuild@vger.kernel.org
> > Cc: linux-hardening@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > Co-developed-by: Masahiro Yamada <masahiroy@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?

-- 
Kees Cook

WARNING: multiple messages have this Message-ID (diff)
From: Kees Cook <keescook@chromium.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3] kbuild: Show marked Kconfig fragments in "help"
Date: Fri, 1 Sep 2023 12:50:29 -0700	[thread overview]
Message-ID: <202309011250.AB0DAA03@keescook> (raw)
In-Reply-To: <CAK7LNATENQQy6LrWS10S-EXsyAvTraSj2WA=O7rFsS9Ht6a+3g@mail.gmail.com>

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@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@fjasle.eu>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
> > Cc: Randy Dunlap <rdunlap@infradead.org>
> > Cc: linux-kernel@vger.kernel.org
> > Cc: x86@kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: linux-riscv@lists.infradead.org
> > Cc: linux-s390@vger.kernel.org
> > Cc: linux-kbuild@vger.kernel.org
> > Cc: linux-hardening@vger.kernel.org
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> > Co-developed-by: Masahiro Yamada <masahiroy@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?

-- 
Kees Cook

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-09-01 19:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 19:13 [PATCH v3] kbuild: Show marked Kconfig fragments in "help" Kees Cook
2023-08-31 19:13 ` Kees Cook
2023-08-31 19:13 ` Kees Cook
2023-08-31 19:13 ` Kees Cook
2023-09-01  7:58 ` Masahiro Yamada
2023-09-01  7:58   ` Masahiro Yamada
2023-09-01  7:58   ` Masahiro Yamada
2023-09-01  7:58   ` Masahiro Yamada
2023-09-01 19:50   ` Kees Cook [this message]
2023-09-01 19:50     ` Kees Cook
2023-09-01 19:50     ` Kees Cook
2023-09-01 19:50     ` Kees Cook
2023-09-02  6:17     ` Masahiro Yamada
2023-09-02  6:17       ` Masahiro Yamada
2023-09-02  6:17       ` Masahiro Yamada
2023-09-02  6:17       ` Masahiro Yamada
2023-09-02  1:37 ` Michael Ellerman
2023-09-02  1:37   ` Michael Ellerman
2023-09-02  1:37   ` Michael Ellerman
2023-09-02  1:37   ` Michael Ellerman
2023-09-02 18:17 ` Nicolas Schier
2023-09-02 18:17   ` Nicolas Schier
2023-09-02 18:17   ` Nicolas Schier
2023-09-02 18:17   ` Nicolas Schier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202309011250.AB0DAA03@keescook \
    --to=keescook@chromium.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=masahiroy@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=nicolas@fjasle.eu \
    --cc=rdunlap@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.