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: <20230511085154.GQ66750@black.fi.intel.com>
Date:   Thu, 11 May 2023 11:51:54 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Jiri Slaby <jirislaby@...nel.org>
Cc:     Masahiro Yamada <masahiroy@...nel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        andreas.noever@...il.com, michael.jamet@...el.com,
        YehezkelShB@...il.com, USB list <linux-usb@...r.kernel.org>,
        Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: make localmodconfig doesn't work for thunderbolt

Hi,

On Wed, May 10, 2023 at 01:00:54PM +0200, Jiri Slaby wrote:
> Hi,
> 
> if I use localmodconfig for example like this:
> mkdir /tmp/tb/
> echo thunderbolt >/tmp/tb/lsmod
> make O=/tmp/tb LSMOD=/tmp/tb/lsmod localmodconfig
> 
> I get:
> using config: '.config'
> thunderbolt config not found!!
> 
> $ grep 'USB4\>' /tmp/tb/.config
> # CONFIG_USB4 is not set
> 
> I believe it's due to:
>   obj-${CONFIG_USB4} := thunderbolt.o
> in drivers/thunderbolt/Makefile. I.e. ${} used instead of more common $().
> 
> But even if I change the parser:
> 
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -317,7 +317,7 @@ foreach my $makefile (@makefiles) {
>         $_ = convert_vars($_, %make_vars);
> 
>         # collect objects after obj-$(CONFIG_FOO_BAR)
> -       if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
> +       if (/obj-\$[({](CONFIG_[^})]*)[)}]\s*[+:]?=\s*(.*)/) {
>             $var = $1;
>             $objs = $2;
> 
> 
> I see:
> module thunderbolt did not have configs CONFIG_USB4
> 
> and:
> $ grep 'USB4\>' /tmp/tb/.config
> # CONFIG_USB4 is not set
> 
> So two questions:
> 1) is ${} supported and should be the above change sent as a patch? Or
> should be drivers/thunderbolt/Makefile fixed to use $(). (And maybe other
> Makefiles too.)

The streamline_config.pl mentions use of ${} in comments itself:

# add to the configs hash all configs that are needed to enable
# a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o
# where we know we need bar.o so we add FOO to the list.

So I think it should be made to support this.

> 2) how to fix that 'thunderbolt did not have configs'?

There are bunch of other symbols that generate the same (after the above
fix from you), not just Thunderbolt so figuring that out and fix would
be the way forward I think. However, my perl skills are are not up to
this task at the moment. I can take a look but cannot promise that I
figure a solution.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ