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]
Date:   Wed, 21 Feb 2018 02:04:26 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        "Yann E. MORIN" <yann.morin.1998@...e.fr>,
        Michal Marek <mmarek@...e.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] Kconfig: improve handling for all{rand,yes,no,}.config
 fragments

2018-02-20 18:59 GMT+09:00 Arnd Bergmann <arnd@...db.de>:
> On Tue, Feb 20, 2018 at 10:26 AM, Masahiro Yamada
> <yamada.masahiro@...ionext.com> wrote:
>> 2018-02-17 6:41 GMT+09:00 Arnd Bergmann <arnd@...db.de>:
>
>>> @@ -621,14 +622,24 @@ int main(int ac, char **av)
>>>                 case randconfig:        name = "allrandom.config"; break;
>>>                 default: break;
>>>                 }
>>> -               if (conf_read_simple(name, S_DEF_USER) &&
>>> -                   conf_read_simple("all.config", S_DEF_USER)) {
>>> -                       fprintf(stderr,
>>> -                               _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"),
>>> -                               name);
>>> -                       exit(1);
>>> +               /* try ./name, arch/$(ARCH)/configs/name and kernel/config/name */
>>> +               if (!conf_read_simple(name, S_DEF_USER))
>>> +                       break;
>>> +               arch = getenv("ARCH");
>>> +               if (arch) {
>>> +                       snprintf(fullname, sizeof(fullname), "arch/%s/configs/%s",
>>> +                                arch, name);
>>> +                       if (!conf_read_simple(fullname, S_DEF_USER))
>>> +                               break;
>>>                 }
>>
>>
>> I am not a big fan of hard-coding the kernel directory structure.
>>
>> We already do this [1], but I am thinking of kicking this out.
>> [1] https://github.com/torvalds/linux/blob/v4.16-rc1/scripts/kconfig/confdata.c#L33
>
> Ok, I see. How about adding a way to detect that we are build-testing
> with randconfig instead?


How about implementing something in scripts/kconfig/Makefile?

merge_config collects config fragments into 'configfiles'

I was thinking of a similar thing.


If KCONFIG_ALLCONFIG is 1,
scripts/kconfig/Makefile searches
'./', '$srctree/', 'arch/$(SRCARCH)/configs/', 'kernel/configs/'
and sets the found file in it,

If KCONFIG_ALLCONFIG already contains a file name, it is used as-is.

scripts/kconfig/conf.c will be simplified.



>> BTW, I am trying to compiler capability check to Kconfig.
>> If this work is done, I hope some "depends on !COMPILE_TEST" will go
>> away (but not all?)
>> https://patchwork.kernel.org/patch/10225375/
>
> I think most of the 'depends on !COMPILE_TEST' are for cases that
> impact compile-testing in some way (more false-positive warnings,
> fewer real warnings, much slower compile speed), rather than a lack
> of check for a specific compiler version.
>
> We might be able to replace the CONFIG_STANDALONE and
> CONFIG_PREVENT_FIRMWARE_BUILD with Kconfig $(shell)
> checks if you think that leads to an improvement.
>

OK, then your kernel/configs/allrandom.config approach will be useful.



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ