Re: [PATCH] watchdog: move nmi_watchdog sysctl into .rodata
From: Joel Granados
Date: Thu Oct 09 2025 - 10:21:36 EST
On Mon, Oct 06, 2025 at 05:06:25PM +0200, Petr Mladek wrote:
> On Mon 2025-09-29 17:55:07, Joel Granados wrote:
> > Move nmi_watchdog into the watchdog_sysctls array to prevent it from
> > unnecessary modification. This move effectively moves it inside the
> > .rodata section.
> >
> > Initially moved out into its own non-const array in commit 9ec272c586b0
> > ("watchdog/hardlockup: keep kernel.nmi_watchdog sysctl as 0444 if probe
> > fails"), which made it writable only when watchdog_hardlockup_available
> > was true. Moving it back to watchdog_sysctl keeps this behavior as
> > writing to nmi_watchdog still fails when watchdog_hardlockup_available
> > is false.
> >
> > Signed-off-by: Joel Granados <joel.granados@xxxxxxxxxx>
>
> The patch looks good to me. Updating the access rights was nice to
> have. But it does not look not worth complicating the constification.
> And proc_nmi_watchdog() works correctly even when the access rights
> are always 0644.
>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
>
> Best Regards,
> Petr
Thx for the review.
I'll push this through the sysctl-next branch unless you want to handle
it somewhere else.
Best
--
Joel Granados
Attachment:
signature.asc
Description: PGP signature