tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: compat linux/linux32 uid16 functions cleanup+fixes



On Fri, Jan 04, 2008 at 07:01:17PM +0100, Nicolas Joly wrote:
> 
> Hi,
> 
> While performing some regressions tests under compat linux/linux32, i
> noticed that some uid16 functions were failing ... I started fixing
> them; and while here, made some other cleanups :
> 
> - Add linux_sys_getres{uid,gid}16 to fix an overflow with incorrect
>   sizes given to copyout.
> 
> - Move all uid16 functions to a new linux_uid16.c file, only included
>   by needed archs (currently arm, i386 and m68k).
> 
> - Add some macros to handle conversions between linux_uid_t and uid_t
>   (likewise for gid).
> 
> - Use linux_uid_t/linux_gid_t for syscalls arguments types where
>   appropriate (instead of int, uid_t/gid_t, ...).
> 
> - Update arm syscall table to use more uid16 functions where
>   applicable.
> 
> <URL:ftp://ftp.pasteur.fr/pub/computing/NetBSD/misc/netbsd-linuxuid16.diff>
> 
> Comments ?

Do you need all the casts in:
#define LINUXTOBSD_UID(u) \
        (((linux_uid_t)(u) == (linux_uid_t)-1) ? (uid_t)-1 : (uid_t)(u))
they look likely to be able to hide some errors.

Also I think that tab/spaces are use randomly for the indentation!

Otherwise I suspect you are trying harder than anyone else has to
actually test some of the linux compat code!

        David

-- 
David Laight: david%l8s.co.uk@localhost



Home | Main Index | Thread Index | Old Index