From patchwork Wed May 2 20:33:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 10376441 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 0637D6038F for ; Wed, 2 May 2018 20:33:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA86C28F9F for ; Wed, 2 May 2018 20:33:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDA1E29007; Wed, 2 May 2018 20:33:52 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 2AC9028F9F for ; Wed, 2 May 2018 20:33:51 +0000 (UTC) Received: (qmail 3932 invoked by uid 550); 2 May 2018 20:33:47 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 3677 invoked from network); 2 May 2018 20:33:44 -0000 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; bh=Fpn5GpvC1cSmsOtM1hGkpdRLhGuq36Wj2g36hQzxIHg=; b=bz7nA9wkiYR2BVs3m0EE224dpSyEREXwojSNRE5HhMmW4z6mhD3Oh1D+3rT9GyWb4i 0cKzXJ20QA9UTPbjaMWtdECkGUL7H3e24RcN4mjbbwf0m5gY8MmvJJVDaFCBlCp2zQ4Z MPOf9ZDEXm3qzzQI4JFZtoXMYj6Qew4W5cFZMkC/R6n795zWV6qyer8UauppEe5UY2sS +2rZKr7lzMWoSYfcn6I7bTvU/296O1VnGnPkRJmcs+7U/UKvMhsQoq3nehMjZoFnEJ8x rEkDS9J7FEW6VgouLnnEQx5sTLCICs2mplmlV9a9j2AItVV4AUEnzLq5bZi6EXFFRBqB XypA== X-Gm-Message-State: ALQs6tAprHFEKu87oCiN1OlBdJTMeIOv6EfIYAfGXCkwCygZNv5WvxFb D/zKQ0VGv9yF48HkIoDfVlDRaw== X-Google-Smtp-Source: AB8JxZqhzqEF5YH1ET8/AlzN806/mAsphVQM0xk7iSFPQFe7Alo3fRza+THnjjU4hxWsHN9JDv6k2A== X-Received: by 2002:a9d:48f1:: with SMTP id a46-v6mr14323088otj.94.1525293213144; Wed, 02 May 2018 13:33:33 -0700 (PDT) From: Laura Abbott To: Alexander Popov , Kees Cook , Mark Rutland , Ard Biesheuvel Cc: Laura Abbott , kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] stackleak: Update for arm64 Date: Wed, 2 May 2018 13:33:25 -0700 Message-Id: <20180502203326.9491-2-labbott@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180502203326.9491-1-labbott@redhat.com> References: <20180502203326.9491-1-labbott@redhat.com> X-Virus-Scanned: ClamAV using ClamSMTP arm64 has another layer of indirection in the RTL. Account for this in the plugin. Signed-off-by: Laura Abbott --- Fixed from previous version to be a vector expression. --- scripts/gcc-plugins/stackleak_plugin.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/gcc-plugins/stackleak_plugin.c b/scripts/gcc-plugins/stackleak_plugin.c index 6ac2a055ec61..0a55ecaf44df 100644 --- a/scripts/gcc-plugins/stackleak_plugin.c +++ b/scripts/gcc-plugins/stackleak_plugin.c @@ -253,6 +253,10 @@ static unsigned int stackleak_cleanup_execute(void) * that insn. */ body = PATTERN(insn); + /* arm64 is different */ + if (GET_CODE(body) == PARALLEL) + body = XVECEXP(body, 0, 0); + if (GET_CODE(body) != CALL) continue;