From patchwork Tue May 23 00:14:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 9741685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE34460210 for ; Tue, 23 May 2017 01:04:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0ED82877A for ; Tue, 23 May 2017 01:04:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 951162877D; Tue, 23 May 2017 01:04:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 723F12877A for ; Tue, 23 May 2017 01:03:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 803DE6E2F5; Tue, 23 May 2017 01:01:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0FF866E08E for ; Tue, 23 May 2017 00:15:31 +0000 (UTC) Received: by mail-lf0-x242.google.com with SMTP id m18so6671287lfj.0 for ; Mon, 22 May 2017 17:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=8Vf12sOsTox3kNHmJuR9dHdRdHnVK7AS4bG1hsAxlwk=; b=Wl7vLmJF4oAG+rECIYnwMEE9kizYNr8CLtLv/OZh2V/SeCdKE303D3gZXf0tW9CXhb hQt4MzIhHkdjiz97TMQG1MRKPMnohflaPF3C7PN+HuMAwLnI3H+kKzb9+XQE1KhAuKrW /GJVBsSRKAPJZE+/kkVueQpTudlFTegXlm7U+JgN0d+fAOYGReyBfnyJ5amoxSsB+phB zgEtyqI5UNWc5Zl1e5Za3q5OhEvzzGNZlOkp4sROvMLx0K5W02/VokTJ2qLpQ12w2b8L 8xbJcf7GmAChQFnU4py1X66ZtDuOzWFo4b9t9GjqOjOX2axIRR3tX6lulHtijJhoZ55T g0Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=8Vf12sOsTox3kNHmJuR9dHdRdHnVK7AS4bG1hsAxlwk=; b=dlXtIf9RWe03JkaaXIMmrQKICYj1ElMC95xf9/BdKlSL1wgER6fen8yWRdGSqEcC4b 5R5TnOjH0cI5JVSVuG4hGj3DE5hGnqO/UC1Iu0wxTRoadNXxwlklgw9fsKsKh8Yy32v1 X6oHkc9wAYs/VxrQ3cGhNM0ZhcSvHp+spPigzHfa56CZw5QYhM3bLkcyb2eZrnyPwrtN r4gxfdc6nLXGShwp0Jf7iaONuAJvJu8ReMVIyWFGyxIAlKCQQmAVLIv2Et8wdOvGVuT3 0KaKOHQWMh2N0cvjaeihESrzoW8Ol/WVCIBUcBH0Qz9YBWXLUMSiahDS0/rfree9K5HV y1rQ== X-Gm-Message-State: AODbwcBuZbavrhO2TawlUhiikwNg+uIvc5g0ojD5QrPWDNvtMKl/KYzE Jtrw4XJyQfgmdw== X-Received: by 10.46.80.73 with SMTP id v9mr6818727ljd.135.1495498529544; Mon, 22 May 2017 17:15:29 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-91-175.pppoe.spdop.ru. [109.252.91.175]) by smtp.gmail.com with ESMTPSA id v30sm3440904ljd.9.2017.05.22.17.15.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 May 2017 17:15:28 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Mikko Perttunen Subject: [PATCH 15/22] gpu: host1x: Forbid RESTART opcode in the firewall Date: Tue, 23 May 2017 03:14:30 +0300 Message-Id: X-Mailer: git-send-email 2.13.0 In-Reply-To: References: In-Reply-To: References: X-Mailman-Approved-At: Tue, 23 May 2017 00:59:38 +0000 Cc: linux-tegra@vger.kernel.org, DRI Development X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Erik Faye-Lund Reviewed-by: Mikko Perttunen --- drivers/gpu/host1x/job.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c index 1a1568e64ba8..cf335c5979e2 100644 --- a/drivers/gpu/host1x/job.c +++ b/drivers/gpu/host1x/job.c @@ -497,7 +497,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g) goto out; break; case 4: - case 5: case 14: break; default: