From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 0/4] ARM: mmu: ensure PTE is written at once
Date: Wed, 21 May 2025 19:41:00 +0200 [thread overview]
Message-ID: <20250521174104.1570239-1-a.fatoum@pengutronix.de> (raw)
Writing the PTE with a normal non-volatile access is a bad idea, because
speculation may already use a partially written entry.
Use WRITE_ONCE to turn this into a volatile write via a new set_pte
helper. The extra helper is useful for type enforcement and for future
extension when we start to consistently apply break-before-make[1].
Ahmad Fatoum (4):
arch: sync READ_ONCE/WRITE_ONCE with Linux
ARM64: mmu: document granule size calculation
ARM: mmu: ensure PTE is written at once
WIP: break before make and don't invalidate uncached regions being
remapped
Documentation/devel/porting.rst | 2 +
arch/arm/cpu/mmu_32.c | 247 +++++++++++++++++++++++-----
arch/arm/cpu/mmu_64.c | 38 ++++-
arch/arm/include/asm/barrier.h | 8 +
arch/kvx/include/asm/barrier.h | 2 +
arch/mips/include/asm/barrier.h | 8 +
arch/openrisc/include/asm/barrier.h | 8 +
arch/powerpc/include/asm/barrier.h | 8 +
arch/sandbox/include/asm/barrier.h | 8 +
arch/x86/include/asm/barrier.h | 8 +
include/asm-generic/barrier.h | 24 +++
include/asm-generic/rwonce.h | 87 ++++++++++
include/linux/bitops.h | 2 +-
include/linux/compiler.h | 94 -----------
include/linux/compiler_types.h | 46 ++++++
include/linux/list.h | 1 +
16 files changed, 449 insertions(+), 142 deletions(-)
create mode 100644 arch/arm/include/asm/barrier.h
create mode 100644 arch/mips/include/asm/barrier.h
create mode 100644 arch/openrisc/include/asm/barrier.h
create mode 100644 arch/powerpc/include/asm/barrier.h
create mode 100644 arch/sandbox/include/asm/barrier.h
create mode 100644 arch/x86/include/asm/barrier.h
create mode 100644 include/asm-generic/barrier.h
create mode 100644 include/asm-generic/rwonce.h
--
2.39.5
next reply other threads:[~2025-05-21 17:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 17:41 Ahmad Fatoum [this message]
2025-05-21 17:41 ` [PATCH 1/4] arch: sync READ_ONCE/WRITE_ONCE with Linux Ahmad Fatoum
2025-05-21 17:41 ` [PATCH 2/4] ARM64: mmu: document granule size calculation Ahmad Fatoum
2025-05-21 17:41 ` [PATCH 3/4] ARM: mmu: ensure PTE is written at once Ahmad Fatoum
2025-05-21 17:41 ` [PATCH 4/4] WIP: break before make and don't invalidate uncached regions being remapped Ahmad Fatoum
2025-05-26 13:51 ` (subset) [PATCH 0/4] ARM: mmu: ensure PTE is written at once Sascha Hauer
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=20250521174104.1570239-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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