Currently we disable kbind(2) for static program from libc.a's
authorguenther <guenther@openbsd.org>
Mon, 16 Jan 2023 07:09:11 +0000 (07:09 +0000)
committerguenther <guenther@openbsd.org>
Mon, 16 Jan 2023 07:09:11 +0000 (07:09 +0000)
commitb18b10d81ae65dbcfbcf0bcc2ccedc8e21a5910e
tree98cd46afedb526d5ac9ec18900ba8fa9d00e9dfe
parente2c8dd8b7217dea57fdce51706f143ecf030e4b5
Currently we disable kbind(2) for static program from libc.a's
preinit hook.  Delete that and instead have the kernel disable kbind
at exec-time if the program doesn't have an ELF interpreter.  For
now, permit userland calls to disable it when already disabled so
existing static programs continue to work.

prompted by deraadt@ questioning about the call in libc.a

ok deraadt@ miod@
lib/libc/dlfcn/init.c
sys/kern/exec_elf.c
sys/sys/proc.h
sys/uvm/uvm_mmap.c