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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVPGHTaMxOFZdd+dPxdo5fQYFMQx6k3ygKhvbZSfNrUW3w@mail.gmail.com>
Date:	Thu, 11 Apr 2013 00:07:40 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Greg KH <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, Kay Sievers <kay@...y.org>
Subject: Re: [PATCH] driver core: add uid and gid to devtmpfs

On Wed, Apr 10, 2013 at 11:56 PM, Greg KH <gregkh@...uxfoundation.org> 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 <gregkh@...uxfoundation.org> 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);
>> > +       err = vfs_mknod(path.dentry->d_inode, dentry, mode, dev->devt);
>> >         if (!err) {
>> >                 struct iattr newattrs;
>> >
>> > -               /* fixup possibly umasked mode */
>> >                 newattrs.ia_mode = mode;
>> > -               newattrs.ia_valid = ATTR_MODE;
>> > +               newattrs.ia_uid = uid;
>> > +               newattrs.ia_gid = gid;
>>
>> drivers/base/devtmpfs.c: In function 'handle_create':
>> drivers/base/devtmpfs.c:214:19: error: incompatible types when
>> assigning to type 'kuid_t' from type 'uid_t'
>> drivers/base/devtmpfs.c:215:19: error: incompatible types when
>> assigning to type 'kgid_t' from type 'gid_t'
>> make[2]: *** [drivers/base/devtmpfs.o] Error 1
>
> I can't duplicate this here, what options am I missing?

With CONFIG_UIDGID_STRICT_TYPE_CHECKS

>
>> Looks the below patch may fix it.
>> --
>> diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
>> index fda5256..e268fc5 100644
>> --- a/drivers/base/devtmpfs.c
>> +++ b/drivers/base/devtmpfs.c
>> @@ -211,8 +211,8 @@ static int handle_create(const char *nodename,
>> umode_t mode, uid_t uid,
>>               struct iattr newattrs;
>>
>>               newattrs.ia_mode = mode;
>> -             newattrs.ia_uid = uid;
>> -             newattrs.ia_gid = gid;
>> +             newattrs.ia_uid = KUIDT_INIT(uid);
>> +             newattrs.ia_gid = KGIDT_INIT(gid);
>>               newattrs.ia_valid = ATTR_MODE|ATTR_UID|ATTR_GID;
>>               mutex_lock(&dentry->d_inode->i_mutex);
>>               notify_change(dentry, &newattrs);
>>
>
> Care to resend this in a format I can apply it in?  :)

OK.

thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ