From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by kanga.kvack.org (Postfix) with ESMTP id 47DCF6B0038 for ; Mon, 24 Aug 2015 12:00:22 -0400 (EDT) Received: by wicne3 with SMTP id ne3so76582722wic.0 for ; Mon, 24 Aug 2015 09:00:21 -0700 (PDT) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com. [2a00:1450:400c:c05::233]) by mx.google.com with ESMTPS id m9si13786561wiz.29.2015.08.24.09.00.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2015 09:00:20 -0700 (PDT) Received: by wicja10 with SMTP id ja10so76529978wic.1 for ; Mon, 24 Aug 2015 09:00:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <55DB3BD3.7030202@arm.com> References: <1431698344-28054-1-git-send-email-a.ryabinin@samsung.com> <1431698344-28054-6-git-send-email-a.ryabinin@samsung.com> <55AE56DB.4040607@samsung.com> <20150824131557.GB7557@n2100.arm.linux.org.uk> <55DB3BD3.7030202@arm.com> Date: Mon, 24 Aug 2015 19:00:19 +0300 Message-ID: Subject: Re: [PATCH v2 5/5] arm64: add KASan support From: Andrey Ryabinin Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Vladimir Murzin Cc: Linus Walleij , Russell King - ARM Linux , Arnd Bergmann , "linux-mm@kvack.org" , Catalin Marinas , Will Deacon , "linux-kernel@vger.kernel.org" , David Keitel , Alexander Potapenko , "linux-arm-kernel@lists.infradead.org" , Andrew Morton , Dmitry Vyukov 2015-08-24 18:44 GMT+03:00 Vladimir Murzin : > > Another option would be having "sparse" shadow memory based on page > extension. I did play with that some time ago based on ideas from > original v1 KASan support for x86/arm - it is how 614be38 "irqchip: > gic-v3: Fix out of bounds access to cpu_logical_map" was caught. > It doesn't require any VA reservations, only some contiguous memory for > the page_ext itself, which serves as indirection level for the 0-order > shadow pages. We won't be able to use inline instrumentation (I could live with that), and most importantly, we won't be able to use stack instrumentation. GCC needs to know shadow address for inline and/or stack instrumentation to generate correct code. > In theory such design can be reused by others 32-bit arches and, I > think, nommu too. Additionally, the shadow pages might be movable with > help of driver-page migration patch series [1]. > The cost is obvious - performance drop, although I didn't bother > measuring it. > > [1] https://lwn.net/Articles/650917/ > > Cheers > Vladimir > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org