From: "Steven J. Hill" <Steven.Hill@imgtec.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-arch@vger.kernel.org, linux-mips@linux-mips.org,
Deng-Cheng Zhu <Dengcheng.Zhu@imgtec.com>
Subject: Re: [RFC][PATCH] MIPS: VPE: Remove vpe_getuid and vpe_getgid
Date: Tue, 21 Jan 2014 14:29:05 -0600 [thread overview]
Message-ID: <52DED891.60301@imgtec.com> (raw)
In-Reply-To: <8738kh6usi.fsf@xmission.com>
On 01/21/2014 12:42 PM, Eric W. Biederman wrote:
>
> The linux build-bot recently reported a build error in arch/mips/kernel/vpe.c
>
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-linus
> head: 261000a56b6382f597bcb12000f55c9ff26a1efb
> commit: 261000a56b6382f597bcb12000f55c9ff26a1efb [4/4] userns: userns: Remove UIDGID_STRICT_TYPE_CHECKS
> config: make ARCH=mips maltaaprp_defconfig
>
> All error/warnings:
>
> arch/mips/kernel/vpe.c: In function 'vpe_open':
> >> arch/mips/kernel/vpe.c:1086:9: error: incompatible types when assigning to type 'unsigned int' from type 'kuid_t'
> >> arch/mips/kernel/vpe.c:1087:9: error: incompatible types when assigning to type 'unsigned int' from type 'kgid_t'
>
> vim +1086 arch/mips/kernel/vpe.c
>
> 863abad4 Jesper Juhl 2010-10-30 1080 return -ENOMEM;
> 863abad4 Jesper Juhl 2010-10-30 1081 }
> e01402b1 Ralf Baechle 2005-07-14 1082 v->plen = P_SIZE;
> e01402b1 Ralf Baechle 2005-07-14 1083 v->load_addr = NULL;
> e01402b1 Ralf Baechle 2005-07-14 1084 v->len = 0;
> e01402b1 Ralf Baechle 2005-07-14 1085
> d76b0d9b David Howells 2008-11-14 @1086 v->uid = filp->f_cred->fsuid;
> d76b0d9b David Howells 2008-11-14 @1087 v->gid = filp->f_cred->fsgid;
> 2600990e Ralf Baechle 2006-04-05 1088
> 2600990e Ralf Baechle 2006-04-05 1089 v->cwd[0] = 0;
> 2600990e Ralf Baechle 2006-04-05 1090 ret = getcwd(v->cwd, VPE_PATH_MAX);
>
> When examining the code to see what v->uid and v->gid were used for I
> discovered that the only users in the kernel are vpe_getuid and
> vpe_getgid, and that vpe_getuid and vpe_getgid are never called.
>
> So instead of proposing a conversion to use kuid_t and kgid_t instead
> of unsigned int/int as I normally would let's just kill this dead code
> so no one has to worry about it further.
>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
>
This patch looks good to me, however, Deng-Cheng should also confirm if
this patch is okay. He is currently maintaining that code. Thanks.
Steve
next prev parent reply other threads:[~2014-01-21 20:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 18:42 [RFC][PATCH] MIPS: VPE: Remove vpe_getuid and vpe_getgid Eric W. Biederman
2014-01-21 20:29 ` Steven J. Hill [this message]
2014-01-22 22:14 ` Deng-Cheng Zhu
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=52DED891.60301@imgtec.com \
--to=steven.hill@imgtec.com \
--cc=Dengcheng.Zhu@imgtec.com \
--cc=ebiederm@xmission.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mips@linux-mips.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 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).