On 08/11/2015 06:41 PM, Catalin Marinas wrote: > On Tue, Aug 11, 2015 at 05:18:15AM +0300, Andrey Ryabinin wrote: >> --- /dev/null >> +++ b/mm/kasan/kasan_init.c > [...] >> +#if CONFIG_PGTABLE_LEVELS > 3 >> +pud_t kasan_zero_pud[PTRS_PER_PUD] __page_aligned_bss; >> +#endif >> +#if CONFIG_PGTABLE_LEVELS > 2 >> +pmd_t kasan_zero_pmd[PTRS_PER_PMD] __page_aligned_bss; >> +#endif >> +pte_t kasan_zero_pte[PTRS_PER_PTE] __page_aligned_bss; > > Is there any problem if you don't add the #ifs here? Wouldn't the linker > remove them if they are not used? > AFAIK such optimization is possible if we build with -fdata-sections flag and use --gc-sections flag in linker, but we don't do this. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>