[RFC PATCH 00/13] nommu UML

Hajime Tazaki thehajime at gmail.com
Fri Nov 8 16:52:14 PST 2024


On Wed, 30 Oct 2024 18:25:18 +0900,
Hajime Tazaki wrote:
> 
> > > > > - a crash on userspace programs crashes a UML kernel, not signaling
> > > > >   with SIGSEGV to the program.

after investigation with trying to save/restore FP registers, I found
the register is not the reason that userspace programs cannot
handle/recover with SIGSEGV.

the cause is; I tried to call (!MMU version of) userspace() in segv()
function if is_user == 1 (I configured the variable based on the
address of $rip), but without returning hard_handler(), which is
caller of segv(), SIGIO has been blocked even after switching the
userspace process.  Thus no console input is processed.

With that issue, I didn't include the patch to mark is_user = 1,
resulting kernel exit with panic().

I unblock signals (IO/WINCH/ALRM) after segv() && is_user==1, then the
userspace can recover/handle the SEGV signal.

I will try to implement this in a cleaner way.
Thanks for your comment,
-- Hajime



More information about the linux-um mailing list