Re: [PATCH] arm/kasan:fix the arry size of kasan_early_shadow_pte

2021-01-12 Thread Ard Biesheuvel
On Tue, 12 Jan 2021 at 07:19, Andrew Morton wrote: > > On Sun, 10 Jan 2021 13:03:49 +0100 Linus Walleij > wrote: > > > On Sun, Jan 10, 2021 at 11:21 AM hailong wrote: > > > > > >> +#ifndef PTE_HWTABLE_PTRS > > > >> +#define PTE_HWTABLE_PTRS 0 > > > >> +#endif > > > > > > > >Can this even

Re: [PATCH] arm/kasan:fix the arry size of kasan_early_shadow_pte

2021-01-11 Thread Andrew Morton
On Sun, 10 Jan 2021 13:03:49 +0100 Linus Walleij wrote: > On Sun, Jan 10, 2021 at 11:21 AM hailong wrote: > > > >> +#ifndef PTE_HWTABLE_PTRS > > >> +#define PTE_HWTABLE_PTRS 0 > > >> +#endif > > > > > >Can this even happen? We have either pgtable-2level.h or > > >pgtable-3level.h, both of

Re: Re: [PATCH] arm/kasan:fix the arry size of kasan_early_shadow_pte

2021-01-10 Thread Linus Walleij
On Sun, Jan 10, 2021 at 11:21 AM hailong wrote: > >> +#ifndef PTE_HWTABLE_PTRS > >> +#define PTE_HWTABLE_PTRS 0 > >> +#endif > > > >Can this even happen? We have either pgtable-2level.h or > >pgtable-3level.h, both of which define PTE_HWTABLE_PTRS. > > > > I guess not for arm. But I'm not sure

Re: [PATCH] arm/kasan:fix the arry size of kasan_early_shadow_pte

2021-01-09 Thread Linus Walleij
On Sat, Jan 9, 2021 at 5:51 AM Hailong liu wrote: > From: Hailong Liu > > The size of kasan_early_shadow_pte[] now is PTRS_PER_PTE which defined to > 512 for arm architecture. This means that it only covers the prev Linux pte > entries, but not the HWTABLE pte entries for arm. > > The reason it

Re: [PATCH] arm/kasan:fix the arry size of kasan_early_shadow_pte

2021-01-09 Thread Ard Biesheuvel
(+ Linus) On Sat, 9 Jan 2021 at 05:50, Hailong liu wrote: > > From: Hailong Liu > > The size of kasan_early_shadow_pte[] now is PTRS_PER_PTE which defined to > 512 for arm architecture. This means that it only covers the prev Linux pte > entries, but not the HWTABLE pte entries for arm. > > The