linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 14:12:08 -0700	[thread overview]
Message-ID: <20031001211208.GB30014@hockin.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0310011344070.838-100000@home.osdl.org>

On Wed, Oct 01, 2003 at 01:46:55PM -0700, Linus Torvalds wrote:
> How about just putting it in "gid16.c" and then adding a CONFIG_GID16
> config variable. Then architectures that want it (pretty much all, no?)  
> can then obviously just do the
> 
> 	config GID16
> 		bool
> 		default y

uid16 has this same code in it, which could be moved to gid16.  The problem
is that architectures that currently use CONFIG_UID16 expect to use
old_gid_t and get all the highuid.h magic.  The 64-bit architectures want to
use stuff from uid16 (and by extension gid16) but they don't want it ALL the
time, just in their compat code.  Therefore, they don't have old_gid_t as 16
bits.

You end up with tons of duplicated code in the 64-bit architectures (most
copies straight from uid16.c  s/old_gid_t/short/).

You end up with places that include highuid.h and then undef functions and
redefine them exactly the same  s/old_gid_t/short/.

The gid16 way would work, but doesn't solve the real problem, which is all
the duplicated code and differing types.  Some use old_gid_t, some use
short, some use u16.

What if I broke CONFIG_UID16 into CONFIG_UID16_SYSCALLS and CONFIG_OLDUID?
UID16_SYSCALLS would make the build compile uid16.c.  CONFIG_OLDUID would
activate high2lowuid() and friends.  It would involve copying some of
highuid.h into uid16.c to make uid16.c always do high2lowuid().  But what
types?

Your call - I'll make gid16.c if that's good enough for you.  Or if you
prefer, I'll do a separate patch in which we find a way to REALLY solve it.

Here's the prior fixups but not the gid16 duplicated code cleanups.  If the
rest of this patch meets approval, I'll be happy to go ahead on whatever you
prefer for gid16 stuff.
o
-- 
Notice that as computers are becoming easier and easier to use,
suddenly there's a big market for "Dummies" books.  Cause and effect,
or merely an ironic juxtaposition of unrelated facts?


  reply	other threads:[~2003-10-01 21: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
2003-10-01 20:29               ` Tim Hockin
2003-10-01 20:46                 ` Linus Torvalds
2003-10-01 21:12                   ` Tim Hockin [this message]
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=20031001211208.GB30014@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).