Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5645488imu; Mon, 26 Nov 2018 03:28:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/VsgwiyVCeZ8xmojgLzsa2w9NPkVToAUmUcKgnJyDl5v37NWgsh3tP3GXlNOZUr3DA+qAnK X-Received: by 2002:a62:345:: with SMTP id 66mr8885748pfd.189.1543231686807; Mon, 26 Nov 2018 03:28:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543231686; cv=none; d=google.com; s=arc-20160816; b=YozeDux6/TnDwl9PqMrsIjZOvAChg3VOJad4+rQBWqYhA8zdb8KEYpD3GkuAYYMuey JcWJo4ItP+WymEan8VP5yozJdIyOgdpx8pipulZCUG+I3bOgkYb4wt8SF+R7r58SnMHp 3sInubfCgT/ywSMbsfHCTuBHjWM9TWFI6qV4IjZxoWSfur74R5mMX6uQl9yLRASv+H0c CCtxRe89ZcqoWG5F09PMNfwcyUQ7tumSjKX+YCLn57Hk2DwR3nQW8sGsCiDjtMAugm9p ki/u1lt8w2G6HXaCdmRhmHx18f4MHFVhcHJfRPvDDJlvd/2YEYnK3hd1vANYK9SqtUzB JKPw== 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=a0eHkhDqNH5KMWWobVVDX8PRIDkBTd3U2UWi2KXo7kA=; b=SSz++ZMnaZcIyXFjLf/miFVaQkxIiLWGsvCQXF7/oIJSoXQqwkrHryenbTg1p3IVxj V+QAg0kQebALputx2fAxlUk/ySA60uM/yaPL9Vn150kuGk+C5sT7UrK9Q1UJCY1fbeLa bN0TBLcjKMK2+hGhn5m7L+mbEt8I0F7ZPuPkDGmYJ+q69lM16TOCbVAdSoD3kUVE0VkA S9eXlAy4pA0/prThEr4szl0LlTlqTZD3iGx8+NcaL6hGUKbzHwh8+X7U6ONn25bFa7QG K+mscNSAWP+ukYBkw2VYmbKyy3GNdtM057PRfpskN15le95mJShK5uNKgT2tAyA4P+F/ g7ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WXqk1mdR; 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 g69si6710pfg.225.2018.11.26.03.27.41; Mon, 26 Nov 2018 03:28:06 -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=WXqk1mdR; 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 S1727249AbeKZVru (ORCPT + 99 others); Mon, 26 Nov 2018 16:47:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:56116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726257AbeKZVru (ORCPT ); Mon, 26 Nov 2018 16:47:50 -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 4724421104; Mon, 26 Nov 2018 10:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229645; bh=Q94vGC3WXEWQBVW9X0rvhOlvbY4UVLtpP+PBbQ88/Ys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WXqk1mdRnA1hF6bTOYUQB3/aBHpEh+64MkTfBwtQNNn4i6AqEw1+gTDmRICxs/f6K TWy7hqaXO+FQwaFdBPA2njuSxwucpAaJzQ2X/JSm3qC1UbJoXREhEd43uXLpd8k3WD mgOFtr4kdnU5vVV4A4MHIi9H2zC2St7f7yC7/4QQ= 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 , Nathan Chancellor Subject: [PATCH 4.4 18/70] efi/libstub/arm64: Force hidden visibility for section markers Date: Mon, 26 Nov 2018 11:50:33 +0100 Message-Id: <20181126105048.599872098@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105046.722096341@linuxfoundation.org> References: <20181126105046.722096341@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.4-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 [nc: Fix conflict due to lack of commit 42b55734030c1 in linux-4.4.y] Signed-off-by: Nathan Chancellor 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 efi_status_t __init handle_kernel_image(efi_system_table_t *sys_table_arg, unsigned long *image_addr,