From f5b2042901f791ebf12176a116c29604dc1f71ac Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 7 Aug 2017 14:03:15 -0700 Subject: [PATCH] 4.4-stable patches added patches: mm-page_alloc-remove-kernel-address-exposure-in-free_reserved_area.patch --- ...dress-exposure-in-free_reserved_area.patch | 71 +++++++++++++++++++ ...-core-fix-access-to-hs400-es-devices.patch | 46 ------------ queue-4.4/series | 2 +- 3 files changed, 72 insertions(+), 47 deletions(-) create mode 100644 queue-4.4/mm-page_alloc-remove-kernel-address-exposure-in-free_reserved_area.patch delete mode 100644 queue-4.4/mmc-core-fix-access-to-hs400-es-devices.patch diff --git a/queue-4.4/mm-page_alloc-remove-kernel-address-exposure-in-free_reserved_area.patch b/queue-4.4/mm-page_alloc-remove-kernel-address-exposure-in-free_reserved_area.patch new file mode 100644 index 00000000000..43b694f0ef6 --- /dev/null +++ b/queue-4.4/mm-page_alloc-remove-kernel-address-exposure-in-free_reserved_area.patch @@ -0,0 +1,71 @@ +From adb1fe9ae2ee6ef6bc10f3d5a588020e7664dfa7 Mon Sep 17 00:00:00 2001 +From: Josh Poimboeuf +Date: Tue, 25 Oct 2016 09:51:14 -0500 +Subject: mm/page_alloc: Remove kernel address exposure in free_reserved_area() + +From: Josh Poimboeuf + +commit adb1fe9ae2ee6ef6bc10f3d5a588020e7664dfa7 upstream. + +Linus suggested we try to remove some of the low-hanging fruit related +to kernel address exposure in dmesg. The only leaks I see on my local +system are: + + Freeing SMP alternatives memory: 32K (ffffffff9e309000 - ffffffff9e311000) + Freeing initrd memory: 10588K (ffffa0b736b42000 - ffffa0b737599000) + Freeing unused kernel memory: 3592K (ffffffff9df87000 - ffffffff9e309000) + Freeing unused kernel memory: 1352K (ffffa0b7288ae000 - ffffa0b728a00000) + Freeing unused kernel memory: 632K (ffffa0b728d62000 - ffffa0b728e00000) + +Linus says: + + "I suspect we should just remove [the addresses in the 'Freeing' + messages]. I'm sure they are useful in theory, but I suspect they + were more useful back when the whole "free init memory" was + originally done. + + These days, if we have a use-after-free, I suspect the init-mem + situation is the easiest situation by far. Compared to all the dynamic + allocations which are much more likely to show it anyway. So having + debug output for that case is likely not all that productive." + +With this patch the freeing messages now look like this: + + Freeing SMP alternatives memory: 32K + Freeing initrd memory: 10588K + Freeing unused kernel memory: 3592K + Freeing unused kernel memory: 1352K + Freeing unused kernel memory: 632K + +Suggested-by: Linus Torvalds +Signed-off-by: Josh Poimboeuf +Cc: Andy Lutomirski +Cc: Borislav Petkov +Cc: Brian Gerst +Cc: Denys Vlasenko +Cc: H. Peter Anvin +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Cc: linux-mm@kvack.org +Link: http://lkml.kernel.org/r/6836ff90c45b71d38e5d4405aec56fa9e5d1d4b2.1477405374.git.jpoimboe@redhat.com +Signed-off-by: Ingo Molnar +Cc: Kees Cook +Signed-off-by: Greg Kroah-Hartman + +--- + mm/page_alloc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -5847,8 +5847,8 @@ unsigned long free_reserved_area(void *s + } + + if (pages && s) +- pr_info("Freeing %s memory: %ldK (%p - %p)\n", +- s, pages << (PAGE_SHIFT - 10), start, end); ++ pr_info("Freeing %s memory: %ldK\n", ++ s, pages << (PAGE_SHIFT - 10)); + + return pages; + } diff --git a/queue-4.4/mmc-core-fix-access-to-hs400-es-devices.patch b/queue-4.4/mmc-core-fix-access-to-hs400-es-devices.patch deleted file mode 100644 index 09fcc303af5..00000000000 --- a/queue-4.4/mmc-core-fix-access-to-hs400-es-devices.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 773dc118756b1f38766063e90e582016be868f09 Mon Sep 17 00:00:00 2001 -From: Guenter Roeck -Date: Wed, 1 Mar 2017 14:11:47 -0800 -Subject: mmc: core: Fix access to HS400-ES devices - -From: Guenter Roeck - -commit 773dc118756b1f38766063e90e582016be868f09 upstream. - -HS400-ES devices fail to initialize with the following error messages. - -mmc1: power class selection to bus width 8 ddr 0 failed -mmc1: error -110 whilst initialising MMC card - -This was seen on Samsung Chromebook Plus. Code analysis points to -commit 3d4ef329757c ("mmc: core: fix multi-bit bus width without -high-speed mode"), which attempts to set the bus width for all but -HS200 devices unconditionally. However, for HS400-ES, the bus width -is already selected. - -Cc: Anssi Hannula -Cc: Douglas Anderson -Cc: Brian Norris -Fixes: 3d4ef329757c ("mmc: core: fix multi-bit bus width ...") -Signed-off-by: Guenter Roeck -Reviewed-by: Douglas Anderson -Reviewed-by: Shawn Lin -Tested-by: Heiko Stuebner -Signed-off-by: Ulf Hansson -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/mmc/core/mmc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/mmc/core/mmc.c -+++ b/drivers/mmc/core/mmc.c -@@ -1581,7 +1581,7 @@ static int mmc_init_card(struct mmc_host - err = mmc_select_hs400(card); - if (err) - goto free_card; -- } else { -+ } else if (!mmc_card_hs400es(card)) { - /* Select the desired bus width optionally */ - err = mmc_select_bus_width(card); - if (!IS_ERR_VALUE(err) && mmc_card_hs(card)) { diff --git a/queue-4.4/series b/queue-4.4/series index ccff79b315f..cbeb8206c72 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1,7 +1,7 @@ parisc-increase-thread-and-stack-size-to-32kb.patch libata-array-underflow-in-ata_find_dev.patch workqueue-restore-wq_unbound-max_active-1-to-be-ordered.patch -mmc-core-fix-access-to-hs400-es-devices.patch alsa-hda-fix-speaker-output-from-vaio-vpcl14m1r.patch asoc-do-not-close-shared-backend-dailink.patch kvm-async_pf-make-rcu-irq-exit-if-not-triggered-from-idle-task.patch +mm-page_alloc-remove-kernel-address-exposure-in-free_reserved_area.patch -- 2.47.3