Skip to content

Commit

Permalink
core: pager: fix tee_pager_set_uta_area_attr()
Browse files Browse the repository at this point in the history
Adds missing synchronization, dsb_ishst(), required to make sure that
translation table update is visible after the final update of the
attributes of a page.

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jenswi-linaro authored and jforissier committed Jul 5, 2017
1 parent ac3cc6c commit 05348de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/arch/arm/mm/tee_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,11 @@ bool tee_pager_set_uta_area_attr(struct user_ta_ctx *utc, vaddr_t base,
tee_pager_save_page(pmem, a);

area_set_entry(pmem->area, pmem->pgidx, pa, f);
/*
* Make sure the table update is visible before
* continuing.
*/
dsb_ishst();

if (flags & TEE_MATTR_UX) {
void *va = (void *)area_idx2va(pmem->area,
Expand Down

0 comments on commit 05348de

Please sign in to comment.