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: 10231135 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 2960660209 for ; Wed, 21 Feb 2018 01:13:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DC5928A02 for ; Wed, 21 Feb 2018 01:13:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 126F928A05; Wed, 21 Feb 2018 01:13:37 +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.2 required=2.0 tests=BAYES_00, 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 51E2E28A02 for ; Wed, 21 Feb 2018 01:13:36 +0000 (UTC) Received: (qmail 21743 invoked by uid 550); 21 Feb 2018 01:13:27 -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 21643 invoked from network); 21 Feb 2018 01:13:26 -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=sHXLkDbyoOLxAFqvpD+Mk/KrvARUuBBOb3/j7JVFxQA=; b=FDLuqicv7D7ZFDYNG3ZI1KT1VfhYYcew3oGmSwEm0EBylbR7Ww074pvkLFAGCG3zbO VEh/qqK3INGQ5YTaTsngdMe9qRBsgCZKAQNVBgJn88ObJ6LfdN6ctvw/eMJuOh5bsOEo Z7vBc3PsmjzHOxqzzmbbORpwuc7X30Ly4XE6dqzr/JOIWGcJkfSmp9/L8dipglBmKDmb tB7xtkNjMskLXpW1m//XE+SzrAMdT6KS5Wx9RbC2RjIl1/qc3XvTZn3b6NMnGhY48g52 JaTv9yvkMlBy0iZ19f3icW0I7BVp/mqlHJ2UZwSK0490p88pRtuUsJVCzV6R7xQR4gRr g3+g== X-Gm-Message-State: APf1xPBDN/TzRjTn8DEl4PJQvtz38Z7bsklIpIg3J6egu6SYvOMpHMuZ ubvDGfQf/dfpWda39qD8I8+jTA== 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) 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: 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-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;