Andrey Konovalov 4fdfae8d8f drm/radeon: untag user pointers in radeon_gem_userptr_ioctl
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.

In radeon_gem_userptr_ioctl() an MMU notifier is set up with a (tagged)
userspace pointer.  The untagged address should be used so that MMU
notifiers for the untagged address get correctly matched up with the right
BO.  This funcation also calls radeon_ttm_tt_pin_userptr(), which uses
provided user pointers for vma lookups, which can only by done with
untagged pointers.

This patch untags user pointers in radeon_gem_userptr_ioctl().

Link: http://lkml.kernel.org/r/c856babeb67195b35603b8d5ba386a2819cec5ff.1563904656.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
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: Jens Wiklander <jens.wiklander@linaro.org>
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>
2019-09-25 17:51:41 -07:00
..
2019-09-25 17:51:41 -07:00
2019-09-19 16:24:24 -07:00
2019-08-14 18:31:10 +02:00
2019-09-19 16:24:24 -07:00
2019-07-22 21:24:10 +02:00
2019-08-06 09:20:58 +02:00
2019-09-19 16:24:24 -07:00
2019-06-19 12:07:29 +02:00
2019-08-27 17:21:04 +10:00
2019-08-14 18:30:52 +02:00
2019-07-17 12:52:55 +02:00
2019-09-20 08:36:47 -07:00
2019-09-19 16:24:24 -07:00
2019-09-19 16:24:24 -07:00
2019-09-19 16:24:24 -07:00
2019-09-19 16:24:24 -07:00
2019-06-30 09:48:05 +02:00
2019-09-21 10:07:42 -07:00
2019-09-19 16:24:24 -07:00
2019-09-19 16:24:24 -07:00
2019-08-09 09:15:05 +02:00
2019-09-19 16:24:24 -07:00
2019-07-17 12:52:55 +02:00
2019-09-19 16:24:24 -07:00
2019-09-19 16:24:24 -07:00
2019-06-05 20:31:04 +02:00
2019-09-19 16:24:24 -07:00
2019-07-15 18:11:31 +02:00
2019-06-05 20:29:57 +02:00
2019-09-19 16:24:24 -07:00
2019-07-17 12:52:55 +02:00
2019-09-19 16:24:24 -07:00
2019-08-21 16:44:41 +10:00
2019-07-15 18:11:30 +02:00
2019-07-17 12:52:55 +02:00
2019-09-19 16:24:24 -07:00
2019-09-19 16:24:24 -07:00
2019-07-15 18:11:30 +02:00
2019-09-19 16:24:24 -07:00
2019-07-22 21:24:10 +02:00
2019-06-19 12:07:29 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-06-19 12:07:29 +02:00
2019-05-27 18:07:03 +02:00
2019-07-22 21:24:10 +02:00
2019-07-22 21:24:10 +02:00
2019-05-27 18:07:03 +02:00
2019-06-19 12:07:29 +02:00
2019-07-25 10:45:07 +02:00
2019-09-19 16:24:24 -07:00
2019-05-27 18:07:03 +02:00
2019-05-27 18:07:03 +02:00
2019-06-19 12:07:29 +02:00
2019-05-27 18:07:03 +02:00
2019-06-19 12:07:29 +02:00
2019-08-09 16:04:31 +10:00