diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2020-06-29 15:16:31 +0200 |
---|---|---|
committer | Jérôme Forissier <jerome@forissier.org> | 2020-08-26 17:06:55 +0200 |
commit | 2667e1359e516ed45b71b7857da750f531a8b16f (patch) | |
tree | ee627ef20f7593f11f35b07c7f6c5095f25a7cf4 /core/tee | |
parent | 7bc927fa5192f4af4f59072f38822e0082e4bddb (diff) |
core: fix offset calculation in param_mem_to_user_va()
In param_mem_to_user_va() the offset of a memory parameter is used to
check if a particular struct vm_region will cover that parameter.
struct vm_region always uses offsets from the beginning of the first
physical page while a memory parameter contains only the offset from the
beginning of a MOBJ. Consequently the two offset cannot be compared
directly.
Until this patch the two offset where compared directly so fix it by
adding the phys_offs of the MOBJ to the offset of the memory parameter.
Note that this doesn't change the computed virtual address, it only
fails to find a matching struct vm_region under certain circumstances.
Acked-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/tee')
0 files changed, 0 insertions, 0 deletions