* [PATCH v9 07/24] linux-user: Do not call get_errno() in do_brk()
2023-08-04 22:00 [PATCH v9 for-8.1 00/24] linux-user + tcg patch queue Richard Henderson
@ 2023-08-04 22:00 ` Richard Henderson
0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-08-04 22:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Akihiko Odaki, Helge Deller
From: Akihiko Odaki <akihiko.odaki@daynix.com>
Later the returned value is compared with -1, and negated errno is not
expected.
Fixes: 00faf08c95 ("linux-user: Don't use MAP_FIXED in do_brk()")
Reviewed-by: Helge Deller <deller@gmx.de>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-4-akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/syscall.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 95727a816a..b9d2ec02f9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -862,9 +862,9 @@ abi_long do_brk(abi_ulong brk_val)
*/
if (new_host_brk_page > brk_page) {
new_alloc_size = new_host_brk_page - brk_page;
- mapped_addr = get_errno(target_mmap(brk_page, new_alloc_size,
- PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, 0, 0));
+ mapped_addr = target_mmap(brk_page, new_alloc_size,
+ PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, 0, 0);
} else {
new_alloc_size = 0;
mapped_addr = brk_page;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v9 07/24] linux-user: Do not call get_errno() in do_brk()
@ 2023-08-04 23:40 Nathan Egge
2023-08-05 4:26 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Egge @ 2023-08-04 23:40 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, akihiko.odaki, deller
On 2023-08-04 18:00, Richard Henderson wrote:
> From: Akihiko Odaki <akihiko.odaki@daynix.com>
>
> Later the returned value is compared with -1, and negated errno is not
> expected.
>
> Fixes: 00faf08c95 ("linux-user: Don't use MAP_FIXED in do_brk()")
> Reviewed-by: Helge Deller <deller@gmx.de>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> Message-Id: <20230802071754.14876-4-akihiko.odaki@daynix.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/syscall.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 95727a816a..b9d2ec02f9 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -862,9 +862,9 @@ abi_long do_brk(abi_ulong brk_val)
> */
> if (new_host_brk_page > brk_page) {
> new_alloc_size = new_host_brk_page - brk_page;
> - mapped_addr = get_errno(target_mmap(brk_page, new_alloc_size,
> - PROT_READ|PROT_WRITE,
> - MAP_ANON|MAP_PRIVATE, 0, 0));
> + mapped_addr = target_mmap(brk_page, new_alloc_size,
> + PROT_READ|PROT_WRITE,
> + MAP_ANON|MAP_PRIVATE, 0, 0);
> } else {
> new_alloc_size = 0;
> mapped_addr = brk_page;
> --
> 2.34.1
This patch is triggering a gitlab pipeline failure in Richard's tcg-next
branch:
https://gitlab.com/rth7680/qemu/-/pipelines/956532662
It can be reproduced locally by adding a git remote for rth7680 and then
running:
$ git checkout rth7680/tcg-next
$ .gitlab-ci.d/check-patch.py
Checking all commits since c26d005e62f4fd177dae0cd70c24cb96761edebc...
f7cca41b17c809958a7f04b7d7f64af40d64e645:31: ERROR: spaces required
around that '|' (ctx:VxV)
f7cca41b17c809958a7f04b7d7f64af40d64e645:32: ERROR: spaces required
around that '|' (ctx:VxV)
total: 2 errors, 0 warnings, 12 lines checked
❌ FAIL one or more commits failed scripts/checkpatch.pl
The linux-user/syscall.c has many such places where this style check is
failing. Should these be fixed in a separate patch?
Sincerely,
Nathan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v9 07/24] linux-user: Do not call get_errno() in do_brk()
2023-08-04 23:40 [PATCH v9 07/24] linux-user: Do not call get_errno() in do_brk() Nathan Egge
@ 2023-08-05 4:26 ` Richard Henderson
0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-08-05 4:26 UTC (permalink / raw)
To: Nathan Egge, qemu-devel; +Cc: akihiko.odaki, deller
On 8/4/23 16:40, Nathan Egge wrote:
> The linux-user/syscall.c has many such places where this style check is failing. Should
> these be fixed in a separate patch?
Yes, eventually.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-05 4:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04 23:40 [PATCH v9 07/24] linux-user: Do not call get_errno() in do_brk() Nathan Egge
2023-08-05 4:26 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2023-08-04 22:00 [PATCH v9 for-8.1 00/24] linux-user + tcg patch queue Richard Henderson
2023-08-04 22:00 ` [PATCH v9 07/24] linux-user: Do not call get_errno() in do_brk() Richard Henderson
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).