Re: [apparmor] [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-21 Thread Jani Nikula
On Wed, 21 Jun 2023, Joel Granados wrote: > On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: >> On Wed, 21 Jun 2023, Joel Granados wrote: >> > Remove the empty end element from all the arrays that are passed to the >> > register sysctl calls. In some fi

Re: [apparmor] [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-21 Thread Jani Nikula
.mode = 0644, > + .proc_handler = proc_dointvec_minmax, > + .extra1 = SYSCTL_ZERO, > + .extra2 = &oa_sample_rate_hard_limit, > + } > }; The existing indentation is off, but fixing it doesn't really belong in this patch. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [apparmor] [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()

2024-06-04 Thread Jani Nikula
_match_string() isn't a great argument alone, because this adds three times the number of __match_string() calls than there are __sysfs_match_string() calls. It's not a good model to follow. Arguably both should be renamed. BR, Jani. -- Jani Nikula, Intel

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

2025-01-29 Thread Jani Nikula
able. >> >> Global data structures marked 'const' will be moved into an ELF >> section that is typically mapped read-only in its entirely, and so the >> data cannot be modified by writing to it directly. No such protection >> is possible for the stack, and so the constness there is only enforced >> at compile time. > I completely agree with you. No reason to use const within those > functions. But why define those ctl_tables in function to begin with. > Can't you just use the ones that are defined outside the functions? You could have static const within functions too. You get the rodata protection and function local scope, best of both worlds? BR, Jani. -- Jani Nikula, Intel

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

2025-01-13 Thread Jani Nikula
&i915_perf_stream_paranoid, For i915, Acked-by: Jani Nikula -- Jani Nikula, Intel