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:   Mon, 01 Nov 2021 01:52:04 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>, reinette.chatre@...el.com,
        tony.luck@...el.com, linux-kernel@...r.kernel.org,
        linux-sgx@...r.kernel.org
Subject: Re: [PATCH v9 2/2] x86/sgx: Add an attribute for the amount of SGX
 memory in a NUMA node

On Sun, 2021-10-31 at 20:30 +0100, Greg Kroah-Hartman wrote:
> On Sun, Oct 31, 2021 at 07:39:32PM +0200, Jarkko Sakkinen wrote:
> > > > +static ssize_t size_show(struct device *dev, struct device_attribute *attr, char *buf)
> > > > +{
> > > > +       unsigned long size = 0;
> > > > +       int nid;
> > > > +
> > > > +       for (nid = 0; nid < num_possible_nodes(); nid++) {
> > > > +               if (dev == sgx_numa_nodes[nid].dev) {
> > > > +                       size = sgx_numa_nodes[nid].size;
> > > > +                       break;
> > > > +               }
> > > > +       }
> > > > +
> > > > +       return sysfs_emit(buf, "%lu\n", size);
> > > > +}
> > > > +DEVICE_ATTR_RO(size);
> > > 
> > > static?
> > 
> > The named ("sgx") attribute group is exported:
> > 
> > extern const struct attribute_group sgx_node_group;
> 
> That's fine, I am objecting to the fact that you now have added a global
> symbol called device_attr_size.  Please make that static as that is a
> VERY generic name.

Right, got it! Thank you.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ