Re: [PATCH v5 2/2] riscv: selftests: Add a ptrace test to verify a0 and orig_a0 access

2025-01-15 Thread Celeste Liu
On 2025-01-15 17:56, Andrew Jones wrote: > On Wed, Jan 15, 2025 at 05:41:57PM +0800, Celeste Liu wrote: >> On 2025-01-15 17:14, Andrew Jones wrote: >>> On Wed, Jan 15, 2025 at 04:24:59AM +0800, Celeste Liu wrote: > ... >>>> +#ifndef sizeof_field >>>&g

[PATCH v6 3/3] riscv: selftests: Add a ptrace test to verify a0 and orig_a0 access

2025-01-15 Thread Celeste Liu
This test checks that orig_a0 and a0 can be modified and accessed independently. Co-developed-by: Quan Zhou Signed-off-by: Quan Zhou Co-developed-by: Charlie Jenkins Signed-off-by: Charlie Jenkins Reviewed-by: Björn Töpel Signed-off-by: Celeste Liu --- tools/testing/selftests/riscv/abi

[PATCH v6 2/3] tools: copy include/linux/stddef.h to tools/include

2025-01-15 Thread Celeste Liu
Some macro defined in stddef.h are useful and have been used in many code in selftests. Copy them to tools/include so developers needn't create their copy in every files. Remove some definitions like NULL and true/false to be suitable to non-kernel environment. Signed-off-by: Celest

[PATCH v6 1/3] riscv/ptrace: add new regset to access original a0 register

2025-01-15 Thread Celeste Liu
ISC-V: User-facing API") Link: https://lore.kernel.org/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Cc: sta...@vger.kernel.org Reviewed-by: Björn Töpel Signed-off-by: Celeste Liu --- arch/riscv/kernel/ptrace.c | 32 include/uapi/linux/elf.h | 1

[PATCH v6 0/3] riscv/ptrace: add new regset to access original a0 register

2025-01-15 Thread Celeste Liu
/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Signed-off-by: Celeste Liu --- Changes in v6: - Fix obsolute comment. - Copy include/linux/stddef.h to tools/include to use offsetofend in selftests. - Link to v5: https://lore.kernel.org/r/20250115-riscv-new-regset-v5-0-d0e6ec031

Re: [PATCH v5 2/2] riscv: selftests: Add a ptrace test to verify a0 and orig_a0 access

2025-01-15 Thread Celeste Liu
On 2025-01-15 17:14, Andrew Jones wrote: > On Wed, Jan 15, 2025 at 04:24:59AM +0800, Celeste Liu wrote: >> This test checks that orig_a0 and a0 can be modified and accessed >> independently. >> >> Co-developed-by: Quan Zhou >> Signed-off-by: Quan Zhou &g

Re: [PATCH v4 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2025-01-14 Thread Celeste Liu
On 2025-01-10 11:34, Charlie Jenkins wrote: > On Thu, Dec 26, 2024 at 11:21:59PM +0800, Celeste Liu wrote: >> >> On 2024-12-26 21:35, Dmitry V. Levin wrote: >>> On Thu, Dec 26, 2024 at 06:52:52PM +0800, Celeste Liu wrote: >>>> This test checks that orig_a0 allo

[PATCH v5 2/2] riscv: selftests: Add a ptrace test to verify a0 and orig_a0 access

2025-01-14 Thread Celeste Liu
This test checks that orig_a0 and a0 can be modified and accessed independently. Co-developed-by: Quan Zhou Signed-off-by: Quan Zhou Co-developed-by: Charlie Jenkins Signed-off-by: Charlie Jenkins Reviewed-by: Björn Töpel Signed-off-by: Celeste Liu --- tools/testing/selftests/riscv/abi

[PATCH v5 1/2] riscv/ptrace: add new regset to access original a0 register

2025-01-14 Thread Celeste Liu
ISC-V: User-facing API") Link: https://lore.kernel.org/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Cc: sta...@vger.kernel.org Reviewed-by: Björn Töpel Signed-off-by: Celeste Liu --- arch/riscv/kernel/ptrace.c | 32 include/uapi/linux/elf.h | 1

[PATCH v5 0/2] riscv/ptrace: add new regset to access original a0 register

2025-01-14 Thread Celeste Liu
/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Signed-off-by: Celeste Liu --- Changes in v5: - Fix wrong usage in selftests. - Link to v4: https://lore.kernel.org/r/20241226-riscv-new-regset-v4-0-4496a29d0...@coelacanthus.name Changes in v4: - Fix a copy paste error in selftest. (Forget to

Re: [PATCH v4 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2025-01-12 Thread Celeste Liu
On 2025-01-10 11:34, Charlie Jenkins wrote: > On Thu, Dec 26, 2024 at 11:21:59PM +0800, Celeste Liu wrote: >> >> On 2024-12-26 21:35, Dmitry V. Levin wrote: >>> On Thu, Dec 26, 2024 at 06:52:52PM +0800, Celeste Liu wrote: >>>> This test checks that orig_a0 allo

Re: [PATCH v4 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-26 Thread Celeste Liu
On 2024-12-26 21:35, Dmitry V. Levin wrote: > On Thu, Dec 26, 2024 at 06:52:52PM +0800, Celeste Liu wrote: >> This test checks that orig_a0 allows a syscall argument to be modified, >> and that changing a0 does not change the syscall argument. >> >> Co-developed-by:

Re: [PATCH v2 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-26 Thread Celeste Liu
On 2024-12-20 05:36, Charlie Jenkins wrote: > On Fri, Dec 20, 2024 at 05:29:45AM +0800, Celeste Liu wrote: >> >> On 2024-12-20 02:26, Charlie Jenkins wrote: >>> On Tue, Dec 03, 2024 at 01:55:07PM +0100, Andrew Jones wrote: >>>> On Tue, Dec 03, 2024 at

[PATCH v4 0/2] riscv/ptrace: add new regset to access original a0 register

2024-12-26 Thread Celeste Liu
/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Signed-off-by: Celeste Liu --- Changes in v4: - Fix a copy paste error in selftest. (Forget to commit...) - Link to v3: https://lore.kernel.org/r/20241226-riscv-new-regset-v3-0-f5b964658...@coelacanthus.name Changes in v3: - Use return 0

Re: [PATCH v3 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-26 Thread Celeste Liu
On 2024-12-26 18:45, Celeste Liu wrote: > This test checks that orig_a0 allows a syscall argument to be modified, > and that changing a0 does not change the syscall argument. > > Co-developed-by: Quan Zhou > Signed-off-by: Quan Zhou > Co-developed-by: Charlie Jenkins > S

[PATCH v3 0/2] riscv/ptrace: add new regset to access original a0 register

2024-12-26 Thread Celeste Liu
/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Signed-off-by: Celeste Liu --- Changes in v3: - Use return 0 directly for readability. - Fix test for modify a0. - Add Fixes: tag - Remove useless Cc: stable. - Selftest will check both a0 and orig_a0, but depends on the correctness of

[PATCH v4 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-26 Thread Celeste Liu
: Celeste Liu --- tools/testing/selftests/riscv/abi/.gitignore | 1 + tools/testing/selftests/riscv/abi/Makefile | 5 +- tools/testing/selftests/riscv/abi/ptrace.c | 151 +++ 3 files changed, 156 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/riscv/abi

[PATCH v4 1/2] riscv/ptrace: add new regset to access original a0 register

2024-12-26 Thread Celeste Liu
ISC-V: User-facing API") Link: https://lore.kernel.org/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Cc: sta...@vger.kernel.org Reviewed-by: Björn Töpel Signed-off-by: Celeste Liu --- arch/riscv/kernel/ptrace.c | 32 include/uapi/linux/elf.h | 1

[PATCH v3 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-26 Thread Celeste Liu
: Celeste Liu --- tools/testing/selftests/riscv/abi/.gitignore | 1 + tools/testing/selftests/riscv/abi/Makefile | 5 +- tools/testing/selftests/riscv/abi/ptrace.c | 151 +++ 3 files changed, 156 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/riscv/abi

[PATCH v3 1/2] riscv/ptrace: add new regset to access original a0 register

2024-12-26 Thread Celeste Liu
ISC-V: User-facing API") Link: https://lore.kernel.org/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Cc: sta...@vger.kernel.org Reviewed-by: Björn Töpel Signed-off-by: Celeste Liu --- arch/riscv/kernel/ptrace.c | 32 include/uapi/linux/elf.h | 1

Re: [PATCH v2 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-19 Thread Celeste Liu
On 2024-12-20 02:26, Charlie Jenkins wrote: > On Tue, Dec 03, 2024 at 01:55:07PM +0100, Andrew Jones wrote: >> On Tue, Dec 03, 2024 at 05:30:05PM +0800, Celeste Liu wrote: >>> From: Charlie Jenkins >>> >>> This test checks that orig_a0 allows a syscall a

[PATCH v2 0/2] riscv/ptrace: add new regset to access original a0 register

2024-12-03 Thread Celeste Liu
/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Signed-off-by: Celeste Liu --- Changes in v2: - Fix integer width. - Add selftest. - Link to v1: https://lore.kernel.org/r/20241201-riscv-new-regset-v1-1-c83c58abc...@coelacanthus.name --- Celeste Liu (1): riscv/ptrace: add new regset to

[PATCH v2 2/2] riscv: selftests: Add a ptrace test to verify syscall parameter modification

2024-12-03 Thread Celeste Liu
From: Charlie Jenkins This test checks that orig_a0 allows a syscall argument to be modified, and that changing a0 does not change the syscall argument. Cc: sta...@vger.kernel.org Co-developed-by: Quan Zhou Signed-off-by: Quan Zhou Co-developed-by: Celeste Liu Signed-off-by: Celeste Liu

[PATCH v2 1/2] riscv/ptrace: add new regset to access original a0 register

2024-12-03 Thread Celeste Liu
/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/ Cc: sta...@vger.kernel.org Signed-off-by: Celeste Liu --- arch/riscv/kernel/ptrace.c | 32 include/uapi/linux/elf.h | 1 + 2 files changed, 33 insertions(+) diff --git a/arch/riscv/kernel/ptrace.c b/arch