From mboxrd@z Thu Jan 1 00:00:00 1970 From: aryabinin@virtuozzo.com (Andrey Ryabinin) Date: Thu, 1 Jun 2017 19:37:26 +0300 Subject: how can KAsan support arm32? In-Reply-To: References: <20170601112424.GA8718@leverpostej> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 06/01/2017 06:12 PM, ??? wrote: > > ? 2017?6?1???? UTC+8??9:25:19?dvyukov??? > > On Thu, Jun 1, 2017 at 1:24 PM, Mark Rutland > wrote: > > Hi, > > > > Apologies for the delay in replying. > > > > On Tue, May 23, 2017 at 06:10:39AM +0200, Dmitry Vyukov wrote: > >> On Tue, May 23, 2017 at 5:48 AM, > wrote: > >> > hello everyone, > >> > > >> > I have a project use arm32 platform. Recently, lots of kernel memory > >> > corruption issues come out. > >> > I found KAsan might be useful, but can't run it on arm32. > >> > Is there any patch for arm32? I'm not familiar with memory debug, could > >> > someone give me a hint? > >> > >> Hello, > >> > >> There are no patches for arm32 as far as I know. > >> > >> Not sure if there is a 512MB free region for shadow, but we could use > >> the approach we used in the first kasan version: place shadow right in > >> physical memory, use outline instrumentation, outline instrumentation > >> does bounds check on address and accesses shadow only if address is > >> within physical memory. > > > > Would it be possible to raise this on the linux-arm-kernel mailing list? > > > > I think there are a few people interested in this, but most aren't > > watching thie kasan-dev mailing list. > > FTR, Andrey mentioned that he had a prototype arm32 support: > https://groups.google.com/d/msg/kasan-dev/JKYk2uUBriY/J6voOi7iAgAJ > > > my system only have 256MB memory, and only have 70MB free memory after boot up. Can this patch work on my board? > kasan needs at least 1/8 of the total memory, so it will be 32MB in your case. Plus some memory needed for slub redzones, increased stack size, but I can't tell you the exact number, so you'll have to try.