]> git.pld-linux.org Git - packages/crash.git/blob - kernel-5.8.patch
- fix compilation on kernel 5.8, unfortunately does not work due to
[packages/crash.git] / kernel-5.8.patch
1 --- crash-7.2.8/memory_driver/crash.c~  2020-01-30 19:57:27.000000000 +0100
2 +++ crash-7.2.8/memory_driver/crash.c   2020-08-16 18:41:10.187285717 +0200
3 @@ -34,6 +34,7 @@
4  #include <linux/mm.h>
5  #include <linux/highmem.h>
6  #include <linux/mmzone.h>
7 +#include <linux/version.h>
8  
9  extern int page_is_ram(unsigned long);
10  
11 @@ -186,7 +186,11 @@
12                 return -EFAULT;
13         }
14  
15 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
16         if (probe_kernel_write(vaddr, buffer, count)) {
17 +#else
18 +       if (copy_to_kernel_nofault(vaddr, buffer, count)) {
19 +#endif
20                 unmap_virtual(page);
21                 return -EFAULT;
22         }
23 @@ -227,7 +227,11 @@
24          * Use bounce buffer to bypass the CONFIG_HARDENED_USERCOPY
25          * kernel text restriction.
26          */
27 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
28          if (probe_kernel_read(buffer, vaddr, count)) {
29 +#else
30 +        if (copy_from_kernel_nofault(buffer, vaddr, count)) {
31 +#endif
32                  unmap_virtual(page);
33                  return -EFAULT;
34          }
This page took 0.440154 seconds and 3 git commands to generate.