Skip to content

[PW_SID:994273] [1/2] selftests: riscv: vector: add early ptrace test - #820

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw994273
Closed

[PW_SID:994273] [1/2] selftests: riscv: vector: add early ptrace test#820
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw994273

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 994273 applied to workflow__riscv__fixes

Name: [1/2] selftests: riscv: vector: add early ptrace test
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=994273
Version: 1

Add test that simulates early vector debug: attach to the process right
after enabling vector context and check csr_vlenb.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Currently, vlenb in vstate is set to zero on vector context allocation
and remains zero until the first context switch. This can expose an
inconsistent vlenb value to user-space in early vector debug scenarios,
e.g. when ptrace attaches to a tracee after the first vector instruction
but before the first context switch. Fix this by setting the correct
vlenb value during vector context allocation. Simple reproducer has been
added to selftests:
- tools/testing/selftests/riscv/vector/v_ptrace.c

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.35 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1021.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1320.50 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 20.83 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.09 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.13 seconds
Result: ERROR
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#48: 
new file mode 100644

ERROR: do not initialise globals to 0
#68: FILE: tools/testing/selftests/riscv/vector/v_ptrace.c:16:
+volatile unsigned long data = 0;

WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
#68: FILE: tools/testing/selftests/riscv/vector/v_ptrace.c:16:
+volatile unsigned long data = 0;

ERROR: do not initialise globals to 0
#69: FILE: tools/testing/selftests/riscv/vector/v_ptrace.c:17:
+volatile unsigned long lock = 0;

WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
#69: FILE: tools/testing/selftests/riscv/vector/v_ptrace.c:17:
+volatile unsigned long lock = 0;

total: 2 errors, 3 warnings, 0 checks, 102 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 154af5493879 ("selftests: riscv: vector: add early ptrace test") 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.
ERROR: do not initialise globals to 0
WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.42 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
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: "[1/2] selftests: riscv: vector: add early ptrace test"
kdoc
Desc: Detects for kdoc errors
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "[1/2] selftests: riscv: vector: add early ptrace test"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.40 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1116.08 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1569.62 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.16 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.12 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.68 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 75.32 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
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 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
kdoc
Desc: Detects for kdoc errors
Duration: 0.85 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: vector: init vlenb in vector context allocation"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot deleted the pw994273 branch August 29, 2025 01:02
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