how can KAsan support arm32?

Andrey Ryabinin aryabinin at virtuozzo.com
Thu Jun 1 09:37:26 PDT 2017



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 <mark.r... at arm.com <javascript:>> 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,  <ifq... at gmail.com <javascript:>> 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 <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.



More information about the linux-arm-kernel mailing list