diff mbox

gpu: host1x: Forbid RESTART opcode in the firewall

Message ID 20170515120215.28273-1-digetx@gmail.com
State Superseded
Headers show

Commit Message

Dmitry Osipenko May 15, 2017, 12:02 p.m. UTC
The RESTART opcode terminates the gather and restarts the CDMA fetch 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>
---
 drivers/gpu/host1x/job.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Erik Faye-Lund May 15, 2017, 12:06 p.m. UTC | #1
On Mon, May 15, 2017 at 2:02 PM, Dmitry Osipenko <digetx@gmail.com> wrote:
> The RESTART opcode terminates the gather and restarts the CDMA fetch 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>

Outch, yeah.

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 8f0d43b8f9a6..d648748b3e74 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -493,7 +493,6 @@  static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
 				goto out;
 			break;
 		case 4:
-		case 5:
 		case 14:
 			break;
 		default: