During code review, I noticed we were passing a bad buffer pointer
to bpf_load_pointer helper function called by jitted code.
Point to the buffer allocated by JIT, so we don't silently corrupt
other parts of the stack.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm
h
index aee5637..7c16e54 100644
--- a/arch/arm64/net/bpf_jit.h
+++ b/arch/arm64/net/bpf_jit.h
@@ -1,7 +1,7 @@
/*
* BPF JIT compiler for ARM64
*
- * Copyright (C) 2014-2015 Zi Shen Lim <zlim@gmail.com>
+ * Copyright (C) 2014-2016 Zi Shen Lim <zlim@gmail.com>
*
* This pro
Remove superfluous stack frame, saving us 3 instructions for every
LD_ABS or LD_IND.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm64/net/bpf_jit_comp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 7
Remove superfluous stack frame, saving us 3 instructions for
every JMP_CALL.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm64/net/bpf_jit_comp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 5
c174dea545 ("ebpf: make internal bpf API independent of
CONFIG_BPF_SYSCALL ifdefs")
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
Acked-by: Daniel Borkmann <dan...@iogearbox.net>
---
include/linux/bpf.h | 1 +
1 fi
Remove superfluous stack frame, saving us 3 instructions for every
LD_ABS or LD_IND.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm64/net/bpf_jit_comp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 7
Remove superfluous stack frame, saving us 3 instructions for
every JMP_CALL.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm64/net/bpf_jit_comp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 5
to missing header inclusion
in linux/bpf.h. (Thanks to suggestion and ack by Daniel Borkmann)
Ordered it ahead of bpf_tail_call patch #2 so build error is not
triggered.
Zi Shen Lim (4):
bpf: fix missing header inclusion
arm64: bpf: implement bpf_tail_call() helper
arm64: bpf
On Mon, Jun 6, 2016 at 1:11 AM, Daniel Borkmann wrote:
> On 06/06/2016 06:56 AM, Z Lim wrote:
> [...]
>>
>> How about the attached patch? Fixes compilation error on build
>> !CONFIG_BPF_SYSCALL.
>>
>> Also, should this patch be sent to net or net-next (along with this
>>
h
index aee5637..7c16e54 100644
--- a/arch/arm64/net/bpf_jit.h
+++ b/arch/arm64/net/bpf_jit.h
@@ -1,7 +1,7 @@
/*
* BPF JIT compiler for ARM64
*
- * Copyright (C) 2014-2015 Zi Shen Lim <zlim@gmail.com>
+ * Copyright (C) 2014-2016 Zi Shen Lim <zlim@gmail.com>
*
* This pro
h
index aee5637..7c16e54 100644
--- a/arch/arm64/net/bpf_jit.h
+++ b/arch/arm64/net/bpf_jit.h
@@ -1,7 +1,7 @@
/*
* BPF JIT compiler for ARM64
*
- * Copyright (C) 2014-2015 Zi Shen Lim <zlim@gmail.com>
+ * Copyright (C) 2014-2016 Zi Shen Lim <zlim@gmail.com>
*
* This pro
Remove superfluous stack frame, saving us 3 instructions for every
LD_ABS or LD_IND.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm64/net/bpf_jit_comp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 7
Remove superfluous stack frame, saving us 3 instructions for
every JMP_CALL.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm64/net/bpf_jit_comp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 5
since v1:
- Added patch #1 to address build error due to missing header inclusion
in linux/bpf.h. (Thanks to suggestion and ack by Daniel Borkmann)
Ordered it ahead of bpf_tail_call patch #2 so build error is not
triggered.
Zi Shen Lim (4):
bpf: fix missing header inclusion
arm64
c174dea545 ("ebpf: make internal bpf API independent of
CONFIG_BPF_SYSCALL ifdefs")
Suggested-by: Daniel Borkmann <dan...@iogearbox.net>
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
Acked-by: Daniel Borkmann <dan...@iogearbox.net>
---
include/linux/bpf.h | 1 +
1 fi
: if (0x3 & 0x) return 1
jited:1 89 PASS
...
Fixes: e54bcde3d69d ("arm64: eBPF JIT compiler")
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
arch/arm64/net/bpf_jit_comp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64
: Fix selftests build to
just build, not run tests").
Reordering the Makefile allows us to remove the 'all' target.
Tested on Ubuntu 16.04.2.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
tools/testing/selftests/bpf/Makefile | 13 ++---
1 file changed, 6 insertions(
: Fix selftests build to
just build, not run tests").
Reordering the Makefile allows us to remove the 'all' target.
Tested both:
selftests/bpf$ make
and
selftests$ make TARGETS=bpf
on Ubuntu 16.04.2.
Signed-off-by: Zi Shen Lim <zlim@gmail.com>
---
v1:
- Fixed build
18 matches
Mail list logo