Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>,
	Fuad Tabba <fuad.tabba@linux.dev>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 03/11] kselftest/arm64: Move exit calls out of fp-stress loads
Date: Wed, 30 Sep 2026 09:51:15 +0100	[thread overview]
Message-ID: <arzNg0jxDmbEMrJm@J2N7QTR9R3.cambridge.arm.com> (raw)
In-Reply-To: <arvm8O6kL1I9Plrw@J2N7QTR9R3.cambridge.arm.com>

On Tue, Sep 29, 2026 at 05:27:28PM +0100, Mark Rutland wrote:
> On Tue, Sep 01, 2026 at 06:06:43PM +0100, Mark Brown wrote:
> > When they detect corruption the fp-stress test loads print load specific
> > diagnostics and exits with a failure status.  In preparation for
> > building versions intended to run as KVM guests factor the exits into
> > asm-utils-linux.S.
> > 
> > No functional change.
> 
> This is a good cleanup, but I do think it'd be worth noting that some of
> the existing asm was wrong and worked by coincidence.
> 
> I did mention that in the patches I linked you to a while back:
> 
>   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=922d15ef46cb486a79f168949e103f6df26f4fba

Sorry, that was the wrong link; I meant to share:

  https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=2db277185f5c252decdf49b25cd461782e890cd1

... which was another patch from that cleanup series:

  https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/selftests/cleanup

The description of the problem from the commit message was:

| The barf functions in the fp-stress sub-tests erroneously place the
| status value into x1 (rather than x0) when invoking the exit syscall,
| potentially returning a different status than expected.
| 
| By coincidence, the low 8 bits of x0 happen to be non-zero for all of
| these cases, and the exit will be treated as a failure by the fp-stress
| harness, which is the desired behaviour. Hence this doesn't lead to
| failing tests being reported as passing.
| 
| In all cases x0 contains either:
| 
| * The result of the prior write syscall made by the puts macro, which is
|   a write of the two character string "]\n".
| 
| * The result of the prior write syscall made by the putdecn() function,
|   which is a write of the single-character '\n'.
| 
| In either case, the return value of that write syscall may be a non-zero
| number of bytes written, or a negative error code. As the relevant
| strings are fewer than 256 characters, and all (positive) error codes
| are less than 256, the value in the low 8 bits of x0 will not be zero.

Mark.


  parent reply	other threads:[~2026-09-30  8:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 17:06 [PATCH 00/11] kselftest/arm64: Add coverage of interactions with KVM to fp-stress Mark Brown
2026-09-01 17:06 ` [PATCH 01/11] kselftest/arm64: Factor Linux syscalls out of asm-utils.S Mark Brown
2026-09-29 16:01   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 02/11] kselftest/arm64: Factor shared signal handlers out of fp-stress loads Mark Brown
2026-09-29 16:07   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 03/11] kselftest/arm64: Move exit calls " Mark Brown
2026-09-29 16:22   ` Lorenzo Stoakes (ARM)
2026-09-29 21:56     ` Mark Brown
2026-09-30  8:41       ` Lorenzo Stoakes (ARM)
2026-09-29 16:27   ` Mark Rutland
2026-09-29 22:03     ` Mark Brown
2026-09-30  8:51     ` Mark Rutland [this message]
2026-09-01 17:06 ` [PATCH 04/11] kselftest/arm64: Use exit_error() rather than SIGABRT in fp-stress Mark Brown
2026-09-29 16:28   ` Mark Rutland
2026-09-29 16:31   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 05/11] kselftest/arm64: Exit with an error code on data mismatches " Mark Brown
2026-09-29 16:37   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 06/11] kselftest/arm64: Factor startup code out of fp-stress load programs Mark Brown
2026-09-30 12:39   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 07/11] kselftest/arm64: Remove the sched_yield()s from the fp-stress loads Mark Brown
2026-09-30 14:17   ` Lorenzo Stoakes (ARM)
2026-09-01 17:06 ` [PATCH 08/11] kselftest/arm64: Add a very simple VMM for use in fp-stress Mark Brown
2026-09-01 17:06 ` [PATCH 09/11] kselftest/arm64: Build KVM guest versions of the fp-stress loads Mark Brown
2026-09-01 17:06 ` [PATCH 10/11] kselftest/arm64: Use execv() to start fp-stress test loads Mark Brown
2026-09-01 17:06 ` [PATCH 11/11] kselftest/arm64: Run KVM guests from fp-stress Mark Brown

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=arzNg0jxDmbEMrJm@J2N7QTR9R3.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=fuad.tabba@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=shuah@kernel.org \
    --cc=will@kernel.org \
    /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