From patchwork Wed Jun 14 23:18:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 9787753 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 2BBB0602CB for ; Thu, 15 Jun 2017 00:59:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21BAB284DC for ; Thu, 15 Jun 2017 00:59:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15213284ED; Thu, 15 Jun 2017 00:59:30 +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 A454A284DC for ; Thu, 15 Jun 2017 00:59:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF60C6E68C; Thu, 15 Jun 2017 00:57:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21F676E63A for ; Wed, 14 Jun 2017 23:19:11 +0000 (UTC) Received: by mail-lf0-x244.google.com with SMTP id o28so1618583lfk.1 for ; Wed, 14 Jun 2017 16:19:11 -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=l3/xnBdRt6jaDt7xD5Ao3uiXJk8vNkwgWdUnbCcZGzY=; b=eWGO/Upr5ZDUk7Z1TwG/Lzf34D07mM4IbPTNyTR2D82zEze3Eksx3YPnlt0QrWU+Wn MHKLKkioyeZGzLJ5Gx+w2w19Gehou1qCyshgqaKGxZ6QwxLjC3TvQiOfzGyQMLbozFaz 0XhRaksY+DTGdZDjoBedZ+EH+9AWe30DIt/OxaCDkQoNITOvh1SgBVoDL59Zmech5hM7 4TG1Gxjl/9ez4c3kZGidQVie5ZOJfvcsoRb7/pBIiO+4+S9Gbl6okFC1kc/+RTxzFXVE JOqFyLxZvQ/nNT+WMNBvoZy5SMhKtQzLhY2x6HWZKppWjEWCZnrQDVCXGyPgwPpW+ZED 2lIQ== 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=l3/xnBdRt6jaDt7xD5Ao3uiXJk8vNkwgWdUnbCcZGzY=; b=ChMa0o1POGOgArqyXxno+J/mlYzu7Ur2mc5B27bhxFZlG5ajLIhjBxPEIUT2sq/+7M eb4dzgeysMweUz3iDQqh09g8LlGG3SKHumIyPSXsZAkp5/i8mpbjZReuBdI3GQfXhXN6 2i+d92G3buakQ9TDJP5UC6qbybOMllwpShlZootMp6u2kUuZUitVZy4IAKDow5TRFxsu RbjRt56IUego6jU8LKN1E6kh4FeP+rJ5ZahaYCY+6OJOa050RxNvl7vv9P2Dkdm20Jrx ndTNVCbhngUjjSREpk3Bg8RE73U/zIrEUqfLAFpLKsAq6XxH11bmwkjSQlYlz+xviH8T i/Ig== X-Gm-Message-State: AKS2vOyGLQtpHUIzCAsNnXSPDTn9XTxuYJLW/5aZPkHhZAGVVRw3k5uA Cs7GoukOaqXHMQ== X-Received: by 10.25.149.4 with SMTP id x4mr768448lfd.136.1497482349625; Wed, 14 Jun 2017 16:19:09 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-91-7.pppoe.spdop.ru. [109.252.91.7]) by smtp.gmail.com with ESMTPSA id i24sm290165ljb.63.2017.06.14.16.19.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2017 16:19:08 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Mikko Perttunen , Erik Faye-Lund Subject: [PATCH v3 13/20] gpu: host1x: Forbid RESTART opcode in the firewall Date: Thu, 15 Jun 2017 02:18:36 +0300 Message-Id: X-Mailer: git-send-email 2.13.0 In-Reply-To: References: In-Reply-To: References: X-Mailman-Approved-At: Thu, 15 Jun 2017 00:57:20 +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 a911de6386b4..54230ec4f81e 100644 --- a/drivers/gpu/host1x/job.c +++ b/drivers/gpu/host1x/job.c @@ -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: