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: 765642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wWwz81qfJz9s2P for ; Tue, 23 May 2017 10:15:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Wl7vLmJF"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763338AbdEWAPb (ORCPT ); Mon, 22 May 2017 20:15:31 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36764 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763320AbdEWAPb (ORCPT ); Mon, 22 May 2017 20:15:31 -0400 Received: by mail-lf0-f67.google.com with SMTP id h4so6681406lfj.3 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=XjpdGIsphtT1fGolOFLtourlN48p+mIVUchUOey//c6+H+VNMgHJVOKjUIyq5vXuOV qzRMF3OIsfvrd8PMiaRPO9HW9cdQMlfeVqan3tw1IWbbPKenYXS+ilbUA7Y9hY/FTEYW oUEzYwCmjJa/HHdlLFClRK+1PTkyYP38TlBt6gASyuBrb7/DK0OAPUhmr6i+YlcfL8cL XDzCeLhmefwacxG88JvVN2JxqVmmO7V9/MsvCBLpm9zqMGu4ZuXSDg7Kfa5xJkYU6E4r cQeNxxC4OQDr+pTozqgX4UUtt7x/M1kHv8WUdNGSQDUDdDzJNvcQ13sZrXO6rto2ZmLG S+lQ== X-Gm-Message-State: AODbwcBbA96x1ghb7DT3pC1T8AbdKXAi7ovVCeclDl4k1xe2VY9unpqj xQcvr1zzYbyvSmbRyCY= 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 Cc: linux-tegra@vger.kernel.org, DRI Development , Erik Faye-Lund 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: Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org 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: