From: "André Almeida" <andrealmeid@igalia.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
linux-kernel@vger.kernel.org
Cc: Darren Hart <dvhart@infradead.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Valentin Schneider <vschneid@redhat.com>,
Borislav Petkov <bp@alien8.de>, Waiman Long <longman@redhat.com>,
kernel-dev@igalia.com
Subject: Re: [PATCH 2/5] selftests/futex: Fix some futex_numa_mpol subtests
Date: Wed, 27 Aug 2025 12:40:26 -0300 [thread overview]
Message-ID: <1e3d6a6c-7c99-417b-bc5f-3ab509b1a2f6@igalia.com> (raw)
In-Reply-To: <20250827130011.677600-3-bigeasy@linutronix.de>
Em 27/08/2025 10:00, Sebastian Andrzej Siewior escreveu:
> From: Waiman Long <longman@redhat.com>
>
> The "Memory out of range" subtest of futex_numa_mpol assumes that memory
> access outside of the mmap'ed area is invalid. That may not be the case
> depending on the actual memory layout of the test application. When
> that subtest was run on an x86-64 system with latest upstream kernel,
> the test passed as an error was returned from futex_wake(). On another
> powerpc system, the same subtest failed because futex_wake() returned 0.
>
> Bail out! futex2_wake(64, 0x86) should fail, but didn't
>
> Looking further into the passed subtest on x86-64, it was found that an
> -EINVAL was returned instead of -EFAULT. The -EINVAL error was returned
> because the node value test with FLAGS_NUMA set failed with a node value
> of 0x7f7f. IOW, the futex memory was accessible and futex_wake() failed
> because the supposed node number wasn't valid. If that memory location
> happens to have a very small value (e.g. 0), the test will pass and no
> error will be returned.
>
> Since this subtest is non-deterministic, it is dropped unless we
> explicitly set a guard page beyond the mmap region.
>
> The other problematic test is the "Memory too small" test. The
> futex_wake() function returns the -EINVAL error code because the given
> futex address isn't 8-byte aligned, not because only 4 of the 8 bytes
> are valid and the other 4 bytes are not. So proper name of this subtest
> is changed to "Mis-aligned futex" to reflect the reality.
>
As we discussed in the original patch thread[1], I have a proposal for
this test case to be refactored instead of being removed. I will send a
patch for this in a bit.
[1]
https://lore.kernel.org/all/336a1a43-54ac-4f53-b3a8-5e46f6d45359@igalia.com/
next prev parent reply other threads:[~2025-08-27 15:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 13:00 [PATCH 0/5] selftests/futex: Collected fixups Sebastian Andrzej Siewior
2025-08-27 13:00 ` [PATCH 1/5] selftests/futex: Remove the -g parameter from futex_priv_hash Sebastian Andrzej Siewior
2025-08-27 15:38 ` André Almeida
2025-09-01 14:28 ` [tip: locking/futex] " tip-bot2 for Sebastian Andrzej Siewior
2025-08-27 13:00 ` [PATCH 2/5] selftests/futex: Fix some futex_numa_mpol subtests Sebastian Andrzej Siewior
2025-08-27 15:40 ` André Almeida [this message]
2025-08-29 6:27 ` Sebastian Andrzej Siewior
2025-09-01 14:28 ` [tip: locking/futex] " tip-bot2 for Waiman Long
2025-08-27 13:00 ` [PATCH 3/5] selftests/futex: fix format-security warnings in futex_priv_hash Sebastian Andrzej Siewior
2025-09-01 14:28 ` [tip: locking/futex] selftests/futex: Fix " tip-bot2 for Nai-Chen Cheng
2025-08-27 13:00 ` [PATCH 4/5] selftests/futex: fix typos and grammar " Sebastian Andrzej Siewior
2025-08-27 15:49 ` André Almeida
2025-09-01 14:28 ` [tip: locking/futex] selftests/futex: Fix " tip-bot2 for Gopi Krishna Menon
2025-08-27 13:00 ` [PATCH 5/5] selftests/futex: fix futex_wait() for 32bit ARM Sebastian Andrzej Siewior
2025-08-27 15:50 ` André Almeida
2025-09-01 14:28 ` [tip: locking/futex] selftests/futex: Fix " tip-bot2 for Dan Carpenter
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=1e3d6a6c-7c99-417b-bc5f-3ab509b1a2f6@igalia.com \
--to=andrealmeid@igalia.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=juri.lelli@redhat.com \
--cc=kernel-dev@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vschneid@redhat.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;
as well as URLs for NNTP newsgroup(s).