dolohow / uksm

Ultra Kernel Samepage Merging
242 stars 35 forks source link

5.0.10-rc1 - 1 out of 17 hunks FAILED -- saving rejects to file mm/mmap.c.rej #43

Closed sirlucjan closed 5 years ago

sirlucjan commented 5 years ago

I've compiled uksm-5.0.patch with 5.0.10-rc1 and I got an error

patching file mm/mmap.c
Hunk #1 FAILED at 45.
Hunk #2 succeeded at 183 (offset 1 line).
Hunk #3 succeeded at 727 (offset 1 line).
Hunk #4 succeeded at 869 (offset 1 line).
Hunk #5 succeeded at 975 (offset 1 line).
Hunk #6 succeeded at 1002 (offset 1 line).
Hunk #7 succeeded at 1466 (offset 1 line).
Hunk #8 succeeded at 1833 (offset 1 line).
Hunk #9 succeeded at 1876 (offset 1 line).
Hunk #10 succeeded at 2710 (offset 5 lines).
Hunk #11 succeeded at 3015 (offset 5 lines).
Hunk #12 succeeded at 3066 (offset 5 lines).
Hunk #13 succeeded at 3144 (offset 5 lines).
Hunk #14 succeeded at 3162 (offset 5 lines).
Hunk #15 succeeded at 3188 (offset 5 lines).
Hunk #16 succeeded at 3300 (offset 5 lines).
Hunk #17 succeeded at 3451 (offset 5 lines).
1 out of 17 hunks FAILED -- saving rejects to file mm/mmap.c.rej

Here is mmap.c.rej:

--- mm/mmap.c
+++ mm/mmap.c
@@ -45,6 +45,7 @@
 #include <linux/moduleparam.h>
 #include <linux/pkeys.h>
 #include <linux/oom.h>
+#include <linux/ksm.h>

 #include <linux/uaccess.h>
 #include <asm/cacheflush.h>
sirlucjan commented 5 years ago

I've resync against 5.0.10:

https://github.com/sirlucjan/uksm/commit/52578591aa1f37b54e5e4f8f41988dd667328fcf

Seems to be OK:

  -> Applying patch uksm-5.0.10.patch...
patching file Documentation/vm/uksm.txt
patching file fs/exec.c
patching file fs/proc/meminfo.c
patching file include/asm-generic/pgtable.h
patching file include/linux/ksm.h
patching file include/linux/mm_types.h
patching file include/linux/mmzone.h
patching file include/linux/sradix-tree.h
patching file include/linux/uksm.h
patching file kernel/fork.c
patching file lib/Makefile
patching file lib/sradix-tree.c
patching file mm/Kconfig
patching file mm/Makefile
patching file mm/ksm.c
patching file mm/memory.c
patching file mm/mmap.c
patching file mm/uksm.c
patching file mm/vmstat.c
dolohow commented 5 years ago

Thanks @sirlucjan, I don't really support patches, it's just too much work, but I appreciate your effort :)

ghibo commented 5 years ago

In the case someone other is looking for a fix for a 5.0.10, I attach here two patches that can be used, one before, and one after applying the official uksm-5.0.patch. In this way the 5.0 remain unchanged, at least until a next big change in upstream minor 5.0.x.

uksm-5.0.10-0001-coredump-fix-race-condition-mm-h-revert.patch.txt uksm-5.0.10-0002-coredump-fix-race-condition-mm-h-reapply.patch.txt