On Mon, Mar 2, 2026 at 10:50 AM Pierrick Bouvier < [email protected]> wrote:
> On 3/2/26 7:15 AM, Warner Losh wrote: > > > > > > On Mon, Mar 2, 2026 at 7:03 AM Florian Hofhammer > > <[email protected] <mailto:[email protected]>> wrote: > > > > The syscall emulation code previously wasn't interruptible via > > cpu_loop_exit(), as this construct relies on a longjmp target that > > is not > > live anymore in the syscall handling code. Consequently, longjmp() > would > > operate on a (potentially overwritten) stale jump buffer. This patch > > adds an additional > > setjmp and the necessary handling around it to make longjmp() (and by > > proxy cpu_loop_exit() safe to call even within a syscall context. > > > > Signed-off-by: Florian Hofhammer <[email protected] > > <mailto:[email protected]>> > > --- > > > > > > So bsd-user would need something similar, I'd think. But it still uses > > the older-style > > TARGET_EJUSTRETURN. With half of the archs still out of tree, I'm not > > entirely > > sure the best way to approach this. > > > > The code does what you say, which is good, but there may be some subtle > > reason to do something else. > > > > Reviewed-by: Warner Losh <[email protected] <mailto:[email protected]>> > > > > At the moment, syscall filtering is not available for bsd-user, it's > (sadly) only implemented for linux-user. Which implies that current > changes are not needed for bsd-user neither, since they can't be tested > anyway. > OK. I'll add it to the backlog list then... Warner
