* [PATCH 0/1] linux-user patch queue
@ 2024-08-15 1:05 Richard Henderson
2024-08-15 1:05 ` [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Richard Henderson @ 2024-08-15 1:05 UTC (permalink / raw)
To: qemu-devel
The following changes since commit c4d062885529a84928ddd260dab419b7d8dd4f90:
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-08-15 07:41:16 +1000)
are available in the Git repository at:
https://gitlab.com/rth7680/qemu.git tags/pull-lu-20240815
for you to fetch changes up to 3aefee3ec01e607529a9918e2978f365c5c3b5e9:
linux-user: Preserve NULL hit in target_mmap subroutines (2024-08-15 11:03:47 +1000)
----------------------------------------------------------------
linux-user: Preserve NULL hit in target_mmap subroutines
----------------------------------------------------------------
Richard Henderson (1):
linux-user: Preserve NULL hit in target_mmap subroutines
linux-user/mmap.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines
2024-08-15 1:05 [PATCH 0/1] linux-user patch queue Richard Henderson
@ 2024-08-15 1:05 ` Richard Henderson
2024-08-15 9:14 ` Philippe Mathieu-Daudé
2024-08-15 9:20 ` Peter Maydell
2024-08-15 1:08 ` [PULL 0/1] linux-user patch queue Richard Henderson
2024-08-15 10:43 ` [PUSH " Richard Henderson
2 siblings, 2 replies; 6+ messages in thread
From: Richard Henderson @ 2024-08-15 1:05 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable
Do not pass guest_base to the host mmap instead of zero hint.
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2353
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/mmap.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 4d09a72fad..6418e811f6 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -560,9 +560,13 @@ static abi_long mmap_h_eq_g(abi_ulong start, abi_ulong len,
int host_prot, int flags, int page_flags,
int fd, off_t offset)
{
- void *p, *want_p = g2h_untagged(start);
+ void *p, *want_p = NULL;
abi_ulong last;
+ if (start || (flags & (MAP_FIXED | MAP_FIXED_NOREPLACE))) {
+ want_p = g2h_untagged(start);
+ }
+
p = mmap(want_p, len, host_prot, flags, fd, offset);
if (p == MAP_FAILED) {
return -1;
@@ -610,11 +614,15 @@ static abi_long mmap_h_lt_g(abi_ulong start, abi_ulong len, int host_prot,
int mmap_flags, int page_flags, int fd,
off_t offset, int host_page_size)
{
- void *p, *want_p = g2h_untagged(start);
+ void *p, *want_p = NULL;
off_t fileend_adj = 0;
int flags = mmap_flags;
abi_ulong last, pass_last;
+ if (start || (flags & (MAP_FIXED | MAP_FIXED_NOREPLACE))) {
+ want_p = g2h_untagged(start);
+ }
+
if (!(flags & MAP_ANONYMOUS)) {
struct stat sb;
@@ -740,12 +748,16 @@ static abi_long mmap_h_gt_g(abi_ulong start, abi_ulong len,
int flags, int page_flags, int fd,
off_t offset, int host_page_size)
{
- void *p, *want_p = g2h_untagged(start);
+ void *p, *want_p = NULL;
off_t host_offset = offset & -host_page_size;
abi_ulong last, real_start, real_last;
bool misaligned_offset = false;
size_t host_len;
+ if (start || (flags & (MAP_FIXED | MAP_FIXED_NOREPLACE))) {
+ want_p = g2h_untagged(start);
+ }
+
if (!(flags & (MAP_FIXED | MAP_FIXED_NOREPLACE))) {
/*
* Adjust the offset to something representable on the host.
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PULL 0/1] linux-user patch queue
2024-08-15 1:05 [PATCH 0/1] linux-user patch queue Richard Henderson
2024-08-15 1:05 ` [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines Richard Henderson
@ 2024-08-15 1:08 ` Richard Henderson
2024-08-15 10:43 ` [PUSH " Richard Henderson
2 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2024-08-15 1:08 UTC (permalink / raw)
To: qemu-devel
Bah, s/PATCH/PULL/
r~
On 8/15/24 11:05, Richard Henderson wrote:
> The following changes since commit c4d062885529a84928ddd260dab419b7d8dd4f90:
>
> Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-08-15 07:41:16 +1000)
>
> are available in the Git repository at:
>
> https://gitlab.com/rth7680/qemu.git tags/pull-lu-20240815
>
> for you to fetch changes up to 3aefee3ec01e607529a9918e2978f365c5c3b5e9:
>
> linux-user: Preserve NULL hit in target_mmap subroutines (2024-08-15 11:03:47 +1000)
>
> ----------------------------------------------------------------
> linux-user: Preserve NULL hit in target_mmap subroutines
>
> ----------------------------------------------------------------
> Richard Henderson (1):
> linux-user: Preserve NULL hit in target_mmap subroutines
>
> linux-user/mmap.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines
2024-08-15 1:05 ` [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines Richard Henderson
@ 2024-08-15 9:14 ` Philippe Mathieu-Daudé
2024-08-15 9:20 ` Peter Maydell
1 sibling, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-08-15 9:14 UTC (permalink / raw)
To: Richard Henderson, qemu-devel; +Cc: qemu-stable
On 15/8/24 03:05, Richard Henderson wrote:
> Do not pass guest_base to the host mmap instead of zero hint.
>
> Cc: qemu-stable@nongnu.org
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2353
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
FTR per
https://lore.kernel.org/qemu-devel/6d425bd0-efd0-42ee-af3e-d7b5c3379d55@linaro.org/:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> linux-user/mmap.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines
2024-08-15 1:05 ` [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines Richard Henderson
2024-08-15 9:14 ` Philippe Mathieu-Daudé
@ 2024-08-15 9:20 ` Peter Maydell
1 sibling, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2024-08-15 9:20 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, qemu-stable
On Thu, 15 Aug 2024 at 02:07, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Do not pass guest_base to the host mmap instead of zero hint.
>
> Cc: qemu-stable@nongnu.org
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2353
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Typo in subject line: s/hit/hint/.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PUSH 0/1] linux-user patch queue
2024-08-15 1:05 [PATCH 0/1] linux-user patch queue Richard Henderson
2024-08-15 1:05 ` [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines Richard Henderson
2024-08-15 1:08 ` [PULL 0/1] linux-user patch queue Richard Henderson
@ 2024-08-15 10:43 ` Richard Henderson
2 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2024-08-15 10:43 UTC (permalink / raw)
To: qemu-devel
On 8/15/24 11:05, Richard Henderson wrote:
> The following changes since commit c4d062885529a84928ddd260dab419b7d8dd4f90:
>
> Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-08-15 07:41:16 +1000)
>
> are available in the Git repository at:
>
> https://gitlab.com/rth7680/qemu.git tags/pull-lu-20240815
>
> for you to fetch changes up to 3aefee3ec01e607529a9918e2978f365c5c3b5e9:
>
> linux-user: Preserve NULL hit in target_mmap subroutines (2024-08-15 11:03:47 +1000)
>
> ----------------------------------------------------------------
> linux-user: Preserve NULL hit in target_mmap subroutines
>
> ----------------------------------------------------------------
> Richard Henderson (1):
> linux-user: Preserve NULL hit in target_mmap subroutines
>
> linux-user/mmap.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
Comedy of errors, missing r-b, typo in subject.
But still pushed to master before I double-checked the list.
Ho hum.
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-15 10:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 1:05 [PATCH 0/1] linux-user patch queue Richard Henderson
2024-08-15 1:05 ` [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines Richard Henderson
2024-08-15 9:14 ` Philippe Mathieu-Daudé
2024-08-15 9:20 ` Peter Maydell
2024-08-15 1:08 ` [PULL 0/1] linux-user patch queue Richard Henderson
2024-08-15 10:43 ` [PUSH " 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).