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: <b768e6bf-04c8-ad90-bfb1-39d78073be2a@intel.com>
Date:   Mon, 11 Sep 2023 14:53:33 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Fenghua Yu <fenghua.yu@...el.com>, Babu Moger <babu.moger@....com>,
        <corbet@....net>, <tglx@...utronix.de>, <mingo@...hat.com>,
        <bp@...en8.de>
CC:     <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 v9 8/9] x86/resctrl: Display CLOSID for resource group

Hi Fenghua,

On 9/11/2023 11:08 AM, Fenghua Yu wrote:
> On 9/7/23 16:51, Babu Moger wrote:

...
>> @@ -1863,6 +1879,13 @@ static struct rftype res_common_files[] = {
>>           .seq_show    = rdtgroup_size_show,
>>           .fflags        = RFTYPE_CTRL_BASE,
>>       },
>> +    {
>> +        .name        = "ctrl_hw_id",
>> +        .mode        = 0444,
>> +        .kf_ops        = &rdtgroup_kf_single_ops,
>> +        .seq_show    = rdtgroup_closid_show,
> 
> Is it better to rename "rdtgroup_closid_show" as arch neutral name
> "rdtgroup_ctrl_hw_id_show"? So the name is arch neutral and reflects
> the ctrl_hw_id. So this can eventually go to generic fs code without
> renaming it. The getting closid implementation in the function will
> be arch specific.

This is not so obvious to me. We have to draw the line somewhere. This
series draws the line between the kernel and user interface. That is,
from user perspective it is "ctrl_hw_id" and from kernel perspective
it is "closid".

I think renaming rdtgroup_closid_show() to rdtgroup_ctrl_hw_id_show() may
be mixing up the two because the function called rdtgroup_ctrl_hw_id_show() 
would operate on rdtgroup->closid - so in a sense renaming the function
to rdtgroup_ctrl_hw_id_show() would move the name further from what the
function does. Would that mean that we need to refactor the whole kernel
the naming to match between kernel space and user space by changing
rdtgroup->closid to rdtgroup->ctrl_hw_id? That escalates quite far and
wide and I wonder if it is not just simpler to keep the naming
boundary between kernel space and user space.

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ