* [PATCH 6.12.y] clk: meson: align gxbb_32k_clk_sel number of parents with actual count [not found] <2026090928-nylon-handoff-edb8@gregkh> @ 2026-09-10 7:21 ` Jerome Brunet 2026-09-11 11:20 ` Sasha Levin 0 siblings, 1 reply; 5+ messages in thread From: Jerome Brunet @ 2026-09-10 7:21 UTC (permalink / raw) To: stable; +Cc: Martin Blumenstingl, Neil Armstrong, Jerome Brunet, linux-amlogic From: Martin Blumenstingl <martin.blumenstingl@googlemail.com> The following out-of-bounds read has been observed by Christian on a GXBB WeTek Hub: ================================================================== BUG: KASAN: global-out-of-bounds in __clk_register+0x1b70/0x2418 Read of size 8 at addr ffffd66320cf88e0 by task swapper/0/1 CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 7.0.0-rc5 #1 PREEMPT Hardware name: WeTek Hub (DT) Call trace: show_stack+0x14/0x20 (C) dump_stack_lvl+0x74/0x94 print_report+0x164/0x4b0 kasan_report+0x98/0xd8 __asan_report_load8_noabort+0x1c/0x24 __clk_register+0x1b70/0x2418 devm_clk_hw_register+0x74/0x15c meson_clkc_init+0xd4/0x20c meson_clkc_syscon_probe+0x5c/0x94 platform_probe+0xbc/0x17c really_probe+0x184/0x844 __driver_probe_device+0x154/0x35c driver_probe_device+0x60/0x188 __driver_attach+0x168/0x4a0 bus_for_each_dev+0xec/0x180 driver_attach+0x38/0x58 bus_add_driver+0x238/0x4c0 driver_register+0x150/0x388 __platform_driver_register+0x54/0x7c gxbb_clkc_driver_init+0x18/0x20 do_one_initcall+0xb8/0x340 kernel_init_freeable+0x49c/0x52c kernel_init+0x24/0x148 ret_from_fork+0x10/0x20 The buggy address belongs to the variable: gxbb_32k_clk_parents+0x60/0x400 The buggy address belongs to a vmalloc virtual mapping The buggy address belongs to the physical page: Memory state around the buggy address: ffffd66320cf8780: 00 00 00 00 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 ffffd66320cf8800: 00 04 f9 f9 f9 f9 f9 f9 00 04 f9 f9 f9 f9 f9 f9 >ffffd66320cf8880: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 ^ ffffd66320cf8900: 00 01 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 ffffd66320cf8980: 00 00 02 f9 f9 f9 f9 f9 00 00 02 f9 f9 f9 f9 f9 ================================================================== Commit 7915d7d5407c ("clk: amlogic: gxbb: drop non existing 32k clock parent") dropped a non-existing clock parent from the gxbb_32k_clk_sel mux but didn't adjust the hard-coded num_parents field. Fix the actual number of parents of that mux by using ARRAY_SIZE instead (avoiding similar problems in future). Fixes: 7915d7d5407c ("clk: amlogic: gxbb: drop non existing 32k clock parent") Reported-by: Christian Hewitt <christianshewitt@gmail.com> Cc: stable@vger.kernel.org Tested-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://patch.msgid.link/20260623201956.1324992-1-martin.blumenstingl@googlemail.com (cherry picked from commit 628b6fee9fca292f12d07f0f1bcf1edefa949d81) Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- drivers/clk/meson/gxbb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 2bfb0ab9c93c..39a6a31e796f 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -1305,7 +1305,7 @@ static struct clk_regmap gxbb_32k_clk_sel = { .name = "32k_clk_sel", .ops = &clk_regmap_mux_ops, .parent_data = gxbb_32k_clk_parent_data, - .num_parents = 4, + .num_parents = ARRAY_SIZE(gxbb_32k_clk_parent_data), .flags = CLK_SET_RATE_PARENT, }, }; -- 2.53.0 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6.12.y] clk: meson: align gxbb_32k_clk_sel number of parents with actual count 2026-09-10 7:21 ` [PATCH 6.12.y] clk: meson: align gxbb_32k_clk_sel number of parents with actual count Jerome Brunet @ 2026-09-11 11:20 ` Sasha Levin 2026-09-11 13:07 ` Jerome Brunet 0 siblings, 1 reply; 5+ messages in thread From: Sasha Levin @ 2026-09-11 11:20 UTC (permalink / raw) To: stable Cc: Sasha Levin, Neil Armstrong, Martin Blumenstingl, linux-amlogic, Jerome Brunet > The following out-of-bounds read has been observed by Christian on a > GXBB WeTek Hub: Queued for 6.12, thanks. -- Thanks, Sasha _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6.12.y] clk: meson: align gxbb_32k_clk_sel number of parents with actual count 2026-09-11 11:20 ` Sasha Levin @ 2026-09-11 13:07 ` Jerome Brunet 2026-09-11 17:54 ` Sasha Levin 0 siblings, 1 reply; 5+ messages in thread From: Jerome Brunet @ 2026-09-11 13:07 UTC (permalink / raw) To: Sasha Levin, stable Cc: Sasha Levin, Neil Armstrong, Martin Blumenstingl, linux-amlogic On ven. 11 sept. 2026 at 07:20, Sasha Levin <sashal@kernel.org> wrote: >> The following out-of-bounds read has been observed by Christian on a >> GXBB WeTek Hub: > > Queued for 6.12, thanks. Hello Sasha, In those instance where exact same backport applies to multiple versions how do you prefer to handle things ? * Just replying 5 times as I did ? * Just reply once with a note explaining that it applies to other version ? Thanks Cheers > > -- > Thanks, > Sasha > > _______________________________________________ > linux-amlogic mailing list > linux-amlogic@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-amlogic -- Jerome _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6.12.y] clk: meson: align gxbb_32k_clk_sel number of parents with actual count 2026-09-11 13:07 ` Jerome Brunet @ 2026-09-11 17:54 ` Sasha Levin 2026-09-11 19:05 ` Jerome Brunet 0 siblings, 1 reply; 5+ messages in thread From: Sasha Levin @ 2026-09-11 17:54 UTC (permalink / raw) To: Jerome Brunet; +Cc: stable, Neil Armstrong, Martin Blumenstingl, linux-amlogic On Fri, Sep 11, 2026 at 03:07:54PM +0200, Jerome Brunet wrote: >On ven. 11 sept. 2026 at 07:20, Sasha Levin <sashal@kernel.org> wrote: > >>> The following out-of-bounds read has been observed by Christian on a >>> GXBB WeTek Hub: >> >> Queued for 6.12, thanks. > >Hello Sasha, > >In those instance where exact same backport applies to multiple versions >how do you prefer to handle things ? > >* Just replying 5 times as I did ? >* Just reply once with a note explaining that it applies to other version ? Hey! Either works - so whatever is easier for you. Something along the lines of "[PATCH 6.18-6.1]" is what most folks use. -- Thanks, Sasha _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 6.12.y] clk: meson: align gxbb_32k_clk_sel number of parents with actual count 2026-09-11 17:54 ` Sasha Levin @ 2026-09-11 19:05 ` Jerome Brunet 0 siblings, 0 replies; 5+ messages in thread From: Jerome Brunet @ 2026-09-11 19:05 UTC (permalink / raw) To: Sasha Levin; +Cc: stable, Neil Armstrong, Martin Blumenstingl, linux-amlogic On ven. 11 sept. 2026 at 13:54, Sasha Levin <sashal@kernel.org> wrote: > On Fri, Sep 11, 2026 at 03:07:54PM +0200, Jerome Brunet wrote: >>On ven. 11 sept. 2026 at 07:20, Sasha Levin <sashal@kernel.org> wrote: >> >>>> The following out-of-bounds read has been observed by Christian on a >>>> GXBB WeTek Hub: >>> >>> Queued for 6.12, thanks. >> >>Hello Sasha, >> >>In those instance where exact same backport applies to multiple versions >>how do you prefer to handle things ? >> >>* Just replying 5 times as I did ? >>* Just reply once with a note explaining that it applies to other version ? > > Hey! > > Either works - so whatever is easier for you. > > Something along the lines of "[PATCH 6.18-6.1]" is what most folks use. Noted. Thanks a lot > > -- > Thanks, > Sasha > > _______________________________________________ > linux-amlogic mailing list > linux-amlogic@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-amlogic -- Jerome _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-11 19:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <2026090928-nylon-handoff-edb8@gregkh>
2026-09-10 7:21 ` [PATCH 6.12.y] clk: meson: align gxbb_32k_clk_sel number of parents with actual count Jerome Brunet
2026-09-11 11:20 ` Sasha Levin
2026-09-11 13:07 ` Jerome Brunet
2026-09-11 17:54 ` Sasha Levin
2026-09-11 19:05 ` Jerome Brunet
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®