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] [day] [month] [year] [list]
Message-ID: <aO0USQCzrj//t0Gr@e133380.arm.com>
Date: Mon, 13 Oct 2025 16:01:29 +0100
From: Dave Martin <Dave.Martin@....com>
To: "Chen, Yu C" <yu.c.chen@...el.com>
Cc: Reinette Chatre <reinette.chatre@...el.com>,
	"Luck, Tony" <tony.luck@...el.com>, linux-kernel@...r.kernel.org,
	James Morse <james.morse@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"H. Peter Anvin" <hpa@...or.com>, Jonathan Corbet <corbet@....net>,
	x86@...nel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH] fs/resctrl,x86/resctrl: Factor mba rounding to be
 per-arch

Hi,

On Sun, Oct 12, 2025 at 01:15:07AM +0800, Chen, Yu C wrote:
> On 10/11/2025 12:48 AM, Reinette Chatre wrote:
> > Hi Dave,
> > 
> > On 9/30/25 8:40 AM, Dave Martin wrote:
> > > On Mon, Sep 29, 2025 at 09:09:35AM -0700, Reinette Chatre wrote:
> > > > On 9/29/25 6:56 AM, Dave Martin wrote:
> > > > > On Thu, Sep 25, 2025 at 03:58:35PM -0700, Luck, Tony wrote:
> > > > > > On Mon, Sep 22, 2025 at 04:04:40PM +0100, Dave Martin wrote:
> 
> [snip]
> 
> > > Anyway, going back to the "#" convention:
> > > 
> > > If the initial read of schemata has the new entries "pre-commented",
> > > then userspace wouldn't need to know about the new entries.  It could
> > > just tweak the MB entry (which it knows about), and write the file back:
> > > 
> > > 	MB: 0=43
> > > 	# MB_HW: 0=2
> > > 	# MB_MIN: 0=1
> > > 	# MB_MAX: 0=2
> > > 
> > > then resctrl knows to ignore the hashed lines, and so reading the file
> > > back gives:
> > > 
> > > 	MB: 0=43
> > > 	# MB_HW: 0=3
> > > 	# MB_MIN: 0=2
> > > 	# MB_MAX: 0=3
> 
> 
> May I ask if introducing the pre-commented lines is intended to prevent
> control conflicts over the same MBA? If this is the case, I wonder if,

Basically, yes.  Note, this is only an issue for old software that
doesn't understand the new entries.  New software should omit the
entries for resources that doesn't understand or doesn't want to set.

> instead of exposing both MB and the pre-commented MB_HW_X in one file,
> it would be  feasible to introduce a new mount option (such as "hw") to
>  make the legacy MB and MB_HW_X mutually exclusive. If the user specifies
>  "hw" in mount option, display MB_HW_X (if available); otherwise, display
> only the legacy "MB". This is similar to the cpufreq governor, where only
> one governor is allowed to adjust the CPU frequency at a time.
> 
> thanks,
> Chenyu

This could be done with a mount option, but I am concerned that a
single resctrl mount might be used by different tools while it is
mounted.  So, maybe a global control is not what we want?

I'm hoping that we can design this in a way that is sufficiently
backwards compatible that we don't need a mount option to turn it off.

Can you think of a userspace scenario that would break, with the
proposed design?

Cheers
---Dave

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ