Re: [PATCH] linux-user: ppoll: eliminate large alloca

2023-04-09 Thread Michael Tokarev
(Replying to an old(ish) email... original thread: https://patchwork.ozlabs.org/project/qemu-devel/patch/20221216192220.2881898-1-...@msgid.tls.msk.ru/ ) 16.12.2022 23:44, Richard Henderson wrote: On 12/16/22 11:22, Michael Tokarev wrote: do_ppoll() in linux-user/syscall.c uses alloca() to all

Re: [PATCH] linux-user: ppoll: eliminate large alloca

2022-12-16 Thread Richard Henderson
On 12/16/22 11:22, Michael Tokarev wrote: do_ppoll() in linux-user/syscall.c uses alloca() to allocate an array of struct pullfds on the stack. The only upper boundary for number of entries for this array is so that whole thing fits in INT_MAX. But this is definitely too much for a stack allocati

[PATCH] linux-user: ppoll: eliminate large alloca

2022-12-16 Thread Michael Tokarev
do_ppoll() in linux-user/syscall.c uses alloca() to allocate an array of struct pullfds on the stack. The only upper boundary for number of entries for this array is so that whole thing fits in INT_MAX. But this is definitely too much for a stack allocation. Use heap allocation when large number o