[PATCH v13 01/25] fs/resctrl: Ensure default group reports tasks on monitor-only systems
From: Tony Luck
Date: Mon Sep 28 2026 - 18:16:03 EST
This is a pre-existing issue, but the resctrl_arch_alloc_capable() check in
is_closid_match() actively breaks the default group on systems that only
support monitoring capabilities.
When a user reads the root /sys/fs/resctrl/tasks file on a system with
monitoring capabilities but no allocation capabilities, the following call
chain occurs:
rdtgroup_tasks_show()
show_rdt_tasks()
is_closid_match()
Since resctrl_arch_alloc_capable() evaluates to false on such systems,
is_closid_match() unconditionally returns false for all tasks. Furthermore,
because the default group has type RDTCTRL_GROUP, is_rmid_match() will also
return false.
This causes the root tasks file to appear completely empty, hiding all tasks
on the system that have not been explicitly moved to a monitoring group.
Removing the resctrl_arch_alloc_capable() test is safe because a struct
rdtgroup with type == RDTCTRL_GROUP (other than the always-present default
group) can only be created on systems where allocation is supported. So
whenever the remaining resctrl_arch_match_closid() check could meaningfully
succeed, resctrl_arch_alloc_capable() was already implicitly true, making
the test redundant.
Fixes: e6b2fac36fcc ("x86/resctrl: Use is_closid_match() in more places")
Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
Closes: https://sashiko.dev/#/patchset/20260831174421.13921-1-tony.luck%40intel.com?part=9
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
---
v13:
New patch (split from patch 9)
---
fs/resctrl/rdtgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
index 68be9b903ac6..57ab090072c2 100644
--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -685,7 +685,7 @@ static int __rdtgroup_move_task(struct task_struct *tsk,
static bool is_closid_match(struct task_struct *t, struct rdtgroup *r)
{
- return (resctrl_arch_alloc_capable() && (r->type == RDTCTRL_GROUP) &&
+ return (r->type == RDTCTRL_GROUP &&
resctrl_arch_match_closid(t, r->closid));
}
--
2.55.0