Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Description of problem: Version-Release number of selected component (if applicable): How reproducible: 编译RISCV架构内核,配置CONFIG_KASAN=y后编译失败 Actual results: make ARCH=riscv CROSS_COMPILE=~/toolchain/riscv64_gcc14.1/install/bin/riscv64-unknown-linux-gnu- O=./build/ -j120 make[1]: 进入目录“/home/zam/cloud-kernel/build” GEN Makefile CC arch/riscv/kernel/asm-offsets.s In file included from ../include/linux/sched/task_stack.h:11, from ../arch/riscv/include/asm/compat.h:12, from ../arch/riscv/include/asm/pgtable.h:119, from ../include/linux/pgtable.h:6, from ../include/linux/mm.h:29, from ../arch/riscv/kernel/asm-offsets.c:8: ../include/linux/kasan.h:53:37: error: 'MAX_PTRS_PER_PTE' undeclared here (not in a function); did you mean 'PTRS_PER_PTE'? 53 | extern pte_t kasan_early_shadow_pte[MAX_PTRS_PER_PTE + PTE_HWTABLE_PTRS]; | ^~~~~~~~~~~~~~~~ | PTRS_PER_PTE ../include/linux/kasan.h:54:8: error: unknown type name 'pmd_t'; did you mean 'pgd_t'? 54 | extern pmd_t kasan_early_shadow_pmd[MAX_PTRS_PER_PMD]; | ^~~~~ | pgd_t ../include/linux/kasan.h:54:37: error: 'MAX_PTRS_PER_PMD' undeclared here (not in a function); did you mean 'PTRS_PER_PGD'? 54 | extern pmd_t kasan_early_shadow_pmd[MAX_PTRS_PER_PMD]; | ^~~~~~~~~~~~~~~~ | PTRS_PER_PGD ../include/linux/kasan.h:55:8: error: unknown type name 'pud_t'; did you mean 'pgd_t'? 55 | extern pud_t kasan_early_shadow_pud[MAX_PTRS_PER_PUD]; | ^~~~~ | pgd_t ../include/linux/kasan.h:55:37: error: 'MAX_PTRS_PER_PUD' undeclared here (not in a function); did you mean 'PTRS_PER_PGD'? 55 | extern pud_t kasan_early_shadow_pud[MAX_PTRS_PER_PUD]; | ^~~~~~~~~~~~~~~~ | PTRS_PER_PGD ../include/linux/kasan.h:56:8: error: unknown type name 'p4d_t'; did you mean 'pgd_t'? 56 | extern p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D]; | ^~~~~ | pgd_t ../include/linux/kasan.h:56:37: error: 'MAX_PTRS_PER_P4D' undeclared here (not in a function); did you mean 'PTRS_PER_PGD'? 56 | extern p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D]; | ^~~~~~~~~~~~~~~~ | PTRS_PER_PGD make[3]: *** [../scripts/Makefile.build:116:arch/riscv/kernel/asm-offsets.s] 错误 1 make[2]: *** [/home/zam/cloud-kernel/Makefile:1209:prepare0] 错误 2 make[1]: *** [/home/zam/cloud-kernel/Makefile:234:__sub-make] 错误 2 make[1]: 离开目录“/home/zam/cloud-kernel/build” make: *** [Makefile:234:__sub-make] 错误 2 Expected results: Additional info:
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/5361