Re: [PATCH] fortify: turn strlen() into an inline function using __builtin_constant_p()

2025-01-10 Thread kernel test robot
Hi Vincent, kernel test robot noticed the following build warnings: [auto build test WARNING on 9d89551994a430b50c4fffcb1e617a057fa76e20] url: https://github.com/intel-lab-lkp/linux/commits/Vincent-Mailhol/fortify-turn-strlen-into-an-inline-function-using-__builtin_constant_p/20250108-223159

Re: [linus:master] [fortify] 239d87327d: vm-scalability.throughput 17.3% improvement

2025-01-10 Thread Mateusz Guzik
On Fri, Jan 10, 2025 at 5:58 PM Kees Cook wrote: > > On Thu, Jan 09, 2025 at 11:01:47PM +0100, Mateusz Guzik wrote: > > That is to say, contrary to the report above, I believe the change is > > in fact a regression which just so happened to make things faster for > > a specific case. The unintende

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

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

2025-01-10 Thread Dixit, Ashutosh
On Thu, 09 Jan 2025 05:16:39 -0800, Joel Granados wrote: > > diff --git a/drivers/gpu/drm/i915/i915_perf.c > b/drivers/gpu/drm/i915/i915_perf.c > index 2406cda75b7b..5384d1bb4923 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -4802,7 +4802,7 @@ int i9

Re: [linus:master] [fortify] 239d87327d: vm-scalability.throughput 17.3% improvement

2025-01-10 Thread Kees Cook
On Thu, Jan 09, 2025 at 11:01:47PM +0100, Mateusz Guzik wrote: > On Thu, Jan 9, 2025 at 10:12 PM Kees Cook wrote: > > > > On Thu, Jan 09, 2025 at 09:52:31PM +0100, Mateusz Guzik wrote: > > > On Thu, Jan 09, 2025 at 12:38:04PM -0800, Kees Cook wrote: > > > > On Thu, Jan 09, 2025 at 08:51:44AM -0800

Re: [PATCH v2] pstore/zone: avoid dereferencing zero sized ptr after init zones

2025-01-10 Thread Kees Cook
On Fri, 10 Jan 2025 14:57:14 +0200, Eugen Hristev wrote: > In psz_init_zones, if the requested area has a total_size less than > record_size, kcalloc will be called with c == 0 and will return > ZERO_SIZE_PTR. > Further, this will lead to an oops. > > With this patch, in this scenario, it will loo

[PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-10 Thread Joel Granados
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 special cases as they use a registration function with a n

Re: [RFC PATCH v2 13/15] arm64: mm: Guard page table writes with kpkeys

2025-01-10 Thread Kevin Brodsky
On 09/01/2025 08:17, Qi Zheng wrote: > [...] > >> @@ -314,6 +315,7 @@ static inline pte_t pte_clear_uffd_wp(pte_t pte) >>     static inline void __set_pte_nosync(pte_t *ptep, pte_t pte) >>   { >> +    guard(kpkeys_hardened_pgtables)(); >>   WRITE_ONCE(*ptep, pte); >>   } >>   @@ -758,6 +760,7 @

[PATCH v2] pstore/zone: avoid dereferencing zero sized ptr after init zones

2025-01-10 Thread Eugen Hristev
In psz_init_zones, if the requested area has a total_size less than record_size, kcalloc will be called with c == 0 and will return ZERO_SIZE_PTR. Further, this will lead to an oops. With this patch, in this scenario, it will look like this : [6.865545] pstore_zone: total size : 28672 Byte