All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ye Li <ye.li@oss.nxp.com>
To: Richard Weinberger <richard@sigma-star.at>, sahil.malhotra@nxp.com
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	alice.guo@nxp.com, peng.fan@nxp.com,
	upstream+uboot@sigma-star.at, ye.li@nxp.com
Subject: Re: TZASC misconfiguration on i.mx8m
Date: Tue, 9 Jun 2026 09:44:40 +0800	[thread overview]
Message-ID: <9bcf6592-e616-4b7f-9d54-83987c6a2bbb@oss.nxp.com> (raw)
In-Reply-To: <CAKxiovgS_1x4rVYN+bdXGGSBLQ87Q-ho88wSLn=eVEMQO9BG6Q@mail.gmail.com>



On 6/8/2026 11:07 AM, Richard Weinberger wrote:
> Ye Li <ye.li@oss.nxp.com <mailto:ye.li@oss.nxp.com>> schrieb am Mo., 8. 
> Juni 2026, 03:43:
> 
>     Hi Richard,
> 
>     On 6/5/2026 10:52 PM, Richard Weinberger wrote:
>      > CC'ing Ye Li.
>      >
>      > On Donnerstag, 4. Juni 2026 19:24 Richard Weinberger wrote:
>      >> Hello!
>      >>
>      >> FYI, in arch/arm/mach-imx/imx8m/soc.c enable_tzc380() U-Boot
>     configures
>      >> region0 to allow secure and non-secure world access.
>      >> This is known to be problematic and allows circumventing the
>     TrustZone due to
>      >> memory aliasing[0][1].
>      >>
>      >> It causes also recent OP-TEE to panic at startup:
>      >> E/TC:0 0 Panic 'region0 is not secure configured, non-secure
>     memory alias access possible!' at core/arch/arm/plat-imx/
>     tzc380.c:217 <imx_configure_tzasc>
>      >>
>      >> This is not a theoretical issue.
>      >> On my i.mx8mm evk Board I was able to exploit this and dump all
>     OP-TEE memory from Linux.
>      >
>      > I suggest reverting commit b3cf0a8f03d162e030cde1131751d060853e16fc
>      > Author: Ye Li <ye.li@nxp.com <mailto:ye.li@nxp.com>>
>      > Date:   Tue Aug 27 06:25:34 2019 +0000
>      >
>      >      imx8m: Configure trustzone region 0 for non-secure access
>      >
>      >      Set trustzone region 0 to allow both non-secure and secure
>     access
>      >      when trust zone is enabled. We found USB controller fails to
>     access
>      >      DDR if the default region 0 is secure access only.
>      >
>      >      Signed-off-by: Ye Li <ye.li@nxp.com <mailto:ye.li@nxp.com>>
>      >      Signed-off-by: Peng Fan <peng.fan@nxp.com
>     <mailto:peng.fan@nxp.com>>
>      >
>      > Thanks,
>      > //richard
>     We have discussed this with iMX optee owner. The fix should be done in
>     OPTEE not u-boot.
>     1. OPTEE uses secure memory, so it needs to re-confiure trustzone to
>     meet secure requirement not depending on SPL setting.
>     2. SPL also supports Non-optee case.
> 
>     Best regards,
>     Ye Li
> 
> 
> Can you please point to this discussion?

It is our internal discussion not on community thread. I add Sahil to 
comment for optee. And please notice, trustzone should be enabled before 
DDR initialization. So it should be in SPL not optee. Optee can 
reconfigure trustzone setting.

Best regards,
Ye Li
> 
> Thanks,
> //richard
> 


  reply	other threads:[~2026-06-09  1:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 17:24 TZASC misconfiguration on i.mx8m Richard Weinberger
2026-06-05 14:52 ` Richard Weinberger
2026-06-08  1:42   ` Ye Li
2026-06-08  3:07     ` Richard Weinberger
2026-06-09  1:44       ` Ye Li [this message]
2026-06-09  6:53         ` Richard Weinberger
2026-06-09  9:56           ` Ye Li
2026-06-09  9:58             ` Richard Weinberger
2026-06-09 10:12               ` Ye Li
2026-06-09 10:15                 ` Richard Weinberger
2026-06-10  7:21                   ` [EXT] " Sahil Malhotra
2026-06-11 14:53     ` Fabio Estevam
2026-06-12  9:59       ` Ye Li

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=9bcf6592-e616-4b7f-9d54-83987c6a2bbb@oss.nxp.com \
    --to=ye.li@oss.nxp.com \
    --cc=alice.guo@nxp.com \
    --cc=peng.fan@nxp.com \
    --cc=richard@sigma-star.at \
    --cc=sahil.malhotra@nxp.com \
    --cc=u-boot@lists.denx.de \
    --cc=upstream+uboot@sigma-star.at \
    --cc=ye.li@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.