Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp320741ybv; Tue, 4 Feb 2020 22:27:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwi/bUN6J2wvaeksb3XCVyItVf6iRQTK0hRdNbJyYt1pA49AtPuYG5q2gpxUIn4IwQjKPt5 X-Received: by 2002:a05:6830:1185:: with SMTP id u5mr23064278otq.147.1580884027779; Tue, 04 Feb 2020 22:27:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580884027; cv=none; d=google.com; s=arc-20160816; b=DJ1+pMaATLJJyXwkAdHD7GKS2GCoU20Lxq9aOzvQD49xXlJXIzry8FwYRGSWODMM24 6SI3mv2Mv9CipL4NreK3gDLElm9PSzK+as4SjBuAyCSf0lhBaDjtfSPJLFPVry2xd4PT +KFu5jwLFM/iNpfJq0FP7O4K61mvevmb9iAsDkf7y/pZlaVN3xVTqsykkjCF86ZwlpRt mevPbg3NDyR2VB89pbLOIv048wQXow0RwA1MeE5/BI+X/BmXkWhFCe3HCgByONzREJzw pmqcUO3gTYFyRWGlyyf+b7wt5YbeJxKBbS4AOf1nLkzeIVSs5OW1qjWDDowjknTGRpOS GYiA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=arjyGSAsMm0Nw/MEg/HGvPVCQztAhca2h8pfvGO7wGE=; b=IdQ89DRkK/UCBCQZFta71UuS6fvSWoUhFmTqndzcvOs0M9qdzN4JxWXv5W9t+4hbu+ 39Rzkq+phLBkVN6yl+DQ90QgGD4NZnEoNYiqbB5Y4HlTJ4EcRVjR4Rl6K6JZir+qxowo svN5qXPN5UwIT+IzMEplT8EQG3Kig7TnmQGRocOp7n7SmvkH7LxCpkaOH/h4sQLL3i7r 1cDWKxfHiOeonT9aZc0f9t5F4pguRyyYKQVtpe7xja6ubSjLzwyPQuh+byEN4yVrC+Zx bf4s7kLoLP0y5c0tBM8USx0zks0XorUGvw1dsQQEKwVQA2CDa+2HQbS/95nP6QIhqKPB 57Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=Hmjs+NJp; 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 h8si11334340oib.104.2020.02.04.22.26.55; Tue, 04 Feb 2020 22:27:07 -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=@c-s.fr header.s=mail header.b=Hmjs+NJp; 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 S1726277AbgBEG0C (ORCPT + 99 others); Wed, 5 Feb 2020 01:26:02 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:64192 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgBEG0C (ORCPT ); Wed, 5 Feb 2020 01:26:02 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48CBQb2lTQz9v9Cl; Wed, 5 Feb 2020 07:25:59 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=Hmjs+NJp; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id djzf2NcZP0j6; Wed, 5 Feb 2020 07:25:59 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48CBQb1TnSz9v9Ck; Wed, 5 Feb 2020 07:25:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1580883959; bh=arjyGSAsMm0Nw/MEg/HGvPVCQztAhca2h8pfvGO7wGE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Hmjs+NJpMGkA+Ee2fGqfMl3SCjZu9+GCPa3wGWJc7wxoIgzYVeN2jhvL23n25B30d NHCWMIWfW4VHsOQF3Bt0rJ7ofbK+qot1ySSNV99RkUGa4V9dHmKbRYXe2q3H9WFX0n V0YLQ+h2/2Yekf2izKm81liQC22q9kqACXqDWOAM= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0273C8B820; Wed, 5 Feb 2020 07:26:00 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id Ue-_DaLfAi1p; Wed, 5 Feb 2020 07:25:59 +0100 (CET) Received: from [172.25.230.107] (unknown [172.25.230.107]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B9A9A8B778; Wed, 5 Feb 2020 07:25:59 +0100 (CET) Subject: Re: [PATCH] powerpc/vdso32: mark __kernel_datapage_offset as STV_PROTECTED To: Fangrui Song , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com References: <20200205005054.k72fuikf6rwrgfe4@google.com> From: Christophe Leroy Message-ID: <10e3d362-ec29-3816-88ff-8415d5c78e3b@c-s.fr> Date: Wed, 5 Feb 2020 07:25:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200205005054.k72fuikf6rwrgfe4@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 05/02/2020 à 01:50, Fangrui Song a écrit : > 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 Note that there is a series whose first two patches aim at dropping __kernel_datapage_offset . See https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=156045 and especially patches https://patchwork.ozlabs.org/patch/1231467/ and https://patchwork.ozlabs.org/patch/1231461/ Those patches can be applied independentely of the rest. Christophe > > Make the symbol protected so that it is non-preemptible but still > exported. > > [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 > >