From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Subject: Re: [PATCH] linux-user: permit sendto() with NULL buf and 0 len
Date: Fri, 31 Oct 2025 12:12:49 +0100 [thread overview]
Message-ID: <756f3e9e-8db8-4e52-8b4a-28748701bb59@linaro.org> (raw)
In-Reply-To: <20251028142001.3011630-1-peter.maydell@linaro.org>
On 10/28/25 15:20, Peter Maydell wrote:
> If you pass sendto() a NULL buffer, this is usually an error
> (causing an EFAULT return); however if you pass a 0 length then
> we should not try to validate the buffer provided. Instead we
> skip the copying of the user data and possible processing
> through fd_trans_target_to_host_data, and call the host syscall
> with NULL, 0.
>
> (unlock_user() permits a NULL buffer pointer for "do nothing"
> so we don't need to special case the unlock code.)
>
> Cc:qemu-stable@nongnu.org
> Resolves:https://gitlab.com/qemu-project/qemu/-/issues/3102
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
> linux-user/syscall.c | 25 ++++++++++++++-----------
> 1 file changed, 14 insertions(+), 11 deletions(-)
Queued, thanks.
r~
prev parent reply other threads:[~2025-10-31 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 14:20 [PATCH] linux-user: permit sendto() with NULL buf and 0 len Peter Maydell
2025-10-28 15:42 ` Philippe Mathieu-Daudé
2025-10-28 15:44 ` Michael Tokarev
2025-10-31 11:12 ` Richard Henderson [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=756f3e9e-8db8-4e52-8b4a-28748701bb59@linaro.org \
--to=richard.henderson@linaro.org \
--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).