• Y
    mm: Add sysctl to clear free list pages · 62015863
    Yu Liao 提交于
    hulk inclusion
    category: feature
    bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S
    CVE: NA
    
    --------------------------------
    
    This patch add sysctl to clear pages in free lists of each NUMA node.
    For each NUMA node, clear each page in the free list, these work is
    scheduled on a random CPU of the NUMA node.
    
    When kasan is enabled and the pages are free, the shadow memory will be
    filled with 0xFF, writing these free pages will cause UAF, so just
    disable KASAN for clear freelist.
    
    In the case of large memory, the clear freelist will hold zone lock
    for a long time. As a result, the process may be blocked unless clear
    freelist thread exit, and causing the system to be reset by the watchdog.
    
    Provide a mechanism to stop clear freelist threads when elapsed time
    exceeds cfp_timeout, which can be set by module_param().
    Signed-off-by: NYu Liao <liaoyu15@huawei.com>
    Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
    62015863
Kconfig 31.3 KB