Re: [PATCH v3 1/3] kasan: support backing vmalloc space with real shadow memory

2019-08-11 Thread Daniel Axtens
Mark Rutland writes: > On Thu, Aug 08, 2019 at 06:43:25PM +0100, Mark Rutland wrote: >> On Thu, Aug 08, 2019 at 02:50:37PM +0100, Mark Rutland wrote: >> > Hi Daniel, >> > >> > This is looking really good! >> > >> > I spotted a few more things we need to deal with, so I've suggested some >> > (n

Re: [PATCH v3 1/3] kasan: support backing vmalloc space with real shadow memory

2019-08-09 Thread Mark Rutland
On Thu, Aug 08, 2019 at 02:50:37PM +0100, Mark Rutland wrote: > From looking at this for a while, there are a few more things we should > sort out: > * We can use the split pmd locks (used by both x86 and arm64) to > minimize contention on the init_mm ptl. As apply_to_page_range() > doesn't p

Re: [PATCH v3 1/3] kasan: support backing vmalloc space with real shadow memory

2019-08-09 Thread Vasily Gorbik
On Wed, Jul 31, 2019 at 05:15:48PM +1000, Daniel Axtens wrote: > Hook into vmalloc and vmap, and dynamically allocate real shadow > memory to back the mappings. > > Most mappings in vmalloc space are small, requiring less than a full > page of shadow space. Allocating a full shadow page per mappin

Re: [PATCH v3 1/3] kasan: support backing vmalloc space with real shadow memory

2019-08-09 Thread Mark Rutland
On Thu, Aug 08, 2019 at 06:43:25PM +0100, Mark Rutland wrote: > On Thu, Aug 08, 2019 at 02:50:37PM +0100, Mark Rutland wrote: > > Hi Daniel, > > > > This is looking really good! > > > > I spotted a few more things we need to deal with, so I've suggested some > > (not even compile-tested) code for

Re: [PATCH v3 1/3] kasan: support backing vmalloc space with real shadow memory

2019-08-08 Thread Mark Rutland
On Thu, Aug 08, 2019 at 02:50:37PM +0100, Mark Rutland wrote: > Hi Daniel, > > This is looking really good! > > I spotted a few more things we need to deal with, so I've suggested some > (not even compile-tested) code for that below. Mostly that's just error > handling, and using helpers to avoid

Re: [PATCH v3 1/3] kasan: support backing vmalloc space with real shadow memory

2019-08-08 Thread Mark Rutland
Hi Daniel, This is looking really good! I spotted a few more things we need to deal with, so I've suggested some (not even compile-tested) code for that below. Mostly that's just error handling, and using helpers to avoid things getting too verbose. On Wed, Jul 31, 2019 at 05:15:48PM +1000, Dani

[PATCH v3 1/3] kasan: support backing vmalloc space with real shadow memory

2019-07-31 Thread Daniel Axtens
Hook into vmalloc and vmap, and dynamically allocate real shadow memory to back the mappings. Most mappings in vmalloc space are small, requiring less than a full page of shadow space. Allocating a full shadow page per mapping would therefore be wasteful. Furthermore, to ensure that different mapp