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@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx: coding-style fixes] Signed-off-by: Baoquan He <bhe@xxxxxxxxxx> Cc: Xishi Qiu <qiuxishi@xxxxxxxxxx> Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxx 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 -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html