Re: [PATCH v5 01/14] clk: microchip: mpfs: fix clk_cfg array bounds violation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Stephen Boyd (2022-09-28 17:30:28)
> Quoting Conor Dooley (2022-09-09 05:31:10)
> > There is an array bounds violation present during clock registration,
> > triggered by current code by only specific toolchains. This seems to
> > fail gracefully in v6.0-rc1, using a toolchain build from the riscv-
> > gnu-toolchain repo and with clang-15, and life carries on. While
> > converting the driver to use standard clock structs/ops, kernel panics
> > were seen during boot when built with clang-15:
> > 
> [...]
> > 
> > If parent is RTCREF, so the macro becomes: &mpfs_cfg_clks[33].cfg.hw
> > which is well beyond the end of the array. Amazingly, builds with GCC
> > 11.1 see no problem here, booting correctly and hooking the parent up
> > etc. Builds with clang-15 do not, with the above panic.
> > 
> > Change the macro to use specific offsets depending on the parent rather
> > than the dt-binding's clock IDs.
> > 
> > Fixes: 1c6a7ea32b8c ("clk: microchip: mpfs: add RTCREF clock control")
> > CC: Nathan Chancellor <nathan@xxxxxxxxxx>
> > Signed-off-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
> > ---
> 
> I'll merge this patch over to clk-fixes as well.

Great I see it's already split out and on fixes branch. Thanks!




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux