* [PATCH] soc: renesas: rz-sysc: Suppress binding attributes
@ 2025-02-15 13:18 Claudiu
2025-02-18 20:46 ` Lad, Prabhakar
2025-02-20 16:00 ` Geert Uytterhoeven
0 siblings, 2 replies; 6+ messages in thread
From: Claudiu @ 2025-02-15 13:18 UTC (permalink / raw)
To: geert+renesas, magnus.damm, john.madieu.xa
Cc: claudiu.beznea, linux-renesas-soc, linux-kernel, Claudiu Beznea
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
The matching data for the rz-sysc driver is marked with __initconst, which
means it is discarded after initialization. Because of this, attempting to
unbind/bind the driver through sysfs after system boot can lead to "Unable
to handle kernel paging request at virtual address" errors due to accessing
freed memory.
Since the System Controller (SYSC) is an essential block for Renesas SoCs,
suppress binding attributes to prevent them being exposed in sysfs,
avoiding potential issues.
Fixes: 1660e5ea6a3e ("soc: renesas: Add SYSC driver for Renesas RZ family")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---
drivers/soc/renesas/rz-sysc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soc/renesas/rz-sysc.c b/drivers/soc/renesas/rz-sysc.c
index 1c98da37b7d1..14db508f669f 100644
--- a/drivers/soc/renesas/rz-sysc.c
+++ b/drivers/soc/renesas/rz-sysc.c
@@ -120,6 +120,7 @@ static int rz_sysc_probe(struct platform_device *pdev)
static struct platform_driver rz_sysc_driver = {
.driver = {
.name = "renesas-rz-sysc",
+ .suppress_bind_attrs = true,
.of_match_table = rz_sysc_match
},
.probe = rz_sysc_probe
--
2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: renesas: rz-sysc: Suppress binding attributes
2025-02-15 13:18 [PATCH] soc: renesas: rz-sysc: Suppress binding attributes Claudiu
@ 2025-02-18 20:46 ` Lad, Prabhakar
2025-02-20 16:00 ` Geert Uytterhoeven
1 sibling, 0 replies; 6+ messages in thread
From: Lad, Prabhakar @ 2025-02-18 20:46 UTC (permalink / raw)
To: Claudiu
Cc: geert+renesas, magnus.damm, john.madieu.xa, linux-renesas-soc,
linux-kernel, Claudiu Beznea
On Sat, Feb 15, 2025 at 1:18 PM Claudiu <claudiu.beznea@tuxon.dev> wrote:
>
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> The matching data for the rz-sysc driver is marked with __initconst, which
> means it is discarded after initialization. Because of this, attempting to
> unbind/bind the driver through sysfs after system boot can lead to "Unable
> to handle kernel paging request at virtual address" errors due to accessing
> freed memory.
>
> Since the System Controller (SYSC) is an essential block for Renesas SoCs,
> suppress binding attributes to prevent them being exposed in sysfs,
> avoiding potential issues.
>
> Fixes: 1660e5ea6a3e ("soc: renesas: Add SYSC driver for Renesas RZ family")
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
> drivers/soc/renesas/rz-sysc.c | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> diff --git a/drivers/soc/renesas/rz-sysc.c b/drivers/soc/renesas/rz-sysc.c
> index 1c98da37b7d1..14db508f669f 100644
> --- a/drivers/soc/renesas/rz-sysc.c
> +++ b/drivers/soc/renesas/rz-sysc.c
> @@ -120,6 +120,7 @@ static int rz_sysc_probe(struct platform_device *pdev)
> static struct platform_driver rz_sysc_driver = {
> .driver = {
> .name = "renesas-rz-sysc",
> + .suppress_bind_attrs = true,
> .of_match_table = rz_sysc_match
> },
> .probe = rz_sysc_probe
> --
> 2.43.0
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: renesas: rz-sysc: Suppress binding attributes
2025-02-15 13:18 [PATCH] soc: renesas: rz-sysc: Suppress binding attributes Claudiu
2025-02-18 20:46 ` Lad, Prabhakar
@ 2025-02-20 16:00 ` Geert Uytterhoeven
2025-02-20 16:37 ` Geert Uytterhoeven
2025-02-20 16:41 ` claudiu beznea (tuxon)
1 sibling, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2025-02-20 16:00 UTC (permalink / raw)
To: Claudiu
Cc: magnus.damm, john.madieu.xa, linux-renesas-soc, linux-kernel,
Claudiu Beznea
On Sat, 15 Feb 2025 at 14:18, Claudiu <claudiu.beznea@tuxon.dev> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> The matching data for the rz-sysc driver is marked with __initconst, which
> means it is discarded after initialization. Because of this, attempting to
> unbind/bind the driver through sysfs after system boot can lead to "Unable
> to handle kernel paging request at virtual address" errors due to accessing
> freed memory.
>
> Since the System Controller (SYSC) is an essential block for Renesas SoCs,
> suppress binding attributes to prevent them being exposed in sysfs,
> avoiding potential issues.
>
> Fixes: 1660e5ea6a3e ("soc: renesas: Add SYSC driver for Renesas RZ family")
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.15.
> drivers/soc/renesas/rz-sysc.c | 1 +
Looks like there are more opportunities for similar changes?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: renesas: rz-sysc: Suppress binding attributes
2025-02-20 16:00 ` Geert Uytterhoeven
@ 2025-02-20 16:37 ` Geert Uytterhoeven
2025-02-20 16:40 ` claudiu beznea (tuxon)
2025-02-20 16:41 ` claudiu beznea (tuxon)
1 sibling, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2025-02-20 16:37 UTC (permalink / raw)
To: Claudiu
Cc: magnus.damm, john.madieu.xa, linux-renesas-soc, linux-kernel,
Claudiu Beznea
Hi Claudiu,
On Thu, 20 Feb 2025 at 17:00, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sat, 15 Feb 2025 at 14:18, Claudiu <claudiu.beznea@tuxon.dev> wrote:
> > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >
> > The matching data for the rz-sysc driver is marked with __initconst, which
> > means it is discarded after initialization. Because of this, attempting to
> > unbind/bind the driver through sysfs after system boot can lead to "Unable
> > to handle kernel paging request at virtual address" errors due to accessing
> > freed memory.
> >
> > Since the System Controller (SYSC) is an essential block for Renesas SoCs,
> > suppress binding attributes to prevent them being exposed in sysfs,
> > avoiding potential issues.
> >
> > Fixes: 1660e5ea6a3e ("soc: renesas: Add SYSC driver for Renesas RZ family")
> > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-devel for v6.15.
As the offending commit is only in renesas-devel, I'll fold the fix into
the original commit.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: renesas: rz-sysc: Suppress binding attributes
2025-02-20 16:37 ` Geert Uytterhoeven
@ 2025-02-20 16:40 ` claudiu beznea (tuxon)
0 siblings, 0 replies; 6+ messages in thread
From: claudiu beznea (tuxon) @ 2025-02-20 16:40 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: magnus.damm, john.madieu.xa, linux-renesas-soc, linux-kernel,
Claudiu Beznea
Hi, Geert,
On 2/20/25 18:37, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Thu, 20 Feb 2025 at 17:00, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Sat, 15 Feb 2025 at 14:18, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>
>>> The matching data for the rz-sysc driver is marked with __initconst, which
>>> means it is discarded after initialization. Because of this, attempting to
>>> unbind/bind the driver through sysfs after system boot can lead to "Unable
>>> to handle kernel paging request at virtual address" errors due to accessing
>>> freed memory.
>>>
>>> Since the System Controller (SYSC) is an essential block for Renesas SoCs,
>>> suppress binding attributes to prevent them being exposed in sysfs,
>>> avoiding potential issues.
>>>
>>> Fixes: 1660e5ea6a3e ("soc: renesas: Add SYSC driver for Renesas RZ family")
>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> i.e. will queue in renesas-devel for v6.15.
> As the offending commit is only in renesas-devel, I'll fold the fix into
> the original commit.
Sure, thank you!
>
> Gr{oetje,eeting}s,
>
> Geert
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: renesas: rz-sysc: Suppress binding attributes
2025-02-20 16:00 ` Geert Uytterhoeven
2025-02-20 16:37 ` Geert Uytterhoeven
@ 2025-02-20 16:41 ` claudiu beznea (tuxon)
1 sibling, 0 replies; 6+ messages in thread
From: claudiu beznea (tuxon) @ 2025-02-20 16:41 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: magnus.damm, john.madieu.xa, linux-renesas-soc, linux-kernel,
Claudiu Beznea
Hi, Geert,
On 2/20/25 18:00, Geert Uytterhoeven wrote:
> On Sat, 15 Feb 2025 at 14:18, Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>
>> The matching data for the rz-sysc driver is marked with __initconst, which
>> means it is discarded after initialization. Because of this, attempting to
>> unbind/bind the driver through sysfs after system boot can lead to "Unable
>> to handle kernel paging request at virtual address" errors due to accessing
>> freed memory.
>>
>> Since the System Controller (SYSC) is an essential block for Renesas SoCs,
>> suppress binding attributes to prevent them being exposed in sysfs,
>> avoiding potential issues.
>>
>> Fixes: 1660e5ea6a3e ("soc: renesas: Add SYSC driver for Renesas RZ family")
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-devel for v6.15.
>
>> drivers/soc/renesas/rz-sysc.c | 1 +
> Looks like there are more opportunities for similar changes?
For the other Renesas drivers I wasn't sure if this is the desired way.
Thank you,
Claudiu
>
> Gr{oetje,eeting}s,
>
> Geert
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-20 16:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-15 13:18 [PATCH] soc: renesas: rz-sysc: Suppress binding attributes Claudiu
2025-02-18 20:46 ` Lad, Prabhakar
2025-02-20 16:00 ` Geert Uytterhoeven
2025-02-20 16:37 ` Geert Uytterhoeven
2025-02-20 16:40 ` claudiu beznea (tuxon)
2025-02-20 16:41 ` claudiu beznea (tuxon)
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®