Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4248980ybl; Tue, 21 Jan 2020 16:07:16 -0800 (PST) X-Google-Smtp-Source: APXvYqzXnzmsHIXopnpckWaEhP2MBRYbLLMyA2I2it2zJymCVKwBRn/+llS/PwglhDojwsynqZwV X-Received: by 2002:aca:f555:: with SMTP id t82mr5100299oih.103.1579651636806; Tue, 21 Jan 2020 16:07:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579651636; cv=none; d=google.com; s=arc-20160816; b=kwV6h1Pw6wKfY+V8B1OtOiyBDc7w6qxiBwEr4oB5Ve7DAKuNu0Qo3TOQzsR110qrmi q9IDEUL+Fano97m4HWH3POZP6FXdrYbQNi8kNhZj58OgJk6seHq/CRDNlWh3cLVUS5K2 lDMWP8W9cGpA4czJBzefmBXyYcAbodOJOfIIWQo3fBbA2w5QqXwiBDcHW78QWkXzcGoJ ymX4cJgc8YlU38EJVG09ZNX4p943SJJOSLl9K7Wx1RMkE9iN/X1NlXLVqQ0CJoQl6rRH ZhC0JLTPRzikIbmQL6JBHz5MLfvv4IhB3SyGmAbkO7iNsP7rrY3OYwOoZeFMPovhRDGk KMSA== 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=dLQ+QI++eCjlyAt/BPhwKj9mJwMzoHkPG5/0tL6ZnQU=; b=VZCadJoRUKcW6Btn6xCnlTtfhX/IUQYrYE1h6tqbRKkMmGUyrHM5JEDdXvjAqjFBrm Xuy1hk4z58IfKoFo4XCASUFffB7VezPtnJDG/S60//tKjLTWJx3+4RljNrW9LcQ+Kemh /Hw01kDa6nOu5AA5wRCeXaz7OCW5YJYl+un3/xbTLmSJftrx8oK7Mv+9Y+t6PZVOFryy v5GpyHMH4jBSD2KH5QP84hq6XMt7JbUEmSjRfdED+AGqd5vcE4UXQZs/GmgfzU9+x/TY oBACT8fdZPYScQ3CdEaFQFpaqOvHki0hhPNc0Tp97graFWTKUD/lgpC1EZ83eXW+nBOO Si4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NkUmJmAS; 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 v10si19845510ote.97.2020.01.21.16.07.03; Tue, 21 Jan 2020 16:07:16 -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=NkUmJmAS; 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 S1728894AbgAVAGG (ORCPT + 99 others); Tue, 21 Jan 2020 19:06:06 -0500 Received: from mail-qk1-f195.google.com ([209.85.222.195]:41721 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbgAVAGF (ORCPT ); Tue, 21 Jan 2020 19:06:05 -0500 Received: by mail-qk1-f195.google.com with SMTP id x129so4690564qke.8; Tue, 21 Jan 2020 16:06:05 -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=dLQ+QI++eCjlyAt/BPhwKj9mJwMzoHkPG5/0tL6ZnQU=; b=NkUmJmAS/2iCKF4LmTItJ92DYd5DIifuu7d47SeBDHxG7VcscD/iFZprmsKSaYsPGW IGj/AWfp0fFt1lPWNoFcMyuOMcbRapp8qLEdY/3BY5naJqorz2dkOBsccg9wHs+k6zq5 wuXwAG2pIPFJuWwMf5ORAS68nKz7eJkVuFhvd09Xi6AK7Bgt1JyaEc7kbyi2ub023Jqq 2zmBYQWZR8B7y+l1uM2TuqblpMTtpPSmEjacnV4eW1nxbNxi2Ceh7EX2aBmmOrwFvUSW emH3tQ6H+XZYSpxgEJ3aWMrJL7dLtfPGTKPRjlJJDEGn2A+slUOEHMrkhMsdUNTyKj9P LK5w== 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=dLQ+QI++eCjlyAt/BPhwKj9mJwMzoHkPG5/0tL6ZnQU=; b=da9y9qF8QAVUEt3Wfc8koNG79psGjERwt7gcMxM/fxPKTphyJDxJjfHcRLFJEU3D7R +1vawcziaXU9I5urlLFk/QxOSjT4vtmmcSIS//+7Fuz5eoS4MeAvYmolC/aM6pabKxn/ PgJa3TB/2P/DJmZ7XJ8E8IkDnaS1MUI7BGz8o7fyI5vjKZW9GqiddJY/OCmKcNPMgpC5 YOamN27NrLfZnCqotD6L2vXbDFOewFCg4Nx+Ndo+/tNzftwJngzp7a7ZOTg/sDk2D9Tp 66dAu1u1IuoF0ENFKupPWtKq8AtSZDyQSPS335s6HwagXjzO+tIj5oNxHNGKxGn7PAhX nu9g== X-Gm-Message-State: APjAAAUoavMcQGB9HkP0cscmA1JodQKZEZkEoYFhAIeT7Al0yC4Xkpai LGVWiP1Tc4CmPmXrQCUQ9s86ZL6ZhODcU+JBabd8Wg== X-Received: by 2002:a05:620a:5ae:: with SMTP id q14mr7456752qkq.437.1579651564807; Tue, 21 Jan 2020 16:06:04 -0800 (PST) MIME-Version: 1.0 References: <20200122000110.GA310073@chrisdown.name> In-Reply-To: <20200122000110.GA310073@chrisdown.name> From: Andrii Nakryiko Date: Tue, 21 Jan 2020 16:05:53 -0800 Message-ID: Subject: Re: [PATCH v2] 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 4:01 PM 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 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Looks great, thanks! Acked-by: Andrii Nakryiko > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index c287ad9b3a67..bbe9be2bf5ff 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -108,13 +108,13 @@ gen_btf() > local bin_arch > > if ! [ -x "$(command -v ${PAHOLE})" ]; then > - info "BTF" "${1}: pahole (${PAHOLE}) is not available" > + echo >&2 "BTF: ${1}: pahole (${PAHOLE}) is not available" > 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" > + echo >&2 "BTF: ${1}: pahole version $(${PAHOLE} --version) is too old, need at least v1.13" > return 1 > fi > > -- > 2.25.0 >