Re: Huawei review of different PMP enhancement schemes
Allen Baum
Just as I have been asking why DMC is necessary, I have to ask why the DPL bit is necessary. If there is code that wants to reorder PMP entries while DPL is 1, but the lock bits are set - why don't you instead simply not program any lock bits until you get to the point that you would have changed DPL from 1->0? As the doc mentions: It is noted
that this style of boot flow does not prevent the PMP being unlocked again by
software, and so the security is lower than if the regions remain locked. If you are executing code that has not been authenticated while existing entries are unlocked (or the L bit is set but hasn't taken effect) - then you have a security issue. The DPL bit doesn't fix that, therefore it seems to me that the sequence above (separate "lock everything that needs locking" phase) gives you equivalent security. Also note that DPL is really two bits when implemented, since it as 3 states (initially 0, has been set to 1, has transitioned to 0 and is now locked). Can someone show a sequence that has higher security with DPL compared to a sequence that sets all the lock bits at the point that DPL would have been cleared? Ditto for DMC: can someone show a sequence (and memory map) that causes an extra entry to be required if the default memory closed is defined as "any entry is locked". If someone doesn't demonstrate one (that can't be easily modified to avoid the problem with equivalent security), I can't support either.
On Mon, Feb 24, 2020 at 2:09 PM John Hauser <jh.riscv@...> wrote: Tariq Kurd wrote:
|
|