From: Tim Hockin <thockin@hockin.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Many groups patch.
Date: Wed, 1 Oct 2003 13:29:10 -0700 [thread overview]
Message-ID: <20031001202910.GA30014@hockin.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0310011216530.24564-100000@home.osdl.org>
On Wed, Oct 01, 2003 at 12:22:03PM -0700, Linus Torvalds wrote:
> Augh. It also makes code even uglier than it used to be:
>
> ...
>
> + u16 group;
> + if (copy_from_user(&group, grouplist+i, sizeof(group)))
> + return -EFAULT;
I can change it to do a copy_from_user one block at a time, if you prefer...
> if (nr > TASK_SIZE / sizeof(group))
> return -EFAULT;
> if (!access_ok(grouplist, nr*sizeof(group))
> return -EFAULT;
> ...
>
> if (__get_user(group, grouplist + i))
> return -EFAULT;
> ...
Or change it to this, which is the same 1-gid-at-a-time copy. This code is
definitely SIMPLER than the 1-block-at-a-time copy. I'll go with that.
> which really is so common that it _really_ should be in kernel/uid16.c
> (or, actually create a new kernel/gid16.c file) rather than copied
> (incorrectly) to a lot of architectures. Then things like the above can be
> done right once, rather than merging this that does the nasty thing over
> and over.
I'd love to put it in uid16.c, but uid16.c is not used by the 64-bit
architectures. I remember proposing a simple fix at one point and being
shot down. I'd love to fix that up, but it's a separate patch. If I
fix it up as suggested above, will you take it with the promise that I'll
find some way to do uid16 properly for the 64-bit arches and clean it up in
a followup patch?
> Sorry to just complain all the time,
I'm just glad it's getting attention - I'm dying to take this off my todo
list.
Tim
next prev parent reply other threads:[~2003-10-01 20:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1064857032.26219.linux-kernel2news@redhat.com>
2003-09-29 22:29 ` [PATCH] Many groups patch Pete Zaitcev
2003-09-29 22:43 ` Tim Hockin
2003-09-29 22:55 ` Tim Hockin
2003-09-29 23:10 ` Linus Torvalds
2003-10-01 7:10 ` Tim Hockin
2003-10-01 18:46 ` Tim Hockin
2003-10-01 19:22 ` Linus Torvalds
2003-10-01 20:29 ` Tim Hockin [this message]
2003-10-01 20:46 ` Linus Torvalds
2003-10-01 21:12 ` Tim Hockin
2003-10-01 21:16 ` Tim Hockin
2003-10-02 1:00 ` IDEA: arch uid16 cleanup (was 'Many groups patch') Tim Hockin
2003-10-02 2:09 ` [PATCH] Many groups patch Rusty Russell
2003-10-02 4:39 ` Tim Hockin
2003-10-02 9:10 ` David S. Miller
2003-10-02 2:25 ` Rusty Russell
2003-10-02 2:46 ` Pete Zaitcev
2003-09-29 7:19 Rusty Russell
2003-09-29 17:25 ` Linus Torvalds
2003-09-29 23:30 ` Rusty Russell
2003-09-30 4:11 ` Tim Hockin
2003-10-01 7:29 ` Rusty Russell
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=20031001202910.GA30014@hockin.org \
--to=thockin@hockin.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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).