Re: Re: Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-29 Thread Joel Granados
On Tue, Jan 28, 2025 at 10:43:10AM -0500, Paul Moore wrote: > On Tue, Jan 28, 2025 at 6:22 AM Joel Granados > wrote: > > On Mon, Jan 27, 2025 at 03:42:39PM +, Matthew Wilcox wrote: > > > On Mon, Jan 27, 2025 at 04:55:58PM +0200, Jani Nikula wrote: > > > > You could have static const within fu

Re: Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-28 Thread Paul Moore
On Tue, Jan 28, 2025 at 6:22 AM Joel Granados wrote: > On Mon, Jan 27, 2025 at 03:42:39PM +, Matthew Wilcox wrote: > > On Mon, Jan 27, 2025 at 04:55:58PM +0200, Jani Nikula wrote: > > > You could have static const within functions too. You get the rodata > > > protection and function local sco

Re: Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-28 Thread Joel Granados
On Mon, Jan 27, 2025 at 03:42:39PM +, Matthew Wilcox wrote: > On Mon, Jan 27, 2025 at 04:55:58PM +0200, Jani Nikula wrote: > > You could have static const within functions too. You get the rodata > > protection and function local scope, best of both worlds? > > timer_active is on the stack, so

Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-27 Thread Matthew Wilcox
On Mon, Jan 27, 2025 at 04:55:58PM +0200, Jani Nikula wrote: > You could have static const within functions too. You get the rodata > protection and function local scope, best of both worlds? timer_active is on the stack, so it can't be static const. Does this really need to be cc'd to such a wid

Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-27 Thread Jani Nikula
On Mon, 27 Jan 2025, Joel Granados wrote: > On Wed, Jan 22, 2025 at 01:41:35PM +0100, Ard Biesheuvel wrote: >> On Wed, 22 Jan 2025 at 13:25, Joel Granados wrote: >> > >> > On Tue, Jan 21, 2025 at 02:40:16PM +0100, Alexander Gordeev wrote: >> > > On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Gran

Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-27 Thread Joel Granados
On Wed, Jan 22, 2025 at 01:41:35PM +0100, Ard Biesheuvel wrote: > On Wed, 22 Jan 2025 at 13:25, Joel Granados wrote: > > > > On Tue, Jan 21, 2025 at 02:40:16PM +0100, Alexander Gordeev wrote: > > > On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Granados wrote: > > > > > > Hi Joel, > > > > > > > Ad

Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-22 Thread Ard Biesheuvel
On Wed, 22 Jan 2025 at 13:25, Joel Granados wrote: > > On Tue, Jan 21, 2025 at 02:40:16PM +0100, Alexander Gordeev wrote: > > On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Granados wrote: > > > > Hi Joel, > > > > > Add the const qualifier to all the ctl_tables in the tree except for > > > watchdo

Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-22 Thread Joel Granados
On Tue, Jan 21, 2025 at 02:40:16PM +0100, Alexander Gordeev wrote: > On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Granados wrote: > > Hi Joel, > > > Add the const qualifier to all the ctl_tables in the tree except for > > watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls, > > load

Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-21 Thread Alexander Gordeev
On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Granados wrote: Hi Joel, > Add the const qualifier to all the ctl_tables in the tree except for > watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls, > loadpin_sysctl_table and the ones calling register_net_sysctl (./net, > drivers/inifi

Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-15 Thread Bill O'Donnell
On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Granados wrote: > Add the const qualifier to all the ctl_tables in the tree except for > watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls, > loadpin_sysctl_table and the ones calling register_net_sysctl (./net, > drivers/inifiniband dirs

Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-15 Thread Wei Liu
On Fri, Jan 10, 2025 at 03:16:08PM +0100, Joel Granados wrote: [...] > diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c > index 7a35c82976e0..9453f0c26f2a 100644 > --- a/drivers/hv/hv_common.c > +++ b/drivers/hv/hv_common.c > @@ -141,7 +141,7 @@ static int sysctl_record_panic_msg = 1; >

Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-15 Thread Thomas Gleixner
On Fri, Jan 10 2025 at 15:16, Joel Granados wrote: > sed: > sed --in-place \ > -e "s/struct ctl_table .table = &uts_kern/const struct ctl_table *table > = \&uts_kern/" \ > kernel/utsname_sysctl.c > > Reviewed-by: Song Liu > Acked-by: Steven Rostedt (Google) # for kernel/trace/ >

Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-12 Thread Baoquan He
On 01/10/25 at 03:16pm, Joel Granados wrote: ...snip... > diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c > index c0caa14880c3..71b0809e06d6 100644 > --- a/kernel/kexec_core.c > +++ b/kernel/kexec_core.c > @@ -925,7 +925,7 @@ static int kexec_limit_handler(const struct ctl_table > *table, i

Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-10 Thread Anna Schumaker
On 1/10/25 9:16 AM, Joel Granados wrote: > Add the const qualifier to all the ctl_tables in the tree except for > watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls, > loadpin_sysctl_table and the ones calling register_net_sysctl (./net, > drivers/inifiniband dirs). These are specia