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]
Date:   Fri, 1 Sep 2023 10:57:11 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     <babu.moger@....com>, <corbet@....net>, <tglx@...utronix.de>,
        <mingo@...hat.com>, <bp@...en8.de>
CC:     <fenghua.yu@...el.com>, <dave.hansen@...ux.intel.com>,
        <x86@...nel.org>, <hpa@...or.com>, <paulmck@...nel.org>,
        <akpm@...ux-foundation.org>, <quic_neeraju@...cinc.com>,
        <rdunlap@...radead.org>, <damien.lemoal@...nsource.wdc.com>,
        <songmuchun@...edance.com>, <peterz@...radead.org>,
        <jpoimboe@...nel.org>, <pbonzini@...hat.com>,
        <chang.seok.bae@...el.com>, <pawan.kumar.gupta@...ux.intel.com>,
        <jmattson@...gle.com>, <daniel.sneddon@...ux.intel.com>,
        <sandipan.das@....com>, <tony.luck@...el.com>,
        <james.morse@....com>, <linux-doc@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <bagasdotme@...il.com>,
        <eranian@...gle.com>, <christophe.leroy@...roup.eu>,
        <jarkko@...nel.org>, <adrian.hunter@...el.com>,
        <quic_jiles@...cinc.com>, <peternewman@...gle.com>
Subject: Re: [PATCH v8 8/8] x86/resctrl: Display hardware ids of resource
 groups

Hi Babu,

On 9/1/2023 10:28 AM, Moger, Babu wrote:
> On 8/31/23 19:43, Reinette Chatre wrote:
>> On 8/31/2023 4:58 PM, Moger, Babu wrote:
>>> @@ -3336,6 +3340,9 @@ static int mkdir_rdt_prepare(struct kernfs_node
>>> *parent_kn,
>>>         else
>>>                 files = RFTYPE_BASE | RFTYPE_MON;
>>>
>>> +       if (rdt_mon_capable)
>>> +               files |= RFTYPE_MON;
>>> +
>>
>> Is this not redundant considering what just happened a few lines above?
> 
> Yea. Right. I will change the previous line to
> 
> files = RFTYPE_BASE;
> 

This is not clear to me. If I understand correctly this means that
when rtype == RDTMON_GROUP then files = RFTYPE_BASE?
This does not sound right to me. I think it would be awkward to to set
files = RFTYPE_BASE if rtype == RDTMON_GROUP and then later do another
test using rdt_mon_capable to set the correct flag. It should be possible
to integrate this better.

What is needed is:
When group is a control group:
	files = RFTYPE_BASE | RFTYPE_CTRL;
When group is a monitor group:
	files = RFTYPE_BASE | RFTYPE_MON;
When group is a monitor and control group then:
	files = RFTYPE_BASE | RFTYPE_CTRL | RFTYPE_MON;

How about just moving the "if (rdt_mon_capable)" check into the 
snippet that sets the flag for a control group?

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ