From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A61F3F54B0 for ; Wed, 8 Jul 2026 07:17:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783495041; cv=none; b=f1vhD2y0dp0xSrWh6kHh4iqPPKLtqAnkNBUtwf3cCclhRyITjBhe0ziF1SfIRY3rp3A1kqGy8ORHWDlujrkSP188hoU0D9PSZX0YOeyJ1YrebmHGmmtv91OUb24oDnJcNHVcl2ha0fxqOqf28XvngZ9pWBva14vUFfRLTPBGznw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783495041; c=relaxed/simple; bh=DUO1cS2kcjQKdTTdmG9ZK8SYKzHwNCmGjb8fhYTdsss=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=mhT4c25HJ/Yhw92BskW0/YyyZHkddBqH6Ya7RFVgqFoxjEfi4ySsRVQC0ffvCGvAAYnH7BFTRn91Am8Nx+u26zF6kJu1ZyWeCkavhOuozwXGXJUbbDnKiff8foAf0/YFp0tqN6rbxCR2KJlwUXO0TMEHmnkeEpWx2T6m9hgOkQg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iDnbou0R; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iDnbou0R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 645341F000E9; Wed, 8 Jul 2026 07:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783495015; bh=/dRpSm0Wfc3gb2hQ1lfBTFrclpun0KfQynpXPzaG5S8=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=iDnbou0Rj6/sk1duNwUGKMJ2pWe2fL1AKR0c7OGvlYweLhnQxbfSPk6/9q1QgdfLW bXxfB6wZh/dJqBsYiVsCSamd4C/efqZvymjgUHz/bPTz/LSl/IeO97IkJQBQgg5KGx dShWf6EHvFGZsDmLgw0932qKOsobhnMnLrmA1vQZLADmUoYR/uWxcRe+410dJkUV6l ZMzmy0Pn9Kpw0seMmnK829ZqEJ2PQkqkdn2ZwB98FD3eBN+lQjiFGJM/GIA2FBuX8h 5LKnepT5tW/ZN9NiqfoYuKDo+BgbdG3R7GZMoAPnqcPft+CJ8P4tYmRK9us3kA1u1b cKaUrdolYK4+g== Date: Wed, 8 Jul 2026 01:16:52 -0600 (MDT) From: Paul Walmsley To: Andrew Jones cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, pjw@kernel.org, palmer@dabbelt.com, Andy Chiu Subject: Re: [PATCH] selftests: riscv: Bypass libc in inactive vector ptrace test In-Reply-To: <20260707153827.175245-1-andrew.jones@oss.qualcomm.com> Message-ID: <7d7bcba8-7fe7-a7ed-c493-17f8c82dc37d@kernel.org> References: <20260707153827.175245-1-andrew.jones@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 > Assisted-by: Claude:claude-sonnet-4-6 > Signed-off-by: Andrew Jones Thanks, queued for v7.2-rc. - Paul