Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-06 Thread P J P
+-- On Mon, 6 Mar 2017, Eric Blake wrote --+ | If you impose any limit smaller than _SC_ARG_MAX, you are needlessly | limiting things. Furthermore, _SC_ARG_MAX may not always be the same | value, depending on how the kernel was compiled. So it's probably | asiest to just let execve() impose its o

Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-06 Thread Eric Blake
On 03/06/2017 12:06 PM, P J P wrote: > +-- On Mon, 6 Mar 2017, Eric Blake wrote --+ > | On 03/06/2017 01:17 AM, P J P wrote: > | > Arguments passed to execve(2) call from user program could > | > be large, allocating stack memory for them via alloca(3) call > | > would lead to bad behaviour. Use 'g

Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-06 Thread P J P
+-- On Mon, 6 Mar 2017, Eric Blake wrote --+ | On 03/06/2017 01:17 AM, P J P wrote: | > Arguments passed to execve(2) call from user program could | > be large, allocating stack memory for them via alloca(3) call | > would lead to bad behaviour. Use 'g_malloc0' to allocate memory | > for such argum

Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-06 Thread Eric Blake
On 03/06/2017 09:53 AM, Eric Blake wrote: > On 03/06/2017 01:17 AM, P J P wrote: >> From: Prasad J Pandit >> >> Arguments passed to execve(2) call from user program could >> be large, allocating stack memory for them via alloca(3) call >> would lead to bad behaviour. Use 'g_malloc0' to allocate me

Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-06 Thread Peter Maydell
On 6 March 2017 at 07:17, P J P wrote: > From: Prasad J Pandit > > Arguments passed to execve(2) call from user program could > be large, allocating stack memory for them via alloca(3) call > would lead to bad behaviour. Use 'g_malloc0' to allocate memory > for such arguments. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-06 Thread Eric Blake
On 03/06/2017 01:17 AM, P J P wrote: > From: Prasad J Pandit > > Arguments passed to execve(2) call from user program could > be large, allocating stack memory for them via alloca(3) call > would lead to bad behaviour. Use 'g_malloc0' to allocate memory > for such arguments. > > Signed-off-by: P

[Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments

2017-03-05 Thread P J P
From: Prasad J Pandit Arguments passed to execve(2) call from user program could be large, allocating stack memory for them via alloca(3) call would lead to bad behaviour. Use 'g_malloc0' to allocate memory for such arguments. Signed-off-by: Prasad J Pandit --- linux-user/syscall.c | 7 +--