[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v11 0/2 hurd] Add irqhelp library and clean up ddekit

From: Samuel Thibault
Subject: Re: [PATCH v11 0/2 hurd] Add irqhelp library and clean up ddekit
Date: Sun, 24 Mar 2024 11:32:33 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Damien Zammit, le dim. 24 mars 2024 10:08:30 +0000, a ecrit:
> The previous problem was that calling a function with a global param
> from inside the wrapped_server_loop was crashing netdde
> due to a bogus stack offset. This is fixed.

Ah, it's not a global param, but a local param. Passing a nested
function that access local parameters to a thread is indeed a way to
mayhem since as soon as the caller function exits after creating the
thread, the local parameters don't exist any more. Also note that such
local access from nested function is exactly what makes the stack
executable because gcc has to put some trampoline there.

Your version 11 is however still accessing the `irq` local parameter,
so it's still only by luck that it's working.  You need to restore
allocating the params structure to store irq and priv, which was
precisely meant to avoid this kind issue.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]