linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: D Scott Phillips <scott@os.amperecomputing.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	James Clark <james.clark@linaro.org>,
	James Morse <james.morse@arm.com>,
	Joey Gouly <joey.gouly@arm.com>,
	Kevin Brodsky <kevin.brodsky@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	"Rob Herring  (Arm)" <robh@kernel.org>,
	Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
	Shiqi Liu <shiqiliu@hust.edu.cn>, Will Deacon <will@kernel.org>,
	Yicong Yang <yangyicong@hisilicon.com>,
	kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] arm64: errata: Work around AmpereOne's erratum AC04_CPU_23
Date: Fri, 23 May 2025 16:00:06 +0100	[thread overview]
Message-ID: <87wma7e5jd.wl-maz@kernel.org> (raw)
In-Reply-To: <aDCDGZ-G-nCP3hJI@finisterre.sirena.org.uk>

On Fri, 23 May 2025 15:15:53 +0100,
Mark Brown <broonie@kernel.org> wrote:
> 
> On Tue, May 13, 2025 at 11:45:14AM -0700, D Scott Phillips wrote:
> > On AmpereOne AC04, updates to HCR_EL2 can rarely corrupt simultaneous
> > translations for data addresses initiated by load/store instructions.
> > Only instruction initiated translations are vulnerable, not translations
> > from prefetches for example. A DSB before the store to HCR_EL2 is
> > sufficient to prevent older instructions from hitting the window for
> > corruption, and an ISB after is sufficient to prevent younger
> > instructions from hitting the window for corruption.
> 
> This patch, which is in -next as fed55f49fad181be9dfb93c0, breaks the
> build of at least the vDSO selftests:
> 
> $ make -C tools/testing/selftests ARCH=arm64 LLVM=1 TARGETS=vDSO
> 
>   CC       vdso_test_chacha
> In file included from vgetrandom-chacha.S:9:
> In file included from ./../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S:5:
> In file included from /home/broonie/git/bisect/tools/testing/selftests/../../../arch/arm64/include/asm/assembler.h:21:
> In file included from /home/broonie/git/bisect/tools/testing/selftests/../../../arch/arm64/include/asm/cpufeature.h:13:
> /home/broonie/git/bisect/tools/testing/selftests/../../../arch/arm64/include/asm/sysreg.h:1097:5: error: function-like macro 'IS_ENABLED' is not defined
>  1097 | #if IS_ENABLED(CONFIG_AMPERE_ERRATUM_AC04_CPU_23)
>       |     ^
> 1 error generated.

This:

diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h
index ad63457a05c5b..4389d3916426c 100644
--- a/arch/arm64/include/asm/assembler.h
+++ b/arch/arm64/include/asm/assembler.h
@@ -13,6 +13,7 @@
 #define __ASM_ASSEMBLER_H
 
 #include <linux/export.h>
+#include <linux/kconfig.h>
 
 #include <asm/alternative.h>
 #include <asm/asm-bug.h>

should solve it.

But it also outlines that the vdso is getting built using stuff that
is not meant for userspace code.

	M.

-- 
Jazz isn't dead. It just smells funny.


  reply	other threads:[~2025-05-23 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-13 18:45 [PATCH v4] arm64: errata: Work around AmpereOne's erratum AC04_CPU_23 D Scott Phillips
2025-05-19 10:56 ` Catalin Marinas
2025-05-19 11:13   ` Will Deacon
2025-05-19 11:57 ` Marc Zyngier
2025-05-23 14:15 ` Mark Brown
2025-05-23 15:00   ` Marc Zyngier [this message]
2025-05-23 15:15     ` Mark Brown
2025-11-16 11:01 ` Jaikiran Pai
2025-11-17 17:17   ` D Scott Phillips
2025-11-18  1:45     ` Jaikiran Pai

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=87wma7e5jd.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.clark@linaro.org \
    --cc=james.morse@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kevin.brodsky@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=oliver.upton@linux.dev \
    --cc=robh@kernel.org \
    --cc=scott@os.amperecomputing.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shiqiliu@hust.edu.cn \
    --cc=will@kernel.org \
    --cc=yangyicong@hisilicon.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).