]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: host1x: Forbid unrelated SETCLASS opcode in the firewall
authorDmitry Osipenko <digetx@gmail.com>
Wed, 14 Jun 2017 23:18:37 +0000 (02:18 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 15 Jun 2017 12:23:50 +0000 (14:23 +0200)
commit77c3e690cef8cd4e0bdcf26478050b54f8f07862
tree3197816e7ddebd5d8360c6aae439d20a956b6a95
parent2de52fc931bd3bba8752326c7dfe7c1bc677dfc2
gpu: host1x: Forbid unrelated SETCLASS opcode in the firewall

Several channels could be made to write the same unit concurrently via
the SETCLASS opcode, trusting userspace is a bad idea. It should be
possible to drop the per-client channel reservation and add a per-unit
locking by inserting MLOCK's to the command stream to re-allow the
SETCLASS opcode, but it will be much more work. Let's forbid the
unit-unrelated class changes for now.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c
drivers/gpu/drm/tegra/drm.h
drivers/gpu/drm/tegra/gr2d.c
drivers/gpu/host1x/job.c
include/linux/host1x.h