This allows the use of chroot and/or jail environments which depend on
interpreters registed with imgact_binmisc.
Details
Ad-hoc testing of arm64 chroot environments with qemu-user-static
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I added a new field to struct image_args. Since this was added to the end of the structure, it should make it possible to MFC to stable/13 since the structure is owned and zeroed by do_execve and any imgact modules should not be affected.
I'm not 100% sure about the vnode protocols are right, but they seem fine.
Not sure if I reinstall qemu and its implications, but that aught to be documented if it doesn't just work.
sys/kern/imgact_binmisc.c | ||
---|---|---|
69 | Having this in the middle is OK, right? | |
179 | What happens if I reinstall qemu? | |
sys/sys/imgact.h | ||
97 | This is good. |
Thanks for the review. I will follow up with a PR for qemu-bsd-user to remove the logic which adds the emulator binary to emulated execve calls and make a separate review for the qemu-user-static-devel port to enable pre-open and also remind users to 'service qemu_user_static restart' or something similar after an upgrade.
sys/kern/imgact_binmisc.c | ||
---|---|---|
69 | Yes - nothing outside this file can depend on the layout of imgact_binmisc_entry | |
179 | The kernel will continue to use the old qemu until binmiscctl refreshes the mapping. |