[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1453454841-232334-1-git-send-email-wangnan0@huawei.com>
Date: Fri, 22 Jan 2016 09:27:19 +0000
From: Wang Nan <wangnan0@...wei.com>
To: <ast@...nel.org>, <acme@...nel.org>
CC: <linux-kernel@...r.kernel.org>, Wang Nan <wangnan0@...wei.com>,
"Arnaldo Carvalho de Melo" <acme@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>,
Li Zefan <lizefan@...wei.com>, <pi3orama@....com>
Subject: [PATCH 0/2] perf bpf: Fix relocation error
Alexei notices me about a bug in llvm [1]. Because of this bug,
even a normal BPF program can generate incorrect (or redundant)
relocation information.
Patch 1 adds a new test case about it (use an buggy BPF script, should
fail even LLVM's bug is fixed). Since it is the first test case expected
to be fail, test framework is slightly adjusted.
Patch 2 adds the checker.
[1] https://llvm.org/bugs/show_bug.cgi?id=26243
Wang Nan (2):
perf test: Add libbpf relocation checker
perf bpf: Check relocation target section
tools/lib/bpf/libbpf.c | 34 +++++++++++-------
tools/perf/Makefile.perf | 2 +-
tools/perf/tests/.gitignore | 1 +
tools/perf/tests/Build | 9 ++++-
tools/perf/tests/bpf-script-test-relocation.c | 50 +++++++++++++++++++++++++++
tools/perf/tests/bpf.c | 26 +++++++++++---
tools/perf/tests/llvm.c | 17 ++++++---
tools/perf/tests/llvm.h | 5 ++-
8 files changed, 120 insertions(+), 24 deletions(-)
create mode 100644 tools/perf/tests/bpf-script-test-relocation.c
Cc: Alexei Starovoitov <ast@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Daniel Borkmann <daniel@...earbox.net>
Cc: Li Zefan <lizefan@...wei.com>
Cc: pi3orama@....com
--
1.8.3.4
Powered by blists - more mailing lists