bug-hurd
[Top][All Lists]
Advanced

[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 13:05:13 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Damien Zammit, le dim. 24 mars 2024 11:40:27 +0000, a ecrit:
> \-------- Original Message --------
> On 24 Mar 2024, 9:32 pm, Samuel Thibault
> >... 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.
> 
> Actually, the ddekit semaphore protects the irq variable from disappearing 
> because the function is guaranteed to not return until after the semaphore 
> has signalled it has run the thread\_init and used the irq local.

Ok, but there's not even a comment about it. If somebody else comes
and changes the code a bit, they'll very easily get to the unsafe side
again. And really, accessing local variables from nested functions
is something we want to kill because it ends up making the stack
executable.

Samuel



reply via email to

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