Re: [PATCH v3 5/6] Initialize the mapping of KASan shadow memory

2018-04-02 Thread Nicolas Pitre
On Mon, 2 Apr 2018, Russell King - ARM Linux wrote: > On Mon, Apr 02, 2018 at 02:08:13PM -0400, Nicolas Pitre wrote: > > On Mon, 2 Apr 2018, Abbott Liu wrote: > > > > > index c79b829..20161e2 100644 > > > --- a/arch/arm/kernel/head-common.S > > > +++ b/arch/arm/kernel/head-common.S > > > @@

Re: [PATCH v3 5/6] Initialize the mapping of KASan shadow memory

2018-04-02 Thread Russell King - ARM Linux
On Mon, Apr 02, 2018 at 02:08:13PM -0400, Nicolas Pitre wrote: > On Mon, 2 Apr 2018, Abbott Liu wrote: > > > index c79b829..20161e2 100644 > > --- a/arch/arm/kernel/head-common.S > > +++ b/arch/arm/kernel/head-common.S > > @@ -115,6 +115,9 @@ __mmap_switched: > > str r8, [r2]

Re: [PATCH v3 5/6] Initialize the mapping of KASan shadow memory

2018-04-02 Thread Nicolas Pitre
On Mon, 2 Apr 2018, Abbott Liu wrote: > index c79b829..20161e2 100644 > --- a/arch/arm/kernel/head-common.S > +++ b/arch/arm/kernel/head-common.S > @@ -115,6 +115,9 @@ __mmap_switched: > str r8, [r2]@ Save atags pointer > cmp r3, #0 > strne r10,

[PATCH v3 5/6] Initialize the mapping of KASan shadow memory

2018-04-02 Thread Abbott Liu
From: Andrey Ryabinin This patch initializes KASan shadow region's page table and memory. There are two stage for KASan initializing: 1. At early boot stage the whole shadow region is mapped to just one physical page (kasan_zero_page). It's finished by the function

[PATCH v3 2/6] Disable instrumentation for some code

2018-04-02 Thread Abbott Liu
From: Andrey Ryabinin Disable instrumentation for arch/arm/boot/compressed/* ,arch/arm/kvm/hyp/* and arch/arm/vdso/* because those code won't linkd with kernel image. Disable kasan check in the function unwind_pop_register because it doesn't matter that kasan checks

[PATCH v3 6/6] Enable KASan for arm

2018-04-02 Thread Abbott Liu
From: Andrey Ryabinin This patch enable kernel address sanitizer for arm. Cc: Andrey Ryabinin Acked-by: Dmitry Vyukov Tested-by: Joel Stanley Tested-by: Florian Fainelli Tested-by:

[PATCH v3 0/6] KASan for arm

2018-04-02 Thread Abbott Liu
From: Andrey Ryabinin Changelog: v3 - v2 - Remove this patch: 2 1-byte checks more safer for memory_is_poisoned_16 because a unaligned load/store of 16 bytes is rare on arm, and this patch is very likely to affect the performance of modern CPUs. ---Acked by: Russell