All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] not-adding-modules-range-to-kcore-if-its-equal-to-vmcore-range.patch removed from -mm tree
@ 2014-10-13 18:18 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-10-13 18:18 UTC (permalink / raw)
  To: bhe, paul.gortmaker, qiuxishi, mm-commits


The patch titled
     Subject: fs/proc/kcore.c: don't add modules range to kcore if it's equal to vmcore range
has been removed from the -mm tree.  Its filename was
     not-adding-modules-range-to-kcore-if-its-equal-to-vmcore-range.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Baoquan He <bhe@redhat.com>
Subject: fs/proc/kcore.c: don't add modules range to kcore if it's equal to vmcore range

On some ARCHs modules range is eauql to vmalloc range. E.g on i686

	"#define MODULES_VADDR   VMALLOC_START"
	"#define MODULES_END     VMALLOC_END"

This will cause 2 duplicate program segments in /proc/kcore, and no flag
to indicate they are different.  This is confusing.  And usually people
who need check the elf header or read the content of kcore will check
memory ranges.  Two program segments which are the same are unnecessary.

So check if the modules range is equal to vmalloc range.  If so, just skip
adding the modules range.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/proc/kcore.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN fs/proc/kcore.c~not-adding-modules-range-to-kcore-if-its-equal-to-vmcore-range fs/proc/kcore.c
--- a/fs/proc/kcore.c~not-adding-modules-range-to-kcore-if-its-equal-to-vmcore-range
+++ a/fs/proc/kcore.c
@@ -610,8 +610,10 @@ static void __init proc_kcore_text_init(
 struct kcore_list kcore_modules;
 static void __init add_modules_range(void)
 {
-	kclist_add(&kcore_modules, (void *)MODULES_VADDR,
+	if (MODULES_VADDR != VMALLOC_START && MODULES_END != VMALLOC_END) {
+		kclist_add(&kcore_modules, (void *)MODULES_VADDR,
 			MODULES_END - MODULES_VADDR, KCORE_VMALLOC);
+	}
 }
 #else
 static void __init add_modules_range(void)
_

Patches currently in -mm which might be from bhe@redhat.com are

origin.patch
try-to-use-automatic-variable-in-kexec-purgatory-makefile.patch
take-the-segment-adding-out-of-locate_mem_hole-functions.patch
check-if-crashk_res_low-exists-when-exclude-it-from-crash-mem-ranges.patch
kexec-remove-the-unused-function-parameter.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-13 18:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 18:18 [merged] not-adding-modules-range-to-kcore-if-its-equal-to-vmcore-range.patch removed from -mm tree akpm

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.