tools/build: Remove bpf() run-time check at build time
This commit is contained in:
parent
ff20c40839
commit
c31998793f
|
@ -5,6 +5,7 @@ linux-tools (4.5~rc4-1~exp1) UNRELEASED; urgency=medium
|
|||
[ Ben Hutchings ]
|
||||
* lockdep: Add missing macros
|
||||
* Adjust VPATH to work for check-hyperv (and simplify the modpost wrapper)
|
||||
* tools/build: Remove bpf() run-time check at build time
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Thu, 18 Feb 2016 03:19:14 +0000
|
||||
|
||||
|
|
|
@ -18,3 +18,4 @@ perf-fix-misleadingly-indented-assignment-whitespace.patch
|
|||
perf-tools-fix-unused-variables-x86_-32-64-_regoffse.patch
|
||||
revert-perf-tools-x86-build-perf-on-older-user-space.patch
|
||||
lockdep-add-missing-macros.patch
|
||||
tools-build-remove-bpf-run-time-check-at-build-time.patch
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Sun, 21 Feb 2016 15:33:15 +0000
|
||||
Subject: tools/build: Remove bpf() run-time check at build time
|
||||
|
||||
It is not correct to test that a syscall works on the build system's
|
||||
kernel. We might be building on an earlier kernel version or with
|
||||
security restrictions that block bpf().
|
||||
|
||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
---
|
||||
--- a/tools/build/feature/test-bpf.c
|
||||
+++ b/tools/build/feature/test-bpf.c
|
||||
@@ -27,10 +27,5 @@ int main(void)
|
||||
attr.log_level = 0;
|
||||
attr.kern_version = 0;
|
||||
|
||||
- attr = attr;
|
||||
- /*
|
||||
- * Test existence of __NR_bpf and BPF_PROG_LOAD.
|
||||
- * This call should fail if we run the testcase.
|
||||
- */
|
||||
- return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
|
||||
+ return 0;
|
||||
}
|
Loading…
Reference in New Issue