lkml.org 
[lkml]   [2022]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v5 01/14] clk: microchip: mpfs: fix clk_cfg array bounds violation
    From
    Date
    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@kernel.org>
    > > Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
    > > ---
    >
    > I'll merge this patch over to clk-fixes as well.

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

    \
     
     \ /
      Last update: 2022-09-29 02:32    [W:3.128 / U:0.656 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site