[PATCH 4/4] ntdll: Guard against syscall stack overrun.

Paul Gofman pgofman at codeweavers.com
Mon Apr 18 06:55:18 CDT 2022


On 4/16/22 22:06, Jin-oh Kang wrote:
> On Sun, Apr 17, 2022, 3:59 AM Jin-oh Kang <jinoh.kang.kr at gmail.com> wrote:
>
>     On Tue, Apr 12, 2022, 5:59 PM Paul Gofman
>     <pgofman at codeweavers.com> wrote:
>
>         I don’t think this complication worth it. What we would like
>         to save is address space on 32 bit, but we can’t (before
>         running 32 on 64 of course where this stack will be on 64
>         only). We apparently need to reserve address space for stack
>         at once, so it has the space to grow, and then growing would
>         only mean saving committed pages.
>
>
>     Maybe allocate extra stack only for function calls that might need
>     it? Something like this:
>     https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/nf-ntddk-keexpandkernelstackandcallout
>
>
> There's also 
> https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/i386/morestack.S, 
> which is used by gcc -fsplit-stack, but we might need something more 
> portable.
>
Will that work with existing host libraries which actually use the stack 
and are supposed to be be compatible with this split stack mechanics if 
we do something like that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220418/aff93cc2/attachment.htm>


More information about the wine-devel mailing list