From patchwork Fri Aug 18 19:49:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 110444 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1346187qge; Fri, 18 Aug 2017 12:53:03 -0700 (PDT) X-Received: by 10.101.70.15 with SMTP id v15mr9534975pgq.229.1503085983167; Fri, 18 Aug 2017 12:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503085983; cv=none; d=google.com; s=arc-20160816; b=uWK7gsnGnCssCVoIE8WQv+Z8PmLB6s+3xtVMGkYwEkHW40Cb3MgLjbI1g0F4BKwLcS Z+0y2Mi4mF0ONJAdEyhPbo8F2wW2+MB60FqrbxcIIjbf+EcQrXvpn7xfyLCuUxVdYoRj Lr0NE1JkmuTlQ2k2+y3+2NuRxYP/cWq1fF6OltNwtLGo2EH7RwIZPyIv0wuzNhSDxE8C jC8fiwqXmRkJ96vX4Y9B9vYzsePrm7IsKJjokWj6ehhPuklBKkoD0MND/DZuArckQzu4 6JBzrnWFR4WFw/FRgU82OQyDk3pZoTdRjj+vZBeNvBDk6Hu5A3sU38Vy1OKlTw4ePkZ0 2d/Q== 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:dkim-signature:arc-authentication-results; bh=Wn7b0rzMKbWkPJGUyzgJPJGUmRXsrd9MvBsPLZoWUj8=; b=VemNex0zTEcA0QIcmaGhBSxqMwcEIHRUyBUrx0xE0P+VRablyCdJ7++BcCGZwRsDaU YuN0ym/e8Akkx3h8yofMMnkUU+HUPttqy66OqgWUxCBxt3QjCGwiztlnxzTlVzaeI9Gn Cvk/42BxNmLNZKlTiACuxhRrfA9i0vQLiOT1LdO0KfghqR98Ao0evJXFcmHrQoe0Vzy+ 2DIG37AiFb0HaSLBzS5OhSGeczZxivcYE4GX09iCYcla7+6r1aeTRvTPgOwawiUQxFrD CqhWQU7vcRm+MkBexKOGP41Y5eWrYxRsemkV6dxj1G1c5DWRMiebUnZgGEZvTqOvHQ/5 60dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=D26hfyJS; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b96si2328444pli.366.2017.08.18.12.53.03; Fri, 18 Aug 2017 12:53:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=D26hfyJS; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751558AbdHRTxC (ORCPT + 2 others); Fri, 18 Aug 2017 15:53:02 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:33617 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751851AbdHRTuI (ORCPT ); Fri, 18 Aug 2017 15:50:08 -0400 Received: by mail-wr0-f181.google.com with SMTP id b65so73373352wrd.0 for ; Fri, 18 Aug 2017 12:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9qVSBGWIYNd1Oj6VFtIfmTY5g+5Brm/5uvl0RmMdgK8=; b=D26hfyJSOIIkHcUHAGhxvBIfJCG8avMG1uI5WmJF+Iz7LilNIyo4PvnnzvkReafLvB 1Bd4XubJPRqdX8Tavq7S3u0YlQPXYFfS1vtH5hl34nvkYRcQl5wi2D//z+r6V7YSLzMX 6W1oHqxzOr6F7L7Dh2rRQbfvNUa/icgUNu2QU= 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=9qVSBGWIYNd1Oj6VFtIfmTY5g+5Brm/5uvl0RmMdgK8=; b=j1qcL+pRi3xZNJmHKTxRHLMZj3mn0gPLoyc9/+Tsw/vBkTHC6ek7C3MeWaJKOYBNkn 3LgcJ+7HRCyJoRRWZKZCz4ASEOEW9ddjIGyQXjNq3lkb/RXbVm9WSNsij+fgFyH96wld C5uLmE0DqTj+WD1X8fOXwy1x/fyIMtuDQaqlQWxqtF5PlBSHl3M5vzNjzo2V3zehmjQv MtYpfFBDHK6FmcxM6vaLJDa4i+jN68rzcQxxO19g824wireJvMKQlWhBlBOWw9Qi8fP5 SXGn2cDrjIqmzxYYcONdNd950Fzr7BqJOrUNgtmOt8Vj4EOXAMhyY5pTGzvvIVxIAjwH ZFhA== X-Gm-Message-State: AHYfb5hGYm+XhVcx2W+lyUKWO7Z9zSaqW1py9ljXmvf/UQAEH/uH8tfW eKwpLXaV9lxyHSJhkPuTZQ== X-Received: by 10.223.197.140 with SMTP id m12mr6704401wrg.252.1503085806456; Fri, 18 Aug 2017 12:50:06 -0700 (PDT) Received: from localhost.localdomain ([154.146.161.128]) by smtp.gmail.com with ESMTPSA id k29sm5571168wrk.56.2017.08.18.12.50.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 12:50:05 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Matt Fleming Subject: [PATCH 03/14] efi/libstub: arm64: force 'hidden' visibility for section markers Date: Fri, 18 Aug 2017 20:49:36 +0100 Message-Id: <20170818194947.19347-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818194947.19347-1-ard.biesheuvel@linaro.org> References: <20170818194947.19347-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org To prevent the compiler from emitting absolute references to the section markers when running in PIC mode, override the visibility to 'hidden' for all contents of asm/sections.h Cc: Matt Fleming Tested-by: Matthias Kaehlcke Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/arm64-stub.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/efi/libstub/arm64-stub.c b/drivers/firmware/efi/libstub/arm64-stub.c index b4c2589d7c91..f7a6970e9abc 100644 --- a/drivers/firmware/efi/libstub/arm64-stub.c +++ b/drivers/firmware/efi/libstub/arm64-stub.c @@ -9,9 +9,17 @@ * published by the Free Software Foundation. * */ + +/* + * To prevent the compiler from emitting GOT-indirected (and thus absolute) + * references to the section markers, override their visibility as 'hidden' + */ +#pragma GCC visibility push(hidden) +#include +#pragma GCC visibility pop + #include #include -#include #include #include "efistub.h"