Re: [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version

Petr Vorel
2023-03-14T10:38:45Z

Hi Ping,

> > > __kernel_old_uid_t is not defined as 16bit on s390, ppc64le

> > I suppose limitation on s390 is because __kernel_old_uid_t is guarded only
> > for
> > kernel, right?

> Yes, userspace header will use definition in
> /usr/include/asm-generic/posix_types.h
> unsigned int break the size check.

Thanks for additional info.

> > arch/s390/include/uapi/asm/posix_types.h
> > #ifdef __KERNEL__
> > typedef unsigned short __kernel_old_uid_t;
> > typedef unsigned short __kernel_old_gid_t;
> > #define __kernel_old_uid_t __kernel_old_uid_t
> > #endif

> > > Then -1 will be translated into UINT_MAX fails the size check.
> > > s390, ppc64le use definition in /usr/include/asm-generic/posix_types.h
> > BTW do you test LTP syscalls on s930 and ppc (32bit)?

> I don't have these machines at hand.
Ah, I see it's broken on 64bit (not many people have 32bit for s390 or ppc).

Merged, thank you!

Kind regards,
Petr