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=-8.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 3EBFEC282C3 for ; Thu, 24 Jan 2019 03:15:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D6BE218A2 for ; Thu, 24 Jan 2019 03:15:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fomichev-me.20150623.gappssmtp.com header.i=@fomichev-me.20150623.gappssmtp.com header.b="TeTO4ssU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726997AbfAXDPL (ORCPT ); Wed, 23 Jan 2019 22:15:11 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:37491 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbfAXDPK (ORCPT ); Wed, 23 Jan 2019 22:15:10 -0500 Received: by mail-pl1-f194.google.com with SMTP id b5so2200204plr.4 for ; Wed, 23 Jan 2019 19:15:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fomichev-me.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8DI82blJvqid7qdppp+Cvf2e1cufPMc6e4JQIqsYmg8=; b=TeTO4ssUR2hgX3lB2S6edMEWGQE71N62u1AX4P7ArtzSeQKK3zFtwjqO2m6Zj7r4uJ wA4T0VB/zuBWPthg/ZtxjgiS/fYWJaJUpcIm3z8EjPrHdwN9UFnVOp2LhCGeCKqmFGdh hfX/KZq3PmZ5jOBkKNX3X5rn8k5hhGkloPOA3KnrocNE8oduVkarIu1aEbsaNw2Cyp+/ XfPDmyDnyctGu0c5rZ75sNibNrOSc0oatQ6ZkG0u2kUFOpoKuL6zs9YQ3n7AlDBTCkUO nsp9AMZOrm0Rm2RGnb3h4vTyz51tipdcS5yBnGdHM4nIQvRzEZijv9amhL6nfOfTL34U 0+dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8DI82blJvqid7qdppp+Cvf2e1cufPMc6e4JQIqsYmg8=; b=ABF5SfsBekutk3d82H0TzLU7h/839nycEc673vzCuh9T208NgtWOjr2SdmFsywPVa2 EKMwYeOS63H4hr4O6d3aZ8bPpMNKSF/CRTbbXYAmq3v1h8Q3qYGJj1rBFfXBbjCs3647 DKT/NPrxTn4dmLff5sL+bmDy7uR+Hmqb1IyF0vjggU6UZp7brRHFkrbjmmPPs6y4O6fA q6wpXOf8QIK6jO+jvmoEzMKhKXaAw68e4xLeTJ/HFOxnugAdSYoKZ+ae5wb+ECBnaXw8 GjLJZH4NDL6srA9EB6Ot3RruFCEMHRAjhZwkQgFuKQnz9BDHvw3RrgUKBhNrmAHS4q1y 7aiw== X-Gm-Message-State: AJcUukc7/W8fUvIWrI/rCV0x/ln6qyxz8LT0XCmA1c43FMvKfNM5qQxy cN8MgNRm8LnW8+3K1AIJ+OHFJA== X-Google-Smtp-Source: ALg8bN7tgYXqxPkfSR7SWguCANQ+erp4wU5L0qpgVjWei0rQF/Vxt5huyYuIzpXHiYdmYSn69uXjwg== X-Received: by 2002:a17:902:4324:: with SMTP id i33mr4748444pld.227.1548299709903; Wed, 23 Jan 2019 19:15:09 -0800 (PST) Received: from localhost ([2601:646:8f00:18d9:d0fa:7a4b:764f:de48]) by smtp.gmail.com with ESMTPSA id f67sm29820065pfc.141.2019.01.23.19.15.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Jan 2019 19:15:08 -0800 (PST) Date: Wed, 23 Jan 2019 19:15:07 -0800 From: Stanislav Fomichev To: Alexei Starovoitov Cc: Stanislav Fomichev , netdev@vger.kernel.org, davem@davemloft.net, ast@kernel.org, daniel@iogearbox.net Subject: Re: [PATCH bpf-next] selftests/bpf: suppress readelf stderr when probing for BTF support Message-ID: <20190124031507.GC26773@mini-arch> References: <20190123172435.197862-1-sdf@google.com> <20190124014527.kb7gpsrvz2zh2jhv@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190124014527.kb7gpsrvz2zh2jhv@ast-mbp.dhcp.thefacebook.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 01/23, Alexei Starovoitov wrote: > On Wed, Jan 23, 2019 at 09:24:35AM -0800, Stanislav Fomichev wrote: > > Before: > > $ make -s -C tools/testing/selftests/bpf > > readelf: Error: Missing knowledge of 32-bit reloc types used in DWARF > > sections of machine number 247 > > readelf: Warning: unable to apply unsupported reloc type 10 to section > > .debug_info > > readelf: Warning: unable to apply unsupported reloc type 1 to section > > .debug_info > > readelf: Warning: unable to apply unsupported reloc type 10 to section > > .debug_info > > > > After: > > $ make -s -C tools/testing/selftests/bpf > > > > Signed-off-by: Stanislav Fomichev > > --- > > tools/testing/selftests/bpf/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > > index 70229de510f5..ff3cab5525c1 100644 > > --- a/tools/testing/selftests/bpf/Makefile > > +++ b/tools/testing/selftests/bpf/Makefile > > @@ -131,7 +131,7 @@ BTF_PAHOLE_PROBE := $(shell $(BTF_PAHOLE) --help 2>&1 | grep BTF) > > BTF_OBJCOPY_PROBE := $(shell $(LLVM_OBJCOPY) --help 2>&1 | grep -i 'usage.*llvm') > > BTF_LLVM_PROBE := $(shell echo "int main() { return 0; }" | \ > > $(CLANG) -target bpf -O2 -g -c -x c - -o ./llvm_btf_verify.o; \ > > - readelf -S ./llvm_btf_verify.o | grep BTF; \ > > + readelf -S ./llvm_btf_verify.o 2>/dev/null | grep BTF; \ > > /bin/rm -f ./llvm_btf_verify.o) > > Silencing the warning may hide real issue later. > I'd rather fix whatever is necessary in readelf. > Does it use bfd? if so bpf support for bfd was practically complete. Are you concerned about the situation where llvm has btf support, but readelf (binutils) is unaware of it? In this case, we should probably use llvm's readelf (llvm-readelf binary). We already have a precedent of using llvm's tools with LLVM_OBJCOPY. Let me try it out tomorrow.