Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3599803ybv; Mon, 10 Feb 2020 03:02:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyF+uANhgMINoXH7LhWGljE5y/ZZ61CUN8V0oWuWRWOw4qxEdgguWd3GhjE55GFgEqBUzpE X-Received: by 2002:aca:f2c5:: with SMTP id q188mr449200oih.113.1581332526974; Mon, 10 Feb 2020 03:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581332526; cv=none; d=google.com; s=arc-20160816; b=bYv5m5zuT1vrnbPsjdZmgPqng7JtI4H+7LjDlrtJ+jFgkgIaRvmCC8l5dOYo6bgzEo 15T+LLilUkJfHabylBdp9KlcbR5uStvnSwRRsNkyoLv8uYNlEzVwNxlROaxUIfGoWF99 eiXICOrldtp/2xcGJDwWN8FynYFv+4RmOVQkrFmI6BaAYRCznSXRG34O/IX8tzKEzL0e SqhqE0bdyMOkX8m6foLLmOrCdbmRW4tSbLdr5CzwzuzyyRkLUjKcumIbbmnmVXSvOG90 s8oPxHAA8JagmRTGcEnL5ckm+/JJY4kQ/A1thL9EieUdbQO8CkkG2ZQxkpa9aVU4mGKh 1wjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=3iXbS5rL2Gq6Vm+5t72NnNkbrQMAKpMwkUFpaTv41K8=; b=R/UZiDIbNmPNXX+oBvr0aT3rc7UE3Ec9A5H6gdUiJ5j9wbDi2KSdNfJjg6BZCpZrCO 4ToioU4R6Wz5f4iykoeeqdOXlOCF1Vv97yrB2fFeVS+Mhyfc8eWtcHgJYyFsV78huPvk eMJuxj4x8wAZi3fZdQsFJRRhHx3Iwofyv0jtDCnh2vxmHNUNEbN8QfUknm6WCcgQtz2y O2rlOxoS68gRg4Zkkj5Ird9emuaQi2BciicaCcMU+3DBaj+AfaEi7DLdDa4ddMEjVzvY mdufuntn6z+nVoi2/bZm8hX9hptDP4V9u5lWn1hmHowPh6BqQ2NiaHUPi+4ZiATyylXu 6Z2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=I+3CIT97; 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 b126si36430oii.72.2020.02.10.03.01.54; Mon, 10 Feb 2020 03:02: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=@ellerman.id.au header.s=201909 header.b=I+3CIT97; 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 S1727079AbgBJLBo (ORCPT + 99 others); Mon, 10 Feb 2020 06:01:44 -0500 Received: from ozlabs.org ([203.11.71.1]:45029 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726796AbgBJLBo (ORCPT ); Mon, 10 Feb 2020 06:01:44 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48GNJP0Cxwz9sP7; Mon, 10 Feb 2020 22:01:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1581332501; bh=PJQpp+82DbTtRtYpFA6iKQwKJ/YFQPhWyqk91A7RpFM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=I+3CIT97uU9eN2rACI2HGPBGIt5YdJcCu3JmWSUcLrqAke3ZaBnFwzXcF4moZBOtD 3l33M5rqyE+U3GWzC69car4xZrQiExj+M+CbM3XsuykI/jifpdxSSaKNFYnIP7Kj6G FpoZl9RXUaM140vnDOHX+TmUzKL4SvkRLOGY2hueQATjBsm6WhFvr1wEiAVP529+OH O78MF45p885mczAWziqTzyJ7jdy5Q246/dfdf7cQISMO+n20pHgXySs7LDduzbliHf clCngKK97t9Woye+hhuWf4htUQeB5I1nWisLTOKXzhVaffPHjzIDiE9MJ9hz3Ll+xY b2jOw5KNOzDpA== From: Michael Ellerman To: Fangrui Song , Benjamin Herrenschmidt , Paul Mackerras , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Fangrui Song Subject: Re: [PATCH] powerpc/vdso32: mark __kernel_datapage_offset as STV_PROTECTED In-Reply-To: <20200205005054.k72fuikf6rwrgfe4@google.com> References: <20200205005054.k72fuikf6rwrgfe4@google.com> Date: Mon, 10 Feb 2020 22:01:37 +1100 Message-ID: <87pnemzoxa.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fangrui Song writes: > A PC-relative relocation (R_PPC_REL16_LO in this case) referencing a > preemptible symbol in a -shared link is not allowed. GNU ld's powerpc > port is permissive and allows it [1], but lld will report an error after > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=ec0895f08f99515194e9fcfe1338becf6f759d38 > > Make the symbol protected so that it is non-preemptible but still > exported. "preemptible" means something different to me, and I assume we're not using it to mean the same thing. Can you explain it using small words that a kernel developer can understand? :) cheers > [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=25500 > > Link: https://github.com/ClangBuiltLinux/linux/issues/851 > Signed-off-by: Fangrui Song > --- > arch/powerpc/kernel/vdso32/datapage.S | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S > index 217bb630f8f9..2831a8676365 100644 > --- a/arch/powerpc/kernel/vdso32/datapage.S > +++ b/arch/powerpc/kernel/vdso32/datapage.S > @@ -13,7 +13,8 @@ > #include > > .text > - .global __kernel_datapage_offset; > + .global __kernel_datapage_offset > + .protected __kernel_datapage_offset > __kernel_datapage_offset: > .long 0 > > -- > 2.25.0.341.g760bfbb309-goog