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

2019-08-30 Thread Daniel Axtens
Hi all, > +static int kasan_depopulate_vmalloc_pte(pte_t *ptep, unsigned long addr, > + void *unused) > +{ > + unsigned long page; > + > + page = (unsigned long)__va(pte_pfn(*ptep) << PAGE_SHIFT); > + > + spin_lock(_mm.page_table_lock); > + > +

[PATCH v5 1/5] kasan: support backing vmalloc space with real shadow memory

2019-08-29 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