Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4009235ybl; Tue, 21 Jan 2020 11:07:57 -0800 (PST) X-Google-Smtp-Source: APXvYqweWc+YpIuU1GADomrXcvLopgHCYQZCmydjRmAJliasnDE8jPZu1RDAx1gZqAy7OANyvajk X-Received: by 2002:a05:6830:2009:: with SMTP id e9mr4780339otp.160.1579633677625; Tue, 21 Jan 2020 11:07:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579633677; cv=none; d=google.com; s=arc-20160816; b=m4xyB3M57p7bZxS7cfD7vfNc3MtNx5tf1BUMmNFfMEl0QCN2CZEZCGs2ifxdCOjWQu n1cgGvgyHmeiyZObf1T9GrfZ+AOdOjJ6sTJR8kLUGwtFOLebSIOHz2Yt/vmqcx0WYJ1U mhFND20Mk5bCQ+gY0i8zMiYTqXfl+lab4u2Bu8mgKdLYSGSRxYIcCPEzwOd6/uWku/hs y4RBTtKf3/RET3Bi1Lapd2m30iKEY1i7p40khC4r/NKoLKsQ7HVJCsJFGW8WG2klqTn8 7BvVMHOiBqlNwuzGW2M5ikLFTAzhkG1wi+m1CJjXW9DGFC+rqIlOykcUxy/3bkZBGuSj 9pqw== 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=h9l4pccApU6icRLlOza3B0ImHsVOwXrkyewWhbtE6M8=; b=s3FN5rxj94L3GKcoyEtA1u5NteNs8WbsyRc5M75dLB3SI0LvHbScYGsRZR8JO+F1w7 RvHqeMw76Ky+6pLVARZzdFZfSajd9Rgy1Ipz6cNmZHmWSHyLuneLzixJw0XBmg1ghRnr Qi6aVxVcFiPXbwH5+JQJdspK26jmFFQ+vfiPPtYR6eJJKl21wu85rbCJ4p/+b18ppfJZ xTOXWl6djxJlALQZrFb/TEwN2BUyMutpwDL4KVJQz5BLDrpu21SBWXMryAg9VPjq9H8j n1tqJiQDpO50peE4yReNDvcECsBBDsbbpHJYOgDpBz6+A4McU4wJGipx84qAWt2fDTV/ 51Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y7V3uRh4; 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 q6si23112035oth.26.2020.01.21.11.07.44; Tue, 21 Jan 2020 11:07:57 -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=Y7V3uRh4; 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 S1729353AbgAUTGU (ORCPT + 99 others); Tue, 21 Jan 2020 14:06:20 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:42840 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728829AbgAUTGT (ORCPT ); Tue, 21 Jan 2020 14:06:19 -0500 Received: by mail-qk1-f195.google.com with SMTP id q15so3125393qke.9; Tue, 21 Jan 2020 11:06:19 -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=h9l4pccApU6icRLlOza3B0ImHsVOwXrkyewWhbtE6M8=; b=Y7V3uRh4VCQUOCckTPU9FlDtZ7lj354vAGW71DSl9e+k6dD8wek9fSEh8U7SgWn3Y9 cMKNDy7lu5Zu6IarlWw+aUo9vAT+I/aYUJ/kI+LRa3DZOw2fn1T8emIXi+Vdo9Twj9Yo kappk8Ny8E63YBwb4RAT+aJAnxjbw3pqkj2xNBVtrZxrBJgAtpJqavFkhwvwHTMtrOLl jYt6CSrnXzlk9U/P4IERjPTidx9nlA3ys+bPiQ9pIjGfpB4GFQsoQ/9MwsCgZ9jhP0HX 3aszLnFhXb7/UTHVwAiWEj+GIwvgdjbs8m3gOEgEic7U+o63nxMQHY/hj65nTDcjavHS 5ktA== 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=h9l4pccApU6icRLlOza3B0ImHsVOwXrkyewWhbtE6M8=; b=MI3XB9i7g/ZjOD/sL4e2g8uhIoLaTZhhk4E0H+ebfakWtlKDuCSBasu3GOvu5U+Nq0 HUnwEZ8DHm3Ckakhkein+PL34r3kDAM+YBTLJIPv5pMsvb8vrrlEHw0hPhQHhEc+Y2uS ArHnQhnmot8nlr8Gbjwy4oZMI+gwv9Hn0XcLKrHdNHKpK7RUwvltgKcoFmsJgchc5dmi 4ivuzcaj7NxuPKlU6o9E5ZCG1HDzATjmc1wuve5NL92jSSxbTwPGpLSqmgJIxGU/g2ke CebYNwGt+yzczYd3umK66Ep5X13Uh5fdFB08fv6unmbgFA6pOOOIBPuMfVIO5WHcSVGO eexw== X-Gm-Message-State: APjAAAVfWe5SvSx/6x7iaGbF+wzHGMfmjMgO5jauSQa7X7jSJPvlBtMQ 2c+F0X87NAvd2wfsRIZ14EByd4Jf/Oq7aIrmdy4= X-Received: by 2002:a37:e408:: with SMTP id y8mr6013574qkf.39.1579633578497; Tue, 21 Jan 2020 11:06:18 -0800 (PST) MIME-Version: 1.0 References: <20200121150431.GA240246@chrisdown.name> In-Reply-To: <20200121150431.GA240246@chrisdown.name> From: Andrii Nakryiko Date: Tue, 21 Jan 2020 11:06:07 -0800 Message-ID: Subject: Re: [PATCH] bpf: btf: Always output invariant hit in pahole DWARF to BTF transform To: Chris Down Cc: bpf , Networking , Stanislav Fomichev , Andrii Nakryiko , John Fastabend , open list , Kernel Team 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 Tue, Jan 21, 2020 at 7:05 AM Chris Down wrote: > > When trying to compile with CONFIG_DEBUG_INFO_BTF enabled, I got this > error: > > % make -s > Failed to generate BTF for vmlinux > Try to disable CONFIG_DEBUG_INFO_BTF > make[3]: *** [vmlinux] Error 1 > > Compiling again without -s shows the true error (that pahole is > missing), but since this is fatal, we should show the error > unconditionally on stderr as well, not silence it using the `info` > function. With this patch: > > % make -s > BTF: .tmp_vmlinux.btf: pahole (pahole) is not available > Failed to generate BTF for vmlinux > Try to disable CONFIG_DEBUG_INFO_BTF > make[3]: *** [vmlinux] Error 1 > > Signed-off-by: Chris Down > Cc: Stanislav Fomichev > Cc: Andrii Nakryiko > Cc: John Fastabend > Cc: linux-kernel@vger.kernel.org > Cc: netdev@vger.kernel.org > Cc: bpf@vger.kernel.org > Cc: kernel-team@fb.com > --- > scripts/link-vmlinux.sh | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index c287ad9b3a67..c8e9f49903a0 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -108,13 +108,15 @@ gen_btf() > local bin_arch > > if ! [ -x "$(command -v ${PAHOLE})" ]; then > - info "BTF" "${1}: pahole (${PAHOLE}) is not available" > + printf 'BTF: %s: pahole (%s) is not available\n' \ > + "${1}" "${PAHOLE}" >&2 any reason not to use echo instead of printf? would be more minimal change > return 1 > fi > > pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/') > if [ "${pahole_ver}" -lt "113" ]; then > - info "BTF" "${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13" > + printf 'BTF: %s: pahole version %s is too old, need at least v1.13\n' \ > + "${1}" "$(${PAHOLE} --version)" >&2 > return 1 > fi > > -- > 2.25.0 >