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: Mon, 27 May 2024 13:16:06 +0200
From: "Linux regression tracking (Thorsten Leemhuis)"
 <regressions@...mhuis.info>
To: Ron Economos <re@...z.net>, Guenter Roeck <linux@...ck-us.net>,
 "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
 regressions@...ts.linux.dev, linux-clk@...r.kernel.org,
 Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 linux-riscv <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH] clkdev: report over-sized strings when creating clkdev

On 27.05.24 12:45, Ron Economos wrote:
> On Fri, May 17, 2024 at 03:09:14PM -0700, Guenter Roeck wrote:
>>
>> On Fri, Mar 15, 2024 at 11:47:55AM +0000, Russell King (Oracle) wrote:
>> > Report an error when an attempt to register a clkdev entry results in a
>> > truncated string so the problem can be easily spotted.
>> >
>> > Reported by: Duanqiang Wen <duanqiangwen@...-swift.com>
>> > Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
>> > Reviewed-by: Stephen Boyd <sboyd@...nel.org>
>>
>> With this patch in the mainline kernel, I get
>> [...]
>> when trying to boot sifive_u in qemu.
>>
>> Apparently, "10000000.clock-controller" is too long. Any suggestion on
>> how to solve the problem ? I guess using dev_name(dev) as dev_id
> parameter
>> for clk_hw_register_clkdev() is not or no longer a good idea.
>> What else should be used instead ?
> 
> This issue causes a complete boot failure on real hardware (SiFive
> Unmatched).

Hmmm. That and because nobody afaics has time/motivation to fix this
anytime soon (or am I mistaken there?) makes me wonder if we should
revert this change for now (and remerge it later once the problem this
change exposed was fixed). Or is another solution in sight somewhere?

Ciao, Thorsten

> The boot only gets as far as "Starting kernel ..." with no
> other indication of what's going on.
> 
> Guenter's suggested patch solves the issue.
> 
> diff --git a/drivers/clk/sifive/sifive-prci.c
> b/drivers/clk/sifive/sifive-prci.c
> index 25b8e1a80ddc..20cc8f42d9eb 100644
> --- a/drivers/clk/sifive/sifive-prci.c
> +++ b/drivers/clk/sifive/sifive-prci.c
> @@ -537,7 +537,7 @@ static int __prci_register_clocks(struct device
> *dev, struct __prci_data *pd,
>                          return r;
>                  }
> 
> -               r = clk_hw_register_clkdev(&pic->hw, pic->name,
> dev_name(dev));
> +               r = clk_hw_register_clkdev(&pic->hw, pic->name, "prci");
>                  if (r) {
>                          dev_warn(dev, "Failed to register clkdev for
> %s: %d\n",
>                                   init.name, r);
> 
> 
> 

#regzbot dup:
https://lore.kernel.org/lkml/7eda7621-0dde-4153-89e4-172e4c095d01@roeck-us.net/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ