From patchwork Mon Feb 5 15:12:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126906 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2054761ljc; Mon, 5 Feb 2018 07:14:10 -0800 (PST) X-Google-Smtp-Source: AH8x226bSnPw3X3a5Bahx1IrH49KBT9Ri0XxxycfTQ/4u1SvTOMZ2X0BBX/ZXB1TJzTVEtD6TEpF X-Received: by 10.98.71.146 with SMTP id p18mr11201914pfi.3.1517843650695; Mon, 05 Feb 2018 07:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517843650; cv=none; d=google.com; s=arc-20160816; b=lkk0Xot+B9FvOXIrmhsTEqON9sPF2HoNBYNxtyG7QOAaM7L9NuIU34j3GKabIcFBmc tAl7MNjrZFRNuk7Yyg/66xRS0SeUSaiHkNeLGEyasHQdNU23imSzilBHmgKXY/C4LMol EYvyiN/q5540uDD+MyY7m2T9is2u1ljhaCDRvYev1yE3odRw6/la3hSdtOrbFPoJyZLB jZ6lpWS4eyfeLZ1aC8BHra5Yl+28IKW+BANNGvSZtMBSlvC4BqhADM1Gj1e7DOXNexqD crIOh5+SZCxDZnXGckzWnGL34Oh+eMbVV/a3SvMYoTZN3YK25P9hUlhn9qSLnBzK/nQH itHg== 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=OS4S92vnm0KHBx5tkdQdQNHUc9voUh1zot73GVVIg+o=; b=wotE8E89AAz9CItTxns5DtchgjvgthCDCiidlQv2jjMXmaqhoJBfyWMbeVaF8MNM/Z fkC6NmhZqk/DSjsZRNcOjExaFIndNth8kM5+57+LWUrX1UNLThBl3hnX2SdnAVuNXJiu sJfzD5t2hP+F50KMBggNm1dXFk7V6jCNl0RthaddIFSN8whNvhPEf2O+dWf8MSUsn/VI u53etzga15DN/r/dtTuOLxO4D8npZTPVDcp54GvVVW7r5Fi4TSasGxx5Y6OXO0eCkVR3 rzzXDT+gq+TSB3B2LHdXwzYRGh9wWfp2EE4kANtosE8XjGN650ds0V4SviNONQZ3zjMn k2sg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10-v6si4727427plz.107.2018.02.05.07.14.10; Mon, 05 Feb 2018 07:14:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226AbeBEPOI (ORCPT + 28 others); Mon, 5 Feb 2018 10:14:08 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:53241 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752933AbeBEPN7 (ORCPT ); Mon, 5 Feb 2018 10:13:59 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MPp3a-1eeqq72DGE-004z5o; Mon, 05 Feb 2018 16:13:33 +0100 From: Arnd Bergmann To: Andi Kleen , Jessica Yu , Kees Cook , Arnd Bergmann Cc: nico@linaro.org, linux-kernel@vger.kernel.org, Wanlong Gao , Luis de Bethencourt , Randy Dunlap , Masahiro Yamada Subject: [PATCH 1/2] modpost: don't add warnings for LTO-generated symbols Date: Mon, 5 Feb 2018 16:12:52 +0100 Message-Id: <20180205151300.539874-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180205151300.539874-1-arnd@arndb.de> References: <20180205151300.539874-1-arnd@arndb.de> X-Provags-ID: V03:K0:HfiFsrmLuFcEBM9q+cKCfOl2SheuK7uIeIYfeISntpAdhkfUEG8 SYWy0IAbcPU/F1af8+jDLNpMApvhE4Fu8kSYNGDiqrPUDEfBeq/E3kXKE3qJRYqn7swVksN SrT8iVLmQfDvLoQFN1yHI8XG1t9wE4m4wWzzcQZEolgTaS8TbNdnftXDh3pAe8YNs3XR0Ub TOeewhG5M0n2vD1fKjSNw== X-UI-Out-Filterresults: notjunk:1; V01:K0:E/TbT/cVDug=:+5fE1KuU410su1SrbgXdlm FAoby2xA6k1Q0obtm8VM+k620nIFHYdjj8tP44PCHnAGHDsDBImKPnUFzHGjo8eFr1Kar9Hjh eUR7PWIFq6QNHH42qI4PhEMH2BlsUTL+xG9J0MVMYowroJeWOs229rhMTitjaNaKmw3sy/Cnx Iyr7Y6t/PqeOadHkJQ6+okRWe9gFChoMLqNK6fGbNLEp18o+NqqaLb/iWpzRJ9prFT4CdFMKC ZbUtDhFuUA+6hw97QsdP80srycVl9KOWqVY43wiHM9lqIFS/MOUr8SIBmqetP+3QEphSaT/G9 gDRml/d9qaBKuZtX2Glmx9nZIgzorO2RhZyOaQvAvhcYm/in2EOmxK8RbFYEq75ETJiD7aK+c WGcc53Uo4Zwyq8foiViQKhYHRjQ/eWCHggJc6m9QG+1zSR86UilLWC0WkhrcJAW3mkNd92HnJ 3pSFqj7OLIkYYXDqT0UadjmO4sPGiBi82ks7bpMEmd/Fwnnpwr82Z4nwRgy6u92ucoqET8xCq OSrB3andWLtmwQSb0wh12IUNr6Lb0L/AH4Ul3zik13iTTWobgZRK4lUXbML3FLQMwyH7nfl5r bY8PtYpD/biDw3ou8uX3I1Zwbz6I8JFTi06fCYaSjMoiEki+Qvy5UtH9UCBE2elAVNfvQAzAX auhD5wNHNdYstvbY0im2w+RLeveJLIDT8PeNvCOjRJVJ9fYAqhJRtkBXNPerghW5x1JOl9MtJ btRvdR3xH1S0NVpQUW/lceww44Pf4kxlTUnC7w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org WARNING: vmlinux.o(.data+0x12e0): Section mismatch in reference from the variable pfkey_net_ops.lto_priv.2992 to the function .init.text:pfkey_net_init.lto_priv.2977() The variable pfkey_net_ops.lto_priv.2992 references the function __init pfkey_net_init.lto_priv.2977() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Signed-off-by: Arnd Bergmann --- scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f75224d59294..8a8a473cee08 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1027,7 +1027,7 @@ static const struct sectioncheck sectioncheck[] = { .bad_tosec = { INIT_SECTIONS, NULL }, .mismatch = DATA_TO_ANY_INIT, .symbol_white_list = { - "*_template", "*_timer", "*_sht", "*_ops", + "*_template", "*_timer", "*_sht", "*_ops", "*_ops.lto_priv*", "*_probe", "*_probe_one", "*_console", NULL }, }, From patchwork Mon Feb 5 15:12:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 126907 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp2056049ljc; Mon, 5 Feb 2018 07:15:45 -0800 (PST) X-Google-Smtp-Source: AH8x2262JsTa/nAqCQ/rD5LWzE/uSqRtxI8TGz0nPhrmMNW6QiilW5nwj14VlFBlzk8IGDzk5s1s X-Received: by 10.98.7.73 with SMTP id b70mr48390029pfd.39.1517843744977; Mon, 05 Feb 2018 07:15:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517843744; cv=none; d=google.com; s=arc-20160816; b=AsORxHPbKWIQ8rogRlHNO8rBNDTNbaQVZMCJJzTMjjXMqIDBG/rw44UQjOiNucn5jl XyCBxrj2UTplQpNFVXyDo4PDfZRHtoETFuP0jXFRYuGgRLul8qWtayO3uox0m02cj8Ff 1cGZuqeuniM/tS0EKNf8cXvq/iyQbE3WjKIe5XPLrKx31hPzi5DrpN/KPKoch6Spnacq gu7fdnneTlTbXs9BxBq2ffnZ7TSfjY+BoDclarZEqvLfRbvu2pY2dEKp2RJSINP5E4TR VxlsrYnq/x4hInYX/uKgDkYuwnOqlsH4AJIwE3+3/6rmmFlmu/aRtWi1BzGxzJSgJIG1 mHkA== 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=tGe3AcON8zI1PppWwROXzf5/chS9jWnwyy0uyD8b2/k=; b=P5DZ2pWse+XZIPJaXIo0qhQo+D53ZkXcC5TzzlRsdh26Fh/bnBZg5oNdfrPa2ue3j5 Rc3cXtbB2/xi43t8vtEIdr2irlXoXz04jd1pbq2H2Kk7+Um47KyJQLkaodfB9SHQhFmZ D9lyTBiS83vMIBJb7sUJx/2d3v59QcCA8j7/WlI61JI0WLnsDey5v4INHveVyCvqahmC g3AfTkwOnVnY9H7WzX0vqYJ/s00CQZxcJri1T9P1+yQ7qlIx8yyzYLuCleRBOFMe5Smt 2RdyJKLjNlvVgnuQfb8H4lVH0bWiYdaNFFCxLs5CU8LyQKAAMdvAghfbY0l0iGEnNpNZ +QTQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k189si5277029pgc.250.2018.02.05.07.15.44; Mon, 05 Feb 2018 07:15:44 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753260AbeBEPPl (ORCPT + 28 others); Mon, 5 Feb 2018 10:15:41 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:42539 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753037AbeBEPPc (ORCPT ); Mon, 5 Feb 2018 10:15:32 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MQNoq-1eH7Rh3FgS-00Tnco; Mon, 05 Feb 2018 16:14:13 +0100 From: Arnd Bergmann To: Andi Kleen Cc: nico@linaro.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, David Woodhouse , Borislav Petkov Subject: [PATCH 2/2] x86: make __ibp_barrier visible Date: Mon, 5 Feb 2018 16:12:53 +0100 Message-Id: <20180205151300.539874-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180205151300.539874-1-arnd@arndb.de> References: <20180205151300.539874-1-arnd@arndb.de> X-Provags-ID: V03:K0:KZQT0FH1nAaojQPCyTPQCi7eKXrIHLjOGE0cGSR1vz8606thuJw nUYsffLfXxVy4qlwS3vmWWhY4SYp2F2fRtVoVSh6lgeEIEH7me+bhpyiXyZEuZKVakEKUIb +GbJDur/wmX4Cxuke3gIUa77jE0xflavd2TqByDE7KUeYCgWz9r/xMs4csfKDxj8p3L9Pu5 Ebry4maUxFkJNIWZN6sXw== X-UI-Out-Filterresults: notjunk:1; V01:K0:QnD3WMQzmSk=:Fh6bD7+Db7SB6d3eqHrF3J j0qlyeWxUeFYxsjThT5wTLa6RjWV3BqyhXVDFWIBvOksDJyV3SxrM5YRjEmE85nUn3PFRZi1y Ny/QRh/qM7cP8LeTxpN7iiP6wg+KJDnYPqkdnLqFzcGQrbOA4GPkqpxY7ZNvpWtEslAdGF3nu opgzEG1U8ZDwKRVgucTR2K59YzU/0/ITE5A6ndGDb5E/ShEMkICHIHF7Y8OO4Z9ZWoG/5gAIY v9tWLLqPteiu/C3fpYEyBukeIpCZmU++I41K4jSGLAtUjnXAr8rZRSoHhEv04Z6WT0FPh1+dB 5AuTrBM1U6UQfEbit7nIiNcwmAwx+B+/GsWLyD3v3l6LCT+PitX4Qo1EEyhkYMW/Vg+HaLwO5 OfKPFC0AjGu5ymH1dfC0FyNL7lL6i2E9IS4HLIddWx8OWaDEuvOGhLsSqYRZgeefZJpORtwqt datS3vPxEw6kXW72b/LByyc2fLUBy1knfZ6VmvQ1IRpP0xDAzktUHGc7YYl8Kotyh4287idE/ /bSmrEQ9M1ctrjl2RKJqYY6mNRiigxS9qDAtNauC/2kY4iQApEYJriOtDvNJlyNW1MRxeLtxE pf9qNCZKqohlVS84YaCCw6sv2jc2UFXAxFvXWAGUrlNM13r5h9bexrbRmcER5kMICtOC3aP0d D8SUP4Qht92OL2290g5iJKIEx/Sn0jlyJjohjhfVZyjBJTQ2WC8ZA8XCTQiKiJ/lo5mZonjcj UVYg+jqx/J+y9X0EiibwVtpQNCVIKYkubtXiCQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LTO linking was broken by the addition of __ibp_barrier, which only has relocations from assembler code, and not from C, so the linker decides to drop it: ./ccfzUJ1l.ltrans0.ltrans.o:(.altinstr_replacement+0x42): undefined reference to `__ibp_barrier' Fixes: 64e16720ea08 ("x86/speculation: Simplify indirect_branch_prediction_barrier()") Signed-off-by: Arnd Bergmann --- arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 71949bf2de5a..c3f5fe1c6e83 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -338,7 +338,7 @@ ssize_t cpu_show_spectre_v2(struct device *dev, } #endif -void __ibp_barrier(void) +void __visible __ibp_barrier(void) { __wrmsr(MSR_IA32_PRED_CMD, PRED_CMD_IBPB, 0); }