From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2105BC33CB3 for ; Wed, 15 Jan 2020 20:48:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 007552084D for ; Wed, 15 Jan 2020 20:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729439AbgAOUsY (ORCPT ); Wed, 15 Jan 2020 15:48:24 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:32963 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729263AbgAOUsX (ORCPT ); Wed, 15 Jan 2020 15:48:23 -0500 X-Originating-IP: 79.86.19.127 Received: from [192.168.0.12] (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alexandre@ghiti.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 161D1240002; Wed, 15 Jan 2020 20:48:18 +0000 (UTC) From: Alexandre Ghiti Subject: Re: linux-next: build warning after merge of the bpf-next tree To: Alexei Starovoitov , Zong Li Cc: Palmer Dabbelt , Stephen Rothwell , Daniel Borkmann , Alexei Starovoitov , Network Development , Linux-Next Mailing List , "linux-kernel@vger.kernel.org List" , ppc-dev , linux-arm-kernel References: <20191018105657.4584ec67@canb.auug.org.au> <20191028110257.6d6dba6e@canb.auug.org.au> Message-ID: <6c03d212-775c-cddb-b0d0-d7b00571694b@ghiti.fr> Date: Wed, 15 Jan 2020 15:48:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/14/20 6:23 AM, Alexei Starovoitov wrote: > On Sun, Jan 12, 2020 at 8:33 PM Zong Li wrote: >> I'm not quite familiar with btf, so I have no idea why there are two >> weak symbols be added in 8580ac9404f6 ("bpf: Process in-kernel BTF") > I can explain what these weak symbols are for, but that won't change > the fact that compiler or linker are buggy. The weak symbols should work > in all cases and compiler should pick correct relocation. > In this case it sounds that compiler picked relative relocation and failed > to reach zero from that address. Sorry for the response delay: I now agree that there is nothing weird about those relocations. All compiler/linker I took a look at (arm64, ppc64 and riscv64) correctly emit an absolute relocation to the address 0 in case of a weak unresolved symbol, so there's no buggy compiler/linker. And regarding ppc warning, the kernel being compiled as -pie, the scripts looks for absolute relocations which it considers as "bad", except for one that is known to be weak and that is ignored: I have just sent a patch to fix this script so that weak undefined symbol relocations are not considered as bad. Thanks, Alex From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 976C1C32771 for ; Wed, 15 Jan 2020 20:50:25 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 562242081E for ; Wed, 15 Jan 2020 20:50:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 562242081E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47yfbf2nRhzDqS6 for ; Thu, 16 Jan 2020 07:50:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=ghiti.fr (client-ip=217.70.183.193; helo=relay1-d.mail.gandi.net; envelope-from=alexandre@ghiti.fr; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47yfYS4fdJzDq9j for ; Thu, 16 Jan 2020 07:48:26 +1100 (AEDT) X-Originating-IP: 79.86.19.127 Received: from [192.168.0.12] (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alexandre@ghiti.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 161D1240002; Wed, 15 Jan 2020 20:48:18 +0000 (UTC) From: Alexandre Ghiti Subject: Re: linux-next: build warning after merge of the bpf-next tree To: Alexei Starovoitov , Zong Li References: <20191018105657.4584ec67@canb.auug.org.au> <20191028110257.6d6dba6e@canb.auug.org.au> Message-ID: <6c03d212-775c-cddb-b0d0-d7b00571694b@ghiti.fr> Date: Wed, 15 Jan 2020 15:48:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Rothwell , Daniel Borkmann , Network Development , Palmer Dabbelt , Alexei Starovoitov , "linux-kernel@vger.kernel.org List" , Linux-Next Mailing List , ppc-dev , linux-arm-kernel Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 1/14/20 6:23 AM, Alexei Starovoitov wrote: > On Sun, Jan 12, 2020 at 8:33 PM Zong Li wrote: >> I'm not quite familiar with btf, so I have no idea why there are two >> weak symbols be added in 8580ac9404f6 ("bpf: Process in-kernel BTF") > I can explain what these weak symbols are for, but that won't change > the fact that compiler or linker are buggy. The weak symbols should work > in all cases and compiler should pick correct relocation. > In this case it sounds that compiler picked relative relocation and failed > to reach zero from that address. Sorry for the response delay: I now agree that there is nothing weird about those relocations. All compiler/linker I took a look at (arm64, ppc64 and riscv64) correctly emit an absolute relocation to the address 0 in case of a weak unresolved symbol, so there's no buggy compiler/linker. And regarding ppc warning, the kernel being compiled as -pie, the scripts looks for absolute relocations which it considers as "bad", except for one that is known to be weak and that is ignored: I have just sent a patch to fix this script so that weak undefined symbol relocations are not considered as bad. Thanks, Alex From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07666C32771 for ; Wed, 15 Jan 2020 20:48:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF5CA2081E for ; Wed, 15 Jan 2020 20:48:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bfhxNuY7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF5CA2081E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KlninYoRCj8mmqsyI58zoJlHLvr7sj/+1tQwjEhf3a8=; b=bfhxNuY7UVi1FHBybGE3k7r2k Wpt1eLgB8bNVBOmJ+hu2XPurekvyWoaMj7PNtOMOK3gd0aDugEx8sD0tUY6Tr0eKAinO4FrVVTVMA ZSoMD0kzqV586zu7mekpb/HTZ0+fOtQNpke7RLRKQK0aVmjmi7xXdDx6i//Ynr7huNJfoa79h97ue 6VfiVeUlhFdhBHH8Pj+Va/Soo9gPSGC7/TgiuMlE8GnqDX0REM7o5NNX7M0a3YQiuiY1rI9gLfOgv PAIICamYU1tYRGDvR4Lba8i3J/FWL+5QY2OoPaPuU9L6al6UEsI1znY2bT3vEdKfOJ3G8Wh3YAZxS FdK//ubVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1irpaZ-0000eR-5v; Wed, 15 Jan 2020 20:48:31 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1irpaV-0000ch-Vz for linux-arm-kernel@lists.infradead.org; Wed, 15 Jan 2020 20:48:29 +0000 X-Originating-IP: 79.86.19.127 Received: from [192.168.0.12] (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alexandre@ghiti.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 161D1240002; Wed, 15 Jan 2020 20:48:18 +0000 (UTC) From: Alexandre Ghiti Subject: Re: linux-next: build warning after merge of the bpf-next tree To: Alexei Starovoitov , Zong Li References: <20191018105657.4584ec67@canb.auug.org.au> <20191028110257.6d6dba6e@canb.auug.org.au> Message-ID: <6c03d212-775c-cddb-b0d0-d7b00571694b@ghiti.fr> Date: Wed, 15 Jan 2020 15:48:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200115_124828_170511_CB2517CD X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Rothwell , Daniel Borkmann , Network Development , Palmer Dabbelt , Alexei Starovoitov , "linux-kernel@vger.kernel.org List" , Linux-Next Mailing List , ppc-dev , linux-arm-kernel Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/14/20 6:23 AM, Alexei Starovoitov wrote: > On Sun, Jan 12, 2020 at 8:33 PM Zong Li wrote: >> I'm not quite familiar with btf, so I have no idea why there are two >> weak symbols be added in 8580ac9404f6 ("bpf: Process in-kernel BTF") > I can explain what these weak symbols are for, but that won't change > the fact that compiler or linker are buggy. The weak symbols should work > in all cases and compiler should pick correct relocation. > In this case it sounds that compiler picked relative relocation and failed > to reach zero from that address. Sorry for the response delay: I now agree that there is nothing weird about those relocations. All compiler/linker I took a look at (arm64, ppc64 and riscv64) correctly emit an absolute relocation to the address 0 in case of a weak unresolved symbol, so there's no buggy compiler/linker. And regarding ppc warning, the kernel being compiled as -pie, the scripts looks for absolute relocations which it considers as "bad", except for one that is known to be weak and that is ignored: I have just sent a patch to fix this script so that weak undefined symbol relocations are not considered as bad. Thanks, Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel