Quoting Michael Tokarev (2022-05-16 07:46:01)
> Yes this is possible, but only at the binfmt_misc level.
> 
>    echo 0 > /proc/sys/fs/binfmt_misc/qemu-aarch64  -- disable this particular 
> entry
>    echo 1 > /proc/sys/fs/binfmt_misc/qemu-aarch64  -- enable it
> 
>    echo 0 > /proc/sys/fs/binfmt_misc/status    -- disable whole binfmt support
>    echo 1 > /proc/sys/fs/binfmt_misc/status    -- enable it
> 
> With systemd you can disable particular formats/architectures entirely
> by masking /usr/lib/binfmt.d/qemu-foo.conf in /etc/binfmt.d/ (if you remove
> binfmt-support).

I just learned about a much simpler way (classic: right after asking the
expert). qemu-user emulation is also disabled by setting the QEMU_VERSION
variable to something as this will mean that qemu-user exits without doing
anything (other than printing version information):

https://sources.debian.org/src/qemu/1:7.0+dfsg-7/linux-user/main.c/?hl=543#L480

I'm just noting this here because I'm sure future-me will soon forget about
this again. XD

Attachment: signature.asc
Description: signature

Reply via email to