Lines Matching refs:pgd
33 static inline bool kasan_p4d_table(pgd_t pgd) in kasan_p4d_table() argument
35 return pgd_page(pgd) == virt_to_page(lm_alias(kasan_early_shadow_p4d)); in kasan_p4d_table()
38 static inline bool kasan_p4d_table(pgd_t pgd) in kasan_p4d_table() argument
194 static int __ref zero_p4d_populate(pgd_t *pgd, unsigned long addr, in zero_p4d_populate() argument
197 p4d_t *p4d = p4d_offset(pgd, addr); in zero_p4d_populate()
247 pgd_t *pgd = pgd_offset_k(addr); in kasan_populate_early_shadow() local
266 pgd_populate(&init_mm, pgd, in kasan_populate_early_shadow()
268 p4d = p4d_offset(pgd, addr); in kasan_populate_early_shadow()
280 if (pgd_none(*pgd)) { in kasan_populate_early_shadow()
284 p = p4d_alloc(&init_mm, pgd, addr); in kasan_populate_early_shadow()
288 pgd_populate(&init_mm, pgd, in kasan_populate_early_shadow()
292 zero_p4d_populate(pgd, addr, next); in kasan_populate_early_shadow()
293 } while (pgd++, addr = next, addr != end); in kasan_populate_early_shadow()
343 static void kasan_free_p4d(p4d_t *p4d_start, pgd_t *pgd) in kasan_free_p4d() argument
354 p4d_free(&init_mm, (p4d_t *)page_to_virt(pgd_page(*pgd))); in kasan_free_p4d()
355 pgd_clear(pgd); in kasan_free_p4d()
462 pgd_t *pgd; in kasan_remove_zero_shadow() local
476 pgd = pgd_offset_k(addr); in kasan_remove_zero_shadow()
477 if (!pgd_present(*pgd)) in kasan_remove_zero_shadow()
480 if (kasan_p4d_table(*pgd)) { in kasan_remove_zero_shadow()
483 pgd_clear(pgd); in kasan_remove_zero_shadow()
488 p4d = p4d_offset(pgd, addr); in kasan_remove_zero_shadow()
490 kasan_free_p4d(p4d_offset(pgd, 0), pgd); in kasan_remove_zero_shadow()