]> git.pld-linux.org Git - packages/crash.git/commitdiff
- fix compilation on kernel 5.8, unfortunately does not work due to
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 16 Aug 2020 16:51:44 +0000 (18:51 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 16 Aug 2020 16:52:26 +0000 (18:52 +0200)
  copy_to_kernel_nofault not being exported anymore
- updated homepage and source URL

kernel-5.8.patch [new file with mode: 0644]

diff --git a/kernel-5.8.patch b/kernel-5.8.patch
new file mode 100644 (file)
index 0000000..baebb11
--- /dev/null
@@ -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 <linux/mm.h>
+ #include <linux/highmem.h>
+ #include <linux/mmzone.h>
++#include <linux/version.h>
+ 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;
+         }
This page took 0.185687 seconds and 4 git commands to generate.