mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-04 23:59:07 +08:00
ci: Add a step to patch kernel with temporary fixes
Apply a custom set of patches against bpf-next kernel tree before building vmlinux image.
This commit is contained in:
committed by
Andrii Nakryiko
parent
96268bf0c2
commit
9fab7c81ec
5
.github/actions/vmtest/action.yml
vendored
5
.github/actions/vmtest/action.yml
vendored
@@ -33,6 +33,11 @@ runs:
|
|||||||
repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git'
|
repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git'
|
||||||
rev: ${{ env.CHECKPOINT }}
|
rev: ${{ env.CHECKPOINT }}
|
||||||
dest: '${{ github.workspace }}/.kernel'
|
dest: '${{ github.workspace }}/.kernel'
|
||||||
|
- name: Patch kernel source
|
||||||
|
uses: libbpf/ci/patch-kernel@master
|
||||||
|
with:
|
||||||
|
patches-root: '${{ github.workspace }}/travis-ci/diffs'
|
||||||
|
repo-root: '.kernel'
|
||||||
- name: Prepare to build BPF selftests
|
- name: Prepare to build BPF selftests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
0
travis-ci/diffs/.do_not_use_dot_patch_here
Normal file
0
travis-ci/diffs/.do_not_use_dot_patch_here
Normal file
35
travis-ci/diffs/001-fix-oob-write-in-test_verifier.diff
Normal file
35
travis-ci/diffs/001-fix-oob-write-in-test_verifier.diff
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
|
||||||
|
To: bpf@vger.kernel.org
|
||||||
|
Cc: Alexei Starovoitov <ast@kernel.org>,
|
||||||
|
Daniel Borkmann <daniel@iogearbox.net>,
|
||||||
|
Andrii Nakryiko <andrii@kernel.org>
|
||||||
|
Subject: [PATCH bpf-next] selftests/bpf: Fix OOB write in test_verifier
|
||||||
|
Date: Tue, 14 Dec 2021 07:18:00 +0530 [thread overview]
|
||||||
|
Message-ID: <20211214014800.78762-1-memxor@gmail.com> (raw)
|
||||||
|
|
||||||
|
The commit referenced below added fixup_map_timer support (to create a
|
||||||
|
BPF map containing timers), but failed to increase the size of the
|
||||||
|
map_fds array, leading to out of bounds write. Fix this by changing
|
||||||
|
MAX_NR_MAPS to 22.
|
||||||
|
|
||||||
|
Fixes: e60e6962c503 ("selftests/bpf: Add tests for restricted helpers")
|
||||||
|
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
|
||||||
|
---
|
||||||
|
tools/testing/selftests/bpf/test_verifier.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
|
||||||
|
index ad5d30bafd93..33e2ecb3bef9 100644
|
||||||
|
--- a/tools/testing/selftests/bpf/test_verifier.c
|
||||||
|
+++ b/tools/testing/selftests/bpf/test_verifier.c
|
||||||
|
@@ -54,7 +54,7 @@
|
||||||
|
#define MAX_INSNS BPF_MAXINSNS
|
||||||
|
#define MAX_TEST_INSNS 1000000
|
||||||
|
#define MAX_FIXUPS 8
|
||||||
|
-#define MAX_NR_MAPS 21
|
||||||
|
+#define MAX_NR_MAPS 22
|
||||||
|
#define MAX_TEST_RUNS 8
|
||||||
|
#define POINTER_VALUE 0xcafe4all
|
||||||
|
#define TEST_DATA_LEN 64
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
Reference in New Issue
Block a user