qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev


From: Peter Maydell
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output
Date: Fri, 10 May 2019 15:21:14 +0100

On Fri, 10 May 2019 at 15:05, Alex Bennée <address@hidden> wrote:
> Only for the first one though.. that said I'm sure the write string is
> leaking when we do gdb output with whatever lock_user_string is trying
> to achieve.

Yes, there looks like there's a leak there. (The fix is
complicated because we need to check whether the string
buffer is required to hang around until the asynchronous
gdb operation is finished and the arm_semi_cb is invoked,
or whether we can free it as soon as arm_gdb_syscall() returns.)

lock_user_string is basically "give me a host pointer to the
string at this address in guest memory":
 * on softmmu, the 'lock' operation copies the contents of
   guest memory into a local buffer, and 'unlock' then frees
   the buffer (possibly copying the updated local buffer
   contents back to the guest)
 * on linux-user, 'lock' does the guest-addr-to-host-addr
   conversion, and if DEBUG_REMAP is defined then it will
   also copy it into a separate buffer (and unlock will
   copy it back)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]