Re: [PATCH 3/5] linux-user: Use MAP_FIXED_NOREPLACE for do_brk()

2023-07-31 Thread Richard Henderson
On 7/31/23 06:32, Akihiko Odaki wrote: On 2023/07/31 20:44, Peter Maydell wrote: On Mon, 31 Jul 2023 at 09:04, Akihiko Odaki wrote: MAP_FIXED_NOREPLACE can ensure the mapped address is fixed without concerning that the new mapping overwrites something else. MAP_FIXED_NOREPLACE only came in

Re: [PATCH 3/5] linux-user: Use MAP_FIXED_NOREPLACE for do_brk()

2023-07-31 Thread Peter Maydell
On Mon, 31 Jul 2023 at 14:32, Akihiko Odaki wrote: > > On 2023/07/31 20:44, Peter Maydell wrote: > > On Mon, 31 Jul 2023 at 09:04, Akihiko Odaki > > wrote: > >> > >> MAP_FIXED_NOREPLACE can ensure the mapped address is fixed without > >> concerning that the new mapping overwrites something else.

Re: [PATCH 3/5] linux-user: Use MAP_FIXED_NOREPLACE for do_brk()

2023-07-31 Thread Akihiko Odaki
On 2023/07/31 20:44, Peter Maydell wrote: On Mon, 31 Jul 2023 at 09:04, Akihiko Odaki wrote: MAP_FIXED_NOREPLACE can ensure the mapped address is fixed without concerning that the new mapping overwrites something else. MAP_FIXED_NOREPLACE only came in with Linux 4.17. So I think we still nee

Re: [PATCH 3/5] linux-user: Use MAP_FIXED_NOREPLACE for do_brk()

2023-07-31 Thread Peter Maydell
On Mon, 31 Jul 2023 at 09:04, Akihiko Odaki wrote: > > MAP_FIXED_NOREPLACE can ensure the mapped address is fixed without > concerning that the new mapping overwrites something else. MAP_FIXED_NOREPLACE only came in with Linux 4.17. So I think we still need to handle the "mapped address is not th

[PATCH 3/5] linux-user: Use MAP_FIXED_NOREPLACE for do_brk()

2023-07-31 Thread Akihiko Odaki
MAP_FIXED_NOREPLACE can ensure the mapped address is fixed without concerning that the new mapping overwrites something else. Signed-off-by: Akihiko Odaki --- linux-user/syscall.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/linux-user/syscall.c b/linux-