Skip to content

[PW_SID:1102439] [[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state#2029

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

[PW_SID:1102439] [[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state#2029
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1102439

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1102439 applied to workflow__riscv__fixes

Name: [[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1102439
Version: 1

…state

The last patch introduced the INITIAL vector state to avoid saving and
restoring vector registers across syscall boundaries. However, this
optimization did not fully account for the ptrace and signal handling
interfaces.

As a result, two issues emerged:
1. Ptrace reads at syscall stop could observe stale, non-nulled
   registers.
2. Modifications to the ucontext through signal interface during a
   syscall stop would be overwritten by the vector discaring macro.

This patch introduces riscv_v_ucontext_save() to synchronize these
paths with the INITIAL state:

- Ptrace reads during a syscall stop now explicitly execute the hardware
  discard macro and return the discarded state to prevent data leaks.
- Ptrace writes (PTRACE_SETREGSET) during a syscall stop are silently
  dropped (returning 0). Returning an error like EINVAL would break
  debbugers like GDB, which disables the optional regset on receiving
  such error.
- Signal handling (rt_sigreturn) now honor user-space modifications to
  the vector context (for user-space thread schedulers).

CC: Sergey Matyukevich <geomatsi@gmail.com>
CC: gdb@sourceware.org
Signed-off-by: Andy Chiu <tchiu@tenstorrent.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1155.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1711.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.56 seconds
Result: WARNING
Output:

WARNING: Argument 'tsk' is not used in function-like macro
#57: FILE: arch/riscv/include/asm/vector.h:430:
+#define riscv_v_ucontext_save(tsk)		do {} while (0)

total: 0 errors, 1 warnings, 0 checks, 113 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit b6df5b37e6b2 ("v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 113 lines checked
WARNING: Argument 'tsk' is not used in function-like macro


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 87.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
module-param
Desc: Detect module_param changes
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[[PATCH] v4 3/4] riscv: vector: adjust ptrace and signal behavior for INITIAL state"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 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