android_kernel_motorola_sm6225/drivers/tee
Andrey Konovalov e426e9788e UPSTREAM: tee/shm: untag user pointers in tee_shm_register
(Upstream commit 78063a9dd9637c0450cf6eacc03f42eb1295917f).

This patch is a part of a series that extends kernel ABI to allow to pass
tagged user pointers (with the top byte set to something else other than
0x00) as syscall arguments.

tee_shm_register()->optee_shm_unregister()->check_mem_type() uses provided
user pointers for vma lookups (via __check_mem_type()), which can only by
done with untagged pointers.

Untag user pointers in this function.

Link: http://lkml.kernel.org/r/4b993f33196b3566ac81285ff8453219e2079b45.1563904656.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Bug: 135692346
Change-Id: Id956633fca0b8e95954f0ed61744389b6bd503fd
2019-10-07 15:27:41 -04:00
..
optee tee: optee: avoid possible double list_del() 2019-02-12 19:47:08 +01:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tee_core.c tee: check shm references are consistent in offset/size 2018-05-07 11:51:03 +02:00
tee_private.h tee: use reference counting for tee_context 2017-12-15 13:36:18 +01:00
tee_shm.c UPSTREAM: tee/shm: untag user pointers in tee_shm_register 2019-10-07 15:27:41 -04:00
tee_shm_pool.c tee: flexible shared memory pool creation 2017-12-15 12:37:29 +01:00