Archive-only list for patches
 help / color / mirror / Atom feed
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 v5 00/11] x86,fs/resctrl: Fix long-standing issues
Date: Tue,  9 Jun 2026 14:02:26 -0700	[thread overview]
Message-ID: <cover.1781029125.git.reinette.chatre@intel.com> (raw)

v4: https://lore.kernel.org/lkml/cover.1780456704.git.reinette.chatre@intel.com/
v3: https://lore.kernel.org/lkml/cover.1779476724.git.reinette.chatre@intel.com/
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. More issues
were uncovered as fixes were developed and reviewed. While the goal is to
fix all issues the races surrounding pseudo-locked regions are not yet
solved and have been removed from this series (last appearance was in V3 of
this series).

Applies against tip/master to ensure it considers pending x86/cache changes
as well as the lockdep_is_cpus_held() stubs available in smp/core.

Changes since V4:
- Add new fix to prevent out-of-bouds read when SNC is enabled and domain
  with busy RMID goes offline.
- Add substitute for "is domain going offline" check to workers to avoid
  reading any event counters on soon-to-be-offline domain since its
  cpu_mask is empty and reading an event counter on an SNC enabled system
  depends on knowing a CPU associated with the domain.

Changes since V3:
- Drop majority of pseudo-locking fixes, only keep the double free/double
  list add fix.
- Add patch to help document safe RCU list traversal.
- See individual patches for detailed changes.

[1] https://sashiko.dev/#/patchset/20260429184858.36423-1-tony.luck%40intel.com

Reinette Chatre (8):
  x86,fs/resctrl: Prevent out-of-bounds access while offlining CPU when
    SNC enabled
  x86,fs/resctrl: Document safe RCU list traversal
  fs/resctrl: Fix deadlock on errors during mount
  fs/resctrl: Prevent use-after-free in rdtgroup_kn_put()
  fs/resctrl: Fix double-add of pseudo-locked region's RMID to free list
  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/ctrlmondata.c |   4 +-
 arch/x86/kernel/cpu/resctrl/intel_aet.c   |   5 +-
 arch/x86/kernel/cpu/resctrl/monitor.c     |   7 +-
 arch/x86/kernel/cpu/resctrl/rdtgroup.c    |   4 +-
 fs/resctrl/ctrlmondata.c                  |  50 +-
 fs/resctrl/internal.h                     |   3 +-
 fs/resctrl/monitor.c                      | 170 +++--
 fs/resctrl/pseudo_lock.c                  |   2 +-
 fs/resctrl/rdtgroup.c                     | 859 ++++++++++++++--------
 10 files changed, 698 insertions(+), 424 deletions(-)

-- 
2.50.1


             reply	other threads:[~2026-06-09 21:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 21:02 Reinette Chatre [this message]
2026-06-09 21:02 ` [PATCH v5 01/11] x86,fs/resctrl: Prevent out-of-bounds access while offlining CPU when SNC enabled Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 02/11] x86,fs/resctrl: Document safe RCU list traversal Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 03/11] fs/resctrl: Move functions to avoid forward references in subsequent fixes Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 04/11] fs/resctrl: Free mon_data structures on rdt_get_tree() failure Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 05/11] fs/resctrl: Fix use-after-free during unmount Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 06/11] fs/resctrl: Fix deadlock on errors during mount Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 07/11] fs/resctrl: Prevent use-after-free in rdtgroup_kn_put() Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 08/11] fs/resctrl: Fix double-add of pseudo-locked region's RMID to free list Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 09/11] fs/resctrl: Prevent deadlock and use-after-free in info file handlers Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 10/11] x86/resctrl: Ensure domain fully initialized before placed on RCU list Reinette Chatre
2026-06-09 21:02 ` [PATCH v5 11/11] fs/resctrl: Fix UAF from worker threads when domains are removed Reinette Chatre
2026-06-10 17:48 ` [PATCH v5 00/11] x86,fs/resctrl: Fix long-standing issues Reinette Chatre
2026-06-10 19:21   ` Borislav Petkov
2026-06-10 20:34     ` Reinette Chatre
2026-06-10 23:10       ` Borislav Petkov
2026-06-10 23:17         ` 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.1781029125.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox