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: <SJ1PR11MB60831C44DEE7711F93C3C26CFC382@SJ1PR11MB6083.namprd11.prod.outlook.com>
Date: Fri, 13 Dec 2024 16:24:43 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: "Moger, Babu" <bmoger@....com>, Babu Moger <babu.moger@....com>
CC: "corbet@....net" <corbet@....net>, "Chatre, Reinette"
	<reinette.chatre@...el.com>, "tglx@...utronix.de" <tglx@...utronix.de>,
	"mingo@...hat.com" <mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
	"peternewman@...gle.com" <peternewman@...gle.com>, "Yu, Fenghua"
	<fenghua.yu@...el.com>, "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com"
	<hpa@...or.com>, "paulmck@...nel.org" <paulmck@...nel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>, "thuth@...hat.com"
	<thuth@...hat.com>, "rostedt@...dmis.org" <rostedt@...dmis.org>,
	"xiongwei.song@...driver.com" <xiongwei.song@...driver.com>,
	"pawan.kumar.gupta@...ux.intel.com" <pawan.kumar.gupta@...ux.intel.com>,
	"daniel.sneddon@...ux.intel.com" <daniel.sneddon@...ux.intel.com>,
	"jpoimboe@...nel.org" <jpoimboe@...nel.org>, "perry.yuan@....com"
	<perry.yuan@....com>, "Huang, Kai" <kai.huang@...el.com>, "Li, Xiaoyao"
	<xiaoyao.li@...el.com>, "seanjc@...gle.com" <seanjc@...gle.com>, "Li, Xin3"
	<xin3.li@...el.com>, "andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
	"ebiggers@...gle.com" <ebiggers@...gle.com>, "mario.limonciello@....com"
	<mario.limonciello@....com>, "james.morse@....com" <james.morse@....com>,
	"tan.shaopeng@...itsu.com" <tan.shaopeng@...itsu.com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Wieczor-Retman, Maciej" <maciej.wieczor-retman@...el.com>, "Eranian,
 Stephane" <eranian@...gle.com>
Subject: RE: [PATCH v10 16/24] x86/resctrl: Add interface to the assign
 counter

> It is right thing to continue assignment if one of the domain is out of 
> counters. In that case how about we save the error(say error_domain) and 
> continue. And finally return success if both ret and error_domain are zeros.
>
>    return ret ?  ret : error_domain:

If there are many domains, then you might have 3 succeed and 5 fail.

I think the best you can do is return success if everything succeeded
and an error if any failed.

You have the same issue if someone tries to update multiple things
with a single write to mbm_assign_control:

# cat > mbm_assign_control << EOF
c1/m78/0=t;1=l;
c1/m79/0=t;1=l
c1/m80/0=t;1=l;
c1/m81/0=t;1=l;
EOF

Those get processed in order, some may succeed, but once a domain
is out of counters the rest for that domain will fail.

Updates to schemata are handled in multiple passes to either have
all succeed or all fail. But the only problems that can occur are user
syntax/range issues. So it's a lot simpler.

For writes to mbm_assign_control I think it's okay to document that
some requests may have been applied even though the whole request
reports failure. The user can always read the file to check status.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ