Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-06-20 Thread Laurent Vivier
Le 20/06/2021 à 17:09, Kenta Iwasaki a écrit : > No worries, though I would also like to apologize as I find that the > explanation I gave in my last > email was a little all over the place. > > To clarify my last e-mail, I believe the current msghdr struct layout in QEMU  > is libc-agnostic, but

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-06-20 Thread Kenta Iwasaki
No worries, though I would also like to apologize as I find that the explanation I gave in my last email was a little all over the place. To clarify my last e-mail, I believe the current msghdr struct layout in QEMU is libc-agnostic, but not kernel agnostic. Rather, the current msghdr struct layou

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-06-20 Thread Laurent Vivier
Le 16/05/2021 à 14:57, Kenta Iwasaki a écrit : > Sure, > > The bytes of `msghdr` need to be cleared because the `msghdr` struct layout > specified in QEMU > appears to generalize between the definitions of `msghdr` across different > libc's and kernels. To > appropriately generalize `msghdr` acr

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-05-23 Thread Kenta Iwasaki
Doing a ping for this patch. https://patchew.org/QEMU/20210516091536.1042693-1-ke...@lithdew.net/ Best regards, Kenta Iwasaki On Sun, 16 May 2021 at 21:57, Kenta Iwasaki wrote: > Sure, > > The bytes of `msghdr` need to be cleared because the `msghdr` struct > layout specified in QEMU appears to

[PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-05-16 Thread Kenta Iwasaki
The mixing of libc and kernel versions of the layout of the `msghdr` struct causes EMSGSIZE to be returned by sendmsg if the `msghdr` struct is not zero-initialized (such that padding bytes comprise of uninitialized memory). Other parts of the QEMU codebase appear to zero-initialize the `msghdr` s

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-05-16 Thread Kenta Iwasaki
Sure, The bytes of `msghdr` need to be cleared because the `msghdr` struct layout specified in QEMU appears to generalize between the definitions of `msghdr` across different libc's and kernels. To appropriately generalize `msghdr` across libc's and kernels would either: 1. require specializing c

Re: [PATCH] linux-user/syscall: zero-init msghdr in do_sendrecvmsg_locked

2021-05-16 Thread Laurent Vivier
Le 16/05/2021 à 11:15, Kenta Iwasaki a écrit : > The mixing of libc and kernel versions of the layout of the `msghdr` > struct causes EMSGSIZE to be returned by sendmsg if the `msghdr` struct > is not zero-initialized (such that padding bytes comprise of > uninitialized memory). > > Other parts of