From: Reinette Chatre <reinette.chatre@intel.com>
To: tony.luck@intel.com, james.morse@arm.com, Dave.Martin@arm.com,
babu.moger@amd.com, bp@alien8.de, tglx@linutronix.de,
dave.hansen@linux.intel.com
Cc: x86@kernel.org, hpa@zytor.com, ben.horgan@arm.com,
fustini@kernel.org, fenghuay@nvidia.com, peternewman@google.com,
yu.c.chen@intel.com, linux-kernel@vger.kernel.org,
patches@lists.linux.dev, reinette.chatre@intel.com
Subject: [PATCH v3 0/9] x86,fs/resctrl: Fix long-standing issues
Date: Fri, 22 May 2026 12:15:04 -0700 [thread overview]
Message-ID: <cover.1779476724.git.reinette.chatre@intel.com> (raw)
v2: https://lore.kernel.org/lkml/20260515193944.15114-1-tony.luck@intel.com/
v1: https://lore.kernel.org/all/20260508182143.14592-1-tony.luck@intel.com/
While reviewing the AET series [1] Sashiko reported a deadlock during mount,
and a use-after-free when an L3 domain is removed during CPU offline. Reinette
found a memory leak in the mount error path while refactoring code for a
solution to the mount hang.
During review of V1 of this series Sashiko found a new UAF on unmount issue
that was fixed in V2.
During review of V2 Sashiko uncovered a couple more new issues: TOCTOU
involving rdtgroup_kn_put() that may lead to UAF or double-free, double
free of pseudo-locked regions, potential deadlock between resctrl unmount and
info file readers. Sashiko also found that the CPU offline fix in V2 is flawed
in its use of is_percpu_thread().
Address all issues identified. This version is significantly different from V2
because of the additional fixes and reworking of the CPU offline fix. I do not
consider this version quite "polished" but after all changes made to address
all the issues identified by Sashiko I would like to check-in with folks (and
Sashiko) on where the fixes are headed and would appreciate any feedback.
Applies against tip/master to ensure it considers pending x86/cache changes.
[1] https://sashiko.dev/#/patchset/20260429184858.36423-1-tony.luck%40intel.com
Reinette Chatre (6):
fs/resctrl: Fix deadlock for errors during mount
fs/resctrl: Prevent use-after-free in rdtgroup_kn_put()
fs/resctrl: Fix pseudo-locking lifetime handling
fs/resctrl: Prevent deadlock and use-after-free in info file handlers
x86/resctrl: Ensure domain fully initialized before placed on RCU list
fs/resctrl: Fix UAF from worker threads when domains are removed
Tony Luck (3):
fs/resctrl: Move functions to avoid forward references in subsequent
fixes
fs/resctrl: Free mon_data structures on rdt_get_tree() failure
fs/resctrl: Fix use-after-free during unmount
arch/x86/kernel/cpu/resctrl/core.c | 18 +-
arch/x86/kernel/cpu/resctrl/intel_aet.c | 5 +-
fs/resctrl/ctrlmondata.c | 38 +-
fs/resctrl/internal.h | 15 +-
fs/resctrl/monitor.c | 100 ++-
fs/resctrl/pseudo_lock.c | 44 +-
fs/resctrl/rdtgroup.c | 847 +++++++++++++++---------
7 files changed, 680 insertions(+), 387 deletions(-)
--
2.50.1
next reply other threads:[~2026-05-22 19:15 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 19:15 Reinette Chatre [this message]
2026-05-22 19:15 ` [PATCH v3 1/9] fs/resctrl: Move functions to avoid forward references in subsequent fixes Reinette Chatre
2026-05-28 10:06 ` Ben Horgan
2026-05-22 19:15 ` [PATCH v3 2/9] fs/resctrl: Free mon_data structures on rdt_get_tree() failure Reinette Chatre
2026-05-27 15:18 ` Ben Horgan
2026-05-22 19:15 ` [PATCH v3 3/9] fs/resctrl: Fix use-after-free during unmount Reinette Chatre
2026-05-28 9:45 ` Ben Horgan
2026-05-28 16:09 ` Reinette Chatre
2026-05-28 13:48 ` Chen Yu
2026-05-28 16:09 ` Reinette Chatre
2026-05-22 19:15 ` [PATCH v3 4/9] fs/resctrl: Fix deadlock for errors during mount Reinette Chatre
2026-05-28 10:11 ` Ben Horgan
2026-05-29 14:06 ` Chen, Yu C
2026-05-29 15:53 ` Reinette Chatre
2026-05-31 8:41 ` Chen, Yu C
2026-05-22 19:15 ` [PATCH v3 5/9] fs/resctrl: Prevent use-after-free in rdtgroup_kn_put() Reinette Chatre
2026-05-28 10:51 ` Ben Horgan
2026-05-22 19:15 ` [PATCH v3 6/9] fs/resctrl: Fix pseudo-locking lifetime handling Reinette Chatre
2026-05-28 10:56 ` Ben Horgan
2026-05-28 16:10 ` Reinette Chatre
2026-05-22 19:15 ` [PATCH v3 7/9] fs/resctrl: Prevent deadlock and use-after-free in info file handlers Reinette Chatre
2026-05-22 19:15 ` [PATCH v3 8/9] x86/resctrl: Ensure domain fully initialized before placed on RCU list Reinette Chatre
2026-05-28 16:11 ` Reinette Chatre
2026-05-28 19:04 ` Babu Moger
2026-05-28 20:56 ` Reinette Chatre
2026-05-28 23:10 ` Moger, Babu
2026-05-31 8:37 ` Chen, Yu C
2026-06-01 15:40 ` Reinette Chatre
2026-05-22 19:15 ` [PATCH v3 9/9] fs/resctrl: Fix UAF from worker threads when domains are removed Reinette Chatre
2026-05-26 15:32 ` Luck, Tony
2026-05-26 17:53 ` Reinette Chatre
2026-05-26 18:27 ` Luck, Tony
2026-05-26 21:05 ` Reinette Chatre
2026-05-26 21:26 ` Luck, Tony
2026-05-27 1:49 ` Reinette Chatre
2026-05-28 16:12 ` Reinette Chatre
2026-05-28 20:08 ` [PATCH v3 0/9] x86,fs/resctrl: Fix long-standing issues Luck, Tony
2026-05-29 18:37 ` Reinette Chatre
2026-05-29 19:06 ` Luck, Tony
2026-05-29 20:19 ` Reinette Chatre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1779476724.git.reinette.chatre@intel.com \
--to=reinette.chatre@intel.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghuay@nvidia.com \
--cc=fustini@kernel.org \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=peternewman@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.