From: Richard Henderson <richard.henderson@linaro.org>
To: Shaobo Song <shnusongshaobo@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] tcg: Fix returned type in alloc_code_gen_buffer_splitwx_memfd()
Date: Sun, 26 Jun 2022 16:19:14 +0530 [thread overview]
Message-ID: <ea652243-c114-628d-647e-a0df3f14d688@linaro.org> (raw)
In-Reply-To: <20220624150216.3627-1-shnusongshaobo@gmail.com>
On 6/24/22 20:32, Shaobo Song wrote:
> This fixes a bug in POSIX-compliant environments. Since we had allocated
> a buffer named 'tcg-jit' with read-write access protections we need a int
> type to combine these access flags and return it, whereas we had inexplicably
> return a bool type. It may cause an unnecessary protection change in
> tcg_region_init().
>
> Signed-off-by: Shaobo Song <shnusongshaobo@gmail.com>
> ---
> tcg/region.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tcg/region.c b/tcg/region.c
> index 71ea81d671..88d6bb273f 100644
> --- a/tcg/region.c
> +++ b/tcg/region.c
> @@ -548,7 +548,7 @@ static int alloc_code_gen_buffer_anon(size_t size, int prot,
> #ifdef CONFIG_POSIX
> #include "qemu/memfd.h"
>
> -static bool alloc_code_gen_buffer_splitwx_memfd(size_t size, Error **errp)
> +static int alloc_code_gen_buffer_splitwx_memfd(size_t size, Error **errp)
> {
> void *buf_rw = NULL, *buf_rx = MAP_FAILED;
> int fd = -1;
Thanks, queued to tcg-next.
r~
prev parent reply other threads:[~2022-06-26 10:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 15:02 [PATCH] tcg: Fix returned type in alloc_code_gen_buffer_splitwx_memfd() Shaobo Song
2022-06-25 16:32 ` Alex Bennée
2022-06-26 10:49 ` 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=ea652243-c114-628d-647e-a0df3f14d688@linaro.org \
--to=richard.henderson@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shnusongshaobo@gmail.com \
/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).