Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Eric W. Biederman
Greg KH writes: > On Thu, Apr 11, 2013 at 08:56:06AM -0700, Greg KH wrote: >> Again, thanks for the review, I'll go enable namespaces in my test >> kernel and fix up the fallout. > > Here's the fixup patch, Eric, does it look correct to you? That looks reasonable to me. Eric -- To unsubscribe f

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Greg KH
On Thu, Apr 11, 2013 at 08:56:06AM -0700, Greg KH wrote: > Again, thanks for the review, I'll go enable namespaces in my test > kernel and fix up the fallout. Here's the fixup patch, Eric, does it look correct to you? thanks, greg k-h diff --git a/block/genhd.c b/block/genhd.c index dfcec43..20

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Eric W. Biederman
Greg KH writes: > On Wed, Apr 10, 2013 at 09:10:12PM -0700, Eric W. Biederman wrote: >> Still it approaches being twisted to have files like >> /sys/class/net/eth0/uevent that anyone can read that will only return >> values in the initial user namespace. > > Side note, I don't think that ethernet

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Eric W. Biederman
Greg KH writes: > On Wed, Apr 10, 2013 at 09:10:12PM -0700, Eric W. Biederman wrote: >> Greg KH writes: >> >> > From: Kay Sievers >> > >> > Some drivers want to tell userspace what uid and gid should be used for >> > their device nodes, so allow that information to percolate through the >> > d

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Greg KH
On Wed, Apr 10, 2013 at 09:10:12PM -0700, Eric W. Biederman wrote: > Still it approaches being twisted to have files like > /sys/class/net/eth0/uevent that anyone can read that will only return > values in the initial user namespace. Side note, I don't think that ethernet network devices have uids

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Greg KH
On Tue, Apr 09, 2013 at 10:11:55AM -0500, Rob Landley wrote: > > Or do you think it will simply never cause a problem, so there's no > need to worry? Based on the limited number of drivers that will be using this interface, I don't think there's any need to worry. But I will be glad to revisit t

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Greg KH
On Thu, Apr 11, 2013 at 08:56:06AM -0700, Greg KH wrote: > > > + newattrs.ia_uid = uid; > > > + newattrs.ia_gid = gid; > > This doesn't even compile because the types are wrong. > > Yes, this has been fixed. But note, it only fails the build if > namespaces are enabled, and given

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-11 Thread Greg KH
On Wed, Apr 10, 2013 at 09:10:12PM -0700, Eric W. Biederman wrote: > Greg KH writes: > > > From: Kay Sievers > > > > Some drivers want to tell userspace what uid and gid should be used for > > their device nodes, so allow that information to percolate through the > > driver core to userspace in

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-10 Thread Eric W. Biederman
Greg KH writes: > From: Kay Sievers > > Some drivers want to tell userspace what uid and gid should be used for > their device nodes, so allow that information to percolate through the > driver core to userspace in order to make this happen. This means that > some systems (i.e. Android and fri

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-10 Thread Ming Lei
On Wed, Apr 10, 2013 at 11:56 PM, Greg KH wrote: > On Wed, Apr 10, 2013 at 05:12:17PM +0800, Ming Lei wrote: >> On Sun, Apr 7, 2013 at 12:56 AM, Greg KH wrote: >> > @@ -201,14 +206,14 @@ static int handle_create(const char *nod >> > if (IS_ERR(dentry)) >> > return PTR_ERR(

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-10 Thread Greg KH
On Wed, Apr 10, 2013 at 05:12:17PM +0800, Ming Lei wrote: > On Sun, Apr 7, 2013 at 12:56 AM, Greg KH wrote: > > @@ -201,14 +206,14 @@ static int handle_create(const char *nod > > if (IS_ERR(dentry)) > > return PTR_ERR(dentry); > > > > - err = vfs_mknod(path.dentry->d_

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-10 Thread Ming Lei
On Sun, Apr 7, 2013 at 12:56 AM, Greg KH wrote: > @@ -201,14 +206,14 @@ static int handle_create(const char *nod > if (IS_ERR(dentry)) > return PTR_ERR(dentry); > > - err = vfs_mknod(path.dentry->d_inode, > - dentry, mode, dev->devt); > + e

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-09 Thread Rob Landley
On 04/08/2013 01:25:27 PM, Greg KH wrote: On Mon, Apr 08, 2013 at 01:14:13PM -0500, Rob Landley wrote: > On 04/06/2013 11:56:00 AM, Greg KH wrote: > >From: Kay Sievers > > > >Some drivers want to tell userspace what uid and gid should be > >used for > >their device nodes, so allow that informati

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-08 Thread Greg KH
On Mon, Apr 08, 2013 at 01:14:13PM -0500, Rob Landley wrote: > On 04/06/2013 11:56:00 AM, Greg KH wrote: > >From: Kay Sievers > > > >Some drivers want to tell userspace what uid and gid should be > >used for > >their device nodes, so allow that information to percolate through the > >driver core t

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-08 Thread Rob Landley
On 04/06/2013 11:56:00 AM, Greg KH wrote: From: Kay Sievers Some drivers want to tell userspace what uid and gid should be used for their device nodes, so allow that information to percolate through the driver core to userspace in order to make this happen. This means that some systems (

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-07 Thread Kay Sievers
On Sat, Apr 6, 2013 at 7:58 PM, Greg KH 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 chan

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-06 Thread Greg KH
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

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-06 Thread Al Viro
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

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-06 Thread Greg KH
On Sat, Apr 06, 2013 at 06:09:52PM +0100, Al Viro wrote: > On Sat, Apr 06, 2013 at 09:56:00AM -0700, Greg KH wrote: > > From: Kay Sievers > > > > Some drivers want to tell userspace what uid and gid should be used for > > their device nodes, so allow that information to percolate through the > >

Re: [PATCH] driver core: add uid and gid to devtmpfs

2013-04-06 Thread Al Viro
On Sat, Apr 06, 2013 at 09:56:00AM -0700, Greg KH wrote: > From: Kay Sievers > > Some drivers want to tell userspace what uid and gid should be used for > their device nodes, so allow that information to percolate through the > driver core to userspace in order to make this happen. This means th