Re: Re: [PATCH] treewide: const qualify ctl_tables where applicable
From: Joel Granados
Date: Mon Jan 13 2025 - 03:44:43 EST
On Fri, Jan 10, 2025 at 05:05:34PM +0000, Daniel Xu wrote:
> Hi Joel,
>
> On 1/10/25 05:32, Joel Granados wrote:
> > On Thu, Jan 09, 2025 at 01:38:33PM +0000, bot+bpf-ci@xxxxxxxxxx wrote:
> >> Dear patch submitter,
> >>
> >> CI has tested the following submission:
> >> Status: FAILURE
> >> Name: treewide: const qualify ctl_tables where applicable
> >> Patchwork: https://patchwork.kernel.org/project/netdevbpf/list/?series=923743&state=*
> >> Matrix: https://github.com/kernel-patches/bpf/actions/runs/12690795270
> >>
> >> Failed jobs:
> >> build-x86_64-gcc: https://github.com/kernel-patches/bpf/actions/runs/12690795270/job/35372434718
> >> build-x86_64-llvm-17: https://github.com/kernel-patches/bpf/actions/runs/12690795270/job/35372434997
> >> build-x86_64-llvm-17-O2: https://github.com/kernel-patches/bpf/actions/runs/12690795270/job/35372435294
> >> build-x86_64-llvm-18: https://github.com/kernel-patches/bpf/actions/runs/12690795270/job/35372435638
> >> build-x86_64-llvm-18-O2: https://github.com/kernel-patches/bpf/actions/runs/12690795270/job/35372435949
> > We can't make watchdog_hardlockup_sysctl const here because it is
> > changing the ctl_talbe.mode to 0644 if watchdog_hardlockup_available is
> > true. I'll remove this sysctl array from my patchset to move forward
> > with the general constification, but I still don't fully understand the
> > need for the modification of the permissions.
> >
> > My main question is: Cant we just leave the permissions as they where
> > originally (before the this commit [1])? The problem touched by [1] is
> > when the user writes to nmi_watchdog and watchdog_hardlockup_available
> > is false, they will receive a -ENOTSUPP error from proc_nmi_watchdog.
> > But wont they get an error anyway if they try to write to a read-only
> > file? Does this fix target some specific user-space application?
> >
> > I have added the original to:/from: contacts from [1]. Please correct me
> > if I have miss-read the situation.
> >
> > Best
> >
> > [1] https://lore.kernel.org/lkml/20230526184139.1.I0d75971cc52a7283f495aac0bd5c3041aadc734e@changeid/
>
> That seems like a reasonable question. Note BPF CI is off-list by
> default, so I've CC'd linux-kernel.
Thx. more info on this is greatly appreciated
--
Joel Granados