* [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version
@ 2023-03-09 8:54 Ping Fang
2023-03-13 9:00 ` Li Wang
2023-03-13 22:24 ` Petr Vorel
0 siblings, 2 replies; 5+ messages in thread
From: Ping Fang @ 2023-03-09 8:54 UTC (permalink / raw)
To: ltp
__kernel_old_uid_t is not defined as 16bit on s390, ppc64le
Then -1 will be translated into UINT_MAX fails the size check.
s390, ppc64le use definition in /usr/include/asm-generic/posix_types.h
typedef unsigned int __kernel_uid_t;
...
typedef __kernel_uid_t __kernel_old_uid_t;
x86_64, aarch64 use definition in /usr/include/asm/posix_types_64.h
typedef unsigned short __kernel_old_uid_t;
Signed-off-by: Ping Fang <pifang@redhat.com>
---
testcases/kernel/syscalls/utils/compat_uid.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/utils/compat_uid.h b/testcases/kernel/syscalls/utils/compat_uid.h
index 94e54f310..7a345a654 100644
--- a/testcases/kernel/syscalls/utils/compat_uid.h
+++ b/testcases/kernel/syscalls/utils/compat_uid.h
@@ -26,7 +26,7 @@
#include "tst_common.h"
#ifdef TST_USE_COMPAT16_SYSCALL
-typedef __kernel_old_uid_t UID_T;
+typedef unsigned short UID_T;
int UID_SIZE_CHECK(uid_t uid)
{
/* See high2lowuid in linux/highuid.h
--
2.31.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version
2023-03-09 8:54 [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version Ping Fang
@ 2023-03-13 9:00 ` Li Wang
2023-03-13 22:24 ` Petr Vorel
1 sibling, 0 replies; 5+ messages in thread
From: Li Wang @ 2023-03-13 9:00 UTC (permalink / raw)
To: Ping Fang; +Cc: ltp
Reviewed-by: Li Wang <liwang@redhat.com>
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version
2023-03-09 8:54 [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version Ping Fang
2023-03-13 9:00 ` Li Wang
@ 2023-03-13 22:24 ` Petr Vorel
2023-03-14 1:43 ` Ping Fang
1 sibling, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2023-03-13 22:24 UTC (permalink / raw)
To: Ping Fang; +Cc: ltp
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?
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)?
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version
2023-03-13 22:24 ` Petr Vorel
@ 2023-03-14 1:43 ` Ping Fang
2023-03-14 10:38 ` Petr Vorel
0 siblings, 1 reply; 5+ messages in thread
From: Ping Fang @ 2023-03-14 1:43 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi Petr,
On Tue, Mar 14, 2023 at 6:32 AM Petr Vorel <pvorel@suse.cz> wrote:
> 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.
>
> 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.
>
> Kind regards,
> Petr
>
>
--
*--*
Thanks & Regards,
*Ping Fang*
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version
2023-03-14 1:43 ` Ping Fang
@ 2023-03-14 10:38 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2023-03-14 10:38 UTC (permalink / raw)
To: Ping Fang; +Cc: ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-14 10:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 8:54 [LTP] [PATCH v1] setfsuid02_16: Fix uid -1 too large for testing 16-bit version Ping Fang
2023-03-13 9:00 ` Li Wang
2023-03-13 22:24 ` Petr Vorel
2023-03-14 1:43 ` Ping Fang
2023-03-14 10:38 ` Petr Vorel
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).