From: Tim Hockin <thockin@hockin.org>
To: Andrew Morton <akpm@osdl.org>
Cc: thockin@sun.com, torvalds@osdl.org, linux-kernel@vger.kernel.org,
rusty@rustcorp.com.au
Subject: Re: NGROUPS 2.6.2rc2
Date: Tue, 27 Jan 2004 17:02:22 -0800 [thread overview]
Message-ID: <20040128010222.GA32323@hockin.org> (raw)
In-Reply-To: <20040127164615.38fd992e.akpm@osdl.org>
On Tue, Jan 27, 2004 at 04:46:15PM -0800, Andrew Morton wrote:
> > Attached is a patch to remove the NGROUPS limit (again).
> +/* export the group_info to a user-space array */
> +static int groups_to_user(gid_t *grouplist, struct group_info __user *info)
> This had me thorougly confused for a while ;) The __user tag here should
> apply to grouplist, not to info.
indeed.
> +static int groups16_to_user(old_gid_t __user *grouplist,
> + struct group_info *info)
> +{
> + int i;
> + old_gid_t group;
> +
> + if (info->ngroups > TASK_SIZE/sizeof(group))
> + return -EFAULT;
> + if (!access_ok(VERIFY_WRITE, grouplist, info->ngroups * sizeof(group)))
> + return -EFAULT;
>
> Why are many functions playing with TASK_SIZE?
Not sure - I thought it was maybe a paranoid check, Rusty included it in his
version of a similar patch a while ago.
> +extern asmlinkage long sys_setgroups(int gidsetsize, gid_t *grouplist);
>
> rant. We have soooo many syscalls declared in .c files. We had a bug due
> to this a while back. Problem is, we have no anointed header in which to
> place them. include/linux/syscalls.h would suit. And unistd.h for
> arch-specific syscalls. But that's not appropriate to this patch.
Agreed.
next prev parent reply other threads:[~2004-01-28 1:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-27 22:53 NGROUPS 2.6.2rc2 Tim Hockin
2004-01-27 23:25 ` Dax Kelson
2004-01-27 23:55 ` Chris Wright
2004-01-28 0:41 ` Chris Wright
2004-01-28 0:46 ` Andrew Morton
2004-01-28 0:52 ` Christoph Hellwig
2004-01-28 1:02 ` Tim Hockin [this message]
2004-01-28 17:08 ` Hugh Dickins
2004-01-28 18:04 ` Hugh Dickins
2004-01-28 18:10 ` Linus Torvalds
2004-01-28 22:22 ` Tim Hockin
2004-02-03 22:17 ` Pavel Machek
2004-02-04 22:11 ` Panu Matilainen
2004-01-28 1:12 ` Rusty Russell
2004-01-28 11:31 ` Robin Holt
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=20040128010222.GA32323@hockin.org \
--to=thockin@hockin.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=thockin@sun.com \
--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