mm/hwpoison: add migrate_page_mc_extra()
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8K5CO -------------------------------- During page migration, page is copied in kernel space. If the origin page has UCE, there will lead to kernel panic. In order to solve this problem, use machine check safe to catch this error which can be achieved by using copy_mc_to_kernel to replace copy_page. Signal SIGBUS will be send to user task if this UCE is consumed by this situation to avoid kernel panic. Add a new param to copy_huge_page to support mc. If mc is set copy_mc_higepage will be called rather than copy_hugepage during memory copy. Since migrate_page_move_mapping() is done before page copy, rollback is hard due to race condition. Do copy page at the start of function migrate_page_mc_extra() to solve this problem. Signed-off-by:Ma Wupeng <mawupeng1@huawei.com>
Loading
Please sign in to comment