From: Linus Torvalds <torvalds@osdl.org>
To: Tim Hockin <thockin@hockin.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>, <braam@clusterfs.com>,
<rusty@rustcorp.com.au>,
Linux Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Many groups patch.
Date: Wed, 1 Oct 2003 12:22:03 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0310011216530.24564-100000@home.osdl.org> (raw)
In-Reply-To: <20031001184610.GA25716@hockin.org>
On Wed, 1 Oct 2003, Tim Hockin wrote:
>
> This patch touches all the compat code in the 64-bit architectures.
> These files have a LOT of duplicated code from uid16.c. I did not try to
> reduce duplicated code, and instead followed suit.
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;
which is really a memcpy() of two bytes at a time. That's disgusting. It
really should be
u16 group;
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;
...
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.
Sorry to just complain all the time,
Linus
next prev parent reply other threads:[~2003-10-01 19:23 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 [this message]
2003-10-01 20:29 ` Tim Hockin
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=Pine.LNX.4.44.0310011216530.24564-100000@home.osdl.org \
--to=torvalds@osdl.org \
--cc=braam@clusterfs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=thockin@hockin.org \
--cc=zaitcev@redhat.com \
/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).