Received: by 10.223.185.116 with SMTP id b49csp118976wrg; Tue, 20 Feb 2018 17:14:26 -0800 (PST) X-Google-Smtp-Source: AH8x226R7EEKvsxrPA9HY3O9n033RfHv+5m74m5G0/fx2jZN5V6sRiQ8b8UkJYeBnYwxQQWcx7Oa X-Received: by 2002:a17:902:a5c5:: with SMTP id t5-v6mr1478222plq.160.1519175666025; Tue, 20 Feb 2018 17:14:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519175665; cv=none; d=google.com; s=arc-20160816; b=B8f3KFYrsL0YMpQbX6RLZCpPh+sFrE1E5Lk1owH64V8o1RdC/8838/5eBqblHzJF7s ZiNB1czGQB6d9QCtlZfhNllOdSP8xeEaxeE7Hn8Kv+6r4b5Tp4at58D04M1xr1HISgmd R+IA9KMU9sHsMYtFTEQhYTJeL3VRhWO+/IwuNQpHiJVfymDiGA6+/cL019DvTEBkVnN9 j+tmW8HpcUdB8Me3dmWCnr/y8OTUhYN+14jGqJeCE+dDF17ijmNnzp2stPBAavCGed8i nwsolyjptL+x8uEhQTIeqfGtQOxPXlgJFIErnkuPpBDTJ6B4kVhDLMwxAAa1ZO44txHz /PYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=sHXLkDbyoOLxAFqvpD+Mk/KrvARUuBBOb3/j7JVFxQA=; b=E9VfofFv7TR61vM6DBrc04nTScFy2RJcDLXRDDtRzv5cK9wkjMntniLpVe7USoizcO 0DtFJQc+2c/ab+EBECO0wZGMLIOBrYdjiL9CYzj6YFPk07Clgw8vTRWPuPKpqHCFE3W9 ubLQIqXQGZeEtn3Wg1Grj1X9DeEUGC1OmcLLjrBXV7Q68jJm3Yol8zp5qn+vNGNf54dp +ro50HDASU/f2vBhYDLpb6PRl1SR6W9ZMpcR8TBiteeWu6PcOrLgewzUGdwYZVy/2f+8 DSX7SWsd4IZOadqFHVPClY0Gc1+hx4W9a2thaqK73sDVvb5bB4l4Zs0bTqhX2K6KvyMW 2XxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z24si13295756pfm.319.2018.02.20.17.14.11; Tue, 20 Feb 2018 17:14:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751352AbeBUBNS (ORCPT + 99 others); Tue, 20 Feb 2018 20:13:18 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:42668 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbeBUBNP (ORCPT ); Tue, 20 Feb 2018 20:13:15 -0500 Received: by mail-oi0-f68.google.com with SMTP id u6so18973oiv.9 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=cYZcDjV+uNIZ7ItOrzTUcpBxEqrVTyh52N3thlIzLXJBsNyLvoIwv0iaqAn2mEv6Nh qYjqsegFFpvI3yBMtQaZSg+pY0bi+p1umW6hPxLMsqNVf1b8mwhXLwEfzXw1GAkkR0YO R6tXJXl1LU1yI39xZ1Uz0LaSdkcYeTDhi8EUORaI2TCAOCBRGnr41GPU91wLGRK/9ztf ha/SR1850GciGFr6YhXToc45Cs/hmpfy0sh4GEeHCEErX+xPtm0MofEuAzUeLzUhVC3e lG9WwzXzlmUQ1HgYj+ZgxxiZV3AAY+mW3FmCid9efP0c8huRAmLK3IPvEjnw6q4w15AU gAUw== X-Gm-Message-State: APf1xPDF/+NYvcd47cI59+INDsSKynaPHQf/YKi/DMIjexoRg6ZQeb1/ QDxwe1pLFdD1XY8zNYHsWj7JQg== 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 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.14.3