Re: [PATCH v11 RESEND 9/9] arm64: armv8_deprecated: apply FEAT_LSUI for swpX emulation.

Yeoreum Yun
2026-01-21T14:52:31Z

> On Tue, Jan 20, 2026 at 05:59:47PM +0000, Yeoreum Yun wrote:
> > On second thought, while a CPU that implements LSUI is unlikely to
> > support AArch32 compatibility,
> > I don't think LSUI requires the absence of AArch32.
> > These two are independent features (and in fact our FVP reports/supports both).
>
> Did you have to configure the FVP specially for this or that a "default"
> configuration?
>
> > Given that, I'm not sure a WARN is really necessary.
> > Would it be sufficient to just drop the patch for swpX instead?
>
> Given that the whole point of LSUI is to remove the PAN toggling, I think
> we should make an effort to make sure that we don't retain PAN toggling
> paths at runtime that could potentially be targetted by attackers. If we
> drop the SWP emulation patch and then see that we have AArch32 at runtime,
> we should forcefully disable the SWP emulation but, since we don't actually
> think we're going to see this in practice, the WARN seemed simpler.

TBH, I missed the FVP configuration option clusterX.max_32bit_el, which
can disable AArch32 support by setting it to -1 (default: 3).
Given this, I think it’s reasonable to emit a WARN when LSUI is enabled and
drop the SWP emulation path under that condition.

Thanks!

--
Sincerely,
Yeoreum Yun