KVM-VMI / kvm

Fork of KVM with Virtual Machine Introspection patches
Other
33 stars 28 forks source link

kvm: introspection: avoid clash of syscall index for pidfd_mem #49

Closed thomasdangl closed 3 years ago

thomasdangl commented 3 years ago

Linux 5.9 introduced the close_range syscall to effectively close multiple file descriptors at once. Coincidentally, the index of this syscall is equal to the one of pidfd_mem.

As multiple programs, e.g., systemd, attempt to use this syscall without checking against the kernel version, pidfd_mem breaks the boot process on many newer systems.

The patch proposes to move the syscall index far ahead to avoid potential future regressions until kvmi is merged upstream.

Wenzel commented 3 years ago

@adlazar can I have your input on this one ?

adlazar commented 3 years ago

I'm not sure if QEMU fails if the ioctl fails when using the old value

On a second thought, if QEMU is not started with mem-introspection stuff, it should not fail (I guess :) ).

thomasdangl commented 3 years ago

On a second thought, if QEMU is not started with mem-introspection stuff, it should not fail (I guess :) ).

Yup, when not using mem-introspection it appears to work fine. I will prepare a pull request for QEMU anyway if that is fine with you.

adlazar commented 3 years ago

I will prepare a pull request for QEMU anyway if that is fine with you.

Sure. Thank you.

Wenzel commented 3 years ago

The build passed, merging this