Re: [PATCH v9] mm,kfence: decouple kfence from page granularity mapping judgement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





>> +    /* Kfence pool needs page-level mapping */
>> +    if (early_kfence_pool) {
>> +            __map_memblock(pgdp, early_kfence_pool,
>> +                    early_kfence_pool + KFENCE_POOL_SIZE,
>> +                    pgprot_tagged(PAGE_KERNEL),
>> +                    NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS);
>> +            memblock_clear_nomap(early_kfence_pool, KFENCE_POOL_SIZE);
>> +            /* kfence_pool really mapped now */
>> +            kfence_set_pool(early_kfence_pool);
>> +    }
>
> Why not wrap this under CONFIG_KFENCE ? early_kfence_pool can also go in
> there?

Because I didn't want to add CONFIG_KFENCE in function.. in the case of
w/o CONFIG_KFENCE, early_kfence_pool should be always NULL.

Please no. If the code is not used in non-KFENCE build, it should not be compiled. Same holds for the variables that only exist in KFENCE builds.

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux