From: Cyril Hrubis <chrubis@suse.cz>
To: Edward Liaw <edliaw@google.com>
Cc: kernel-team@android.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] syscall01: use 32bit syscalls if available
Date: Thu, 23 Feb 2023 10:09:32 +0100 [thread overview]
Message-ID: <Y/ctTPK22LgAcHzK@rei.mediaserver.passengera.com> (raw)
In-Reply-To: <20230223012839.1857976-1-edliaw@google.com>
Hi!
> For 32-bit applications, the getuid/getgid syscalls return 16-bit ids,
> and the getuid32 and getgid32 syscalls return 32-bit ids. When
> CONFIG_UID16 is disabled in the kernel, getuid/getgid (16-bit UIDs) are
> no longer available. Thus this test will fail when compiled as 32-bit
> and with CONFIG_UID16 disabled. For 64-bit applications, this is not an
> issue because getuid/getgid return 32-bit ids and getuid32/getgid32 are
> not defined.
>
> The fix for this is to use getuid32/getgid32 if they are available to
> match the behavior of glibc.
Sounds reasonable, since we are attempting to test syscall() and not the
getuid implementation. Also this probably fixes the case where the test
would be executed with UID that does not fit into 16 bits as well.
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2023-02-23 9:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 1:28 [LTP] [PATCH v3] syscall01: use 32bit syscalls if available Edward Liaw via ltp
2023-02-23 9:09 ` Cyril Hrubis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y/ctTPK22LgAcHzK@rei.mediaserver.passengera.com \
--to=chrubis@suse.cz \
--cc=edliaw@google.com \
--cc=kernel-team@android.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox