Received: by 10.192.165.148 with SMTP id m20csp1070226imm; Wed, 2 May 2018 13:35:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr34euedMAxWlAr7wPr6+I5ybWrXYz29jYCHFmhraJ7sjGRgnxKUm2OthAmcZlJhWb76nDP X-Received: by 2002:a63:41c1:: with SMTP id o184-v6mr17191174pga.393.1525293304972; Wed, 02 May 2018 13:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525293304; cv=none; d=google.com; s=arc-20160816; b=lwoYYvjsuYpYYpBmYUVkt7lEfmBaNuZzoAIkfzoE+TyKvelvQUd0K+oEdjDj75x6uc 4SVNXN8bdEX6X5QTJgffkTB9DyLL7hvyRCkHxk8en7IpHVKXPs9ewMQ44/rxsVTHjVqA VuHDtoXkzAyEkprIPNC4U8gd2Jtbwj95Gk8WAP7r/wphGc0fULHYVbJi61y8bRKrxAhI xYUEEkDbWP9LOTFFvCllejiD1V3sfuc/xjOKOr8a8JdX6EVOiqOMLSGNFzZznHkbHy83 73/Ddv8Et24UUuHgvwGcWSjcA2XqGNrmxqTzCF82Mu2inkmh1R4Oz0JCN5Mi8GVpLFQX vg8w== 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=Fpn5GpvC1cSmsOtM1hGkpdRLhGuq36Wj2g36hQzxIHg=; b=YiPlWMuZySB8wyFxXxihsqyR9MzLEqsgvVl6fx1KmdbWNNGVGhB2MnJ7MgkMrdoffT XplJtpvKxHldC+PE+5VfdM34VOcYN/16tQbWuCHFGnPKrTIlquKKKfro6WU2pxsBGKHh qC/M/iKATuTONOF4VY80aoxLXjaKl2nkMwyNGrSB2RGPDxnHFjeiyy3ecO9LPIBXLuIq l3X1dNY22w6GNtk0UyNa1ouWNC5FjHzgV/l3iDBvbJbby2m/jRP7fMXdZudZuRSoApGV phFtIvk+34OI6hoNMM6dBXNQ04BLddB/e33mMC0gTruVEyFdi2IWx/gYAxBehXH0+4Jl 7D8w== 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 s9-v6si9901054pgp.163.2018.05.02.13.34.50; Wed, 02 May 2018 13:35:04 -0700 (PDT) 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 S1751417AbeEBUd7 (ORCPT + 99 others); Wed, 2 May 2018 16:33:59 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:39450 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbeEBUdd (ORCPT ); Wed, 2 May 2018 16:33:33 -0400 Received: by mail-ot0-f193.google.com with SMTP id l12-v6so18172182oth.6 for ; Wed, 02 May 2018 13:33:33 -0700 (PDT) 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=M4G9deGWLoS+9b99MhLz9ISLmKqqpHX1vSk40sRNZssR90/bqseTDX6RcgcFjyRws7 mjWfGk/byuvkmtcyIFjhETjbv3l5qln5M559loxsUi47xD1FDq1PvcVUVgZ5Sa+TwjZl 154BkEW4n4gwlxodvPMf5CrnEyOL91znUFXvWJfG0YPMQugon2tTXOQ1/a2XZ8DmNccU Afq+pzW5jeymwuAIQqW+UhROW8ao7p8+YRPjdfhJEy84OxK21IxvBI4EhbRMQz2HBTCc 7uMi3hDCVeW0rLpsyNG2zAPUhVM2F6yI3nNqfAvSQWdBhGEV2n0rKIyd9T/ghEWN1qTn y8Xw== X-Gm-Message-State: ALQs6tCTHujehwuGu59G4ZmYy34G9JNmKJT9PnvpB97GpvShhwn47RX3 ldT3C/kTHTTTN+XOdqlkdaDfaA== X-Received: by 2002:a9d:48f1:: with SMTP id a46-v6mr14323088otj.94.1525293213144; Wed, 02 May 2018 13:33:33 -0700 (PDT) Received: from labbott-redhat.redhat.com ([2601:602:9802:a8dc::d2dd]) by smtp.gmail.com with ESMTPSA id v140-v6sm7141762oie.52.2018.05.02.13.33.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 May 2018 13:33:32 -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> 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 --- 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; -- 2.14.3