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:   Sat, 23 Oct 2021 04:02:48 +0300
From:   Jarkko Sakkinen <>
To:     Greg Kroah-Hartman <>
Cc:     Dave Hansen <>,
        Thomas Gleixner <>,
        Ingo Molnar <>, Borislav Petkov <>,, "H. Peter Anvin" <>,,,,
Subject: Re: [PATCH v8 2/2] x86/sgx: Add an attribute for the amount of SGX
 memory in a NUMA node

On Mon, 2021-10-18 at 16:35 +0200, Greg Kroah-Hartman wrote:
> > +               ret = sysfs_create_group(&dev->kobj, &sgx_node_attr_group);
> A huge hint, if a driver has to call a sysfs_* call, something is wrong.
> Something is wrong here.
> Why are you messing around with a kobject?  This is a device, that you
> control, you can just set the default attribute group for it and then
> the driver core will add and remove the sysfs group at the proper time,
> in the proper way.  Right now you are racing userspace and loosing.
> Use the default group list, that is what it is there for.

I used sysfs_create_group() because node_devices is not owned by SGX
code. It is managed in drivers/base/node.c, and also initialized before


Powered by blists - more mailing lists