Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3790378ybl; Tue, 21 Jan 2020 07:06:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyZkxMgilq6kM01qyalKFKyVPaumK7K/+iO6hI3aUERozhUEIeULbuTflr5DwidhrUK6VY7 X-Received: by 2002:a05:6830:c2:: with SMTP id x2mr1366232oto.8.1579619202369; Tue, 21 Jan 2020 07:06:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579619202; cv=none; d=google.com; s=arc-20160816; b=eTE2e2u5zaTMbX5CykpmbrmW/xnG3DxPEvCY1AObVdRxdPGMV35EZWoDUOxJV75DAs R1s6YVZ9LnVWB9Sbol/LCpN//4qSALA9g/S1+3yurzOuX0V8taI3ZHN1eMVJAeiTJPNy gmX8JaOqFK20Zy9FMWoJsXzeVTaEe20KmGX35CAgszqIa3kO1+7yzuoZos5KVVfGSa+s i5LYf8HtDBnQdNTj/X4/plfz15Jvr2SN1YEL3a4PeB1dbe0nRcS/cRciurfl8YPoLaF9 YUd7KBs0APMaiXfajyZaxCncTAULuDxdP1yV2M3zh5G4kWGuaqXYuBDwUX0w8CdrW4aj MXqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=3fX8yqVdokeUbIrwEfgnVCmcXTtAwRGxuX8ZNd4rp/U=; b=QWQsw78rAH3dyLF25zfosmY0xG8aijh8QjgCTlcxIIq+/J5dsXgCZxzm1frmvx20TT 7xVfbVpckd4nFAfFQjSbZGVb5f6ZE3gFir3h/49kin647A/KRgyHkMhXGu8dN44TituP SP6A+/82wz3L8g0MHV4Gx2MN2GjJFDpEGlbH7svaP/WeHPZaqw7vAwk18cElrbH8gllC t3c+GsbTjfVBdFgBxkOG5RfzNLbCNilONzWBKc8mMtGBq3QqSJT3tYI88/5ZYjdsXGh+ CtCy6aJKxU+yFxxrYCUNBFrS04/HvBVcswa1Zaa9jKjVMJHqT2ep07EpflD77mMhznFF suTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=lqbjIQov; 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=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m25si23118621otn.208.2020.01.21.07.06.29; Tue, 21 Jan 2020 07:06:42 -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=@chrisdown.name header.s=google header.b=lqbjIQov; 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=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729184AbgAUPEe (ORCPT + 99 others); Tue, 21 Jan 2020 10:04:34 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38215 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726968AbgAUPEe (ORCPT ); Tue, 21 Jan 2020 10:04:34 -0500 Received: by mail-wr1-f65.google.com with SMTP id y17so3583497wrh.5 for ; Tue, 21 Jan 2020 07:04:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=3fX8yqVdokeUbIrwEfgnVCmcXTtAwRGxuX8ZNd4rp/U=; b=lqbjIQovQBhxj+xtgVpB8uPL58iOhyecjOyhwTyWj62vfntLi4PpGJ6VfGKjJ2QUnK JMumsdiQl5V6T7LB2vFENkf8ojE07zTSr/3BJxxB/9O7BC4rZwYKSzfyCvx7JknD3GMV Ea2K+iKl2ejNEzovb915Aw97aYSA1UGVo51PM= 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:mime-version :content-disposition; bh=3fX8yqVdokeUbIrwEfgnVCmcXTtAwRGxuX8ZNd4rp/U=; b=dA8W0F+JESjhVfP5/hFzg+1di5L6sBgRwc92q1yR3d7+jZMMEV3y6mEnXHsjkP3KpH R10MqHz7oE36vJ5qEJknW8RLH51S1wLCkgoGyv5rByiuUJz5afbo9tYk6L5/z7ZfIyH2 ktpedTOc8AZHGBC575lpPeoViDOvZtj2dnAoHpYEVz7UB0MZC42y7I+JR9pMbksARgu2 jyLU2zAg1ha/YeM1yGB09f6m0vwCflCG279jmyL+qzsdvcS9vIuTimtRgpMsJPUT8pQ0 MNlyUqByHnkfTcRqIGSHO7zvmRLC+6Ku3n+ZACo/+IJ+6aUX3pZocFpHgAjie1uSWnku NSRg== X-Gm-Message-State: APjAAAUX/q9+ek8PnzR9pEOKzKB5TTX4B8ik6uo5GUBiGjklTftBK5N+ rngz0x5xLJdycYBnhZaIe5Op2g== X-Received: by 2002:a5d:4d8d:: with SMTP id b13mr5816499wru.6.1579619072431; Tue, 21 Jan 2020 07:04:32 -0800 (PST) Received: from localhost ([2620:10d:c092:180::1:db6c]) by smtp.gmail.com with ESMTPSA id s15sm49352115wrp.4.2020.01.21.07.04.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 07:04:31 -0800 (PST) Date: Tue, 21 Jan 2020 15:04:31 +0000 From: Chris Down To: bpf@vger.kernel.org, netdev@vger.kernel.org Cc: Stanislav Fomichev , Andrii Nakryiko , John Fastabend , linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [PATCH] bpf: btf: Always output invariant hit in pahole DWARF to BTF transform Message-ID: <20200121150431.GA240246@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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