Re: [PATCH v5 19/31] linux-user: Handle tags in lock_user/unlock_user

2021-02-08 Thread Richard Henderson
On 2/8/21 5:57 AM, Peter Maydell wrote: >> void unlock_user(void *host_ptr, abi_ulong guest_addr, size_t len); >> -if (len > 0) { >> -memcpy(g2h_untagged(guest_addr), host_ptr, len); >> +if (len != 0) { >> +memcpy(host_ptr_conv, host_ptr, len); >> } > > Why the

Re: [PATCH v5 19/31] linux-user: Handle tags in lock_user/unlock_user

2021-02-08 Thread Peter Maydell
On Wed, 3 Feb 2021 at 19:00, Richard Henderson wrote: > > Resolve the untagged address once, using thread_cpu. > Tidy the DEBUG_REMAP code using glib routines. > > Signed-off-by: Richard Henderson > --- > linux-user/uaccess.c | 29 +++-- > 1 file changed, 15

[PATCH v5 19/31] linux-user: Handle tags in lock_user/unlock_user

2021-02-03 Thread Richard Henderson
Resolve the untagged address once, using thread_cpu. Tidy the DEBUG_REMAP code using glib routines. Signed-off-by: Richard Henderson --- linux-user/uaccess.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/linux-user/uaccess.c