diff options
author | Jean-Marc Lenoir | 2022-04-09 15:34:50 +0200 |
---|---|---|
committer | Jean-Marc Lenoir | 2022-04-09 15:34:50 +0200 |
commit | 58259609c60ecd1dd070b4b8a1fe266c99519e88 (patch) | |
tree | a5a9f3fbb6676697700024ebbac482aaa97f9923 /vmmon.patch | |
parent | 5825073a9359e02bcfab56ecfc0a2f5d70eb58a5 (diff) | |
download | aur-58259609c60ecd1dd070b4b8a1fe266c99519e88.tar.gz |
Compatibility with Linux 5.18-rc1
Diffstat (limited to 'vmmon.patch')
-rw-r--r-- | vmmon.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vmmon.patch b/vmmon.patch index 27e8fb449b08..0620eea41650 100644 --- a/vmmon.patch +++ b/vmmon.patch @@ -310,3 +310,31 @@ index 0ec30b3..b920e2d 100644 #else /* * Vmkernel's bogus __FreeBSD__ value causes gcc <stddef.h> to break. +From 16d490ae022d7fc4ca867971e20e2dcd59e6ca5a Mon Sep 17 00:00:00 2001 +From: Michal Kubecek <mkubecek@suse.cz> +Date: Mon, 4 Apr 2022 01:57:28 +0200 +Subject: [PATCH] vmmon: do not rely on HAVE_GET_KERNEL_NOFAULT + +Mainline commit 34737e269803 ("uaccess: add generic +__{get,put}_kernel_nofault") in 5.18-rc1 removes HAVE_GET_KERNEL_NOFAULT +macro as all architectures can use get_kernel_nofault() now. Check for +existence of __get_kernel_nofault() instead and add also a version check in +case it stops being a macro or is removed in the future. +--- + vmmon-only/linux/hostif.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c +index a21c300..b6326e9 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -2436,7 +2436,8 @@ isVAReadable(VA r) // IN: + uint32 dummy; + int ret; + +-#ifdef HAVE_GET_KERNEL_NOFAULT ++#if defined(HAVE_GET_KERNEL_NOFAULT) || defined(__get_kernel_nofault) || \ ++ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) + ret = get_kernel_nofault(dummy, (void *)r); + #else + { |