https://github.com/torvalds/linux
Revision 7ddfd3e0df29106c728dda2a6bd6591ee43a4e3c authored by Marc Zyngier on 17 June 2018, 09:16:21 UTC, committed by Marc Zyngier on 21 June 2018, 16:17:50 UTC
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: de8e5d744051568c8aad ("KVM: Disable compat ioctl for s390")
Reported-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 47a91b7
History
Tip revision: 7ddfd3e0df29106c728dda2a6bd6591ee43a4e3c authored by Marc Zyngier on 17 June 2018, 09:16:21 UTC
KVM: Enforce error in ioctl for compat tasks when !KVM_COMPAT
Tip revision: 7ddfd3e
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 12.8 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.5 KB
.mailmap -rw-r--r-- 9.3 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 96.3 KB
Kbuild -rw-r--r-- 2.2 KB
Kconfig -rw-r--r-- 321 bytes
MAINTAINERS -rw-r--r-- 448.8 KB
Makefile -rw-r--r-- 58.3 KB
README -rw-r--r-- 800 bytes

README

back to top