[linux-tools] 04/06: tools/build: Remove bpf() run-time check at build time

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun Feb 21 16:52:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux-tools.

commit c31998793f0f2cb515b903829fef8bc1585bae47
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sun Feb 21 15:36:15 2016 +0000

    tools/build: Remove bpf() run-time check at build time
---
 debian/changelog                                   |  1 +
 debian/patches/series                              |  1 +
 ...d-remove-bpf-run-time-check-at-build-time.patch | 24 ++++++++++++++++++++++
 3 files changed, 26 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d0115ef..7329ff6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 at decadent.org.uk>  Thu, 18 Feb 2016 03:19:14 +0000
 
diff --git a/debian/patches/series b/debian/patches/series
index 1d7e997..59c555c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -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
diff --git a/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch b/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch
new file mode 100644
index 0000000..3a570b3
--- /dev/null
+++ b/debian/patches/tools-build-remove-bpf-run-time-check-at-build-time.patch
@@ -0,0 +1,24 @@
+From: Ben Hutchings <ben at 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 at 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;
+ }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux-tools.git



More information about the Kernel-svn-changes mailing list