summaryrefslogtreecommitdiff
path: root/lib/asn1_encoder.c
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2024-09-24 10:32:20 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2024-09-24 10:32:20 +0300
commitf04de6d8f252ec6434b846895474cc205527b8b8 (patch)
treef76726f77633019258f0e53c9127d0a843da73e5 /lib/asn1_encoder.c
parente86935f705fa732d8c7c3ecf0c50ea461ffab76f (diff)
downloadlinux-f04de6d8f252ec6434b846895474cc205527b8b8.tar.xz
LoongArch: Add ARCH_HAS_SET_DIRECT_MAP support
Add set_direct_map_*() functions for setting the direct map alias for the page to its default permissions and to an invalid state that cannot be cached in a TLB. (See d253ca0c3 ("x86/mm/cpa: Add set_direct_map_*() functions")) Add a similar implementation for LoongArch. This fixes the KFENCE warnings during hibernation: ================================================================== BUG: KFENCE: invalid read in swsusp_save+0x368/0x4d8 Invalid read at 0x00000000f7b89a3c: swsusp_save+0x368/0x4d8 hibernation_snapshot+0x3f0/0x4e0 hibernate+0x20c/0x440 state_store+0x128/0x140 kernfs_fop_write_iter+0x160/0x260 vfs_write+0x2c0/0x520 ksys_write+0x74/0x160 do_syscall+0xb0/0x160 CPU: 0 UID: 0 PID: 812 Comm: bash Tainted: G B 6.11.0-rc1+ #1566 Tainted: [B]=BAD_PAGE Hardware name: Loongson-LS3A5000-7A1000-1w-CRB, BIOS vUDK2018-LoongArch-V2.0.0 10/21/2022 ================================================================== Note: We can only set permissions for KVRANGE/XKVRANGE kernel addresses. Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'lib/asn1_encoder.c')
0 files changed, 0 insertions, 0 deletions