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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 29 Aug 2023 23:57:19 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Nicolas Schier <nicolas@...sle.eu>
Cc:     Michael Ellerman <mpe@...erman.id.au>,
        Kees Cook <keescook@...omium.org>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Randy Dunlap <rdunlap@...radead.org>,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        linux-arm-kernel@...ts.infradead.org,
        linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
        linux-s390@...r.kernel.org, linux-kbuild@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2 0/2] kbuild: Show Kconfig fragments in "help"

On Tue, Aug 29, 2023 at 3:55 PM Nicolas Schier <nicolas@...sle.eu> wrote:
>
> On Mon 28 Aug 2023 16:17:07 GMT, Michael Ellerman wrote:
> > Masahiro Yamada <masahiroy@...nel.org> writes:
> > > On Sat, Aug 26, 2023 at 4:55 AM Kees Cook <keescook@...omium.org> wrote:
> > >>
> > >> Hi,
> > >>
> > >> This is my series to show *.config targets in the "help" target so these
> > >> various topics can be more easily discoverd.
> > >>
> > >> v2:
> > >>  - split .fragment from .config to hide "internal" fragments
> > >
> > > Please do not do this churn.
> >
> > That was my idea :}
> >
> > > Like Randy, I did not get "why" part quiet well,
> > > but if you are eager about this,
> > > you can show help message only when the following
> > > ("# Help:" prefix for example) is found in the first line.
> > >
> > > # Help: blah blah
> > > # other comment
> >
> > I did think of that, but wasn't sure how to do it in make.
>
> Something like this should do it:
>
>         @grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \
>          while read loc dummy helptext; do \
>                 tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \
>                 [ "$${line}" = "1" ] && \
>                   printf "  %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \
>          done
>
> but this neither beautiful nor elegant it likes to be improved.
>
> Kind regards,
> Nicolas




The attached patch will work too.

I dropped the "in the first line" restriction
because SPDX might be placed in the first line
of config fragments.



-- 
Best Regards
Masahiro Yamada

View attachment "config-help.diff" of type "text/x-patch" (4024 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ