Skip to content

[PW_SID:1100175] riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap#2006

Open
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1100175
Open

[PW_SID:1100175] riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap#2006
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1100175

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1100175 applied to workflow__riscv__fixes

Name: riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1100175
Version: 1

section_activate() creates new mappings in the vmemmap range without
flushing TLB, which may cause faults on some RISC-V implementations that
cache non-present PTEs and crashes.

This seems to be most easily reproduced with DEBUG_VM=y and
PAGE_POISONING=y, which causes these newly mapped struct pages to be
poisoned i.e. written to immediately after mapping.

Add a hook vmemmap_populate_finalize() in __populate_section_memmap(),
and implement it as calling mark_new_valid_map() on RISC-V, which
arranges for the exception handler to deal with these faults if they
happen.

Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.10 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 746.30 seconds
Result: ERROR
Output:

Redirect to /build/tmp.nqC3cDwBcy and /build/tmp.4f5dhW6wSn
Tree base:
c03cdce24d90e ("Adding CI files")
Building the whole tree with the patch
error:
/build/tmpp4r7sljm/arch/riscv/mm/init.c:1392:2: error: call to undeclared function 'mark_new_valid_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Warning: /build/tmpp4r7sljm/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c:245 struct __packed mtk_mfg_opp_entry { __le32 freq_khz; __le32 voltage_core; __le32 voltage_sram; __le32 posdiv; __le32 voltage_margin; __le32 power_mw; }; error: Cannot parse struct or union!



real	12m20.141s
user	478m53.850s
sys	93m48.094s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1025.95 seconds
Result: ERROR
Output:

Redirect to /build/tmp.D2Y5BvlAUm and /build/tmp.RTottYNNPW
Tree base:
c03cdce24d90e ("Adding CI files")
Building the whole tree with the patch
error:
/build/tmpp4r7sljm/arch/riscv/mm/init.c:1392:9: error: implicit declaration of function 'mark_new_valid_map' [-Wimplicit-function-declaration]
Warning: /build/tmpp4r7sljm/drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c:245 struct __packed mtk_mfg_opp_entry { __le32 freq_khz; __le32 voltage_core; __le32 voltage_sram; __le32 posdiv; __le32 voltage_margin; __le32 power_mw; }; error: Cannot parse struct or union!



real	16m59.371s
user	665m55.742s
sys	114m43.119s

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.95 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 75.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
kdoc
Desc: Detects for kdoc errors
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: mm: Call mark_new_valid_map() after hotplugging vmemmap"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.26 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants