• T
    arm64: add cow to machine check safe · b32f46c2
    Tong Tiangen 提交于
    hulk inclusion
    category: feature
    bugzilla: https://gitee.com/openeuler/kernel/issues/I5GB28
    CVE: NA
    
    -------------------------------
    
    In the cow(copy on write) processing, the data of the user process is
    copied, when hardware memory error is encountered during copy, only the
    relevant processes are affected, so killing the user process and isolate
    the user page with hardware memory errors is a more reasonable choice than
    kernel panic.
    
    Add new helper copy_page_mc() which provide a page copy implementation with
    machine check safe. At present, only used in cow. In future, we can expand
    more scenes. As long as the consequences of page copy failure are not
    fatal(eg: only affect user process), we can use this helper.
    
    The copy_page_mc() in copy_page_mc.S is largely borrows from copy_page()
    in copy_page.S and the main difference is copy_page_mc() add extable entry
    to every load/store insn to support machine check safe. largely to keep the
    patch simple. If needed those optimizations can be folded in.
    Signed-off-by: NTong Tiangen <tongtiangen@huawei.com>
    b32f46c2
page.h 1.6 KB