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
| ||
|
Date: Wed, 26 Feb 2020 09:15:33 +0100 From: Greg Kroah-Hartman <gregkh@...uxfoundation.org> To: Christian Brauner <christian.brauner@...ntu.com> Cc: "David S. Miller" <davem@...emloft.net>, linux-kernel@...r.kernel.org, netdev@...r.kernel.org, "Rafael J. Wysocki" <rafael@...nel.org>, Pavel Machek <pavel@....cz>, Jakub Kicinski <kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, Stephen Hemminger <stephen@...workplumber.org>, linux-pm@...r.kernel.org Subject: Re: [PATCH v6 4/9] sysfs: add sysfs_change_owner() On Tue, Feb 25, 2020 at 02:19:33PM +0100, Christian Brauner wrote: > Add a helper to change the owner of sysfs objects. > This function will be used to correctly account for kobject ownership > changes, e.g. when moving network devices between network namespaces. > > This mirrors how a kobject is added through driver core which in its guts is > done via kobject_add_internal() which in summary creates the main directory via > create_dir(), populates that directory with the groups associated with the > ktype of the kobject (if any) and populates the directory with the basic > attributes associated with the ktype of the kobject (if any). These are the > basic steps that are associated with adding a kobject in sysfs. > Any additional properties are added by the specific subsystem itself (not by > driver core) after it has registered the device. So for the example of network > devices, a network device will e.g. register a queue subdirectory under the > basic sysfs directory for the network device and than further subdirectories > within that queues subdirectory. But that is all specific to network devices > and they call the corresponding sysfs functions to do that directly when they > create those queue objects. So anything that a subsystem adds outside of what > driver core does must also be changed by it (That's already true for removal of > files it created outside of driver core.) and it's the same for ownership > changes. > > Signed-off-by: Christian Brauner <christian.brauner@...ntu.com> Thanks for the documentation update, looks good: Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists