Re: [PATCH v5 00/11] x86,fs/resctrl: Fix long-standing issues

From: Borislav Petkov

Date: Wed Jul 01 2026 - 16:43:12 EST


On Wed, Jul 01, 2026 at 12:40:27PM -0700, Borislav Petkov wrote:
> On Wed, Jul 01, 2026 at 10:55:38AM -0700, Reinette Chatre wrote:
> > I agree there are serious issues here. What prevents me from advocating for them
> > all to go to stable is that the fixes to the intricate races required changes to
> > resctrl's core locking flows. I absolutely tested and scrutinized these changes but
> > having them go straight to all the stable kernels feels like a big jump to me.
>
> Makes sense to me.
>
> > The fixes that do not involve locking changes are below. They could be considered
> > for stable.
> > 1/11: x86,fs/resctrl: Prevent out-of-bounds access while offlining CPU when SNC enabled
> > 4/11: fs/resctrl: Free mon_data structures on rdt_get_tree() failure
> > 5/11: fs/resctrl: Fix use-after-free during unmount
> > 8/11: fs/resctrl: Fix double-add of pseudo-locked region's RMID to free list
>
> Ok, lemme hoist those up into urgent first.

Yeah, not easy, see below.

This is because 3/11 which is moving the functions, is missing now.

We can do a forward declaration but I'd let you reshuffle things the way you
want them and send me the urgent fixes by placing them at the beginning of the
set so that I can stick them into urgent.

I'll queue 1/11 only now.

Thx.

fs/resctrl/rdtgroup.c: In function ‘rdt_get_tree’:
fs/resctrl/rdtgroup.c:2896:17: error: implicit declaration of function ‘mon_put_kn_priv’ [-Werror=implicit-function-declaration]
2896 | mon_put_kn_priv();
| ^~~~~~~~~~~~~~~
fs/resctrl/rdtgroup.c: At top level:
fs/resctrl/rdtgroup.c:3153:13: warning: conflicting types for ‘mon_put_kn_priv’; have ‘void(void)’
3153 | static void mon_put_kn_priv(void)
| ^~~~~~~~~~~~~~~
fs/resctrl/rdtgroup.c:3153:13: error: static declaration of ‘mon_put_kn_priv’ follows non-static declaration
fs/resctrl/rdtgroup.c:2896:17: note: previous implicit declaration of ‘mon_put_kn_priv’ with type ‘void(void)’
2896 | mon_put_kn_priv();
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:289: fs/resctrl/rdtgroup.o] Error 1
make[3]: *** [scripts/Makefile.build:549: fs/resctrl] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:549: fs] Error 2
make[2]: *** Waiting for unfinished jobs....
drivers/gpu/drm/amd/amdgpu/../display/dc/link/accessories/link_dp_cts.c: In function ‘dp_retrain_link_dp_test.constprop’:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/accessories/link_dp_cts.c:161:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
161 | }
| ^

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette