From: Paul Walmsley <pjw@kernel.org>
To: Andrew Jones <andrew.jones@oss.qualcomm.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
pjw@kernel.org, palmer@dabbelt.com,
Andy Chiu <tchiu@tenstorrent.com>
Subject: Re: [PATCH] selftests: riscv: Bypass libc in inactive vector ptrace test
Date: Wed, 8 Jul 2026 01:16:52 -0600 (MDT) [thread overview]
Message-ID: <7d7bcba8-7fe7-a7ed-c493-17f8c82dc37d@kernel.org> (raw)
In-Reply-To: <20260707153827.175245-1-andrew.jones@oss.qualcomm.com>
On Tue, 7 Jul 2026, Andrew Jones wrote:
> The ptrace_v_not_enabled test expects the child to reach its ebreak
> before it has used the vector extension. That is not guaranteed when
> using fork(), because libc may run child atfork handlers before
> returning to the test code. In those cases PTRACE_GETREGSET for
> NT_RISCV_VECTOR then succeeds instead of returning ENODATA for
> inactive vector state.
>
> Use the raw clone syscall with SIGCHLD to keep fork-like semantics
> while bypassing libc's fork wrapper and atfork handler chain.
>
> Cc: Andy Chiu <tchiu@tenstorrent.com>
> Assisted-by: Claude:claude-sonnet-4-6
> Signed-off-by: Andrew Jones <andrew.jones@oss.qualcomm.com>
Thanks, queued for v7.2-rc.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-07-08 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 15:38 [PATCH] selftests: riscv: Bypass libc in inactive vector ptrace test Andrew Jones
2026-07-08 7:16 ` Paul Walmsley [this message]
2026-07-08 7:30 ` patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d7bcba8-7fe7-a7ed-c493-17f8c82dc37d@kernel.org \
--to=pjw@kernel.org \
--cc=andrew.jones@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=tchiu@tenstorrent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox