From 3b048108e63a8e97d7ef1561f2dae7597a16a239 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 16 Aug 2020 18:51:44 +0200 Subject: [PATCH] - fix compilation on kernel 5.8, unfortunately does not work due to copy_to_kernel_nofault not being exported anymore - updated homepage and source URL --- kernel-5.8.patch | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 kernel-5.8.patch diff --git a/kernel-5.8.patch b/kernel-5.8.patch new file mode 100644 index 0000000..baebb11 --- /dev/null +++ b/kernel-5.8.patch @@ -0,0 +1,34 @@ +--- crash-7.2.8/memory_driver/crash.c~ 2020-01-30 19:57:27.000000000 +0100 ++++ crash-7.2.8/memory_driver/crash.c 2020-08-16 18:41:10.187285717 +0200 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + extern int page_is_ram(unsigned long); + +@@ -186,7 +186,11 @@ + return -EFAULT; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) + if (probe_kernel_write(vaddr, buffer, count)) { ++#else ++ if (copy_to_kernel_nofault(vaddr, buffer, count)) { ++#endif + unmap_virtual(page); + return -EFAULT; + } +@@ -227,7 +227,11 @@ + * Use bounce buffer to bypass the CONFIG_HARDENED_USERCOPY + * kernel text restriction. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) + if (probe_kernel_read(buffer, vaddr, count)) { ++#else ++ if (copy_from_kernel_nofault(buffer, vaddr, count)) { ++#endif + unmap_virtual(page); + return -EFAULT; + } -- 2.44.0