From: Catalin Marinas <catalin.marinas@arm.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Marc Zyngier <maz@kernel.org>,
Chris January <Chris.January@arm.com>,
stable@vger.kernel.org, Will Deacon <will@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Discussions about the Letux Kernel
<letux-kernel@openphoenux.org>
Subject: Re: Bug with KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and CPTR_EL2 to 1
Date: Thu, 16 Dec 2021 17:25:49 +0000 [thread overview]
Message-ID: <Ybt2nd33H/pgKfpm@arm.com> (raw)
In-Reply-To: <CD07B147-6798-46C8-A01C-6CBDB73A44B2@goldelico.com>
On Thu, Dec 16, 2021 at 03:30:40PM +0100, H. Nikolaus Schaller wrote:
> > Am 16.12.2021 um 09:43 schrieb Marc Zyngier <maz@kernel.org>:
> > On 2021-12-16 06:58, H. Nikolaus Schaller wrote:
> >>> Am 15.12.2021 um 19:40 schrieb H. Nikolaus Schaller <hns@goldelico.com>:
> >>> this seems to break build of 5.10.y (and maybe earlier) for me:
> >>> CALL scripts/checksyscalls.sh - due to target missing
> >>> CALL scripts/atomic/check-atomics.sh - due to target missing
> >>> CHK include/generated/compile.h
> >>> AS arch/arm64/kvm/hyp/nvhe/hyp-init.nvhe.o - due to target missing
> >>> arch/arm64/kvm/hyp/nvhe/hyp-init.S: Assembler messages:
> >>> arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
> >>> arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'
> >>> arch/arm64/kvm/hyp/nvhe/hyp-init.S:87: Error: missing ')'This should somehow be fixed so that arch/arm64/include/asm/kvm_arm.h
> >>> can be included by older assemblers.
> >
> > GCC versions prior to 5.1 are known to miscompile the kernel,
> > and the minimal GCC version was bumped in dca5244d2f5b.
>
> > I am surprised this requirement wasn't backported to 5.10-stable,
> > as this results in all sorts of terrible bugs that are hard to
> > diagnose (see the horror story in the commit message).
>
> Indeed.
>
> My build system checks for existence of scripts/min-tool-version.sh
> and if it exists it chooses the right gcc version. If it does not exist
> it assumes that gcc 4.9 is still good enough...
I wonder whether the problem is binutils rather than gcc. We have a
minimum requirement of 2.23 but it looks like it failed to build for you
with 2.25. Unless the compiler got smarter and it drops the 'U' from 1U
when passing it to gas.
> Yes, it does! This can be compiled with gcc 4.9 (resp. binutils).
>
> So IMHO there are 3 different ways to solve it:
> a) your fix applied to 5.10.y
> b) someone backports scripts/min-tool-version.sh
> to allow for dependable automation...
> c) we leave 5.10.y unfixed and I just add a special
> rule for arm64 to choose a newer gcc (it is no problem to
> use 4.9 for other architectures) in my build setup.
Another option is to merge Marc's fix in 5.16 (there are two more 1U in
the same file) with a Fixes tag and cc stable so that it gets backported
to 5.10.y.
--
Catalin
prev parent reply other threads:[~2021-12-16 17:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 18:40 Bug with KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and CPTR_EL2 to 1 H. Nikolaus Schaller
2021-12-16 6:58 ` H. Nikolaus Schaller
2021-12-16 8:43 ` Marc Zyngier
2021-12-16 14:30 ` H. Nikolaus Schaller
2021-12-16 17:25 ` Catalin Marinas [this message]
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=Ybt2nd33H/pgKfpm@arm.com \
--to=catalin.marinas@arm.com \
--cc=Chris.January@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=hns@goldelico.com \
--cc=letux-kernel@openphoenux.org \
--cc=maz@kernel.org \
--cc=stable@vger.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