From: John Ernberg <john.ernberg@actia.se>
To: Frank Li <Frank.li@nxp.com>
Cc: "Horia Geantă" <horia.geanta@nxp.com>,
"Pankaj Gupta" <pankaj.gupta@nxp.com>,
"Gaurav Jain" <gaurav.jain@nxp.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Thomas Richard" <thomas.richard@bootlin.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"stable@kernel.org" <stable@kernel.org>
Subject: Re: [PATCH v3 1/4] crypto: caam - Prevent crash on suspend with iMX8QM / iMX8ULP
Date: Thu, 29 May 2025 09:51:43 +0000 [thread overview]
Message-ID: <aDguL2HynKmYyWnS@w447anl.localdomain> (raw)
In-Reply-To: <aDcjS+3ing1W81QY@lizhi-Precision-Tower-5810>
Hi Frank,
On Wed, May 28, 2025 at 10:52:59AM -0400, Frank Li wrote:
> On Wed, May 28, 2025 at 02:43:07PM +0000, John Ernberg wrote:
> > Since the CAAM on these SoCs is managed by another ARM core, called the
> > SECO (Security Controller) on iMX8QM and Secure Enclave on iMX8ULP, which
> > also reserves access to register page 0 suspend operations cannot touch
> > this page.
> >
> > This is similar to when running OPTEE, where OPTEE will reserve page 0.
> >
> > Track this situation using a new state variable no_page0, reflecting if
> > page 0 is reserved elsewhere, either by other management cores in SoC or
> > by OPTEE.
> >
> > Replace the optee_en check in suspend/resume with the new check.
> >
> > optee_en cannot go away as it's needed elsewhere to gate OPTEE specific
> > situations.
> >
> > Fixes the following splat at suspend:
> >
> > Internal error: synchronous external abort: 0000000096000010 [#1] SMP
> > Hardware name: Freescale i.MX8QXP ACU6C (DT)
> > pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> > pc : readl+0x0/0x18
> > lr : rd_reg32+0x18/0x3c
> > sp : ffffffc08192ba20
> > x29: ffffffc08192ba20 x28: ffffff8025190000 x27: 0000000000000000
> > x26: ffffffc0808ae808 x25: ffffffc080922338 x24: ffffff8020e89090
> > x23: 0000000000000000 x22: ffffffc080922000 x21: ffffff8020e89010
> > x20: ffffffc080387ef8 x19: ffffff8020e89010 x18: 000000005d8000d5
> > x17: 0000000030f35963 x16: 000000008f785f3f x15: 000000003b8ef57c
> > x14: 00000000c418aef8 x13: 00000000f5fea526 x12: 0000000000000001
> > x11: 0000000000000002 x10: 0000000000000001 x9 : 0000000000000000
> > x8 : ffffff8025190870 x7 : ffffff8021726880 x6 : 0000000000000002
> > x5 : ffffff80217268f0 x4 : ffffff8021726880 x3 : ffffffc081200000
> > x2 : 0000000000000001 x1 : ffffff8020e89010 x0 : ffffffc081200004
> > Call trace:
> > readl+0x0/0x18
> > caam_ctrl_suspend+0x30/0xdc
> > dpm_run_callback.constprop.0+0x24/0x5c
> > device_suspend+0x170/0x2e8
> > dpm_suspend+0xa0/0x104
> > dpm_suspend_start+0x48/0x50
> > suspend_devices_and_enter+0x7c/0x45c
> > pm_suspend+0x148/0x160
> > state_store+0xb4/0xf8
> > kobj_attr_store+0x14/0x24
> > sysfs_kf_write+0x38/0x48
> > kernfs_fop_write_iter+0xb4/0x178
> > vfs_write+0x118/0x178
> > ksys_write+0x6c/0xd0
> > __arm64_sys_write+0x14/0x1c
> > invoke_syscall.constprop.0+0x64/0xb0
> > do_el0_svc+0x90/0xb0
> > el0_svc+0x18/0x44
> > el0t_64_sync_handler+0x88/0x124
> > el0t_64_sync+0x150/0x154
> > Code: 88dffc21 88dffc21 5ac00800 d65f03c0 (b9400000)
> >
> > Fixes: d2835701d93c ("crypto: caam - i.MX8ULP donot have CAAM page0 access")
> > Fixes: 61bb8db6f682 ("crypto: caam - Add support for i.MX8QM")
>
> Why need two fixes tags? It should be enough to keep oldest one.
It looked to me to improve clarity in affected supported modules by
highlighting when each module support was added. I'll drop the second one.
Best regards // John Ernberg
>
> Frank
>
next prev parent reply other threads:[~2025-05-29 9:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 14:43 [PATCH v3 0/4] crypto: caam - iMX8QXP support (and related fixes) John Ernberg
2025-05-28 14:43 ` [PATCH v3 3/4] dt-bindings: crypto: fsl,sec-v4.0: Add power domains for iMX8QM and iMX8QXP John Ernberg
2025-05-28 14:57 ` Frank Li
2025-05-29 9:42 ` John Ernberg
2025-05-28 16:30 ` Rob Herring (Arm)
2025-05-28 21:52 ` Rob Herring
2025-05-29 9:37 ` John Ernberg
2025-05-28 14:43 ` [PATCH v3 2/4] crypto: caam - Support iMX8QXP and variants thereof John Ernberg
2025-05-28 14:43 ` [PATCH v3 1/4] crypto: caam - Prevent crash on suspend with iMX8QM / iMX8ULP John Ernberg
2025-05-28 14:52 ` Frank Li
2025-05-29 9:51 ` John Ernberg [this message]
2025-05-28 14:43 ` [PATCH v3 4/4] arm64: dts: freescale: imx8qxp/imx8qm: Add CAAM support John Ernberg
2025-05-28 15:01 ` Frank Li
2025-05-29 9:49 ` John Ernberg
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=aDguL2HynKmYyWnS@w447anl.localdomain \
--to=john.ernberg@actia.se \
--cc=Frank.li@nxp.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=gaurav.jain@nxp.com \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.gupta@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stable@kernel.org \
--cc=thomas.richard@bootlin.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