gpu: host1x: Forbid RESTART opcode in the firewall
authorDmitry Osipenko <digetx@gmail.com>
Wed, 14 Jun 2017 23:18:36 +0000 (02:18 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 15 Jun 2017 12:23:18 +0000 (14:23 +0200)
The RESTART opcode terminates the gather and restarts the CDMA fetching
from a specified word << 2 relative to the CDMA start address. That
shouldn't be allowed to be done by userspace.

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/host1x/job.c

index a911de6386b47207e61876c635f77c05bb1e0e7e..54230ec4f81e38e483b3df029b4fa6d477874270 100644 (file)
@@ -495,7 +495,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
                                goto out;
                        break;
                case 4:
-               case 5:
                case 14:
                        break;
                default: