[EXT] Re: [PATCH v4 5/5] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Feb 22 11:24:33 UTC 2022


Hello Pankaj,

On 22.02.22 05:30, Pankaj Gupta wrote:
> Hi Ahmad,
> 
> 
>> -----Original Message-----
>> From: Matthias Schiffer <matthias.schiffer at ew.tq-group.com>
>> Sent: Monday, December 13, 2021 7:11 PM
>> To: Ahmad Fatoum <a.fatoum at pengutronix.de>
>>
>>> For now, this is pointed out in the documentation. If you have a
>>> suggestion on a specific condition we should check and issue a
>>> diagnostic on, I can incorporate it. An exhaustive if
>>> WARN_ON(!secure()) is impossible, but having some warning for
>>> unsuspecting users would indeed be nice.
>>
>> I don't know of any condition that doesn't involve looking at SoC- specific OTP
>> registers - that's what U-Boot does to determine whether HAB is enabled...
>>
> 
> Check the value fetched from the SEC Status Register (SSTA) (Offset 0xFD4h, bit 8,9 => 00b - Non-Secure, 01b - Secure, 10b - Trusted, 11b - Fail), for MOO (Mode of Operation).
> And the warning can be issued accordingly.
> 
> It is to be noted that this register is part of CAAM page0, which might not be accessible to Linux, for all the iMX SoC(s).
> 
> For other SoC(s), this can be added.

Thanks for the pointer. I am only testing this with i.MX, so I'd prefer this
be left as a future exercise for a Layerscape user.

Thanks for your reviews. I collected them on Patches 2/5 and 4/5 for v5.

Cheers,
Ahmad


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the Linux-security-module-archive mailing list