From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>, Zach van Rijn <me@zv.io>
Subject: Re: [PATCH] linux-user/syscall: Endian-swap [res]uid/gid
Date: Wed, 28 Dec 2022 21:21:01 +0100 [thread overview]
Message-ID: <2a07105f-249d-5842-ae5c-a52be6b0dae6@linaro.org> (raw)
In-Reply-To: <20221228153553.83773-1-philmd@linaro.org>
On 28/12/22 16:35, Philippe Mathieu-Daudé wrote:
> Various syscalls miss swapping the endiannes of the [res]uid/gid
> values. Use the tswapid() helper meant to do exactly that.
>
> Fixes: b03c60f351 ("more syscalls")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1394
This is not the correct fix, simply an API cleanup.
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> linux-user/syscall.c | 55 ++++++++++++++++++++++++--------------------
> 1 file changed, 30 insertions(+), 25 deletions(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 1f8c10f8ef..2aa19e33ca 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> #ifdef TARGET_NR_getuid
> case TARGET_NR_getuid:
> - return get_errno(high2lowuid(getuid()));
> + return get_errno(tswapid(high2lowuid(getuid())));
> #endif
prev parent reply other threads:[~2022-12-28 20:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 15:35 [PATCH] linux-user/syscall: Endian-swap [res]uid/gid Philippe Mathieu-Daudé
2022-12-28 20:21 ` Philippe Mathieu-Daudé [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=2a07105f-249d-5842-ae5c-a52be6b0dae6@linaro.org \
--to=philmd@linaro.org \
--cc=laurent@vivier.eu \
--cc=me@zv.io \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).