The patch titled Subject: mm/kasan/kasan_init.c: use kasan_zero_pud for p4d table has been added to the -mm tree. Its filename is mm-kasan-use-kasan_zero_pud-for-p4d-table.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-kasan-use-kasan_zero_pud-for-p4d-table.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-kasan-use-kasan_zero_pud-for-p4d-table.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Subject: mm/kasan/kasan_init.c: use kasan_zero_pud for p4d table There is missing optimization in zero_p4d_populate() that can save some memory when mapping zero shadow. Implement it like as others. Link: http://lkml.kernel.org/r/1494829255-23946-1-git-send-email-iamjoonsoo.kim@xxxxxxx Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Acked-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Cc: "Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/kasan/kasan_init.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff -puN mm/kasan/kasan_init.c~mm-kasan-use-kasan_zero_pud-for-p4d-table mm/kasan/kasan_init.c --- a/mm/kasan/kasan_init.c~mm-kasan-use-kasan_zero_pud-for-p4d-table +++ a/mm/kasan/kasan_init.c @@ -118,6 +118,18 @@ static void __init zero_p4d_populate(pgd do { next = p4d_addr_end(addr, end); + if (IS_ALIGNED(addr, P4D_SIZE) && end - addr >= P4D_SIZE) { + pud_t *pud; + pmd_t *pmd; + + p4d_populate(&init_mm, p4d, lm_alias(kasan_zero_pud)); + pud = pud_offset(p4d, addr); + pud_populate(&init_mm, pud, lm_alias(kasan_zero_pmd)); + pmd = pmd_offset(pud, addr); + pmd_populate_kernel(&init_mm, pmd, + lm_alias(kasan_zero_pte)); + continue; + } if (p4d_none(*p4d)) { p4d_populate(&init_mm, p4d, _ Patches currently in -mm which might be from iamjoonsoo.kim@xxxxxxx are zram-introduce-zram_entry-to-prepare-dedup-functionality.patch zram-implement-deduplication-in-zram.patch zram-make-deduplication-feature-optional.patch zram-compare-all-the-entries-with-same-checksum-for-deduplication.patch mm-kasan-use-kasan_zero_pud-for-p4d-table.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html