Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932745Ab2JBX76 (ORCPT ); Tue, 2 Oct 2012 19:59:58 -0400 Received: from smtp.outflux.net ([198.145.64.163]:35883 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932732Ab2JBX75 (ORCPT ); Tue, 2 Oct 2012 19:59:57 -0400 Date: Tue, 2 Oct 2012 16:49:34 -0700 From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Andrew Morton , David Rientjes , Minchan Kim , Joe Perches , Kautuk Consul , linux-mm@kvack.org, Brad Spengler Subject: [PATCH] mm: use %pK for /proc/vmallocinfo Message-ID: <20121002234934.GA9194@www.outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-HELO: www.outflux.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 925 Lines: 34 In the paranoid case of sysctl kernel.kptr_restrict=2, mask the kernel virtual addresses in /proc/vmallocinfo too. Reported-by: Brad Spengler Signed-off-by: Kees Cook --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 2bb90b1..9c871db 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2572,7 +2572,7 @@ static int s_show(struct seq_file *m, void *p) { struct vm_struct *v = p; - seq_printf(m, "0x%p-0x%p %7ld", + seq_printf(m, "0x%pK-0x%pK %7ld", v->addr, v->addr + v->size, v->size); if (v->caller) -- 1.7.9.5 -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/