linux/drivers/gpu/host1x
Thierry Reding 961e3beae3 drm/tegra: Make job submission 64-bit safe
Job submission currently relies on the fact that struct drm_tegra_reloc
and struct host1x_reloc are the same size and uses a simple call to the
copy_from_user() function to copy them to kernel space. This causes the
handle to be stored in the buffer object field, which then needs a cast
to a 32 bit integer to resolve it to a proper buffer object pointer and
store it back in the buffer object field.

On 64-bit architectures that will no longer work, since pointers are 64
bits wide whereas handles will remain 32 bits. This causes the sizes of
both structures to because different and copying will no longer work.

Fix this by adding a new function, host1x_reloc_get_user(), that copies
the structures field by field.

While at it, use substructures for the command and target buffers in
struct host1x_reloc for better readability. Also use unsized types to
make it more obvious that this isn't part of userspace ABI.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-08-04 10:07:36 +02:00
..
hw gpu: host1x: handle the correct # of syncpt regs 2014-04-16 17:11:04 +02:00
Kconfig
Makefile gpu: host1x: Add Tegra124 support 2013-12-19 09:29:52 +01:00
bus.c gpu: host1x: Rename internal functions for clarity 2014-06-05 23:10:30 +02:00
bus.h
cdma.c
cdma.h
channel.c
channel.h
debug.c
debug.h
dev.c gpu: host1x: Add Tegra124 support 2013-12-19 09:29:52 +01:00
dev.h
intr.c
intr.h
job.c drm/tegra: Make job submission 64-bit safe 2014-08-04 10:07:36 +02:00
job.h
mipi.c
syncpt.c gpu: host1x: export host1x_syncpt_incr_max() function 2014-04-04 09:12:49 +02:00
syncpt.h