Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1467395
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container |
| Date | 2016-08-22 08:50 +0200 |
| Message-ID | <s8Rdw-2H5-9@gated-at.bofh.it> (permalink) |
| References | <s6VbA-DV-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Tue, 16 Aug 2016 15:33:10 -0700 > There are objects in /sys hierarchy (/sys/class/net/) that logically belong > to a namespace/container. Unfortunately all sysfs objects start their life > belonging to global root, and while we could change ownership manually, > keeping tracks of all objects that come and go is cumbersome. It would > be better if kernel created them using correct uid/gid from the beginning. > > This series changes kernfs to allow creating object's with arbitrary > uid/gid, adds get_ownership() callback to ktype structure so subsystems > could supply their own logic (likely tied to namespace support) for > determining ownership of kobjects, and adjusts sysfs code to make use of > this information. Lastly net-sysfs is adjusted to make sure that objects in > net namespace are owned by the root user from the owning user namespace. > > Note that we do not adjust ownership of objects moved into a new namespace > (as when moving a network device into a container) as userspace can easily > do it. As shown by the kbuild robot, this fails to build when CONFIG_SYSFS it disabled.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] Make /sys/class/net per net namespace objects belong to container Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-17 00:40 +0200
[PATCH 5/5] net-sysfs: make sure objects belong to contrainer's owner Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-17 00:40 +0200
Re: [PATCH 5/5] net-sysfs: make sure objects belong to contrainer's owner kbuild test robot <lkp@intel.com> - 2016-08-22 08:10 +0200
[PATCH 2/5] sysfs, kobject: allow creating kobject belonging to arbitrary users Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-17 00:40 +0200
[PATCH 3/5] kobject: kset_create_and_add() - fetch ownership info from parent Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-17 00:40 +0200
[PATCH 4/5] driver core: set up ownership of class devices in sysfs Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-17 00:40 +0200
Re: [PATCH 4/5] driver core: set up ownership of class devices in sysfs Stephen Hemminger <stephen@networkplumber.org> - 2016-08-20 04:30 +0200
[PATCH 1/5] kernfs: allow creating kernfs objects with arbitrary uid/gid Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-17 00:40 +0200
Re: [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container David Miller <davem@davemloft.net> - 2016-08-20 02:00 +0200
Re: [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container David Miller <davem@davemloft.net> - 2016-08-22 08:50 +0200
Re: [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-08-22 18:30 +0200
csiph-web