From: Samuel Holland <samuel@sholland.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org, Samuel Holland <samuel@sholland.org>
Subject: [PATCH] powerpc: Select HAVE_FUTEX_CMPXCHG
Date: Fri, 18 Sep 2020 22:20:09 -0500 [thread overview]
Message-ID: <20200919032009.8346-1-samuel@sholland.org> (raw)
On powerpc, access_ok() succeeds for the NULL pointer. This breaks the
dynamic check in futex_detect_cmpxchg(), which expects -EFAULT. As a
result, robust futex operations are not functional on powerpc.
Since the architecture's futex_atomic_cmpxchg_inatomic() implementation
requires no runtime feature detection, we can select HAVE_FUTEX_CMPXCHG
to skip futex_detect_cmpxchg() and enable the use of robust futexes.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
arch/powerpc/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index ad620637cbd1..5ad1deb0c669 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -196,6 +196,7 @@ config PPC
select HAVE_FUNCTION_ERROR_INJECTION
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FUNCTION_TRACER
+ select HAVE_FUTEX_CMPXCHG
select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
select HAVE_IDE
--
2.26.2
next reply other threads:[~2020-09-19 3:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 3:20 Samuel Holland [this message]
2020-09-19 13:50 ` [PATCH] powerpc: Select HAVE_FUTEX_CMPXCHG David Laight
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=20200919032009.8346-1-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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