PC-BSD/trueos ff1fac3sys/kern init_main.c

Remove a needlessly clever hack to start init with sys_exec().

Construct a struct image_args with the help of new exec_args_*() helper
functions and call kern_execve().

The previous code mapped a page in userspace, copied arguments out
to it one at a time, and then constructed a struct execve_args all so
that sys_execve() can call exec_copyin_args() to copy the data back in
to a struct image_args.

Opencode the part of pre_execve()/post_execve() that releases a
reference to the initial vmspace. We don't need to stop threads like
they do.

Reviewed by:    kib, jhb (prior version)
Obtained from:  CheriBSD
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D15469
DeltaFile
+45-52sys/kern/init_main.c
+45-521 files

UnifiedSplitRaw