From: Dario Faggioli <dfaggioli@suse.com>
Date: Thu Oct 13 18:19:43 2022
Subject: kABI: fix kABI after "KVM: Add infrastructure and macro to mark VM as bugged"
Patch-mainline: never, SUSE kABI
References: bsc#1200788 CVE-2022-2153
Patch "KVM: Add infrastructure and macro to mark VM as bugged"
breaks kABI. The kvm struct has several holes, e.g.:
/* --- cacheline 1355 boundary (86720 bytes) was 32 bytes ago --- */
long unsigned int mmu_notifier_seq; /* 86752 8 */
long int mmu_notifier_count; /* 86760 8 */
long int tlbs_dirty; /* 86768 8 */
struct list_head devices; /* 86776 16 */
/* --- cacheline 1356 boundary (86784 bytes) was 8 bytes ago --- */
bool manual_dirty_log_protect; /* 86792 1 */
/* XXX 7 bytes hole, try to pack */
struct dentry * debugfs_dentry; /* 86800 8 */
struct kvm_stat_data * * debugfs_stat_data; /* 86808 8 */
struct srcu_struct srcu; /* 86816 50336 */
/* --- cacheline 2143 boundary (137152 bytes) --- */
Move the new member there as a workaround.
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
---
include/linux/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -500,12 +500,14 @@
long tlbs_dirty;
struct list_head devices;
bool manual_dirty_log_protect;
+#ifndef __GENKSYMS__
+ bool vm_bugged;
+#endif
struct dentry *debugfs_dentry;
struct kvm_stat_data **debugfs_stat_data;
struct srcu_struct srcu;
struct srcu_struct irq_srcu;
pid_t userspace_pid;
- bool vm_bugged;
};
#define kvm_err(fmt, ...) \