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] [day] [month] [year] [list]
Message-ID: <167112600086.259523.16908827852183615525.robh@kernel.org>
Date:   Thu, 15 Dec 2022 11:40:46 -0600
From:   Rob Herring <robh@...nel.org>
To:     Alexander Sverdlin <alexander.sverdlin@...il.com>
Cc:     Linus Walleij <linusw@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Lukasz Majewski <lukma@...x.de>,
        Arnd Bergmann <arnd@...nel.org>, devicetree@...r.kernel.org,
        Nikita Shubin <nikita.shubin@...uefel.me>,
        Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org,
        Hartley Sweeten <hsweeten@...ionengravers.com>
Subject: Re: [PATCH] of: fdt: Honor CONFIG_CMDLINE* even without /chosen node


On Mon, 12 Dec 2022 00:58:17 +0100, Alexander Sverdlin wrote:
> I do not read a strict requirement on /chosen node in either ePAPR or in
> Documentation/devicetree. Help text for CONFIG_CMDLINE and
> CONFIG_CMDLINE_EXTEND doesn't make their behavior explicitly dependent on
> the presence of /chosen or the presense of /chosen/bootargs.
> 
> However the early check for /chosen and bailing out in
> early_init_dt_scan_chosen() skips CONFIG_CMDLINE handling which is not
> really related to /chosen node or the particular method of passing cmdline
> from bootloader.
> 
> This leads to counterintuitive combinations (assuming
> CONFIG_CMDLINE_EXTEND=y):
> 
> a) bootargs="foo", CONFIG_CMDLINE="bar" => cmdline=="foo bar"
> b) /chosen missing, CONFIG_CMDLINE="bar" => cmdline==""
> c) bootargs="", CONFIG_CMDLINE="bar" => cmdline==" bar"
> 
> Move CONFIG_CMDLINE handling outside of early_init_dt_scan_chosen() so that
> cases b and c above result in the same cmdline.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@...il.com>
> ---
>  drivers/of/fdt.c | 40 ++++++++++++++++++++--------------------
>  1 file changed, 20 insertions(+), 20 deletions(-)
> 

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ