From: ebiederm@xmission.com (Eric W. Biederman)
To: David Miller <davem@davemloft.net>
Cc: dmitry.torokhov@gmail.com, tj@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container
Date: Mon, 29 Aug 2016 07:38:55 -0500 [thread overview]
Message-ID: <87zinvpx5s.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <20160819.165917.2302741905893802825.davem@davemloft.net> (David Miller's message of "Fri, 19 Aug 2016 16:59:17 -0700 (PDT)")
David Miller <davem@davemloft.net> writes:
> 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.
>
> I need some domain experts to review this series please.
I just came back from vacation and I will aim to take a look shortly.
The big picture idea seems sensible. Having a better ownship of sysfs
files that are part of a network namespace. I will have to look at the
details to see if the implementation is similarly sensible.
Eric
next prev parent reply other threads:[~2016-08-29 12:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 22:33 [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container Dmitry Torokhov
2016-08-16 22:33 ` [PATCH 1/5] kernfs: allow creating kernfs objects with arbitrary uid/gid Dmitry Torokhov
2016-08-16 22:33 ` [PATCH 2/5] sysfs, kobject: allow creating kobject belonging to arbitrary users Dmitry Torokhov
2016-08-16 22:33 ` [PATCH 3/5] kobject: kset_create_and_add() - fetch ownership info from parent Dmitry Torokhov
2016-08-16 22:33 ` [PATCH 4/5] driver core: set up ownership of class devices in sysfs Dmitry Torokhov
2016-08-20 2:26 ` Stephen Hemminger
2016-08-16 22:33 ` [PATCH 5/5] net-sysfs: make sure objects belong to contrainer's owner Dmitry Torokhov
2016-08-22 6:03 ` kbuild test robot
2016-08-19 23:59 ` [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container David Miller
2016-08-29 12:38 ` Eric W. Biederman [this message]
2016-09-15 3:24 ` Dmitry Torokhov
2016-09-15 23:26 ` Eric W. Biederman
2016-08-22 6:41 ` David Miller
2016-08-22 16:24 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zinvpx5s.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.