Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp191437imu; Wed, 21 Nov 2018 17:58:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/VDQHXMzzDnC9uOFuj47xOjHYQMl/db/SSSfKDYg9u0ueidhsUTor+sPjoeY/Kz/uohtxtx X-Received: by 2002:a17:902:7046:: with SMTP id h6mr4213779plt.279.1542851881315; Wed, 21 Nov 2018 17:58:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542851881; cv=none; d=google.com; s=arc-20160816; b=tmoRfE0qZkDJ3D6flZNjFl3DW4wZ3fWHQnjxoiCGgxPa+ar4V51n2uDQEo9wXFoli2 aDnf10Z0KbtT9Jiytt/yl/4VNrJLcw+1MUfqJ2dDPdyhs0tSn8vdBpGZ0c9uU1Qp8aTw ht50IdIrFCRrvcuDNXGvwzAyxLBwo16rouNndgwWB8IDpQIPPvH3s1lZSiuZBuunUxCq 0jUs89eCavZ7SuExMd8EqrDbWMZLHaVJfTHTO0At/BZDMAqVuX7pAe8eszPXrMIDbI0E ijoEbzrnVRHwTlDJEjEtWscjGF34rw8KO9dCsO9JTMLyhnt8IOF5MZu8tvppQzw0AeEW lplA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BVLfh/vqaDb+PB95jCFwEoA+EGFpwOAnGkE+rtm5Pp0=; b=mjrXh0KW4LSjKs06sNUsGtV+zvAan1qQHYwpGiy3Yr9sP1ExIHpMV5aLgQdnaXuFWz RDn52AIpKaplHj/78atLyQZ0GkEfVbV+Hbx/isIO/FxnDlAJJvHbFkrv2RWeRLX4/hVh c4K/BRkdt/wm+K7lD2BcG7P6MhDU9mNyRatPQpmOtUDpVMacsFnJ/acsl+WE+HsmLUAD AeWL+d4R6CPPTq+OHp8HvGDXiDKrCDr++gFtODQBdVrI6861dC4iY3lciONPL4VOOpQ6 vpj131UTJyYq0ycAPSHf+9oHC2RDmxSw+ptrE5ufeqefKaOHwdOJ3ffkymo9Xg+n9IQ7 3T8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iSEbJcxv; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si20987162pgb.128.2018.11.21.17.57.46; Wed, 21 Nov 2018 17:58:01 -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; dkim=pass header.i=@kernel.org header.s=default header.b=iSEbJcxv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730935AbeKVFto (ORCPT + 99 others); Thu, 22 Nov 2018 00:49:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:41654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730599AbeKVFqZ (ORCPT ); Thu, 22 Nov 2018 00:46:25 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA8DE2151B; Wed, 21 Nov 2018 19:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542827452; bh=uzKievd5YPxoHndjXMEZoNz9ILd6OiLpv0MmqM7Ogjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iSEbJcxv0xText/UIFmpc5PCZ5ccsCnZbIUu8y3Ru2j/LLRQrLY9Uvh7Ou4oou6TJ IpT4x/jPb6dOfZOoFzTPn/4jZcuvkSsVOAAg56nEFL07XgNvhB00GX72aju1wEIW4U xySCNAfjggmxytDDcDMaiYkziEWFqoBQsmzt7fOU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Ard Biesheuvel , Linus Torvalds , Matt Fleming , Peter Zijlstra , Thomas Gleixner , linux-efi@vger.kernel.org, Ingo Molnar , Nick Desaulniers Subject: [PATCH 4.9 29/59] efi/libstub/arm64: Force hidden visibility for section markers Date: Wed, 21 Nov 2018 20:06:44 +0100 Message-Id: <20181121183509.397770471@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121183508.262873520@linuxfoundation.org> References: <20181121183508.262873520@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ard Biesheuvel commit 0426a4e68f18d75515414361de9e3e1445d2644e upstream. 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 Tested-by: Matthias Kaehlcke Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20170818194947.19347-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar Signed-off-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/efi/libstub/arm64-stub.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- 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"