Re: [PATCH] 2.5.41 s390 (8/8): 16 bit uid/gids.

From: Tim Hockin (thockin@hockin.org)
Date: Wed Oct 09 2002 - 13:24:46 EST


> On Wed, 9 Oct 2002, Tim Hockin wrote:
> > Linus, This is actually something I sent to Martin (and DaveM). The __UID16
> > crap is because s390x and Sparc64 (and others?) do not want the highuid
> > stuff except in very specific places - namely compat code. Just using
> > CONFIG_UID16_SYSCALLS has the same bad side-effect as CONFIG_UID16 - all or
> > nothing. In short, we want to build uid16.o with highuid translations, and
> > a few other compat objects, but not everything. Ugly.
>
> So why don't we just split it up into all the sub-options? So that you
> have a smørgåsbord of real options to select from..
>
> In other words, that __UID16 thing should be a real CONFIG_XXX option.

Because Sparc64/s390x/? still need to tell highuid.h to do macro magic for
NEW_TO_OLD_UID() and friends in some places and not others. A CONFIG_XXX
applies all the time to all files.

We can make the few sparc64/s390x sections just redefine the macros they
want in the files in question, if you prefer, but uid16.c is still a user of
highuid.h and needs to define __UID16. If you prefer, __UID16 can be called
DO_HIGHUID_CONVERSIONS.

#define DO_HIGHUID_CONVERSIONS
#include <linux/uid16.h>

Or have a new uid16.h that unconditionally defines the macros. Then
highuid.h can include uid16.h IFF CONFIG_UID16, and uid16.c can include
uid16.h. I see this as MORE problematic, because someone, somewhere will
include uid16.h when they meant highuid.h. Forcing a non CONFIG_UID16 arch
to explicity call out "I want uid16 macro conversion for THIS FILE" seems
safe. Ugly, but safe.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:32 EST