Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-15 Thread Mark Rutland
On Fri, Sep 15, 2017 at 05:20:59PM -0400, Pavel Tatashin wrote: > Hi Mark, > > I had this optionĀ  back upto version 3, where zero flag was passed into > vmemmap_alloc_block(), but I was asked to remove it, because it required too > many changes in other places. Ok. Sorry for bringing back a point

Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-15 Thread Pavel Tatashin
Hi Mark, I had this optionĀ  back upto version 3, where zero flag was passed into vmemmap_alloc_block(), but I was asked to remove it, because it required too many changes in other places. So, the current approach is cleaner, but the idea is that kasan should use its own version of vmemmap_pop

Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-15 Thread Mark Rutland
On Thu, Sep 14, 2017 at 09:30:28PM -0400, Pavel Tatashin wrote: > Hi Mark, > > Thank you for looking at this. We can't do this because page table is not > set until cpu_replace_ttbr1() is called. So, we can't do memset() on this > memory until then. I see. Sorry, I had missed that we were on the

Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-14 Thread Pavel Tatashin
Hi Mark, Thank you for looking at this. We can't do this because page table is not set until cpu_replace_ttbr1() is called. So, we can't do memset() on this memory until then. Pasha

Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-14 Thread Mark Rutland
On Thu, Sep 14, 2017 at 06:35:16PM -0400, Pavel Tatashin wrote: > To optimize the performance of struct page initialization, > vmemmap_populate() will no longer zero memory. > > We must explicitly zero the memory that is allocated by vmemmap_populate() > for kasan, as this memory does not go throu