From patchwork Wed Jul 22 10:30:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 6841991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A37F6C05AC for ; Wed, 22 Jul 2015 10:33:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D21B1206B6 for ; Wed, 22 Jul 2015 10:33:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F3F39206CC for ; Wed, 22 Jul 2015 10:33:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHrJZ-0000uq-9n; Wed, 22 Jul 2015 10:31:53 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZHrIz-0000gI-Jq for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2015 10:31:19 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NRV00HXBX7JJ650@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 22 Jul 2015 11:30:55 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-81-55af70df3b8b Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 40.B7.04846.FD07FA55; Wed, 22 Jul 2015 11:30:55 +0100 (BST) Received: from localhost.localdomain ([106.109.129.143]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NRV00ML7X769090@eusync4.samsung.com>; Wed, 22 Jul 2015 11:30:55 +0100 (BST) From: Andrey Ryabinin To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 5/5] ARM64: kasan: print memory assignment Date: Wed, 22 Jul 2015 13:30:37 +0300 Message-id: <1437561037-31995-6-git-send-email-a.ryabinin@samsung.com> X-Mailer: git-send-email 2.4.5 In-reply-to: <1437561037-31995-1-git-send-email-a.ryabinin@samsung.com> References: <1437561037-31995-1-git-send-email-a.ryabinin@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsVy+t/xa7r3C9aHGlzeI2+x7dcjNos569ew WfyddIzd4v2yHkaL3ZeeMVtMeNjGbtH+cS+zxZQ/y5ksNj2+xmpxedccNot7a/6zWrz8eILF gcdjzbw1jB6/f01i9Ljc18vksWBTqcemT5PYPe5c28PmcWLGbxaPzUvqPfq2rGL0+LxJLoAr issmJTUnsyy1SN8ugStj478VbAWrhCr+bfjC3sDYzdfFyMkhIWAi8WPpF2YIW0ziwr31bF2M XBxCAksZJU6++M8M4TQxSeztuABWxSagJ/Fv1nY2EFtEoELi6tUJjCA2s8AFJomeiVwgtrCA rcSjxhVgNSwCqhJbt+9mAbF5Bdwkrry7AjSHA2ibnMTS5lqQMKeAu8T5s/vBxgsBlfz/9IFp AiPvAkaGVYyiqaXJBcVJ6bmGesWJucWleel6yfm5mxghQftlB+PiY1aHGAU4GJV4eCccXRcq xJpYVlyZe4hRgoNZSYT3Rdb6UCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8c3e9DxESSE8sSc1O TS1ILYLJMnFwSjUwzpjB4T9HSY/liLDfFe8P8sZB5dNufzW/s/fGoS1XPlbGxR43m3uWOX/x ZvnEX8VvZ0/Jil37X+2IjqOmQOzfr19rlzF93/tWtPnaqzOT535mYtv36fzr5KTWCOcLc/fc mqQg3vRfMFnYhW+V5nf9OE0X48PtnktXCX+xeBx+/Y6Y8aa5BxvV+pRYijMSDbWYi4oTAdMJ xAdWAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150722_033117_884220_9E593EC9 X-CRM114-Status: GOOD ( 11.69 ) X-Spam-Score: -8.1 (--------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-mm@kvack.org, Andrey Ryabinin , Linus Walleij , linux-kernel@vger.kernel.org, David Keitel , Alexander Potapenko , Andrew Morton , Dmitry Vyukov MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Linus Walleij This prints out the virtual memory assigned to KASan in the boot crawl along with other memory assignments, if and only if KASan is activated. Example dmesg from the Juno Development board: Memory: 1691156K/2080768K available (5465K kernel code, 444K rwdata, 2160K rodata, 340K init, 217K bss, 373228K reserved, 16384K cma-reserved) Virtual kernel memory layout: kasan : 0xffffff8000000000 - 0xffffff9000000000 ( 64 GB) vmalloc : 0xffffff9000000000 - 0xffffffbdbfff0000 ( 182 GB) vmemmap : 0xffffffbdc0000000 - 0xffffffbfc0000000 ( 8 GB maximum) 0xffffffbdc2000000 - 0xffffffbdc3fc0000 ( 31 MB actual) fixed : 0xffffffbffabfd000 - 0xffffffbffac00000 ( 12 KB) PCI I/O : 0xffffffbffae00000 - 0xffffffbffbe00000 ( 16 MB) modules : 0xffffffbffc000000 - 0xffffffc000000000 ( 64 MB) memory : 0xffffffc000000000 - 0xffffffc07f000000 ( 2032 MB) .init : 0xffffffc0007f5000 - 0xffffffc00084a000 ( 340 KB) .text : 0xffffffc000080000 - 0xffffffc0007f45b4 ( 7634 KB) .data : 0xffffffc000850000 - 0xffffffc0008bf200 ( 445 KB) Signed-off-by: Linus Walleij Signed-off-by: Andrey Ryabinin Acked-by: Catalin Marinas --- arch/arm64/mm/init.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index ad87ce8..3930692 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -298,6 +298,9 @@ void __init mem_init(void) #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K) pr_notice("Virtual kernel memory layout:\n" +#ifdef CONFIG_KASAN + " kasan : 0x%16lx - 0x%16lx (%6ld GB)\n" +#endif " vmalloc : 0x%16lx - 0x%16lx (%6ld GB)\n" #ifdef CONFIG_SPARSEMEM_VMEMMAP " vmemmap : 0x%16lx - 0x%16lx (%6ld GB maximum)\n" @@ -310,6 +313,9 @@ void __init mem_init(void) " .init : 0x%p" " - 0x%p" " (%6ld KB)\n" " .text : 0x%p" " - 0x%p" " (%6ld KB)\n" " .data : 0x%p" " - 0x%p" " (%6ld KB)\n", +#ifdef CONFIG_KASAN + MLG(KASAN_SHADOW_START, KASAN_SHADOW_END), +#endif MLG(VMALLOC_START, VMALLOC_END), #ifdef CONFIG_SPARSEMEM_VMEMMAP MLG((unsigned long)vmemmap,