From patchwork Wed Feb 21 01:13:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 10231141 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 3066B60209 for ; Wed, 21 Feb 2018 01:14:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20CA328A02 for ; Wed, 21 Feb 2018 01:14:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 142C428A05; Wed, 21 Feb 2018 01:14:21 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A7D4E28A02 for ; Wed, 21 Feb 2018 01:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ZIX+GQuDXSBdJWRxs/+aci29jd4fIsbcxgth9pGOeQ4=; b=Njy5+VPZlrvPVN0u7EmEKEJbDF TCVa2PnuFAhGLmDH5ZC2H0Ym1KWre4z9SVY+/lCuQYLpnlFtwGspQgsUkxtPoFEOyAcTITeU1ep34 yHXwjZK7Ipr9al5ssCy7K79a9p43zdsFtiZ6Y1DjYxKTkIesOICSmpL9bUBS4F6NQhyNrH0Mvpf2r AM6EyjbIFEdQUCUiya5hwla3eOI8VHnwkKeLQQbHERR/Ymm2vhx5U43jLpP7lakklQdiikqJuhwn7 41plQOthwy90etdQXaprDHonIBRXq02FS2tp2EagiNv/XCi8Vq3uY0GOo5+Q5FXqOHpMNvdSy1lqY iG0xMMLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eoIyy-0004m4-7F; Wed, 21 Feb 2018 01:14:04 +0000 Received: from mail-oi0-f67.google.com ([209.85.218.67]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eoIyO-0004Oi-4U for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2018 01:13:29 +0000 Received: by mail-oi0-f67.google.com with SMTP id l124so30133oib.0 for ; Tue, 20 Feb 2018 17:13:15 -0800 (PST) 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=sHXLkDbyoOLxAFqvpD+Mk/KrvARUuBBOb3/j7JVFxQA=; b=USV6ZfU0DNmOYMZxuXgM3SMM8EC3UOse79oCkjybOhB0LogqdgR9TZEEwwy6HbmwoA +/zd6EId+6zdM68jTZj5w7JfI6yFe+S4Ieex2SqDlk9Oj5LbbLQb3Dpr5DNc/oPsMGoZ DUnV/DXs3SxTQ/+88tnCIo3E5X1d9qNt4TZWZ1EAl9zGnDHeQBcq4yssOGXQv73hkPkl jci3RRKcpxmrDbmZMKZNa34PJhXc0nOa9j/21w6jAZFG1qZQcrCHprkEdSrPUrgUPhoq tT+FxJ51qSnSRvG6AM5Uj3fU/z6FY0ewAz1hsjEp5nDQbMNxkHb7sii1dWsnLjJSraNz olNg== X-Gm-Message-State: APf1xPCtD7q01uuxKDngzPvSeTgobZhQOCciB0RT/Yfnv5Sd4MGHRyZc Kh+tWvEcGjsnkNM31tjL7o3Meg== X-Google-Smtp-Source: AH8x2258mgZ5LQaJbTdmDKgX4kLCV1Vbx/yxa5grecw7vJNzux7mvM/Xb/SpPiunxR/Mx3DW0aC7KQ== X-Received: by 10.202.51.138 with SMTP id z132mr1070724oiz.67.1519175594631; Tue, 20 Feb 2018 17:13:14 -0800 (PST) Received: from labbott-redhat.redhat.com ([2601:602:9802:a8dc::f21a]) by smtp.gmail.com with ESMTPSA id 125sm13664765oih.57.2018.02.20.17.13.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2018 17:13:13 -0800 (PST) From: Laura Abbott To: Alexander Popov , Kees Cook , Mark Rutland , Ard Biesheuvel Subject: [PATCH 1/2] stackleak: Update for arm64 Date: Tue, 20 Feb 2018 17:13:02 -0800 Message-Id: <20180221011303.20392-2-labbott@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180221011303.20392-1-labbott@redhat.com> References: <20180221011303.20392-1-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180220_171328_223790_45FB9BB4 X-CRM114-Status: GOOD ( 11.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laura Abbott , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-hardening@lists.openwall.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 --- scripts/gcc-plugins/stackleak_plugin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/gcc-plugins/stackleak_plugin.c b/scripts/gcc-plugins/stackleak_plugin.c index 6fc991c98d8b..7dfaa027423f 100644 --- a/scripts/gcc-plugins/stackleak_plugin.c +++ b/scripts/gcc-plugins/stackleak_plugin.c @@ -244,6 +244,11 @@ static unsigned int stackleak_final_execute(void) * that insn. */ body = PATTERN(insn); + /* arm64 is different */ + if (GET_CODE(body) == PARALLEL) { + body = XEXP(body, 0); + body = XEXP(body, 0); + } if (GET_CODE(body) != CALL) continue;