[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201012092603.630703-1-volodymyr_babchuk@epam.com>
Date: Mon, 12 Oct 2020 09:26:41 +0000
From: Volodymyr Babchuk <Volodymyr_Babchuk@...m.com>
To: Jens Wiklander <jens.wiklander@...aro.org>
CC: "tee-dev@...ts.linaro.org" <tee-dev@...ts.linaro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Volodymyr Babchuk <Volodymyr_Babchuk@...m.com>
Subject: [PATCH] optee: remove address tag in check_mem_type()
Before passing 'start' to find_vma() we need to remove
tags from it to get sane results.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@...m.com>
---
drivers/tee/optee/call.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
index a5afbe6dee68..61420395137b 100644
--- a/drivers/tee/optee/call.c
+++ b/drivers/tee/optee/call.c
@@ -562,6 +562,8 @@ static int check_mem_type(unsigned long start, size_t num_pages)
struct mm_struct *mm = current->mm;
int rc;
+ start = untagged_addr(start);
+
down_read(&mm->mmap_sem);
rc = __check_mem_type(find_vma(mm, start),
start + num_pages * PAGE_SIZE);
--
2.27.0
Powered by blists - more mailing lists