thehajime / linux

Linux kernel source tree
https://lkl.github.io/
Other
3 stars 1 forks source link

vfork copy stack comment is wrong #6

Closed thehajime closed 1 week ago

thehajime commented 1 week ago

hush doesn't makes the stack dirty... (but crash if no copy) => comment fixed, but revisit again if this is really needed => really, crashed after 2nd process is exited (pid=1 exited)

thehajime commented 1 week ago

Fixed by https://github.com/thehajime/linux/pull/1/commits/a14e430320a9f1ef48f766a8f0a8fe89845aacca.

Especially this part explains what/how it is.

https://github.com/thehajime/linux/blob/a14e430320a9f1ef48f766a8f0a8fe89845aacca/arch/um/kernel/process.c#L144-L169 https://github.com/thehajime/linux/blob/a14e430320a9f1ef48f766a8f0a8fe89845aacca/arch/x86/um/do_syscall_64.c#L39-L44