From patchwork Wed Nov 20 11:48:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Monnet X-Patchwork-Id: 1198058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="gDaccDhM"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47J1Dd3n9Dz9sPf; Wed, 20 Nov 2019 22:48:49 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iXOTN-0003jh-Ny; Wed, 20 Nov 2019 11:48:37 +0000 Received: from mail-wm1-f66.google.com ([209.85.128.66]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iXOTL-0003jI-Cf for kernel-team@lists.ubuntu.com; Wed, 20 Nov 2019 11:48:35 +0000 Received: by mail-wm1-f66.google.com with SMTP id l17so6673228wmh.0 for ; Wed, 20 Nov 2019 03:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BE/6/qls+KocXFx7ifR4VwKj5k1uxje4Kk9vuc9sFUI=; b=gDaccDhMss8+FxxZ8RvSYu3zZ2cr9FOaH+OIYbWQjSKgWYhsBLaSIWUc7Phw69NlMg VIpqsYKftvMeaIr9CraYCG+dSkay23MBBUxx3yJ1Mm6v4+gPwWqdI7CnVQkFwgD4Pbky whUe9gn/Zw8zOhyvVploabRXlBgErBq5hlmp+miu7I3OJLn40XbWALV72zhMS2NCppyo bRkhSJdBeGksFiQeVvoAkPkJLEtrfI+fwhgthGoxJtYEy//RXdfZvyuZdkWWMuoKmO34 lFQ6sOoFVerYLTrdYaVyQKjPOXhZz8cK9hiPVpqRLuT50g9CkB4r5R6xNMHDCqWsW37t zaQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BE/6/qls+KocXFx7ifR4VwKj5k1uxje4Kk9vuc9sFUI=; b=iA/3scgbKI6Y8LRLnN6oRAwJsDNmRaEoEmoTC7AEbpwLyqmRAwWcamxstvxOuPxgIF n5I7s+S+v3mJIT755R5umP1B5E4kUheXk6jmZRk2AlKKHL1YCwY5iSV35z+MIEdCraTz NjhrnEAmajG/UHbx/ZXorJ0ja4MUJiPfApAaaT148Wb7CXntpEPpzxwhYvJFoqLmUX9Y 6v6S8P22pbYd94qQS7Aap4pa/Jznkzcv5s/fY//W/cgz1o9uFbj+s/wTqOyn0KJY3AOQ FcuPEOOVOSMv3vL+dtMZNE/OUiMuW6+1YVPPmqYcD3YcnIki4dv9OcWE3a6xH3hkSLlw gqYw== X-Gm-Message-State: APjAAAWsN3LSTc58myuDUSsS5Ztjg+sm8LPPILDIucoN2mv8yf7U54e4 Lq3agoTsnEEFQkUe2WK/3okHfwfrMaaiUjB2awyToVHEDyRZoTiquQecFvPGIgbHAd8OviNkxQg XRdNAUJfc5gVEiLi3NaXVgBV8zWYe2TtyIPBkIJbqa8crSJrO+eZJIiQSHWjerwUoB/HqtmTo2P XljuMwraXpIw== X-Google-Smtp-Source: APXvYqx4ywNrxiTM5+mSHWpDwgOBPzYR8IYfg4YkdFPSq0hnLAEwRMc8Q/JAcap3ceKY/zB5iCcg9w== X-Received: by 2002:a1c:f20c:: with SMTP id s12mr2558188wmc.37.1574250514671; Wed, 20 Nov 2019 03:48:34 -0800 (PST) Received: from cbtest32.netronome.com ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id x9sm29970062wru.32.2019.11.20.03.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 03:48:33 -0800 (PST) From: Quentin Monnet To: kernel-team@lists.ubuntu.com Subject: [SRU][BIONIC][PATCH v3 1/4] tools/bpftool: fix bpftool build with bintutils >= 2.9 Date: Wed, 20 Nov 2019 11:48:20 +0000 Message-Id: <20191120114823.27955-2-quentin.monnet@netronome.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191120114823.27955-1-quentin.monnet@netronome.com> References: <20191120114823.27955-1-quentin.monnet@netronome.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Borkmann , oss-drivers@netronome.com, Stanislav Fomichev , Nicolas Dichtel , Roman Gushchin MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Roman Gushchin BugLink: https://bugs.launchpad.net/bugs/1774815 Bpftool build is broken with binutils version 2.29 and later. The cause is commit 003ca0fd2286 ("Refactor disassembler selection") in the binutils repo, which changed the disassembler() function signature. Fix this by adding a new "feature" to the tools/build/features infrastructure and make it responsible for decision which disassembler() function signature to use. Signed-off-by: Roman Gushchin Cc: Jakub Kicinski Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann (backported from commit fb982666e380c1632a74495b68b3c33a66e76430) Signed-off-by: Quentin Monnet --- tools/bpf/Makefile | 29 +++++++++++++++++++ tools/bpf/bpf_jit_disasm.c | 7 +++++ tools/bpf/bpftool/Makefile | 24 +++++++++++++++ tools/bpf/bpftool/jit_disasm.c | 7 +++++ tools/build/feature/Makefile | 4 +++ .../feature/test-disassembler-four-args.c | 15 ++++++++++ 6 files changed, 86 insertions(+) create mode 100644 tools/build/feature/test-disassembler-four-args.c diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile index 07a6697466ef..c8ec0ae16bf0 100644 --- a/tools/bpf/Makefile +++ b/tools/bpf/Makefile @@ -9,6 +9,35 @@ MAKE = make CFLAGS += -Wall -O2 CFLAGS += -D__EXPORTED_HEADERS__ -I../../include/uapi -I../../include +ifeq ($(srctree),) +srctree := $(patsubst %/,%,$(dir $(CURDIR))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +endif + +FEATURE_USER = .bpf +FEATURE_TESTS = libbfd disassembler-four-args +FEATURE_DISPLAY = libbfd disassembler-four-args + +check_feat := 1 +NON_CHECK_FEAT_TARGETS := clean bpftool_clean +ifdef MAKECMDGOALS +ifeq ($(filter-out $(NON_CHECK_FEAT_TARGETS),$(MAKECMDGOALS)),) + check_feat := 0 +endif +endif + +ifeq ($(check_feat),1) +ifeq ($(FEATURES_DUMP),) +include $(srctree)/tools/build/Makefile.feature +else +include $(FEATURES_DUMP) +endif +endif + +ifeq ($(feature-disassembler-four-args), 1) +CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE +endif + %.yacc.c: %.y $(YACC) -o $@ -d $< diff --git a/tools/bpf/bpf_jit_disasm.c b/tools/bpf/bpf_jit_disasm.c index 75bf526a0168..30044bc4f389 100644 --- a/tools/bpf/bpf_jit_disasm.c +++ b/tools/bpf/bpf_jit_disasm.c @@ -72,7 +72,14 @@ static void get_asm_insns(uint8_t *image, size_t len, int opcodes) disassemble_init_for_target(&info); +#ifdef DISASM_FOUR_ARGS_SIGNATURE + disassemble = disassembler(info.arch, + bfd_big_endian(bfdf), + info.mach, + bfdf); +#else disassemble = disassembler(bfdf); +#endif assert(disassemble); do { diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index ec3052c0b004..9e433c3f8bbe 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -55,6 +55,30 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-parameter -Wshadow CFLAGS += -D__EXPORTED_HEADERS__ -I$(srctree)/tools/include/uapi -I$(srctree)/tools/include -I$(srctree)/tools/lib/bpf -I$(srctree)/kernel/bpf/ LIBS = -lelf -lbfd -lopcodes $(LIBBPF) +FEATURE_USER = .bpftool +FEATURE_TESTS = libbfd disassembler-four-args +FEATURE_DISPLAY = libbfd disassembler-four-args + +check_feat := 1 +NON_CHECK_FEAT_TARGETS := clean uninstall doc doc-clean doc-install doc-uninstall +ifdef MAKECMDGOALS +ifeq ($(filter-out $(NON_CHECK_FEAT_TARGETS),$(MAKECMDGOALS)),) + check_feat := 0 +endif +endif + +ifeq ($(check_feat),1) +ifeq ($(FEATURES_DUMP),) +include $(srctree)/tools/build/Makefile.feature +else +include $(FEATURES_DUMP) +endif +endif + +ifeq ($(feature-disassembler-four-args), 1) +CFLAGS += -DDISASM_FOUR_ARGS_SIGNATURE +endif + include $(wildcard *.d) all: $(OUTPUT)bpftool diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c index 86376f923d28..034d91284ae5 100644 --- a/tools/bpf/bpftool/jit_disasm.c +++ b/tools/bpf/bpftool/jit_disasm.c @@ -110,7 +110,14 @@ void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes) disassemble_init_for_target(&info); +#ifdef DISASM_FOUR_ARGS_SIGNATURE + disassemble = disassembler(info.arch, + bfd_big_endian(bfdf), + info.mach, + bfdf); +#else disassemble = disassembler(bfdf); +#endif assert(disassemble); if (json_output) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 15071cb176bc..3a0de97284ee 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -13,6 +13,7 @@ FILES= \ test-hello.bin \ test-libaudit.bin \ test-libbfd.bin \ + test-disassembler-four-args.bin \ test-libbfd-liberty.bin \ test-libbfd-liberty-z.bin \ test-cplus-demangle.bin \ @@ -188,6 +189,9 @@ $(OUTPUT)test-libpython-version.bin: $(OUTPUT)test-libbfd.bin: $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl +$(OUTPUT)test-disassembler-four-args.bin: + $(BUILD) -lbfd -lopcodes + $(OUTPUT)test-libbfd-liberty.bin: $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty diff --git a/tools/build/feature/test-disassembler-four-args.c b/tools/build/feature/test-disassembler-four-args.c new file mode 100644 index 000000000000..45ce65cfddf0 --- /dev/null +++ b/tools/build/feature/test-disassembler-four-args.c @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 +#include +#include + +int main(void) +{ + bfd *abfd = bfd_openr(NULL, NULL); + + disassembler(bfd_get_arch(abfd), + bfd_big_endian(abfd), + bfd_get_mach(abfd), + abfd); + + return 0; +} From patchwork Wed Nov 20 11:48:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Monnet X-Patchwork-Id: 1198054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="Ezxbug1X"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47J1Dc3HCDz9sPv; Wed, 20 Nov 2019 22:48:48 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iXOTQ-0003kK-SJ; Wed, 20 Nov 2019 11:48:40 +0000 Received: from mail-wr1-f67.google.com ([209.85.221.67]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iXOTN-0003jX-5h for kernel-team@lists.ubuntu.com; Wed, 20 Nov 2019 11:48:37 +0000 Received: by mail-wr1-f67.google.com with SMTP id w9so27794482wrr.0 for ; Wed, 20 Nov 2019 03:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uqIR1gXGcdqo3M+XBVKVLcIbv3ogn9T/GVEKBGOefn0=; b=Ezxbug1Xf3wionKSHj7O0594IVv5m3u6xYil6TJY0k+qxveGbvpeqnc/FXuvKRn1iI Le01gv3i4Ady5K5rwpogeoTKliTf8np4A002pXUl5n7/Nr6a0/+xVpypMRs590bEXt96 VmURBwdMw2GcXaomW+bF0yOY0JdiaU5LYIqB4RoRbU1kB8ku7k7A/vLiKMjSIPs0xnCP zmDWbhtFBl43TlCl/ZYBWxHEJ9VjxPk5JuoBLRGZLV6Gq//b8W9suzIyu73SyVDgogMC Mpzfb+/s7lH4SruwjLYDnm3F2Fd5QFDo+1B5dCpU4AhbZH0KfDW6jA+lKL3csbbjFr15 B00w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uqIR1gXGcdqo3M+XBVKVLcIbv3ogn9T/GVEKBGOefn0=; b=lhH4vkZw5HJZL3Cdj+UuGie8gwCqq+KzykCBPDVfVwqHwWsLokTS/mvcg1E6f6WId1 Pmr9bSzN++60nBUDoDf7A00LmCSuXy2ZOV5KshP/RvmsHMNKIY9O/8CD9T1TcS6ysIiO XQQhYmxuvBKqzZqmDxsf5TYJOltNdY8XV0ozXZW5Q1UiCWw6PrMvde3FAG1VIi0vFa0O Glf0NdpUeaEtAn2DiXE6MPEuvUc9ZUSRXF9oT9pHB37MI9yHs5XXzLizUfqzQ7rX8pQX yPsDpD0F8urRX4PXDX0xXNjkp7lQ1SIFx7QWxDRM6S3nVFXa7kbaesbWkozOoRh+JIW1 I+JA== X-Gm-Message-State: APjAAAU04HAz+VGv2ICSmnjUA+UMrBY8BIixRTF/3QkyqnOBhJw597W9 VMp7z265uU+coCpt6Cz4+oP7hxwHN7T4NSQ38KR9rWHMSB6KVt/oTokcSY8ztdLa9jrEDEcnFYa GOWa94y5Uyxeh4Qtb0bNTqNAKjS8a+CJNRlS24HQoKgDMqLRqTmZlqrm2ubSZiTJ0hskromkkhP IcgbIoY8cD0A== X-Google-Smtp-Source: APXvYqyfebT8QQYDqrUWlYp2CF2yOQ93O+vy4TIUeKJlZx+G34iE5C2qscU8FdotmGag2cD9jFyYEA== X-Received: by 2002:adf:9d88:: with SMTP id p8mr2787142wre.286.1574250516564; Wed, 20 Nov 2019 03:48:36 -0800 (PST) Received: from cbtest32.netronome.com ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id x9sm29970062wru.32.2019.11.20.03.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 03:48:35 -0800 (PST) From: Quentin Monnet To: kernel-team@lists.ubuntu.com Subject: [SRU][BIONIC][PATCH v3 2/4] bpftool: make libbfd optional Date: Wed, 20 Nov 2019 11:48:21 +0000 Message-Id: <20191120114823.27955-3-quentin.monnet@netronome.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191120114823.27955-1-quentin.monnet@netronome.com> References: <20191120114823.27955-1-quentin.monnet@netronome.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Borkmann , oss-drivers@netronome.com, Stanislav Fomichev , Nicolas Dichtel , Roman Gushchin MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Stanislav Fomichev BugLink: https://bugs.launchpad.net/bugs/1774815 Make it possible to build bpftool without libbfd. libbfd and libopcodes are typically provided in dev/dbg packages (binutils-dev in debian) which we usually don't have installed on the fleet machines and we'd like a way to have bpftool version that works without installing any additional packages. This excludes support for disassembling jit-ted code and prints an error if the user tries to use these features. Tested by: cat > FEATURES_DUMP.bpftool < Acked-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov (backported from commit 29a9c10e4110e368443f0b606d71557edee7f2cc) Signed-off-by: Quentin Monnet --- tools/bpf/bpftool/Makefile | 13 +++++++++++-- tools/bpf/bpftool/jit_disasm.c | 6 ++++++ tools/bpf/bpftool/main.c | 3 --- tools/bpf/bpftool/main.h | 13 +++++++++++++ tools/bpf/bpftool/prog.c | 3 +++ 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index 9e433c3f8bbe..b0a1cbde0819 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -53,7 +53,7 @@ CC = gcc CFLAGS += -O2 CFLAGS += -W -Wall -Wextra -Wno-unused-parameter -Wshadow CFLAGS += -D__EXPORTED_HEADERS__ -I$(srctree)/tools/include/uapi -I$(srctree)/tools/include -I$(srctree)/tools/lib/bpf -I$(srctree)/kernel/bpf/ -LIBS = -lelf -lbfd -lopcodes $(LIBBPF) +LIBS = -lelf $(LIBBPF) FEATURE_USER = .bpftool FEATURE_TESTS = libbfd disassembler-four-args @@ -83,7 +83,16 @@ include $(wildcard *.d) all: $(OUTPUT)bpftool -SRCS=$(wildcard *.c) +BFD_SRCS = jit_disasm.c + +SRCS = $(filter-out $(BFD_SRCS),$(wildcard *.c)) + +ifeq ($(feature-libbfd),1) +CFLAGS += -DHAVE_LIBBFD_SUPPORT +SRCS += $(BFD_SRCS) +LIBS += -lbfd -lopcodes +endif + OBJS=$(patsubst %.c,$(OUTPUT)%.o,$(SRCS)) $(OUTPUT)disasm.o $(OUTPUT)disasm.o: $(srctree)/kernel/bpf/disasm.c diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c index 034d91284ae5..ec046e3061d6 100644 --- a/tools/bpf/bpftool/jit_disasm.c +++ b/tools/bpf/bpftool/jit_disasm.c @@ -170,3 +170,9 @@ void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes) bfd_close(bfdf); } + +int disasm_init(void) +{ + bfd_init(); + return 0; +} diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c index d294bc8168be..b11429bb65cb 100644 --- a/tools/bpf/bpftool/main.c +++ b/tools/bpf/bpftool/main.c @@ -33,7 +33,6 @@ /* Author: Jakub Kicinski */ -#include #include #include #include @@ -327,8 +326,6 @@ int main(int argc, char **argv) if (argc < 0) usage(); - bfd_init(); - ret = cmd_select(cmds, argc, argv, do_help); if (json_output) diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h index bff330b49791..af86de84ff30 100644 --- a/tools/bpf/bpftool/main.h +++ b/tools/bpf/bpftool/main.h @@ -117,7 +117,20 @@ int do_map(int argc, char **arg); int prog_parse_fd(int *argc, char ***argv); +#ifdef HAVE_LIBBFD_SUPPORT void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes); +int disasm_init(void); +#else +static inline +void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes) +{ +} +static inline int disasm_init(void) +{ + p_err("No libbfd support"); + return -1; +} +#endif void print_hex_data_json(uint8_t *data, size_t len); #endif diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 26df1a936ebf..caede2cd784a 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -521,6 +521,9 @@ static int do_dump(int argc, char **argv) int fd; if (is_prefix(*argv, "jited")) { + if (disasm_init()) + return -1; + member_len = &info.jited_prog_len; member_ptr = &info.jited_prog_insns; } else if (is_prefix(*argv, "xlated")) { From patchwork Wed Nov 20 11:48:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Monnet X-Patchwork-Id: 1198056 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="Bxgz37eO"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47J1Dc6xssz9sPc; Wed, 20 Nov 2019 22:48:48 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iXOTS-0003ki-0r; Wed, 20 Nov 2019 11:48:42 +0000 Received: from mail-wm1-f66.google.com ([209.85.128.66]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iXOTO-0003ju-Gq for kernel-team@lists.ubuntu.com; Wed, 20 Nov 2019 11:48:38 +0000 Received: by mail-wm1-f66.google.com with SMTP id z19so7478451wmk.3 for ; Wed, 20 Nov 2019 03:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wUXoX/0DGpTol5mT9R6ixfIPbVjBaeP4x4qP/+9Ki08=; b=Bxgz37eOKYMuIFOsI4COxG58OlOgQ8jDJ17etFu9BGbjaou/ALpd4Ckquj3LmQkmzD RbDcUN8RdlMbnnRm5xm5JgJp99a9+5UKofVsPvJKXcH/vk+WXZvvM7spAdBC7wypW7GW dGNb/xICiCN7nYT8rNCN2VDrvuXgtgDszKP6Uetgnw3CosIY4mPFZ0n0EuLcagHbY+/A ImlZM2KTZB2BfPPdKUvLq/dIKcws1qCBpeDrOM01I+ekW3+rPDbwfY6GfK2Bjlywnjo5 sT0f/hHQNn3u0p1JerWBcUF9hB31iiZJvJOn7xs1pq7n8CpE7bw9MYp40bxc09oEGd6G 01Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wUXoX/0DGpTol5mT9R6ixfIPbVjBaeP4x4qP/+9Ki08=; b=fqX+w0+B5YPyhtNYZa9DzzfxuG+Wnt8GuIZbcO+4AyMo6+0stc4eWvtPgJ3VNFkQ0a VYyGjIdiaWhmGalp/yGvGc7BbWuicz+N/YnZUx5gS8tW7VExhc2yHN3CXImQixqKeZk2 dj7TTmUfd7pgVwd0XC/70nUYWEFSVCm08Z3ScQh4XOH6CSO289XG1BRIK/2pX8k/6meW TbJwT4w1KY9HJBjCav9V+/ub86yowoKfZwUxdYB4Sehfi//s3ptHrahAOKsOTizutUn1 vqoaaHTbnRICSREk6CVQvQLzVN4g7rTYnHByJxIELtbM05Ipa6n3dVd/FqKPUXUvyy9q r8cg== X-Gm-Message-State: APjAAAXU5oPicb6Tb6dWHeBE3c9mhB+NGBOV1Wp1l9iGUdk/7E+yS0zn 6J7Vll48hz+budVUH+ETWGL+qJKK7NgS1XirmuEAeEpkLWuunQpjKcl8XPdm6NNFXQfIX9gp6Z8 QSUV63HhtdvAW4gEhas34SbVaFudjatsR1H4etRsX5L+1mY8LetoibycIiRq/VBQhX82cLuoK7/ jDij8T8Q3eeQ== X-Google-Smtp-Source: APXvYqx5HrKLh4Q9U06XQWjj/J1L9LXe1DKIH2+22nsTWWu4WmNZlaylLqhDjzX3Cb7HAlh/M5ZEhw== X-Received: by 2002:a1c:c28a:: with SMTP id s132mr2671922wmf.162.1574250517762; Wed, 20 Nov 2019 03:48:37 -0800 (PST) Received: from cbtest32.netronome.com ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id x9sm29970062wru.32.2019.11.20.03.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 03:48:37 -0800 (PST) From: Quentin Monnet To: kernel-team@lists.ubuntu.com Subject: [SRU][BIONIC][PATCH v3 3/4] UBUNTU: [Debian] Remove binutils-dev build dependency Date: Wed, 20 Nov 2019 11:48:22 +0000 Message-Id: <20191120114823.27955-4-quentin.monnet@netronome.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191120114823.27955-1-quentin.monnet@netronome.com> References: <20191120114823.27955-1-quentin.monnet@netronome.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Borkmann , oss-drivers@netronome.com, Stanislav Fomichev , Nicolas Dichtel , Roman Gushchin MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Seth Forshee BugLink: https://bugs.launchpad.net/bugs/1774815 This keeps giving us problems with introducing unwanted binary dependencies in linux-tools. These tools will work without these dependencies, albeit with somewhat reduced functionality. Aside from that I can't see that this dependency is needed, so let's try removing it. Signed-off-by: Seth Forshee (backported from commit 721d5f0c58073e6133db5dc05cf46200170fd80a) Signed-off-by: Quentin Monnet --- debian.master/control.stub.in | 1 - 1 file changed, 1 deletion(-) diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in index 0afc7e6219a7..0fca6d2ddbc6 100644 --- a/debian.master/control.stub.in +++ b/debian.master/control.stub.in @@ -34,7 +34,6 @@ Build-Depends: automake , libtool , uuid-dev , - binutils-dev , libnuma-dev [amd64 arm64 i386 ppc64el s390x] , dkms , wget , From patchwork Wed Nov 20 11:48:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Monnet X-Patchwork-Id: 1198057 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="d8gzZ2QF"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47J1Dd02Btz9sR5; Wed, 20 Nov 2019 22:48:49 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iXOTV-0003nG-8i; Wed, 20 Nov 2019 11:48:45 +0000 Received: from mail-wr1-f68.google.com ([209.85.221.68]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iXOTP-0003kA-QM for kernel-team@lists.ubuntu.com; Wed, 20 Nov 2019 11:48:39 +0000 Received: by mail-wr1-f68.google.com with SMTP id b3so27776483wrs.13 for ; Wed, 20 Nov 2019 03:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9SFVGzwwnPtwMWc7di1OpdTyJxq8HIuEkzdmLNN4Cx8=; b=d8gzZ2QFEYMt0WSuTjOKi06XOwGGGKSsxkrzd+1Fq83zED1ZjNP9tnc8+acKIgHDKa 50azgbzjFfmgmNvHE+C4F6YNCTp5HNK8hcKlJz14oF8MmyId0YL9aiRnWWTubb2whPJd Q8Nhjss0Z6LKTtHGyPKDyo8lsVf3Z3g/Gul24KFaum0hzy1eG7VO+jeKgYOHByIS3kDE GB8NzmSg/U/tnQD3kCBT6IKIvKSXsDlY96unx00k2peSaitiCw4A2CHC8kqVLZ0Yl+ag 5/no8Tmzre6r+aMwVcIEWeyQcZ9WI0/Aos/9ccj1KGsWtscidkZan+LOYVPekBuIg1lh ZJog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9SFVGzwwnPtwMWc7di1OpdTyJxq8HIuEkzdmLNN4Cx8=; b=uYgqmrbToasQYULc6+QZYOOH2uWO0YI/Qg7177uNSxEG2jJzED71Fz8aLOmFeCmodK h+SbW8hWnnW2bOL/BbQziMaV7St7f+mcXquSq5+c8Y4XfdgZvookG+zA7gbS9g/VT0CV cdhRCfPDm8MLi4Q6/U24WtVa4lUZGwnaiHBMWBwR4Y4/eDHKlftREOyop+AYr5uM6ARG LL2Lz4/kcYALfJW771biguKjZzRLkXRihMibOTz5w7hUfo2TVtu/Cr3EuHq4kPe0eAd9 VvBNwD/N1TsgF/Lssc4+RKtae6/5SREbzf4VaMMQj/GGtILNqyuoiGp+O3fBMV4CfuAe AtNA== X-Gm-Message-State: APjAAAWm34Q62/CxPIzg+qSLP4vaj8rCsPYTiQEW3wk5+8bQaEcjVqkc kx+wsoFiBiPNHfoBwwtdh0oKT21a5kOHQ5AUDoaQrP5P5kWAn/AK/KccgUf8ZuAuuoCcI8B80/T CnT/5EnKzP4c4aD4yV9NLWfCxMTktmUisZ+k74gKL/Vdr+NQuo6Ba0txp9wzddcBFHZ/RxOsYdz hMV4Y2bbmd8g== X-Google-Smtp-Source: APXvYqwj+CI9Rb1EpfxPpXNlc0joPJZuv9RiK0W0O80wU+xptDzyCGMcX7CG/CBw/kb9/ONE7cwsoA== X-Received: by 2002:adf:8426:: with SMTP id 35mr540624wrf.262.1574250518999; Wed, 20 Nov 2019 03:48:38 -0800 (PST) Received: from cbtest32.netronome.com ([217.38.71.146]) by smtp.gmail.com with ESMTPSA id x9sm29970062wru.32.2019.11.20.03.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 03:48:38 -0800 (PST) From: Quentin Monnet To: kernel-team@lists.ubuntu.com Subject: [SRU][BIONIC][PATCH v3 4/4] UBUNTU: [Debian] package bpftool in linux-tools-common Date: Wed, 20 Nov 2019 11:48:23 +0000 Message-Id: <20191120114823.27955-5-quentin.monnet@netronome.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191120114823.27955-1-quentin.monnet@netronome.com> References: <20191120114823.27955-1-quentin.monnet@netronome.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Borkmann , oss-drivers@netronome.com, Stanislav Fomichev , Nicolas Dichtel , Roman Gushchin MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1774815 bpftool is a debugging and introspection tool for BPF elements, developed by the BPF kernel community. Its source code is located in the kernel repository, at tools/bpf/bpftool. Package it in linux-tools and linux-tools-common. Along the binary, package manual pages and bash completion file. bpftool itself is installed under /usr/sbin/, to be consistent with its Makefile. Dependency python3-docutils is added to Build-Depends-Indep, in order to provide rst2man which is necessary to build bpftool's manual pages. Signed-off-by: Quentin Monnet --- debian.master/control.stub.in | 1 + debian.master/rules.d/amd64.mk | 1 + debian.master/rules.d/arm64.mk | 1 + debian.master/rules.d/armhf.mk | 1 + debian.master/rules.d/i386.mk | 1 + debian.master/rules.d/ppc64el.mk | 1 + debian.master/rules.d/s390x.mk | 1 + debian/rules | 2 +- debian/rules.d/1-maintainer.mk | 1 + debian/rules.d/2-binary-arch.mk | 9 +++++++++ debian/rules.d/3-binary-indep.mk | 12 +++++++++++- 11 files changed, 29 insertions(+), 2 deletions(-) diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in index 0fca6d2ddbc6..75c51630d30b 100644 --- a/debian.master/control.stub.in +++ b/debian.master/control.stub.in @@ -47,6 +47,7 @@ Build-Depends-Indep: asciidoc , python-sphinx , python-sphinx-rtd-theme , + python3-docutils , Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic XS-Testsuite: autopkgtest #XS-Testsuite-Depends: gcc-4.7 binutils diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk index 4046adf3ebb3..3d248c270232 100644 --- a/debian.master/rules.d/amd64.mk +++ b/debian.master/rules.d/amd64.mk @@ -14,6 +14,7 @@ do_tools_usbip = true do_tools_cpupower = true do_tools_perf = true do_tools_perf_jvmti = true +do_tools_bpftool = true do_tools_x86 = true do_tools_hyperv = true do_tools_host = true diff --git a/debian.master/rules.d/arm64.mk b/debian.master/rules.d/arm64.mk index c7e9a9c1e199..c49d25e752df 100644 --- a/debian.master/rules.d/arm64.mk +++ b/debian.master/rules.d/arm64.mk @@ -16,6 +16,7 @@ do_tools_usbip = true do_tools_cpupower = true do_tools_perf = true do_tools_perf_jvmti = true +do_tools_bpftool = true do_dtbs = true do_zfs = true diff --git a/debian.master/rules.d/armhf.mk b/debian.master/rules.d/armhf.mk index d516ae13454c..085e8acdc8aa 100644 --- a/debian.master/rules.d/armhf.mk +++ b/debian.master/rules.d/armhf.mk @@ -14,5 +14,6 @@ do_tools_usbip = true do_tools_cpupower = true do_tools_perf = true do_tools_perf_jvmti = true +do_tools_bpftool = true do_dtbs = true diff --git a/debian.master/rules.d/i386.mk b/debian.master/rules.d/i386.mk index a422f9feba6c..89ad2a6c26cf 100644 --- a/debian.master/rules.d/i386.mk +++ b/debian.master/rules.d/i386.mk @@ -13,6 +13,7 @@ do_tools_usbip = true do_tools_cpupower = true do_tools_perf = true do_tools_perf_jvmti = true +do_tools_bpftool = true do_tools_x86 = true do_tools_hyperv = true do_extras_package = true diff --git a/debian.master/rules.d/ppc64el.mk b/debian.master/rules.d/ppc64el.mk index c540bacaa166..3934ef482a57 100644 --- a/debian.master/rules.d/ppc64el.mk +++ b/debian.master/rules.d/ppc64el.mk @@ -15,6 +15,7 @@ do_tools_usbip = true do_tools_cpupower = true do_tools_perf = true do_tools_perf_jvmti = true +do_tools_bpftool = true #do_flavour_image_package = false do_zfs = true diff --git a/debian.master/rules.d/s390x.mk b/debian.master/rules.d/s390x.mk index dad66b1a674f..cbc188507892 100644 --- a/debian.master/rules.d/s390x.mk +++ b/debian.master/rules.d/s390x.mk @@ -16,5 +16,6 @@ do_tools_usbip = true do_tools_cpupower = true do_tools_perf = true do_tools_perf_jvmti = true +do_tools_bpftool = true do_zfs = true diff --git a/debian/rules b/debian/rules index babb28f904ae..4a4707637867 100755 --- a/debian/rules +++ b/debian/rules @@ -33,7 +33,7 @@ include $(DROOT)/rules.d/0-common-vars.mk # Maintainer targets include $(DROOT)/rules.d/1-maintainer.mk -do_linux_tools=$(sort $(filter-out false,$(do_tools_usbip) $(do_tools_cpupower) $(do_tools_perf) $(do_tools_x86))) +do_linux_tools=$(sort $(filter-out false,$(do_tools_usbip) $(do_tools_cpupower) $(do_tools_perf) $(do_tools_bpftool) $(do_tools_x86))) do_cloud_tools=$(sort $(filter-out false,$(do_tools_hyperv))) do_tools_common?=true do_tools_host?=false diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index 82683290cabb..e6e9f191afe1 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -84,6 +84,7 @@ printenv: @echo "do_linux_tools = $(do_linux_tools)" @echo " do_tools_cpupower = $(do_tools_cpupower)" @echo " do_tools_perf = $(do_tools_perf)" + @echo " do_tools_bpftool = $(do_tools_bpftool)" @echo " do_tools_x86 = $(do_tools_x86)" @echo " do_tools_host = $(do_tools_host)" @echo "do_cloud_tools = $(do_cloud_tools)" diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 4bbc803a758f..e2ecd60fa445 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -375,6 +375,9 @@ ifeq ($(do_tools_perf_jvmti),true) $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/libperf-jvmti.so $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* endif endif +ifeq ($(do_tools_bpftool),true) + $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/bpftool $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* +endif ifeq ($(do_tools_x86),true) $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/x86_energy_perf_policy $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/turbostat $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$* @@ -665,6 +668,9 @@ ifeq ($(do_tools_perf),true) cd $(builddirpa)/tools/perf && \ $(kmake) prefix=/usr HAVE_NO_LIBBFD=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 CROSS_COMPILE=$(CROSS_COMPILE) NO_LIBPYTHON=1 NO_LIBPERL=1 PYTHON=python2.7 endif +ifeq ($(do_tools_bpftool),true) + $(kmake) CROSS_COMPILE=$(CROSS_COMPILE) -C $(builddirpa)/tools/bpf/bpftool +endif ifeq ($(do_tools_x86),true) cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE) cd $(builddirpa)/tools/power/x86/turbostat && make CROSS_COMPILE=$(CROSS_COMPILE) @@ -709,6 +715,9 @@ ifeq ($(do_tools_perf_jvmti),true) install -m755 $(builddirpa)/tools/perf/libperf-jvmti.so $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) endif endif +ifeq ($(do_tools_bpftool),true) + install -m755 $(builddirpa)/tools/bpf/bpftool/bpftool $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) +endif ifeq ($(do_tools_x86),true) install -m755 $(builddirpa)/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy \ $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release) diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index b27275685612..e5c6bc0c2c8a 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -84,6 +84,7 @@ install-tools: toolspkg = $(tools_common_pkg_name) install-tools: toolsbin = $(CURDIR)/debian/$(toolspkg)/usr/bin install-tools: toolssbin = $(CURDIR)/debian/$(toolspkg)/usr/sbin install-tools: toolsman = $(CURDIR)/debian/$(toolspkg)/usr/share/man +install-tools: toolsbashcomp = $(CURDIR)/debian/$(toolspkg)/usr/share/bash-completion/completions install-tools: hosttoolspkg = $(hosttools_pkg_name) install-tools: hosttoolsbin = $(CURDIR)/debian/$(hosttoolspkg)/usr/bin install-tools: hosttoolsman = $(CURDIR)/debian/$(hosttoolspkg)/usr/share/man @@ -102,7 +103,10 @@ ifeq ($(do_tools_common),true) rsync -a tools/ $(builddir)/tools/tools/ install -d $(toolsbin) + install -d $(toolssbin) install -d $(toolsman)/man1 + install -d $(toolsman)/man8 + install -d $(toolsbashcomp) install -m755 debian/tools/generic $(toolsbin)/usbip install -m755 debian/tools/generic $(toolsbin)/usbipd @@ -113,6 +117,13 @@ ifeq ($(do_tools_common),true) install -m755 debian/tools/generic $(toolsbin)/perf + install -m755 debian/tools/generic $(toolssbin)/bpftool + make -C $(builddir)/tools/tools/bpf/bpftool doc + install -m644 $(builddir)/tools/tools/bpf/bpftool/Documentation/*.8 \ + $(toolsman)/man8 + install -m644 $(builddir)/tools/tools/bpf/bpftool/bash-completion/bpftool \ + $(toolsbashcomp) + install -m755 debian/tools/generic $(toolsbin)/x86_energy_perf_policy install -m755 debian/tools/generic $(toolsbin)/turbostat @@ -120,7 +131,6 @@ ifeq ($(do_tools_common),true) install -m644 $(builddir)/tools/tools/perf/Documentation/*.1 \ $(toolsman)/man1 - install -d $(toolsman)/man8 install -m644 $(CURDIR)/tools/power/x86/x86_energy_perf_policy/*.8 $(toolsman)/man8 install -m644 $(CURDIR)/tools/power/x86/turbostat/*.8 $(toolsman)/man8