Re: [Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc and free

2016-07-12 Thread Eric Blake
On 07/12/2016 08:41 AM, Peter Lieven wrote: >> I wonder if the _SC_THREAD_STACK_MIN constant exists if there is no minimum? > > Update: > > glibc basically does the following: > > static gulong g_thread_min_stack_size = 0; > > #ifdef _SC_THREAD_STACK_MIN > g_thread_min_stack_size = MAX (sysconf

Re: [Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc and free

2016-07-12 Thread Peter Lieven
Am 12.07.2016 um 16:36 schrieb Peter Lieven: > Am 11.07.2016 um 18:39 schrieb Eric Blake: >> On 07/11/2016 03:07 AM, Peter Lieven wrote: >>> the allocated stack will be adjusted to the minimum supported stack size >>> by the OS and rounded up to be a multiple of the system pagesize. >>> Additionall

Re: [Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc and free

2016-07-12 Thread Peter Lieven
Am 11.07.2016 um 18:39 schrieb Eric Blake: > On 07/11/2016 03:07 AM, Peter Lieven wrote: >> the allocated stack will be adjusted to the minimum supported stack size >> by the OS and rounded up to be a multiple of the system pagesize. >> Additionally an architecture dependent guard page is added to

Re: [Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc and free

2016-07-11 Thread Eric Blake
On 07/11/2016 03:07 AM, Peter Lieven wrote: > the allocated stack will be adjusted to the minimum supported stack size > by the OS and rounded up to be a multiple of the system pagesize. > Additionally an architecture dependent guard page is added to the stack > to catch stack overflows. > > Signe

Re: [Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc and free

2016-07-11 Thread Richard Henderson
On 07/11/2016 02:07 AM, Peter Lieven wrote: the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by:

[Qemu-devel] [PATCH V4 1/6] oslib-posix: add helpers for stack alloc and free

2016-07-11 Thread Peter Lieven
the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by: Peter Lieven --- include/sysemu/os-posix.h |