From: Yonghong Song Subject: [PATCH bpf 0/3] bpf: fix bpffs/bpftool bitfield value printing Date: Thu, 10 Jan 2019 11:14:00 -0800 Message-ID: <20190110191400.3626831-1-yhs@fb.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Alexei Starovoitov , Daniel Borkmann , , Yonghong Song To: Return-path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:35502 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728572AbfAJTOG (ORCPT ); Thu, 10 Jan 2019 14:14:06 -0500 Received: from pps.filterd (m0044010.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0AJ9d1M023049 for ; Thu, 10 Jan 2019 11:14:05 -0800 Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2px9t1gguu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 10 Jan 2019 11:14:05 -0800 Sender: netdev-owner@vger.kernel.org List-ID: The previous BTF kind_flag support patch set introduced a bug for kernel bpffs pretty printing and another bug for bpftool map pretty printing. If a bitfield struct member offset is greater than 256 bits, printed value for that struct member will be incorrect. Patch #1 fixed the bug in kernel bpffs pretty printing. Patch #2 enhanced the test_btf test case to cover the issue exposed by patch #1. Patch #3 fixed the bug in bpftool map pretty printing. Yonghong Song (3): bpf: fix bpffs bitfield pretty print tools/bpf: test btf bitfield with >=256 struct member offset tools/bpf: fix bpftool map dump with bitfields kernel/bpf/btf.c | 12 +++++------ tools/bpf/bpftool/btf_dumper.c | 13 ++++++------ tools/testing/selftests/bpf/test_btf.c | 29 +++++++++++++++++++------- 3 files changed, 34 insertions(+), 20 deletions(-) -- 2.17.1