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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aRelbFgQ4-11Xwg2@agluck-desk3>
Date: Fri, 14 Nov 2025 13:55:56 -0800
From: "Luck, Tony" <tony.luck@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>
CC: 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>, <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
	<patches@...ts.linux.dev>
Subject: Re: [PATCH v13 25/32] x86/resctrl: Handle number of RMIDs supported
 by RDT_RESOURCE_PERF_PKG

On Thu, Nov 13, 2025 at 02:51:45PM -0800, Reinette Chatre wrote:
> >  static bool enable_events(struct event_group *e, struct pmt_feature_group *p)
> >  {
> > +	struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_PERF_PKG].r_resctrl;
> > +
> >  	if (!group_has_usable_regions(e, p))
> >  		return false;
> >  
> > +	/* Disable feature if insufficient RMIDs */
> > +	if (!all_regions_have_sufficient_rmid(e, p))
> > +		rdt_set_feature_disabled(e->name);
> > +
> > +	/* User can override above disable from kernel command line */
> > +	if (!rdt_is_feature_enabled(e->name))
> > +		return false;
> 
> Considering this from the user's perspective I do not think there is an easy way for user space
> to know that the feature was force disabled and that there is an option to override this.
> What is the use case considered here? If I understand correctly there may be a way to deduce this
> by consulting files in /sys/class/intel_pmt/ where the telemetry regions' number of supported
> RMID is printed. A user can compare that to the XML files to determine that there is an issue
> that can explain resctrl not exposing the feature. Considering this difficulty I wonder if it
> may be helpful to print an error message here? This is of course not perfect since the kernel
> log cannot be guaranteed to forever contain it ... but it may help?

Reinette,

Good idea. Here's a draft. Comments welcome to improve the user message
that would look like:

resctrl: Feature energy guid=0x26696143 not enabled due to insufficient RMIDs


static bool enable_events(struct event_group *e, struct pmt_feature_group *p)
{
	struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_PERF_PKG].r_resctrl;
	bool warn_disable = false;

	if (!group_has_usable_regions(e, p))
		return false;

	/* Disable feature if insufficient RMIDs */
	if (!all_regions_have_sufficient_rmid(e, p)) {
		warn_disable = true;
		rdt_set_feature_disabled(e->name);
	}

	/* User can override above disable from kernel command line */
	if (!rdt_is_feature_enabled(e->name)) {
		if (warn_disable)
			pr_info("Feature %s guid=0x%x not enabled due to insufficient RMIDs\n",
				e->name, e->guid);
		return false;
	}
	...
}

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ