Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1270821ybl; Fri, 10 Jan 2020 15:20:13 -0800 (PST) X-Google-Smtp-Source: APXvYqx5zPFd5xV6EHEIZ2j7hZjkankBO8AZBDhhDyxj+fsFTiqOuGCGvVQLFCUvzt9oTM+cFDio X-Received: by 2002:a05:6808:191:: with SMTP id w17mr4117475oic.29.1578698413449; Fri, 10 Jan 2020 15:20:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578698413; cv=none; d=google.com; s=arc-20160816; b=PIbc3nmzhcDBvUfYGuSL4lefF9c5c5Z3mpwFqRNfWuux7aTrBLNSKucwJ2S8boTZja OPdtbCaztHgwvX2zD8hPeUOf3LZwsx/4ePZ9SCXGlyB6o8DPvaPw3QSObnM2HhGa27Tq O8Wvk3Le939AKkmTje5qT1hp6JaPI698AeeXOMuL6z+uakNStb3kZ0nufxfmoBiMJKQC xYJysVhEM2Ri5MsDjjjxsgXL4Xs8hX3zyJucmzvtFEs0Kncka6vDdUszTiji2zgDAvE4 6vK9X+QR+Ysj/SMwwzlgdp5jvZzYou3uIscydCNXL6TjEzVfXaBxzP916B/4riFyUQab dnyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sDCm2fAgdbf9iSd/cGIS/CChQu2q61Zn9eY7u0OfUvA=; b=HuWsYHrF8eYYTerYaPa7ABGVeayyryZ4jViLJYJoCpVXjp6LGA/jwAtF/5HC9OGgxk yPZyCtkSoRN8wjLgLmSZHuy/rEtdvDAH/Erbd5Gmrj4sXiHDWDX3X48mkZ6+7mX2yz53 zuwayWjdsnEP2Hu7ZdwqRDhhiPktM2UcJZZPUKcEPRsJmPpASdiac0ZR/d0ZBC0nKWfw ayDxSWCyEvHDy+P9Wwp+wUOr7TkmRtoIMF/taQAe8ES+EcCogTa5di7lTgPzfR197Lut oVVtzMOuKfJPWBciecDBBulAvSlbigbWup2Jre29QK0nCX122+qD/yzIpQ05s0qe0Anw 7Y1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mSXSzvDi; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si2168756otm.263.2020.01.10.15.20.00; Fri, 10 Jan 2020 15:20:13 -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=@gmail.com header.s=20161025 header.b=mSXSzvDi; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727483AbgAJXTD (ORCPT + 99 others); Fri, 10 Jan 2020 18:19:03 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35935 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727324AbgAJXTD (ORCPT ); Fri, 10 Jan 2020 18:19:03 -0500 Received: by mail-lj1-f195.google.com with SMTP id r19so3828336ljg.3; Fri, 10 Jan 2020 15:19:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sDCm2fAgdbf9iSd/cGIS/CChQu2q61Zn9eY7u0OfUvA=; b=mSXSzvDisimwy4fkPM0YoB3LyDLUDwqWRyHDDL9TbdonJkxVuiWmNym9tx/UBqT/oy 6YyoKqxhS9fU2n/yHjkdK/4+dWFx80x6lGGx4ruh0cLAJwHoASZQo0QaqjFECG0yrNN7 TbLzcJubxPIWx14YYb3VytxYW/tOw0lsHTOfF76XMnpFYUuZ7aZ6omUmN7D+ob09G+7B y306y84V1d4qg9kP6oYcVS5FmbYeB2MXPegicIZWqJK7A0kDC1wknXUtB/b6nG/TQ6vc v7vrI/Oh+C9/RDE3+jI5vVi9FDgAZcb51u6HuQXb7o/cR/5xo67iIdyoADeuKbQFQRYQ X0Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sDCm2fAgdbf9iSd/cGIS/CChQu2q61Zn9eY7u0OfUvA=; b=VbSlsvy6S9zx7Dh3mbwJoy9Pg14lYmFHgD4YW4+IKZdNpimA8lgJ2n+OaCiyesXtiU SNo+qPssErTGRUPONz6VuqCf+fS3fI/I+WZOPE2pQs1QbPOUupCj64WDWDY0UF4cM8P3 chIIPsJ/7k9+395h+OuOY+gNr9OpD79SRHQOoLIogAgGXR8MO69p4Oi6sHcOpU3lnGU+ of+ymcLlBP8fW06SB1DrElyF+xnSGsmSotsEYtajmK8tqYAViCSW1WsQ2ywuJBT5DhXB u6tMprn7NhOzZiqv8YrAETE+dI+19/COuc1NSGivx1xo0YqiFEjPaCXtj6aJG4dED3U9 gdug== X-Gm-Message-State: APjAAAXRIDo6iP6bWDUKjlW8E5fHXJIZbnsR7M+RgxgjmccTSM57yXq+ 8G0Dt8w20EkIyuxMSTWGc/9JnT14zMtunP0JMus= X-Received: by 2002:a2e:58c:: with SMTP id 134mr4241974ljf.12.1578698341335; Fri, 10 Jan 2020 15:19:01 -0800 (PST) MIME-Version: 1.0 References: <20191018105657.4584ec67@canb.auug.org.au> <20191028110257.6d6dba6e@canb.auug.org.au> In-Reply-To: From: Alexei Starovoitov Date: Fri, 10 Jan 2020 15:18:50 -0800 Message-ID: Subject: Re: Re: linux-next: build warning after merge of the bpf-next tree To: Alexandre Ghiti Cc: Stephen Rothwell , Daniel Borkmann , Alexei Starovoitov , Networking , Linux Next Mailing List , Linux Kernel Mailing List , ppc-dev , linux-arm-kernel@lists.infradead.org, zong.li@sifive.com, Andrii Nakryiko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 10, 2020 at 2:28 PM Alexandre Ghiti wrote: > > Hi guys, > > On 10/27/19 8:02 PM, Stephen Rothwell wrote: > > Hi all, > > > > On Fri, 18 Oct 2019 10:56:57 +1100 Stephen Rothwell wrote: > >> Hi all, > >> > >> After merging the bpf-next tree, today's linux-next build (powerpc > >> ppc64_defconfig) produced this warning: > >> > >> WARNING: 2 bad relocations > >> c000000001998a48 R_PPC64_ADDR64 _binary__btf_vmlinux_bin_start > >> c000000001998a50 R_PPC64_ADDR64 _binary__btf_vmlinux_bin_end > >> > >> Introduced by commit > >> > >> 8580ac9404f6 ("bpf: Process in-kernel BTF") > > This warning now appears in the net-next tree build. > > > > > I bump that thread up because Zong also noticed that 2 new relocations for > those symbols appeared in my riscv relocatable kernel branch following > that commit. > > I also noticed 2 new relocations R_AARCH64_ABS64 appearing in arm64 kernel. > > Those 2 weak undefined symbols have existed since commit > 341dfcf8d78e ("btf: expose BTF info through sysfs") but this is the fact > to declare those symbols into btf.c that produced those relocations. > > I'm not sure what this all means, but this is not something I expected > for riscv for > a kernel linked with -shared/-fpie. Maybe should we just leave them to > zero ? > > I think that deserves a deeper look if someone understands all this > better than I do. Are you saying there is a warning for arm64 as well? Can ppc folks explain the above warning? What does it mean "2 bad relocations"? The code is doing: extern char __weak _binary__btf_vmlinux_bin_start[]; extern char __weak _binary__btf_vmlinux_bin_end[]; Since they are weak they should be zero when not defined. What's the issue?