linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] perf bpf: Fix relocation error
@ 2016-01-22  9:27 Wang Nan
  2016-01-22  9:27 ` [PATCH 1/2] perf test: Add libbpf relocation checker Wang Nan
  2016-01-22  9:27 ` [PATCH 2/2] perf bpf: Check relocation target section Wang Nan
  0 siblings, 2 replies; 14+ messages in thread
From: Wang Nan @ 2016-01-22  9:27 UTC (permalink / raw)
  To: ast, acme
  Cc: linux-kernel, Wang Nan, Arnaldo Carvalho de Melo, Daniel Borkmann,
	Li Zefan, pi3orama

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@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Li Zefan <lizefan@huawei.com>              
Cc: pi3orama@163.com
-- 
1.8.3.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-01-25  2:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22  9:27 [PATCH 0/2] perf bpf: Fix relocation error Wang Nan
2016-01-22  9:27 ` [PATCH 1/2] perf test: Add libbpf relocation checker Wang Nan
2016-01-22 15:40   ` Arnaldo Carvalho de Melo
2016-01-22 17:07     ` Alexei Starovoitov
2016-01-22 17:22       ` clang --target=bpf missing on f23 was: " Arnaldo Carvalho de Melo
2016-01-22 17:35         ` Adam Jackson
2016-01-22 17:42           ` Alexei Starovoitov
2016-01-22 21:09             ` David Airlie
2016-01-22 17:56           ` Daniel Borkmann
2016-01-22 19:09             ` Arnaldo Carvalho de Melo
2016-01-22  9:27 ` [PATCH 2/2] perf bpf: Check relocation target section Wang Nan
2016-01-22 17:11   ` Alexei Starovoitov
2016-01-25  1:56     ` Wangnan (F)
2016-01-25  2:04       ` Wangnan (F)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).