[PATCH] um: mprotect() __init memory
Johannes Berg
johannes at sipsolutions.net
Mon Sep 28 00:33:59 PDT 2026
On Sat, 2026-09-26 at 11:16 +0200, Johannes Berg wrote:
> On Sat, 2026-09-26 at 11:12 +0900, Hajime Tazaki wrote:
> > Hello,
> >
> > I recently pulled uml/next branch and faced an issue on the exit.
> >
> > ```
> > Thread 1 "vmlinux" received signal SIGSEGV, Segmentation fault.
> > 0x0000000060003cf3 in start_uml () at ../arch/um/kernel/skas/process.c:41
> > 41 }
> > (gdb) bt
> > #0 0x0000000060003cf3 in start_uml () at ../arch/um/kernel/skas/process.c:41
> > #1 0x0000000060003a69 in linux_main (argc=argc at entry=9, argv=argv at entry=0x7fffffffe118,
> > envp=envp at entry=0x7fffffffe168) at ../arch/um/kernel/um_arch.c:404
> > #2 0x00000000600049dc in main (argc=9, argv=0x7fffffffe118, envp=0x7fffffffe168)
> > at ../arch/um/os-Linux/main.c:153
> > ```
> >
> > and bisected that this commit is the first rev to introduce this.
>
> I didn't get that, hmm.
Actually I did, just no backtrace (console was already shut down), only
"Aborted" and I missed that.
Looking at it with a fresh head, I think removing __init everywhere is a
bad idea. But we're already longjmp()ing around, so we don't really
_need_ to ever return from start_idle_thread(). We can have that call an
"os_exit()" function instead of returning through all the functions, and
that fixes the bug while keeping the __init behaviour.
Btw, it's not just that commit, but also the other one moving init text
into the right place.
I'll send a patch in a minute.
johannes
More information about the linux-um
mailing list