File: module-shadow.patch

package info (click to toggle)
kpatch 0.9.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,716 kB
  • sloc: ansic: 9,716; sh: 2,592; makefile: 260; asm: 35
file content (24 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -Nupr src.orig/arch/x86/kvm/vmx.c src/arch/x86/kvm/vmx.c
--- src.orig/arch/x86/kvm/vmx.c	2017-09-22 15:27:20.853052676 -0400
+++ src/arch/x86/kvm/vmx.c	2017-09-22 15:27:44.742151601 -0400
@@ -10581,10 +10581,20 @@ static void vmx_leave_nested(struct kvm_
  * It should only be called before L2 actually succeeded to run, and when
  * vmcs01 is current (it doesn't leave_guest_mode() or switch vmcss).
  */
+#include "kpatch.h"
 static void nested_vmx_entry_failure(struct kvm_vcpu *vcpu,
 			struct vmcs12 *vmcs12,
 			u32 reason, unsigned long qualification)
 {
+	int *kpatch;
+
+	kpatch = kpatch_shadow_alloc(vcpu, "kpatch", sizeof(*kpatch),
+				     GFP_KERNEL);
+	if (kpatch) {
+		kpatch_shadow_get(vcpu, "kpatch");
+		kpatch_shadow_free(vcpu, "kpatch");
+	}
+
 	load_vmcs12_host_state(vcpu, vmcs12);
 	vmcs12->vm_exit_reason = reason | VMX_EXIT_REASONS_FAILED_VMENTRY;
 	vmcs12->exit_qualification = qualification;