Commit dcd1c6a9 authored by Tong Tiangen's avatar Tong Tiangen Committed by Zheng Zengkai
Browse files

arm64: ras: copy_from_user scenario support uce kernel recovery

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4PM10


CVE: NA

--------------------------------

During kernel copy_from_user processing, the kernel triggers a RAS
exception when reading pages. In this solution, we identify this
scenario in the kernel do_sea processing process, send SIGBUS signals
to the process that triggers copy_from_user and isolate memory pages,
preventing kernel panic.

At the same time, we use cmdline(uce_kernel_recovery) or proc
(/proc/sys/kernel/uce_kernel_recovery) to control this feature on/off.

Usage:
1. Each bit controls whether this feature is turned on in a scene,
    1 means turned on and 0 means turned off.
2. Bit2 represents copy_from_user scene, other bits are currently
    reserved.

eg: make copy_from_user scene open this feature:
1. echo 4 > /proc/sys/kernel/uce_kernel_recovery.
or
2. uce_kernel_recovery=4 add to cmdline.

Signed-off-by: default avatarTong Tiangen <tongtiangen@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 2c36be94
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment