All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20180711104158.GE2070@MiWiFi-R3L-srv>

diff --git a/a/1.txt b/N1/1.txt
index efd4442..848d931 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -74,3 +74,36 @@ if not satisfiled.
 Hi Chao,
 
 Could you check if below patch works for you?
+
+
+From ab6e47c6a78d1a4ccb577b995b7b386f3149732f Mon Sep 17 00:00:00 2001
+From: Baoquan He <bhe@redhat.com>
+Date: Wed, 11 Jul 2018 18:30:04 +0800
+Subject: [PATCH] mm, page_alloc: find movable zone after kernel text
+
+In find_zone_movable_pfns_for_nodes(), when try to find the starting
+PFN movable zone begins in each node, kernel text position is not
+considered. KASLR may put kernel after which movable zone begins.
+
+Fix it by finding movable zone after kernel text.
+
+Signed-off-by: Baoquan He <bhe@redhat.com>
+---
+ mm/page_alloc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 1521100..fe346b4 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -6678,6 +6678,8 @@ static void __init find_zone_movable_pfns_for_nodes(void)
+ 			unsigned long size_pages;
+ 
+ 			start_pfn = max(start_pfn, zone_movable_pfn[nid]);
++			/* KASLR may put kernel after 'start_pfn', start after kernel */
++			start_pfn = max(start_pfn, PAGE_ALIGN(_etext));
+ 			if (start_pfn >= end_pfn)
+ 				continue;
+ 
+-- 
+2.1.0
diff --git a/a/content_digest b/N1/content_digest
index 7601ccd..c2e8957 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -92,6 +92,39 @@
  "\n"
  "Hi Chao,\n"
  "\n"
- Could you check if below patch works for you?
+ "Could you check if below patch works for you?\n"
+ "\n"
+ "\n"
+ "From ab6e47c6a78d1a4ccb577b995b7b386f3149732f Mon Sep 17 00:00:00 2001\n"
+ "From: Baoquan He <bhe@redhat.com>\n"
+ "Date: Wed, 11 Jul 2018 18:30:04 +0800\n"
+ "Subject: [PATCH] mm, page_alloc: find movable zone after kernel text\n"
+ "\n"
+ "In find_zone_movable_pfns_for_nodes(), when try to find the starting\n"
+ "PFN movable zone begins in each node, kernel text position is not\n"
+ "considered. KASLR may put kernel after which movable zone begins.\n"
+ "\n"
+ "Fix it by finding movable zone after kernel text.\n"
+ "\n"
+ "Signed-off-by: Baoquan He <bhe@redhat.com>\n"
+ "---\n"
+ " mm/page_alloc.c | 2 ++\n"
+ " 1 file changed, 2 insertions(+)\n"
+ "\n"
+ "diff --git a/mm/page_alloc.c b/mm/page_alloc.c\n"
+ "index 1521100..fe346b4 100644\n"
+ "--- a/mm/page_alloc.c\n"
+ "+++ b/mm/page_alloc.c\n"
+ "@@ -6678,6 +6678,8 @@ static void __init find_zone_movable_pfns_for_nodes(void)\n"
+ " \t\t\tunsigned long size_pages;\n"
+ " \n"
+ " \t\t\tstart_pfn = max(start_pfn, zone_movable_pfn[nid]);\n"
+ "+\t\t\t/* KASLR may put kernel after 'start_pfn', start after kernel */\n"
+ "+\t\t\tstart_pfn = max(start_pfn, PAGE_ALIGN(_etext));\n"
+ " \t\t\tif (start_pfn >= end_pfn)\n"
+ " \t\t\t\tcontinue;\n"
+ " \n"
+ "-- \n"
+ 2.1.0
 
-20a96a1d453fda38d03693bd621f8918690d9307d16ba857ce436d58007e256a
+90b3db4b84295cf544bc57a9f5c79535b1d176bdc84d090f8de091ccedd88eb4

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.