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: <20251106-kiwi-of-total-valor-b27f5d@kuoka>
Date: Thu, 6 Nov 2025 09:55:17 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Enlin Mu <enlin.mu@...ux.dev>
Cc: robh@...nel.org, saravanak@...gle.com, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, enlin.mu@...soc.com
Subject: Re: [PATCH] of: print warning when cmdline overflows from bootargs

On Wed, Nov 05, 2025 at 04:27:17PM +0800, Enlin Mu wrote:
> From: Enlin Mu <enlin.mu@...oc.com>
> 
> add debug info. sometimes cmdline in dts is too long,

I don't see debug info here.

Please use full sentences, starting with capital letter and ending with
full stop.

Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597


> developers are not aware of the length limit of the
> cmdline, resulting in some misjudgments.
> 
> Signed-off-by: Enlin Mu <enlin.mu@...oc.com>
> ---
>  drivers/of/fdt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 0edd639898a6..077799b2f565 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -1085,6 +1085,8 @@ int __init early_init_dt_scan_chosen(char *cmdline)
>  	p = of_get_flat_dt_prop(node, "bootargs", &l);
>  	if (p != NULL && l > 0)
>  		strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE));
> +	if (l > COMMAND_LINE_SIZE)
> +		pr_warn("cmdline overflows from bootargs\n");

Why only OF early should have this warning and cmdline passed via ATAGS
or in ACPI system should not?

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ