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: <72e612b3-0840-4cbf-b5fb-85ed3be4cfc8@intel.com>
Date: Tue, 13 Aug 2024 21:00:44 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: James Morse <james.morse@....com>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>
CC: Fenghua Yu <fenghua.yu@...el.com>, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, H Peter Anvin
	<hpa@...or.com>, Babu Moger <Babu.Moger@....com>,
	<shameerali.kolothum.thodi@...wei.com>, D Scott Phillips OS
	<scott@...amperecomputing.com>, <carl@...amperecomputing.com>,
	<lcherian@...vell.com>, <bobo.shaobowang@...wei.com>,
	<tan.shaopeng@...itsu.com>, <baolin.wang@...ux.alibaba.com>, Jamie Iles
	<quic_jiles@...cinc.com>, Xin Hao <xhao@...ux.alibaba.com>,
	<peternewman@...gle.com>, <dfustini@...libre.com>, <amitsinght@...vell.com>,
	David Hildenbrand <david@...hat.com>, Rex Nie <rex.nie@...uarmicro.com>,
	"Dave Martin" <dave.martin@....com>
Subject: Re: [PATCH v4 08/39] x86/resctrl: Generate default_ctrl instead of
 sharing it

Hi James,

On 8/2/24 10:28 AM, James Morse wrote:

> +/**
> + * resctrl_get_default_ctrl() - Return the default control value for this
> + *                              resource.
> + * @r:		The resource whose default control type is queried.
> + */
> +static inline u32 resctrl_get_default_ctrl(struct rdt_resource *r)
> +{
> +	switch (r->schema_fmt) {
> +	case RESCTRL_SCHEMA_BITMAP:
> +		return BIT_MASK(r->cache.cbm_len) - 1;
> +	case RESCTRL_SCHEMA_PERCENTAGE:
> +		return 100u;
> +	case RESCTRL_SCHEMA_MBPS:
> +		return r->membw.max_bw;
> +	}
> +
> +	return WARN_ON_ONCE(1);
> +}
> +

I am concerned where this is headed. Since RESCTRL_SCHEMA_PERCENTAGE remains
in use when resctrl is mounted with mba_MBps the default cannot always
be 100u (it should be MBA_MAX_MBPS when software controller is active).

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ