Skip to content

Commit de8e5d7

Browse files
committed
KVM: Disable compat ioctl for s390
We never had a 31bit QEMU/kuli running. We would need to review several ioctls to check if this creates holes, bugs or whatever to make it work. Lets just disable compat support for KVM on s390. Signed-off-by: Christian Borntraeger <[email protected]> Acked-by: Paolo Bonzini <[email protected]>
1 parent 658b6ed commit de8e5d7

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

virt/kvm/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ config HAVE_KVM_ARCH_TLB_FLUSH_ALL
4343

4444
config KVM_GENERIC_DIRTYLOG_READ_PROTECT
4545
bool
46+
47+
config KVM_COMPAT
48+
def_bool y
49+
depends on COMPAT && !S390

virt/kvm/kvm_main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct dentry *kvm_debugfs_dir;
9292

9393
static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl,
9494
unsigned long arg);
95-
#ifdef CONFIG_COMPAT
95+
#ifdef CONFIG_KVM_COMPAT
9696
static long kvm_vcpu_compat_ioctl(struct file *file, unsigned int ioctl,
9797
unsigned long arg);
9898
#endif
@@ -2052,7 +2052,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
20522052
static struct file_operations kvm_vcpu_fops = {
20532053
.release = kvm_vcpu_release,
20542054
.unlocked_ioctl = kvm_vcpu_ioctl,
2055-
#ifdef CONFIG_COMPAT
2055+
#ifdef CONFIG_KVM_COMPAT
20562056
.compat_ioctl = kvm_vcpu_compat_ioctl,
20572057
#endif
20582058
.mmap = kvm_vcpu_mmap,
@@ -2342,7 +2342,7 @@ static long kvm_vcpu_ioctl(struct file *filp,
23422342
return r;
23432343
}
23442344

2345-
#ifdef CONFIG_COMPAT
2345+
#ifdef CONFIG_KVM_COMPAT
23462346
static long kvm_vcpu_compat_ioctl(struct file *filp,
23472347
unsigned int ioctl, unsigned long arg)
23482348
{
@@ -2434,7 +2434,7 @@ static int kvm_device_release(struct inode *inode, struct file *filp)
24342434

24352435
static const struct file_operations kvm_device_fops = {
24362436
.unlocked_ioctl = kvm_device_ioctl,
2437-
#ifdef CONFIG_COMPAT
2437+
#ifdef CONFIG_KVM_COMPAT
24382438
.compat_ioctl = kvm_device_ioctl,
24392439
#endif
24402440
.release = kvm_device_release,
@@ -2721,7 +2721,7 @@ static long kvm_vm_ioctl(struct file *filp,
27212721
return r;
27222722
}
27232723

2724-
#ifdef CONFIG_COMPAT
2724+
#ifdef CONFIG_KVM_COMPAT
27252725
struct compat_kvm_dirty_log {
27262726
__u32 slot;
27272727
__u32 padding1;
@@ -2768,7 +2768,7 @@ static long kvm_vm_compat_ioctl(struct file *filp,
27682768
static struct file_operations kvm_vm_fops = {
27692769
.release = kvm_vm_release,
27702770
.unlocked_ioctl = kvm_vm_ioctl,
2771-
#ifdef CONFIG_COMPAT
2771+
#ifdef CONFIG_KVM_COMPAT
27722772
.compat_ioctl = kvm_vm_compat_ioctl,
27732773
#endif
27742774
.llseek = noop_llseek,

0 commit comments

Comments
 (0)