From: Kay Sievers <kay@vrfy.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver core: add uid and gid to devtmpfs
Date: Sun, 7 Apr 2013 18:38:37 +0200 [thread overview]
Message-ID: <CAPXgP109T1TYParpR1xgB_vKo+C-mXDvWfJJfMEt98X2E1Fduw@mail.gmail.com> (raw)
In-Reply-To: <20130406175800.GA2033@kroah.com>
On Sat, Apr 6, 2013 at 7:58 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sat, Apr 06, 2013 at 06:45:12PM +0100, Al Viro wrote:
>> On Sat, Apr 06, 2013 at 10:26:12AM -0700, Greg KH wrote:
>>
>> > Why not? "closed" systems, like Android and other embedded systems,
>> > have "assigned" uid and gid values that never change. Right now they
>> > have to have a horrible shell-script to set these values in devtmpfs
>> > when the device shows up to the needed numbers. This tiny patch gets
>> > rid of that shell script entirely, allowing them to specify it from the
>> > kernel as needed.
>>
>> What's to stop them from using static /dev? Has an extra benefit of
>> getting rid of devtmpfs shite completely...
>
> True, it would, but they like using devtmpfs :)
>
> This change also allows systems that have "control" devices to properly
> be able to pass in the uid for the device they are creating, like rawctl
> (which I know is "obsolete"), and probably dm and lvm. I thought loop
> devices might also want this, as they can now be created by normal
> users, but I don't think that's needed for them.
It is generally useful to be able to control the uid/gid of
userspace-initiated device nodes, instead of racy post-adjusting this
setting from udev rules with an unpredictable long window between the
request and the adjustment.
The created device node can inherit the ownership of the calling
process, in a similar way like we do for devpts.
We have the same for the mode already, and want to be able to do the
same for the other permissions properties.
Thanks,
Kay
next prev parent reply other threads:[~2013-04-07 16:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-06 16:56 [PATCH] driver core: add uid and gid to devtmpfs Greg KH
2013-04-06 17:09 ` Al Viro
2013-04-06 17:26 ` Greg KH
2013-04-06 17:45 ` Al Viro
2013-04-06 17:58 ` Greg KH
2013-04-07 16:38 ` Kay Sievers [this message]
2013-04-08 18:14 ` Rob Landley
2013-04-08 18:25 ` Greg KH
2013-04-09 15:11 ` Rob Landley
2013-04-11 16:08 ` Greg KH
2013-04-10 9:12 ` Ming Lei
2013-04-10 15:56 ` Greg KH
2013-04-10 16:07 ` Ming Lei
2013-04-11 4:10 ` Eric W. Biederman
2013-04-11 15:56 ` Greg KH
2013-04-11 15:57 ` Greg KH
2013-04-11 16:31 ` Eric W. Biederman
2013-04-11 16:43 ` Greg KH
2013-04-11 16:50 ` Eric W. Biederman
2013-04-11 16:19 ` Greg KH
2013-04-11 16:41 ` Eric W. Biederman
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=CAPXgP109T1TYParpR1xgB_vKo+C-mXDvWfJJfMEt98X2E1Fduw@mail.gmail.com \
--to=kay@vrfy.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).