public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH RFC] s390x sys32 (remove duplicated code)
@ 2002-08-27  7:29 Martin Schwidefsky
  2002-08-29  0:42 ` [PATCH} s390x sys32 duplicated code cleanup (was [PATCH RFC] s390x sys32...) Tim Hockin
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schwidefsky @ 2002-08-27  7:29 UTC (permalink / raw)
  To: Tim Hockin; +Cc: linux-390, Linux Kernel Mailing List


Hi Tim,

> I am working on a patch that removes the old limit of NGROUPS.
>
> In doing so, I am checking everything that references NGROUPS.  One
> such place is in arch/s390x/kernel/linux32.c.
>
> I notice these things:
> * s390x defines __kernel_old_gid_t to __kernel_gid_t (unsigned int)
> * s390x has a sys32_getgroups16() which looks JUST LIKE uid16.c
> sys_getgroups16
> * s390x does not define CONFIG_UID16, but seems to need it
The early versions of 64 bit s390x did not have the 31 bit emulation
layer. As long as only 64 bit code is executed you don't need the
16 bit uids/gids. Thats why is isn't defined.

> It seems to me that if we do:
> * s390x defines CONFIG_UID16
> * typedef __kernel_old_gid_t to u16
> * get rid of all the sys32_*16 stuff and just call the uid16.c function
I checked the code and didn't find any reason why this shouldn't work.
In fact with the 31 bit emulation layer the 64 bit kernel does need the
16 bit uid/gid system calls although only for the emulation. To make it
really perfect you could define CONFIG_UID16 dependent on
CONFIG_S390_SUPPORT. This saves a few bytes in the image if the emulation
support is not enabled.

> We could save a bit of duplicated code.  Patches that remove code are
> good, right?
Definitly.

blue skies,
   Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com



^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [PATCH} s390x sys32 duplicated code cleanup (was [PATCH RFC] s390x sys32...)
@ 2002-09-05  7:30 Martin Schwidefsky
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Schwidefsky @ 2002-09-05  7:30 UTC (permalink / raw)
  To: Tim Hockin; +Cc: Tim Hockin, linux-390, Linux Kernel Mailing List


Hi Tim,

>Uggh, DaveM pointed out a very good issue with this fix (similar for
>Sparc64) and core files.  Core files will now have truncated uid/gid
>values because fs/binfmt_elf calls NEW_TO_OLD_UID().  May be other
>places, too.
>
>I guess you should not apply this patch until I've had a better think
>about it.

Sad but true. And I don't see an easy way around it without changes
to fs/binfmt_elf.c.

blue skies,
   Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-05  7:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-27  7:29 [PATCH RFC] s390x sys32 (remove duplicated code) Martin Schwidefsky
2002-08-29  0:42 ` [PATCH} s390x sys32 duplicated code cleanup (was [PATCH RFC] s390x sys32...) Tim Hockin
2002-09-04 18:19   ` Tim Hockin
  -- strict thread matches above, loose matches on Subject: below --
2002-09-05  7:30 Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox