<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/x86/kernel/cpu/resctrl, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2026-11-08T22:55:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-08T22:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e0d8e8de8bcb1ef7b749033b5af5518ba8df7bec'/>
<id>e0d8e8de8bcb1ef7b749033b5af5518ba8df7bec</id>
<content type='text'>
Pull devm_kmalloc_obj conversion from Kees Cook:

 - treewide refresh of kmalloc_obj() conversions

 - devm_kmalloc_obj conversion rules added to Coccinelle scripting

 - treewide conversion of devm_kmalloc() family to devm_kmalloc_obj()

* tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family
  coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules
  treewide: refresh kmalloc_obj() conversions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull devm_kmalloc_obj conversion from Kees Cook:

 - treewide refresh of kmalloc_obj() conversions

 - devm_kmalloc_obj conversion rules added to Coccinelle scripting

 - treewide conversion of devm_kmalloc() family to devm_kmalloc_obj()

* tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family
  coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules
  treewide: refresh kmalloc_obj() conversions
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-11-06T05:55:37+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-10-29T06:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0af298e62e5cff4ebf9bec47b8711177a7e2f115'/>
<id>0af298e62e5cff4ebf9bec47b8711177a7e2f115</id>
<content type='text'>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86,fs/resctrl: Keep mbm_assign_mode in default mode at boot</title>
<updated>2026-11-02T23:03:09+00:00</updated>
<author>
<name>Babu Moger</name>
<email>babu.moger@amd.com</email>
</author>
<published>2026-10-30T20:28:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7782a6a8dfc05f5622fdf616e5cf3df7d16eaef5'/>
<id>7782a6a8dfc05f5622fdf616e5cf3df7d16eaef5</id>
<content type='text'>
The mbm_event mode assigns hardware MBM counters to RMID/event pairs.  It is
intended for deployments that need to manage counter assignment on platforms
where the number of monitoring groups exceeds the available hardware counters.
Hardware counters are scarce on these platforms, so mbm_event mode suits
workflows that monitor a subset of groups at a time and rotate assignments as
needed.

x86 resctrl enables the mbm_event mode by default on hardware that supports
it. This breaks the pqos tool¹, which assumes the historical default mode.
It creates 16 or more monitoring groups and uses two counters per group. On
a platform with 32 counters per domain, that exhausts the mbm_event counters
pool, causing additional groups to read "Unassigned".  pqos interprets
a non-numeric event read as zero bandwidth and reports 0 MB/s for those
groups:

  $ sudo pqos -m all:0-4
  CORE         IPC      MISSES     LLC[KB]   MBL[MB/s]   MBR[MB/s]
     0        0.69         16k       192.0         0.0         0.0
     1        0.40          3k         0.0         0.0         0.0
     2        0.44          1k        64.0         0.0         0.0
     3        0.39          1k        64.0         0.0         0.0
     4        0.43          1k         0.0         0.0         0.0

Leave mbm_assign_mode in default mode during initialization as decided in the
thread at the Link tag. Default mode uses one counter per monitoring group. On
existing AMD platforms, the default active counters pool is 64 and may be
larger on newer hardware.  The active counters pool is the number of counters
that the hardware can actively track in default mode.

Deployments within the active counters pool receive accurate bandwidth
measurements in the default mode. Users can create more monitoring groups (for
example, 4096 on current hardware) than there are active counters in the pool.
Beyond that pool, readings may be misleading or report as "Unavailable", with
no user-visible indication.

Default mode is still limited once the number of monitoring groups exceeds
that active counters pool. After hardware re-allocates a counter, a read
may return "Unavailable". pqos still treats "Unavailable" as zero.
Successive reads can be a count, "Unavailable", then another count. pqos
treats those jumps as wraparound and can report an inconsistent rate:

  $ sudo pqos -m all:0-4
  CORE     IPC      MISSES     LLC[KB]   MBL[MB/s]   MBR[MB/s]
  0        0.76         60k        32.0         0.0         0.0
  1        0.45          1k        32.0         0.0         0.0
  2        1.57        107k        64.0         0.0 17592186044184.9
  3        1.62        276k      4928.0         3.2         0.5

Users that need stable measurements beyond the active counters pool should
use mbm_event mode and rotate assignments as needed. Enable it with:

  # echo mbm_event &gt; /sys/fs/resctrl/info/L3_MON/mbm_assign_mode

¹https://github.com/intel/intel-cmt-cat

  [ bp: Massage commit message. ]

Fixes: 0f1576e43adc ("x86/resctrl: Configure mbm_event mode if supported")
Closes: https://github.com/intel/intel-cmt-cat/issues/311
Signed-off-by: Babu Moger &lt;babu.moger@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20260804191608.GDanI6eK2Q07w6pNcb@fat_crate.local
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mbm_event mode assigns hardware MBM counters to RMID/event pairs.  It is
intended for deployments that need to manage counter assignment on platforms
where the number of monitoring groups exceeds the available hardware counters.
Hardware counters are scarce on these platforms, so mbm_event mode suits
workflows that monitor a subset of groups at a time and rotate assignments as
needed.

x86 resctrl enables the mbm_event mode by default on hardware that supports
it. This breaks the pqos tool¹, which assumes the historical default mode.
It creates 16 or more monitoring groups and uses two counters per group. On
a platform with 32 counters per domain, that exhausts the mbm_event counters
pool, causing additional groups to read "Unassigned".  pqos interprets
a non-numeric event read as zero bandwidth and reports 0 MB/s for those
groups:

  $ sudo pqos -m all:0-4
  CORE         IPC      MISSES     LLC[KB]   MBL[MB/s]   MBR[MB/s]
     0        0.69         16k       192.0         0.0         0.0
     1        0.40          3k         0.0         0.0         0.0
     2        0.44          1k        64.0         0.0         0.0
     3        0.39          1k        64.0         0.0         0.0
     4        0.43          1k         0.0         0.0         0.0

Leave mbm_assign_mode in default mode during initialization as decided in the
thread at the Link tag. Default mode uses one counter per monitoring group. On
existing AMD platforms, the default active counters pool is 64 and may be
larger on newer hardware.  The active counters pool is the number of counters
that the hardware can actively track in default mode.

Deployments within the active counters pool receive accurate bandwidth
measurements in the default mode. Users can create more monitoring groups (for
example, 4096 on current hardware) than there are active counters in the pool.
Beyond that pool, readings may be misleading or report as "Unavailable", with
no user-visible indication.

Default mode is still limited once the number of monitoring groups exceeds
that active counters pool. After hardware re-allocates a counter, a read
may return "Unavailable". pqos still treats "Unavailable" as zero.
Successive reads can be a count, "Unavailable", then another count. pqos
treats those jumps as wraparound and can report an inconsistent rate:

  $ sudo pqos -m all:0-4
  CORE     IPC      MISSES     LLC[KB]   MBL[MB/s]   MBR[MB/s]
  0        0.76         60k        32.0         0.0         0.0
  1        0.45          1k        32.0         0.0         0.0
  2        1.57        107k        64.0         0.0 17592186044184.9
  3        1.62        276k      4928.0         3.2         0.5

Users that need stable measurements beyond the active counters pool should
use mbm_event mode and rotate assignments as needed. Enable it with:

  # echo mbm_event &gt; /sys/fs/resctrl/info/L3_MON/mbm_assign_mode

¹https://github.com/intel/intel-cmt-cat

  [ bp: Massage commit message. ]

Fixes: 0f1576e43adc ("x86/resctrl: Configure mbm_event mode if supported")
Closes: https://github.com/intel/intel-cmt-cat/issues/311
Signed-off-by: Babu Moger &lt;babu.moger@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20260804191608.GDanI6eK2Q07w6pNcb@fat_crate.local
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/resctrl: Correct ABMC counter ID field width</title>
<updated>2026-11-02T23:02:17+00:00</updated>
<author>
<name>Babu Moger</name>
<email>babu.moger@amd.com</email>
</author>
<published>2026-10-30T20:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=84b4b620af7d24916add5d45104023bc5d804f53'/>
<id>84b4b620af7d24916add5d45104023bc5d804f53</id>
<content type='text'>
AMD's Assignable Bandwidth Monitoring Counters (ABMC) are configured via
MSR_IA32_L3_QOS_ABMC_CFG. The cntr_id field selects the counter the
configuration applies to. The number of counters a platform supports (the
number of possible values written into that field) is enumerated separately
via CPUID.

On platforms that enumerate more than 32 counters, the current 5-bit encoding
truncates the counter ID and misprograms ABMC.

The section "Assignable Bandwidth Monitoring (ABMC)" in the APM has been
updated to widen MSR_IA32_L3_QOS_ABMC_CFG.cntr_id from 5 bits to 12 bits.

The CPUID enumeration reports the maximum counter ID in a 16-bit field and may
therefore report more counters than a 12-bit MSR_IA32_L3_QOS_ABMC_CFG.cntr_id
can address.

Widen MSR_IA32_L3_QOS_ABMC_CFG.cntr_id to 12 bits to match the architecture.
Cap the enumerated counter count at BIT(12) so every counter ID used by
resctrl can be written to MSR_IA32_L3_QOS_ABMC_CFG.cntr_id without truncation.

  [ bp: Massage and simplify commit message. ]

Fixes: 84ecefb76674 ("x86/resctrl: Add data structures and definitions for ABMC assignment")
Signed-off-by: Babu Moger &lt;babu.moger@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/3a5e99300f1309ae279beb058ef0438516b2bdcd.1793392128.git.babu.moger@amd.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AMD's Assignable Bandwidth Monitoring Counters (ABMC) are configured via
MSR_IA32_L3_QOS_ABMC_CFG. The cntr_id field selects the counter the
configuration applies to. The number of counters a platform supports (the
number of possible values written into that field) is enumerated separately
via CPUID.

On platforms that enumerate more than 32 counters, the current 5-bit encoding
truncates the counter ID and misprograms ABMC.

The section "Assignable Bandwidth Monitoring (ABMC)" in the APM has been
updated to widen MSR_IA32_L3_QOS_ABMC_CFG.cntr_id from 5 bits to 12 bits.

The CPUID enumeration reports the maximum counter ID in a 16-bit field and may
therefore report more counters than a 12-bit MSR_IA32_L3_QOS_ABMC_CFG.cntr_id
can address.

Widen MSR_IA32_L3_QOS_ABMC_CFG.cntr_id to 12 bits to match the architecture.
Cap the enumerated counter count at BIT(12) so every counter ID used by
resctrl can be written to MSR_IA32_L3_QOS_ABMC_CFG.cntr_id without truncation.

  [ bp: Massage and simplify commit message. ]

Fixes: 84ecefb76674 ("x86/resctrl: Add data structures and definitions for ABMC assignment")
Signed-off-by: Babu Moger &lt;babu.moger@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/3a5e99300f1309ae279beb058ef0438516b2bdcd.1793392128.git.babu.moger@amd.com
</pre>
</div>
</content>
</entry>
<entry>
<title>x86,fs/resctrl: Add event group descriptions for Intel Diamond Rapids</title>
<updated>2026-10-01T05:47:08+00:00</updated>
<author>
<name>Tony Luck</name>
<email>tony.luck@intel.com</email>
</author>
<published>2026-09-30T17:15:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=50e5282df427830fcd810e553f0e355d9cccb3e2'/>
<id>50e5282df427830fcd810e553f0e355d9cccb3e2</id>
<content type='text'>
Intel Diamond Rapids exposes Application Energy Telemetry through two new PMT
aggregator GUIDs: one covering the "energy" feature, and one covering the
"perf" feature, both documented in the Intel-PMT XML repository at
https://github.com/intel/Intel-PMT

The "perf" aggregator references two events not previously enumerated by
resctrl: retired instructions (INST_RETIRED), and a count of unhalted core
clock cycles perceived by hardware as contributing to instruction execution
(PCNT).

Add definitions for both aggregators, and add the two new events to the
resctrl filesystem so they can be exposed to user space.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Link: https://patch.msgid.link/20260930171554.12794-1-tony.luck@intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Intel Diamond Rapids exposes Application Energy Telemetry through two new PMT
aggregator GUIDs: one covering the "energy" feature, and one covering the
"perf" feature, both documented in the Intel-PMT XML repository at
https://github.com/intel/Intel-PMT

The "perf" aggregator references two events not previously enumerated by
resctrl: retired instructions (INST_RETIRED), and a count of unhalted core
clock cycles perceived by hardware as contributing to instruction execution
(PCNT).

Add definitions for both aggregators, and add the two new events to the
resctrl filesystem so they can be exposed to user space.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Link: https://patch.msgid.link/20260930171554.12794-1-tony.luck@intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>x86,fs/resctrl: Add resctrl_arch_preconvert_bw()</title>
<updated>2026-09-14T15:15:11+00:00</updated>
<author>
<name>Dave Martin</name>
<email>dave.martin@arm.com</email>
</author>
<published>2026-09-11T16:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=57a354d20a01287bd173b13231eb5afcda337eee'/>
<id>57a354d20a01287bd173b13231eb5afcda337eee</id>
<content type='text'>
On MPAM systems the rounding behaviour of the MBA control would be improved if
the rounding in the fs/resctrl code is removed but this is not the case for
x86. To allow any rounding or conversion of the bandwidth value provided by
the user to be specified by the arch code a new arch hook is required.

Introduce resctrl_arch_preconvert_bw(), and add its x86 implementation.
This is currently unused in resctrl but when plumbed in it will replace the
call to roundup() in bw_validate().

Signed-off-by: Dave Martin &lt;dave.martin@arm.com&gt;
Signed-off-by: Ben Horgan &lt;ben.horgan@arm.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Reviewed-by: Gavin Shan &lt;gshan@redhat.com&gt;
Link: https://patch.msgid.link/20260911163613.1131447-2-ben.horgan@arm.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On MPAM systems the rounding behaviour of the MBA control would be improved if
the rounding in the fs/resctrl code is removed but this is not the case for
x86. To allow any rounding or conversion of the bandwidth value provided by
the user to be specified by the arch code a new arch hook is required.

Introduce resctrl_arch_preconvert_bw(), and add its x86 implementation.
This is currently unused in resctrl but when plumbed in it will replace the
call to roundup() in bw_validate().

Signed-off-by: Dave Martin &lt;dave.martin@arm.com&gt;
Signed-off-by: Ben Horgan &lt;ben.horgan@arm.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Reviewed-by: Gavin Shan &lt;gshan@redhat.com&gt;
Link: https://patch.msgid.link/20260911163613.1131447-2-ben.horgan@arm.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'x86_cache_for_v7.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-08-19T01:32:24+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-19T01:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94845e2929701018100389b3554dc54d1eee0c70'/>
<id>94845e2929701018100389b3554dc54d1eee0c70</id>
<content type='text'>
Pull x86 resource control updates from Borislav Petkov:

 - How refreshing: no new features but a whole pile of fixes to more or
   less serious issues reported by Sashiko along with miscellaneous
   cleanups all over the place. All except one by Reinette Chatre, the
   one by Tony Luck.

* tag 'x86_cache_for_v7.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  fs/resctrl: Inform user space when status buffer overflowed
  fs/resctrl: Communicate resource group deleted error via last_cmd_status
  fs/resctrl: Add last_cmd_status support for writes to max_threshold_occupancy
  fs/resctrl: Change last_cmd_status custom during input parsing
  fs/resctrl: Use accurate and symmetric exit flows
  fs/resctrl: Pass error reading event through to user space
  fs/resctrl: Use accurate type for rdt_resource::rid
  fs/resctrl: Change pattern used to track number of entries in enum resctrl_conf_type
  x86/resctrl: Protect against bad shift
  fs/resctrl: Use correct format specifier for printing error pointers
  fs/resctrl: Fix UAF from worker threads when domains are removed
  x86/resctrl: Ensure domain fully initialized before placed on RCU list
  fs/resctrl: Prevent deadlock and use-after-free in info file handlers
  fs/resctrl: Prevent use-after-free in rdtgroup_kn_put()
  fs/resctrl: Fix deadlock on errors during mount
  fs/resctrl: Move functions to avoid forward references in subsequent fixes
  x86,fs/resctrl: Document safe RCU list traversal
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull x86 resource control updates from Borislav Petkov:

 - How refreshing: no new features but a whole pile of fixes to more or
   less serious issues reported by Sashiko along with miscellaneous
   cleanups all over the place. All except one by Reinette Chatre, the
   one by Tony Luck.

* tag 'x86_cache_for_v7.3_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  fs/resctrl: Inform user space when status buffer overflowed
  fs/resctrl: Communicate resource group deleted error via last_cmd_status
  fs/resctrl: Add last_cmd_status support for writes to max_threshold_occupancy
  fs/resctrl: Change last_cmd_status custom during input parsing
  fs/resctrl: Use accurate and symmetric exit flows
  fs/resctrl: Pass error reading event through to user space
  fs/resctrl: Use accurate type for rdt_resource::rid
  fs/resctrl: Change pattern used to track number of entries in enum resctrl_conf_type
  x86/resctrl: Protect against bad shift
  fs/resctrl: Use correct format specifier for printing error pointers
  fs/resctrl: Fix UAF from worker threads when domains are removed
  x86/resctrl: Ensure domain fully initialized before placed on RCU list
  fs/resctrl: Prevent deadlock and use-after-free in info file handlers
  fs/resctrl: Prevent use-after-free in rdtgroup_kn_put()
  fs/resctrl: Fix deadlock on errors during mount
  fs/resctrl: Move functions to avoid forward references in subsequent fixes
  x86,fs/resctrl: Document safe RCU list traversal
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'x86-msr-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-08-18T21:02:15+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-18T21:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8dcef8882aad8f1b8668d1c39968cde99312aa3c'/>
<id>8dcef8882aad8f1b8668d1c39968cde99312aa3c</id>
<content type='text'>
Pull x86 MSR updates from Ingo Molnar:

 - Streamline the x86 MSR handling APIs along the 64-bit variants,
   simplifying the interfaces.

   Removal of the old APIs is planned for the next cycle, to reduce
   churn &amp; integration pain (Juergen Gross)

* tag 'x86-msr-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
  x86/mce: Work around build warning after MSR-interface switch
  cpufreq: Stop using 32-bit MSR interfaces
  x86/featctl: Stop using 32-bit MSR interfaces
  KVM/x86: Stop using 32-bit MSR interfaces
  x86/mtrr: Stop using 32-bit MSR interfaces
  acpi: Stop using 32-bit MSR interfaces
  powercap: Stop using 32-bit MSR interfaces
  thermal/intel: Stop using 32-bit MSR interfaces
  x86/olpc: Stop using 32-bit MSR interfaces
  x86/hyperv: Stop using 32-bit MSR interfaces
  hwmon: Stop using 32-bit MSR interfaces
  EDAC: Stop using 32-bit MSR interfaces
  x86/cpu: Stop using 32-bit MSR interfaces
  x86/apic: Stop using 32-bit MSR interfaces
  x86/resctrl: Stop using 32-bit MSR interfaces
  x86/tsc: Stop using 32-bit MSR interfaces
  x86/amd: Stop using 32-bit MSR interfaces
  x86/pci: Stop using 32-bit MSR interfaces
  x86/hygon: Stop using 32-bit MSR interfaces
  x86/mce: Stop using 32-bit MSR interfaces
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull x86 MSR updates from Ingo Molnar:

 - Streamline the x86 MSR handling APIs along the 64-bit variants,
   simplifying the interfaces.

   Removal of the old APIs is planned for the next cycle, to reduce
   churn &amp; integration pain (Juergen Gross)

* tag 'x86-msr-2026-08-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
  x86/mce: Work around build warning after MSR-interface switch
  cpufreq: Stop using 32-bit MSR interfaces
  x86/featctl: Stop using 32-bit MSR interfaces
  KVM/x86: Stop using 32-bit MSR interfaces
  x86/mtrr: Stop using 32-bit MSR interfaces
  acpi: Stop using 32-bit MSR interfaces
  powercap: Stop using 32-bit MSR interfaces
  thermal/intel: Stop using 32-bit MSR interfaces
  x86/olpc: Stop using 32-bit MSR interfaces
  x86/hyperv: Stop using 32-bit MSR interfaces
  hwmon: Stop using 32-bit MSR interfaces
  EDAC: Stop using 32-bit MSR interfaces
  x86/cpu: Stop using 32-bit MSR interfaces
  x86/apic: Stop using 32-bit MSR interfaces
  x86/resctrl: Stop using 32-bit MSR interfaces
  x86/tsc: Stop using 32-bit MSR interfaces
  x86/amd: Stop using 32-bit MSR interfaces
  x86/pci: Stop using 32-bit MSR interfaces
  x86/hygon: Stop using 32-bit MSR interfaces
  x86/mce: Stop using 32-bit MSR interfaces
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/resctrl: Protect against bad shift</title>
<updated>2026-07-22T21:38:18+00:00</updated>
<author>
<name>Reinette Chatre</name>
<email>reinette.chatre@intel.com</email>
</author>
<published>2026-07-22T21:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=097d3f227bbd0b07a6e02e3b9e6c6ae1e5e7e910'/>
<id>097d3f227bbd0b07a6e02e3b9e6c6ae1e5e7e910</id>
<content type='text'>
The size of the bandwidth field is enumerated from AMD hardware. resctrl uses
this field width to determine the maximum bandwidth supported that is stored
in resctrl_membw::max_bw. User space allocation requests ("control values")
are compared against this maximum for validity before being programmed to
hardware.

resctrl filesystem and resctrl x86 architecture code only support u32 control
values: resctrl_membw::max_bw is a u32, the control value provided by user
space is parsed into u32 local variables, and after validity checks, the
control value is staged into the u32 resctrl_staged_config::new_ctrl for
architecture consumption. The resctrl x86 architecture code in turn caches the
new control value into the u32 array rdt_hw_ctrl_domain::ctrl_val[].

The AMD bandwidth field to which control values are written can be up to
64 bits wide. While not an issue with current hardware (bandwidths that
require more than a u32, more than 536870911.875 GB/s, seem unreasonable
today), it is theoretically possible that enumeration of maximum bandwidth
field width will return values that are according to specification but
cannot be supported by resctrl.

Static checkers complain about this size mismatch.

Fix the static checker complaint by explicitly encoding the fact that resctrl
is unable to support all values that the hardware specification allows. Switch
to BIT() instead of open-coding the bitshift to avoid signed integer overflow
if the number of bits is a valid 31.

Signed-off-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Tony Luck &lt;tony.luck@intel.com&gt;
Link: https://patch.msgid.link/dd9fc3505c0ed250c5f14898b0ed6d7460a3cb82.1784753375.git.reinette.chatre@intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size of the bandwidth field is enumerated from AMD hardware. resctrl uses
this field width to determine the maximum bandwidth supported that is stored
in resctrl_membw::max_bw. User space allocation requests ("control values")
are compared against this maximum for validity before being programmed to
hardware.

resctrl filesystem and resctrl x86 architecture code only support u32 control
values: resctrl_membw::max_bw is a u32, the control value provided by user
space is parsed into u32 local variables, and after validity checks, the
control value is staged into the u32 resctrl_staged_config::new_ctrl for
architecture consumption. The resctrl x86 architecture code in turn caches the
new control value into the u32 array rdt_hw_ctrl_domain::ctrl_val[].

The AMD bandwidth field to which control values are written can be up to
64 bits wide. While not an issue with current hardware (bandwidths that
require more than a u32, more than 536870911.875 GB/s, seem unreasonable
today), it is theoretically possible that enumeration of maximum bandwidth
field width will return values that are according to specification but
cannot be supported by resctrl.

Static checkers complain about this size mismatch.

Fix the static checker complaint by explicitly encoding the fact that resctrl
is unable to support all values that the hardware specification allows. Switch
to BIT() instead of open-coding the bitshift to avoid signed integer overflow
if the number of bits is a valid 31.

Signed-off-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Tony Luck &lt;tony.luck@intel.com&gt;
Link: https://patch.msgid.link/dd9fc3505c0ed250c5f14898b0ed6d7460a3cb82.1784753375.git.reinette.chatre@intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>x86/resctrl: Ensure domain fully initialized before placed on RCU list</title>
<updated>2026-07-13T20:58:30+00:00</updated>
<author>
<name>Reinette Chatre</name>
<email>reinette.chatre@intel.com</email>
</author>
<published>2026-07-13T17:39:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25afd838fb2aae6325ae13937e7db06362a05673'/>
<id>25afd838fb2aae6325ae13937e7db06362a05673</id>
<content type='text'>
A resctrl domain consists of the domain structure self that includes
pointers to dynamically allocated filesystem as well as architecture
specific data. For example, the L3 monitoring domain structure consists
of the architecture specific struct rdt_hw_l3_mon_domain that contains
the dynamically allocated rdt_hw_l3_mon_domain::arch_mbm_states
architectural state and the embedded struct rdt_l3_mon_domain contains
the dynamically allocated rdt_l3_mon_domain::mbm_states resctrl fs state.

The domains are added to and removed from an RCU protected list while
cpus_write_lock() is held so that readers could access domains via
cpus_read_lock() or from an RCU read-side critical section.  A reader
accessing a domain via the RCU list expects that the domain and all its
dynamically allocated data is accessible.

Only place the domain on the RCU list when all its dynamically allocated
data is ready, similarly unlink it from RCU list (again with cpus_write_lock()
held) before removing any of its dynamically allocated data.

Calling resctrl_online_mon_domain() before adding the domain to the RCU
list creates the kernfs files that expose the domain's monitoring data to
user space before adding the domain to the RCU list. This is safe because
rdtgroup_mondata_show() acquires cpus_read_lock() before it traverses the
RCU list and will thus block until the domain is added to the RCU list.

There are no readers accessing a domain via RCU list. Ensure safety of
access when such a reader arrives.

Signed-off-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Tony Luck &lt;tony.luck@intel.com&gt;
Reviewed-by: Chen Yu &lt;yu.c.chen@intel.com&gt;
Link: https://patch.msgid.link/31ae67084c983e8cb8c5ef2c65e1096de5e8f9b0.1783963505.git.reinette.chatre@intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A resctrl domain consists of the domain structure self that includes
pointers to dynamically allocated filesystem as well as architecture
specific data. For example, the L3 monitoring domain structure consists
of the architecture specific struct rdt_hw_l3_mon_domain that contains
the dynamically allocated rdt_hw_l3_mon_domain::arch_mbm_states
architectural state and the embedded struct rdt_l3_mon_domain contains
the dynamically allocated rdt_l3_mon_domain::mbm_states resctrl fs state.

The domains are added to and removed from an RCU protected list while
cpus_write_lock() is held so that readers could access domains via
cpus_read_lock() or from an RCU read-side critical section.  A reader
accessing a domain via the RCU list expects that the domain and all its
dynamically allocated data is accessible.

Only place the domain on the RCU list when all its dynamically allocated
data is ready, similarly unlink it from RCU list (again with cpus_write_lock()
held) before removing any of its dynamically allocated data.

Calling resctrl_online_mon_domain() before adding the domain to the RCU
list creates the kernfs files that expose the domain's monitoring data to
user space before adding the domain to the RCU list. This is safe because
rdtgroup_mondata_show() acquires cpus_read_lock() before it traverses the
RCU list and will thus block until the domain is added to the RCU list.

There are no readers accessing a domain via RCU list. Ensure safety of
access when such a reader arrives.

Signed-off-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Tony Luck &lt;tony.luck@intel.com&gt;
Reviewed-by: Chen Yu &lt;yu.c.chen@intel.com&gt;
Link: https://patch.msgid.link/31ae67084c983e8cb8c5ef2c65e1096de5e8f9b0.1783963505.git.reinette.chatre@intel.com
</pre>
</div>
</content>
</entry>
</feed>
