linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Brian Gerst <brgerst@gmail.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-mm@kvack.org, Ingo Molnar <mingo@kernel.org>,
	Kees Cook <keescook@google.com>
Subject: [PATCH 4.4 07/58] mm/page_alloc: Remove kernel address exposure in free_reserved_area()
Date: Wed,  9 Aug 2017 12:41:19 -0700	[thread overview]
Message-ID: <20170809194146.795256295@linuxfoundation.org> (raw)
In-Reply-To: <20170809194146.501519882@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Josh Poimboeuf <jpoimboe@redhat.com>

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 <torvalds@linux-foundation.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/6836ff90c45b71d38e5d4405aec56fa9e5d1d4b2.1477405374.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Kees Cook <keescook@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 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;
 }

  parent reply	other threads:[~2017-08-09 19:43 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 19:41 [PATCH 4.4 00/58] 4.4.81-stable review Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 01/58] parisc: Increase thread and stack size to 32kb Greg Kroah-Hartman
2017-08-11  1:33   ` Ben Hutchings
2017-08-11  7:21     ` Helge Deller
2017-08-11 15:33       ` Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 02/58] libata: array underflow in ata_find_dev() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 03/58] workqueue: restore WQ_UNBOUND/max_active==1 to be ordered Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 04/58] ALSA: hda - Fix speaker output from VAIO VPCL14M1R Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 05/58] ASoC: do not close shared backend dailink Greg Kroah-Hartman
2017-08-09 19:41 ` Greg Kroah-Hartman [this message]
2017-08-09 19:41 ` [PATCH 4.4 08/58] ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 09/58] ext4: fix overflow caused by missing cast in ext4_resize_fs() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 10/58] ARM: dts: armada-38x: Fix irq type for pca955 Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 11/58] media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 12/58] target: Avoid mappedlun symlink creation during lun shutdown Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 13/58] iscsi-target: Always wait for kthread_should_stop() before kthread exit Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 14/58] iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 15/58] iscsi-target: Fix initial login PDU asynchronous socket close OOPs Greg Kroah-Hartman
2017-08-11 16:12   ` Ben Hutchings
2017-08-09 19:41 ` [PATCH 4.4 16/58] iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 17/58] iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 18/58] mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries Greg Kroah-Hartman
2017-08-11 17:45   ` Ben Hutchings
2017-08-13  6:27     ` Nadav Amit
2017-08-15 13:36       ` Ben Hutchings
2017-08-15 16:39         ` Nadav Amit
2017-08-14  8:00     ` Mel Gorman
2017-08-09 19:41 ` [PATCH 4.4 19/58] media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 20/58] f2fs: sanity check checkpoint segno and blkoff Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 21/58] drm: rcar-du: fix backport bug Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 22/58] [media] saa7164: fix double fetch PCIe access condition Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 23/58] ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 24/58] net: Zero terminate ifr_name in dev_ifname() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 25/58] ipv6: avoid overflow of offset in ip6_find_1stfragopt Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 26/58] ipv4: initialize fib_trie prior to register_netdev_notifier call Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 27/58] rtnetlink: allocate more memory for dev_set_mac_address() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 28/58] mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 29/58] openvswitch: fix potential out of bound access in parse_ct Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 30/58] packet: fix use-after-free in prb_retire_rx_blk_timer_expired() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 31/58] ipv6: Dont increase IPSTATS_MIB_FRAGFAILS twice in ip6_fragment() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 32/58] net: ethernet: nb8800: Handle all 4 RGMII modes identically Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 33/58] dccp: fix a memleak that dccp_ipv6 doesnt put reqsk properly Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 34/58] dccp: fix a memleak that dccp_ipv4 " Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 35/58] dccp: fix a memleak for dccp_feat_init err process Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 36/58] sctp: dont dereference ptr before leaving _sctp_walk_{params, errors}() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 37/58] sctp: fix the check for _sctp_walk_params and _sctp_walk_errors Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 38/58] net/mlx5: Fix command bad flow on command entry allocation failure Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 39/58] net: phy: Correctly process PHY_HALTED in phy_stop_machine() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 40/58] xen-netback: correctly schedule rate-limited queues Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 41/58] sparc64: Measure receiver forward progress to avoid send mondo timeout Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 42/58] sparc64: Prevent perf from running during super critical sections Greg Kroah-Hartman
2017-08-10 16:20   ` Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 43/58] wext: handle NULL extra data in iwe_stream_add_point better Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 44/58] sh_eth: R8A7740 supports packet shecksumming Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 45/58] net: phy: dp83867: fix irq generation Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 46/58] tg3: Fix race condition in tg3_get_stats64() Greg Kroah-Hartman
2017-08-09 19:41 ` [PATCH 4.4 47/58] x86/boot: Add missing declaration of string functions Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 48/58] phy state machine: failsafe leave invalid RUNNING state Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 49/58] scsi: qla2xxx: Get mutex lock before checking optrom_state Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 50/58] drm/virtio: fix framebuffer sparse warning Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 51/58] virtio_blk: fix panic in initialization error path Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 52/58] ARM: 8632/1: ftrace: fix syscall name matching Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 53/58] mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 54/58] lib/Kconfig.debug: fix frv build failure Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 55/58] signal: protect SIGNAL_UNKILLABLE from unintentional clearing Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 56/58] mm: dont dereference struct page fields of invalid pages Greg Kroah-Hartman
2017-08-09 19:42 ` [PATCH 4.4 57/58] ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output Greg Kroah-Hartman
2017-08-10  0:02 ` [PATCH 4.4 00/58] 4.4.81-stable review Shuah Khan
2017-08-10  0:37 ` Guenter Roeck
2017-08-10 16:17   ` Greg Kroah-Hartman
2017-08-10 17:34     ` Guenter Roeck
2017-08-10 16:21   ` Greg Kroah-Hartman
2017-08-10  0:58 ` Guenter Roeck
2017-08-10 16:18   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170809194146.795256295@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).