Skip to content

[PW_SID:1071108] riscv: misaligned: Restore epc in error path#1662

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1071108
Closed

[PW_SID:1071108] riscv: misaligned: Restore epc in error path#1662
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1071108

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1071108 applied to workflow__riscv__fixes

Name: riscv: misaligned: Restore epc in error path
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1071108
Version: 1

In handle_scalar_misaligned_{store, load}, regs->epc is temporarily set
to 0. While it is properly restored in the instruction decoding error
path, it is not restored in the subsequent error paths. This causes the
epc to be corrupted.

Fix this by restoring regs->epc in the unsupported fp and
copy_{from,to}_user error paths.

Fixes: 7c586a5 ("riscv: add floating point insn support to misaligned access emulation")
Fixes: 4413815 ("riscv: misaligned: remove CONFIG_RISCV_M_MODE specific code")
Signed-off-by: Zishun Yi <vulab@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: misaligned: Restore epc in error path"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 140.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1100.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1616.44 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.58 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.06 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.08 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: misaligned: Restore epc in error path"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1071108 branch March 31, 2026 00:06
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