Skip to content
Commit 7ddfd3e0 authored by Marc Zyngier's avatar Marc Zyngier
Browse files

KVM: Enforce error in ioctl for compat tasks when !KVM_COMPAT

The current behaviour of the compat ioctls is a bit odd.
We provide a compat_ioctl method when KVM_COMPAT is set, and NULL
otherwise. But NULL means that the normal, non-compat ioctl should
be used directly for compat tasks, and there is no way to actually
prevent a compat task from issueing KVM ioctls.

This patch changes this behaviour, by always registering a compat_ioctl
method, even if KVM_COMPAT is not selected. In that case, the callback
will always return -EINVAL.

Fixes: de8e5d74

 ("KVM: Disable compat ioctl for s390")
Reported-by: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Acked-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 47a91b72
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment