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: <29acd88c-144e-493e-8721-07828a480d76@intel.com>
Date: Tue, 1 Jul 2025 19:56:40 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: "Moger, Babu" <bmoger@....com>, Babu Moger <babu.moger@....com>,
	<corbet@....net>, <tony.luck@...el.com>, <Dave.Martin@....com>,
	<james.morse@....com>, <tglx@...utronix.de>, <mingo@...hat.com>,
	<bp@...en8.de>, <dave.hansen@...ux.intel.com>
CC: <x86@...nel.org>, <hpa@...or.com>, <akpm@...ux-foundation.org>,
	<rostedt@...dmis.org>, <paulmck@...nel.org>, <thuth@...hat.com>,
	<ardb@...nel.org>, <gregkh@...uxfoundation.org>, <seanjc@...gle.com>,
	<thomas.lendacky@....com>, <pawan.kumar.gupta@...ux.intel.com>,
	<manali.shukla@....com>, <perry.yuan@....com>, <kai.huang@...el.com>,
	<peterz@...radead.org>, <xiaoyao.li@...el.com>, <kan.liang@...ux.intel.com>,
	<mario.limonciello@....com>, <xin3.li@...el.com>, <gautham.shenoy@....com>,
	<xin@...or.com>, <chang.seok.bae@...el.com>, <fenghuay@...dia.com>,
	<peternewman@...gle.com>, <maciej.wieczor-retman@...el.com>,
	<eranian@...gle.com>, <linux-doc@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v14 29/32] fs/resctrl: Introduce the interface to modify
 assignments in a group

Hi Babu,

On 7/1/25 7:18 PM, Moger, Babu wrote:
> On 6/25/2025 6:38 PM, Reinette Chatre wrote:
>> On 6/13/25 2:05 PM, Babu Moger wrote:

>>
>> Apart from simplifying the code an additional benefit is to avoid
>> (ab)use case where user/bot may write:
>>     # echo "mbm_total_bytes:*=_;*=e;*=_" > /sys/fs/resctrl/mbm_L3_assignments
>>
> 
> Why should we restrict this?

I see it as unnecessary churn that can easily be avoided.

> 
>>> +    } else if (!id_str || kstrtoul(id_str, 10, &dom_id)) {
>>> +        rdt_last_cmd_puts("Missing domain id\n");
>>> +        return -EINVAL;
>>> +    }
>>> +
>>> +    /* Verify if the dom_id is valid */
>>> +    found = false;
>>> +    list_for_each_entry(d, &r->mon_domains, hdr.list) {
>>> +        if (d->hdr.id == dom_id) {
>>
>> Similarly, resctrl_get_assign_state() (new name TBD) can be
>> called directly and "found" can be dropped.
> 
> I think we still need to know if the domain id matched or not.

Of course, and when the domain ID matches, just call 
resctrl_get_assign_state()/rdtgroup_modify_assign_state()

> 
> I think it is better to call resctrl_get_assign_state()(now rdtgroup_modify_assign_state()) at once place. Code is easy to follow.

This is not clear to me. Will surely take a look at how this turned out.

> 
> I have taken care of most of the stuff. You can review again in next version.

ok, thank you.

Reinette


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ