Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 387fa740 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres
Browse files

ion: Restore secure system heap buffers' heap pointer after being freed



When a secure system heap buffer is freed, the buffer's heap pointer
is changed to the system heap, so that the buffer's pages can be freed
into the secure pools properly. However, the buffer's heap pointer
is not reset back to the secure system heap after the buffer has been
freed.

This is problematic, as the ION buffer tracking code uses the buffer's
heap pointer to figure out which heap's memory accounting stats it has
to decrement when a buffer is freed. In this case, we end up not
decrementing the system secure heap's memory accounting stats, but
instead, decrement the system heap's accounting stats, which is not
correct.

After freeing a buffer's pages, restore the buffer's heap pointer to
the secure system heap, to ensure that the correct heap's accounting
stats are adjusted.

Change-Id: I4ade80660fb5585a2be93be4929db5c534351c2d
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
parent 6f6827e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment