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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 24A79C43464 for ; Fri, 18 Sep 2020 12:27:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D889221D24 for ; Fri, 18 Sep 2020 12:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600432029; bh=B4RZk8rLe8wXfX0Kzy+3Rtf6TqX0Ke2lJbkWOgE6mAg=; h=From:To:Cc:Subject:Date:List-ID:From; b=0Sedr6JxCrJCLHVfam0nB3423KCYgXu9VGaoTq79QCFFML9gBy3h4QcC+elGvOyAk WF5pISzD5r6UQfsE+3sR90m5Mg0WNj7mIs5DfgbE0wzpAKn1WZyFZPXmZehsFDkXJd pXoidweAYekl+YAtCs82xEJ3ZpQmf0TbtsL3MJyI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726501AbgIRM1I convert rfc822-to-8bit (ORCPT ); Fri, 18 Sep 2020 08:27:08 -0400 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]:39893 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbgIRM1F (ORCPT ); Fri, 18 Sep 2020 08:27:05 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-564-Vj-ZWnJTMQyEKZJkdrg9Jg-1; Fri, 18 Sep 2020 08:27:00 -0400 X-MC-Unique: Vj-ZWnJTMQyEKZJkdrg9Jg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1AE1F88EF21; Fri, 18 Sep 2020 12:26:59 +0000 (UTC) Received: from krava.redhat.com (ovpn-114-24.ams2.redhat.com [10.36.114.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB25110016DA; Fri, 18 Sep 2020 12:26:55 +0000 (UTC) From: Jiri Olsa To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Seth Forshee Subject: [PATCH bpf-next 1/2] bpf: Use --no-fail option if CONFIG_BPF is not enabled Date: Fri, 18 Sep 2020 14:26:53 +0200 Message-Id: <20200918122654.2625699-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jolsa@kernel.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currently all the resolve_btfids 'users' are under CONFIG_BPF code, so if we have CONFIG_BPF disabled, resolve_btfids will fail, because there's no data to resolve. In case CONFIG_BPF is disabled, using resolve_btfids --no-fail option, that makes resolve_btfids leave quietly if there's no data to resolve. Fixes: c9a0f3b85e09 ("bpf: Resolve BTF IDs in vmlinux image") Signed-off-by: Jiri Olsa --- scripts/link-vmlinux.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index e6e2d9e5ff48..3173b8cf08cb 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -342,8 +342,13 @@ vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o} # fill in BTF IDs if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then -info BTFIDS vmlinux -${RESOLVE_BTFIDS} vmlinux + info BTFIDS vmlinux + # Let's be more permissive if CONFIG_BPF is disabled + # and do not fail if there's no data to resolve. + if [ -z "${CONFIG_BPF}" ]; then + no_fail=--no-fail + fi + ${RESOLVE_BTFIDS} $no_fail vmlinux fi if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then -- 2.26.2