lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c50d5c25-1c7f-4665-ac42-239d9074dd14@intel.com>
Date: Fri, 3 Oct 2025 16:32:52 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Tony Luck <tony.luck@...el.com>, Fenghua Yu <fenghuay@...dia.com>, "Maciej
 Wieczor-Retman" <maciej.wieczor-retman@...el.com>, Peter Newman
	<peternewman@...gle.com>, James Morse <james.morse@....com>, Babu Moger
	<babu.moger@....com>, Drew Fustini <dfustini@...libre.com>, Dave Martin
	<Dave.Martin@....com>, Chen Yu <yu.c.chen@...el.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
	<patches@...ts.linux.dev>
Subject: Re: [PATCH v11 10/31] x86,fs/resctrl: Handle events that can be read
 from any CPU

Hi Tony,

On 9/25/25 1:03 PM, Tony Luck wrote:
> resctrl assumes that monitor events can only be read from a CPU in the
> cpumask_t set of each domain.  This is true for x86 events accessed
> with an MSR interface, but may not be true for other access methods such
> as MMIO.
> 
> Add a flag to struct mon_evt, settable by architecture code, to indicate

"Add a flag to struct mon_evt" -> "Add flag mon_evt::any_cpu"

> there are no restrictions on which CPU can read that event.

Or rather:
	Introduce and use flag mon_evt::any_cpu, settable by architecture,
	that indicates there are no restrictions on which CPU can read that
	event.

> 
> Bypass all the smp_call*() code for events that can be read on any CPU
> and call mon_event_count() directly from mon_event_read().

Above (from "Bypass ...") can be dropped since it is clear from patch.

> 
> Simplify CPU checking in __mon_event_count() with a helper.

Above can be seen from patch but when trying to do so it is not clear
why this helper is needed and indicates that this is missing "why".
Proposal:
	Refactor the CPU checking to avoid always calling smp_processor_id()
	now that events can be read from preemptible context.

> 
> Signed-off-by: Tony Luck <tony.luck@...el.com>
> ---

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ