[PATCH 9/9] ARM: Add KASan support

Sascha Hauer s.hauer at pengutronix.de
Wed Feb 10 04:26:05 EST 2021


On Tue, Feb 09, 2021 at 10:25:57AM +0100, Ahmad Fatoum wrote:
> Hello Sascha,
> 
> On 18.09.20 10:45, Sascha Hauer wrote:
> > This adds KASan support to the ARM architecture. What we are doing is:
> > 
> > * Add __no_sanitize_address attribute to various lowlevel functions
> >   which do not run in a proper C environment
> > * Add non-instrumented variants of memset/memcpy (prefixed with '__')
> > * make original memcpy/memset weak symbols so strong definitions in
> >   lib/kasan/common.c can replace them
> > * Use non-instrumented memcpy in early functions
> > * call kasan_init()
> > 
> > Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> > ---
> >  arch/arm/Kconfig              |  1 +
> >  arch/arm/cpu/Makefile         |  2 ++
> >  arch/arm/cpu/common.c         |  2 +-
> >  arch/arm/cpu/setupc.S         |  6 +++---
> 
> Shouldn't you've touched setupc_64.S here as well?

Likely, yes. How did you stumble upon this?

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list