From: Vladimir Murzin <vladimir.murzin@arm.com>
To: Brad Hawthorne <brad@sim.vu>,
linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org
Cc: linusw@kernel.org, arnd@arndb.de, envzhu@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ARM: v7m: clear CONTROL.FPCA before the boot SVC
Date: Wed, 25 Nov 2026 10:50:40 +0000 [thread overview]
Message-ID: <e6eb22d5-fcf8-4b34-a5d9-a68bf8bfa674@arm.com> (raw)
In-Reply-To: <20261125025852.1160075-2-brad@sim.vu>
On 11/25/26 02:58, Brad Hawthorne wrote:
> __v7m_setup writes CONTROL only after the SVC it uses to enter Handler
> mode. If the boot loader ran FP code, CONTROL.FPCA can still be set,
> so the SVC stacks an extended frame, and its EXC_RETURN has FType
> clear. Since commit 72cd4064fcca ("ARM: 8830/1: NOMMU: Toggle only
> bits in EXC_RETURN we are really care of"), that EXC_RETURN is saved in
> exc_ret, which every return to user space uses, so each return expects
> an extended frame that ret_to_user never builds. init then starts with
> a corrupted stack.
>
> Write CONTROL to its reset value, 0, before the SVC. That clears FPCA,
> and also selects the main stack, which the code after the SVC reads.
>
Cannot boot loader do that before passing control to Linux?
Cheers
Vladimir
next prev parent reply other threads:[~2026-11-25 10:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 2:58 [PATCH 0/2] ARM: v7m: reset loader-set CONTROL and M33 ACTLR at boot Brad Hawthorne
2026-11-25 2:58 ` [PATCH 1/2] ARM: v7m: clear CONTROL.FPCA before the boot SVC Brad Hawthorne
2026-11-25 7:41 ` Arnd Bergmann
2026-11-25 10:50 ` Vladimir Murzin [this message]
2026-11-25 2:58 ` [PATCH 2/2] ARM: v7m: clear the Cortex-M33's ACTLR.EXTEXCLALL at boot Brad Hawthorne
2026-11-25 7:35 ` Arnd Bergmann
2026-11-25 10:55 ` Vladimir Murzin
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=e6eb22d5-fcf8-4b34-a5d9-a68bf8bfa674@arm.com \
--to=vladimir.murzin@arm.com \
--cc=arnd@arndb.de \
--cc=brad@sim.vu \
--cc=envzhu@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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
all inboxes | Powered by JetHome®