On 03/09/2019 12:58 AM, Andrii Nakryiko wrote:
> This patch splits and cleans up error handling logic for loading BTF data.
> Previously, if BTF data was parsed successfully, but failed to load into
> kernel, we'd report nonsensical error code, instead of error returned from
> btf__load(). Now btf_
_LOCK upon need.
Signed-off-by: Daniel Borkmann
---
include/linux/bpf.h | 5 ++-
include/uapi/linux/bpf.h | 1 +
kernel/bpf/syscall.c | 72 +---
3 files changed, 65 insertions(+), 13 deletions(-)
diff --git a/include/linux/bpf.h b/include/li
passing in const data.
Joint work with Daniel Borkmann.
Signed-off-by: Joe Stringer
Signed-off-by: Daniel Borkmann
---
tools/testing/selftests/bpf/bpf_helpers.h | 8 +-
.../selftests/bpf/prog_tests/global_data.c| 157 ++
.../selftests/bpf/progs/test_global_data.c
Trivial addition to allow '.' aside from '_' as "special" characters
in the object name. Used to allow for substrings in maps from loader
side such as ".bss", ".data", ".rodata", but could also be useful for
other purposes.
Signed-off-
27;, bad access 1 OK
#921/p XDP pkt read, pkt_data <= pkt_meta', bad access 2 OK
Summary: 1366 PASSED, 1 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann
---
tools/include/linux/filter.h | 14 ++
tools/testing/selftests/bpf/test_verifier.c | 42 +++-
.../selfte
Pull in latest changes, so we can make use of them in libbpf.
Signed-off-by: Daniel Borkmann
---
tools/include/uapi/linux/bpf.h | 24 ++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index
y for these maps (Alexei)
-> Waiting till BTF support for these lands first
v1 -> v2:
- Instead of 32-bit static data, implement full global
data support (Alexei)
[0] https://patchwork.ozlabs.org/cover/1040290/
[1] http://vger.kernel.org/lpc-bpf2018.html#session-3
Dani
From: Joe Stringer
Adjust the code for relocations slightly with no functional changes,
so that upcoming patches that will introduce support for relocations
into the .data, .rodata and .bss sections can be added independent
of these changes.
Signed-off-by: Joe Stringer
Signed-off-by: Daniel
required. Loader support has been added in subsequent commits for
libbpf library.
Signed-off-by: Daniel Borkmann
---
include/linux/bpf.h | 6 ++
include/linux/bpf_verifier.h | 4 ++
include/uapi/linux/bpf.h | 13 +++-
kernel/bpf/arraymap.c | 29
str2[2], "hello", sizeof("hello"));
142: (73) *(u8 *)(r8 +6) = r1 <-- further access based on .bss data
143: (b7) r1 = 108
144: (73) *(u8 *)(r8 +5) = r1
[...]
Based upon recent fix in LLVM, commit c0db6b6bd444 ("[BPF] Don't
fail for static variables"
e and stack. Further map types could be followed
up in future depending on use-case. Main use case here is to
forbid writes into .rodata map values from verifier side.
Signed-off-by: Daniel Borkmann
---
include/linux/bpf.h | 24 ++
include/uapi/linux/bpf.h
On 03/12/2019 12:06 AM, Alexei Starovoitov wrote:
> On Mon, Mar 11, 2019 at 10:51:18PM +0100, Daniel Borkmann wrote:
>> This work adds two new map creation flags BPF_F_RDONLY_PROG
>> and BPF_F_WRONLY_PROG in order to allow for read-only or
>> write-only BPF maps fr
On 03/12/2019 09:02 PM, Andrii Nakryiko wrote:
> On Tue, Mar 12, 2019 at 12:44 PM Magnus Karlsson
> wrote:
>>
>> On Tue, Mar 12, 2019 at 8:27 PM Andrii Nakryiko
>> wrote:
>>>
>>> On Tue, Mar 12, 2019 at 2:00 AM Magnus Karlsson
>>> wrote:
In xsk_socket__create(), the libbpf_flags field
st_progs
> ...
> Summary: 219 PASSED, 2 FAILED
>
> Fixes: b4d4556c3266 ("selftests/bpf: add bpf_spin_lock verifier tests")
> Fixes: ba72a7b4badb ("selftests/bpf: test for BPF_F_LOCK")
> Reported-by: Daniel Borkmann
> Signed-off-by: Yonghong Song
Applied, thanks!
On 03/12/2019 09:52 PM, Daniel Borkmann wrote:
> On 03/12/2019 09:02 PM, Andrii Nakryiko wrote:
>> On Tue, Mar 12, 2019 at 12:44 PM Magnus Karlsson
>> wrote:
>>>
>>> On Tue, Mar 12, 2019 at 8:27 PM Andrii Nakryiko
>>> wrote:
>>>>
>>&g
On 03/13/2019 03:15 PM, Björn Töpel wrote:
> From: Björn Töpel
>
> When the umem is cleaned up, the task that created it might already be
> gone. If the task was gone, the xdp_umem_release function did not free
> the pages member of struct xdp_umem.
>
> It turned out that the task lookup was not
Hi David,
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) Fix a umem memory leak on cleanup in AF_XDP, from Björn.
2) Fix BTF to properly resolve forward-declared enums into their corresponding
full enum definition types during deduplication, fro
On 03/18/2019 04:39 PM, Michal Hocko wrote:
> On Mon 18-03-19 16:10:26, Martynas Pumputis wrote:
>> It has been observed that sometimes a higher order memory allocation
>> for BPF maps fails when there is no obvious memory pressure in a system.
>>
>> E.g. the map (BPF_MAP_TYPE_LRU_HASH, key=38, val
Merge window is closed, so new round begins.
Thanks everyone,
Daniel
On 03/19/2019 06:01 PM, Alban Crequy wrote:
> On Tue, 19 Mar 2019 at 09:56, Daniel Borkmann wrote:
>>
>> Merge window is closed, so new round begins.
>>
>> Thanks everyone,
>> Daniel
>
> Thanks! I see that the bpf tree is more recent than the bpf-next tree
On 03/20/2019 09:44 PM, Stanislav Fomichev wrote:
> On 03/20, Luca Boccassi wrote:
>> On Wed, 2019-03-20 at 10:21 -0700, Stanislav Fomichev wrote:
>>> On 03/20, Luca Boccassi wrote:
On Wed, 2019-03-20 at 13:22 +, Luca Boccassi wrote:
> On Tue, 2019-03-19 at 16:17 -0700, Stanislav Fomic
On 03/20/2019 11:45 PM, Yonghong Song wrote:
> On 3/20/19 3:27 PM, Stanislav Fomichev wrote:
>> On 03/20, Yonghong Song wrote:
>>> On 3/20/19 10:13 AM, Stanislav Fomichev wrote:
On 03/20, Sergey Senozhatsky wrote:
> Not all compilers have __builtin_bswap16() and __builtin_bswap32(),
>
On 03/21/2019 11:01 PM, Alexei Starovoitov wrote:
> On Thu, Mar 21, 2019 at 04:00:46PM +, Andrey Ignatov wrote:
>> luca.bocca...@gmail.com [Thu, 2019-03-21 03:26
>> -0700]:
>>> From: Luca Boccassi
>>>
>>> Generate a libbpf.pc file at build time so that users can rely
>>> on pkg-config to fin
First one is fixing version in Makefile and shared object and
second one clarifies bump in version. Thanks!
Daniel Borkmann (2):
bpf, libbpf: fix version info and add it to shared object
bpf, libbpf: clarify bump in libbpf version info
tools/lib/bpf/Makefile | 42
pf feature
check")
Reported-by: Stanislav Fomichev
Signed-off-by: Daniel Borkmann
---
tools/lib/bpf/Makefile | 42 --
1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 61aaacf..ada2
eported-by: Stanislav Fomichev
Signed-off-by: Daniel Borkmann
---
tools/lib/bpf/README.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/bpf/README.rst b/tools/lib/bpf/README.rst
index 5788479..cef7b77 100644
--- a/tools/lib/bpf/README.rst
+++ b/tools/lib/bpf/README.rst
@@ -11
On 03/23/2019 01:28 AM, Stanislav Fomichev wrote:
> On 03/23, Daniel Borkmann wrote:
>> On 03/23/2019 01:09 AM, Stanislav Fomichev wrote:
>>> On 03/23, Daniel Borkmann wrote:
>> [...]
>>>> +$(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN)
>>>> + $
First one is fixing version in Makefile and shared object and
second one clarifies bump in version. Thanks!
v1 -> v2:
- Fix up soname, thanks Stanislav!
Daniel Borkmann (2):
bpf, libbpf: fix version info and add it to shared object
bpf, libbpf: clarify bump in libbpf version info
to
program types")
Fixes: 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature
check")
Reported-by: Stanislav Fomichev
Signed-off-by: Daniel Borkmann
---
tools/lib/bpf/Makefile | 42 --
1 file changed, 28 insertions(
eported-by: Stanislav Fomichev
Signed-off-by: Daniel Borkmann
---
tools/lib/bpf/README.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/bpf/README.rst b/tools/lib/bpf/README.rst
index 5788479..cef7b77 100644
--- a/tools/lib/bpf/README.rst
+++ b/tools/lib/bpf/README.rst
@@ -11
Hey Willem,
On 03/22/2019 07:32 PM, Willem de Bruijn wrote:
> From: Willem de Bruijn
>
> BPF allows for dynamic tunneling, choosing the tunnel destination and
> features on-demand. Extend bpf_skb_adjust_room to allow for efficient
> tunneling at the TC hooks.
Patch 9 in this series caused the f
Hi Andrey,
On 03/24/2019 01:12 AM, Andrey Ignatov wrote:
> The patch set introduces new BPF hook for sysctl.
>
> It adds new program type BPF_PROG_TYPE_CGROUP_SYSCTL and attach type
> BPF_CGROUP_SYSCTL.
>
> BPF_CGROUP_SYSCTL hook is placed before calling to sysctl's proc_handler so
> that access
On 03/15/2019 07:42 AM, Daniel T. Lee wrote:
> Since, ksym_search added with verification logic for symbols existence,
> it could return NULL when the kernel symbols are not loaded.
>
> This commit will add NULL check logic after ksym_search.
>
> Signed-off-by: Daniel T. Lee
> ---
> samples/bpf
On 03/19/2019 10:53 PM, Stanislav Fomichev wrote:
> When running stacktrace_build_id_nmi, try to query
> kernel.perf_event_max_sample_rate sysctl and use it as a sample_freq.
> If there was an error reading sysctl, fallback to 5000.
>
> kernel.perf_event_max_sample_rate sysctl can drift and/or can
On 03/25/2019 10:36 AM, Alan Maguire wrote:
> test_tc_tunnel.sh sets up a pair of namespaces connected by a
> veth pair to verify encap/decap using bpf_skb_adjust_room. In
> testing this, it uses tunnel links as the peer of the bpf-based
> encap/decap. However because the same IP header is used f
On 03/22/2019 11:38 PM, Javier Honduvilla Coto wrote:
> This patch adds the bpf_progenyof helper which receives a PID and returns
> 1 if the process currently being executed is in the process hierarchy
> including itself or 0 if not.
>
> This is very useful in tracing programs when we want to filt
On 04/25/2019 10:46 PM, Alexei Starovoitov wrote:
> On Wed, Apr 24, 2019 at 09:49:58PM +0200, Paul Chaignon wrote:
>> In case of a null check on a pointer inside a subprog, we should mark all
>> registers with this pointer as either safe or unknown, in both the current
>> and previous frames. Curr
On 04/24/2019 11:31 PM, Stanislav Fomichev wrote:
> target_fd is target namespace. If there is a flow dissector BPF program
> attached to that namespace, its (single) id is returned.
>
> v4:
> * add missing put_net (Jann Horn)
>
> v3:
> * add missing inline to skb_flow_dissector_prog_query static
On 04/25/2019 11:02 AM, Daniel T. Lee wrote:
> This commit adds hbm to .gitignore which is
> currently ommited from the ignore file.
>
> Signed-off-by: Daniel T. Lee
Applied, thanks.
On 04/23/2019 10:24 PM, Daniel T. Lee wrote:
> Currently, building bpf samples will cause the following error.
>
> ./tools/lib/bpf/bpf.h:132:27: error: 'UINT32_MAX' undeclared here (not in
> a function) ..
> #define BPF_LOG_BUF_SIZE (UINT32_MAX >> 8) /* verifier maximum in
> kernels <=
On 04/25/2019 11:37 PM, Stanislav Fomichev wrote:
> target_fd is target namespace. If there is a flow dissector BPF program
> attached to that namespace, its (single) id is returned.
>
> v5:
> * drop net ref right after rcu unlock (Daniel Borkmann)
>
> v4:
> * add mi
encoder along with STADD as special case and use it in the JIT for CPUs
that advertise LSE atomics in CPUID register. If immediate offset in the
BPF XADD insn is 0, then use dst register directly instead of temporary
one.
Signed-off-by: Daniel Borkmann
Acked-by: Jean-Philippe Brucker
Acked-by: Will
This set holds two arm64 bpf jit improvements for xadd. Thanks!
Daniel Borkmann (2):
bpf, arm64: remove prefetch insn in xadd mapping
bpf, arm64: use more scalable stadd over ldxr / stxr loop in xadd
arch/arm64/include/asm/insn.h | 8
arch/arm64/kernel/insn.c | 40
fetch instruction.
Fixes: 85f68fe89832 ("bpf, arm64: implement jiting of BPF_XADD")
Reported-by: Will Deacon
Signed-off-by: Daniel Borkmann
Acked-by: Jean-Philippe Brucker
Acked-by: Will Deacon
---
arch/arm64/net/bpf_jit.h | 6 --
arch/arm64/net/bpf_jit_comp.c | 1 -
2 files chang
On 04/26/2019 07:40 PM, David Ahern wrote:
> On 4/20/19 1:06 PM, Lucas Siba wrote:
>> From: Lucas Siba @ 2019-04-20 11:40 UTC
>> To: netdev
>>
>> This patch updates the tc-bpf.8 example application for changes to the
>> struct bpf_elf_map definition. In it's current form, things compile, but
>> the
bpftool: fix indendation in bash-completion/bpftool
Benjamin Poirier (1):
bpftool: Fix errno variable usage
Daniel Borkmann (6):
Merge branch 'bpf-eth-get-headlen'
Merge branch 'bpf-proto-fixes'
bpf, libbpf: handle old kernels more graceful wrt glob
On 04/29/2019 09:16 PM, Jeff Kirsher wrote:
> From: Björn Töpel
>
> GCC will generate jump tables for switch-statements with more than 5
> case statements. An entry into the jump table is an indirect call,
> which means that for CONFIG_RETPOLINE builds, this is rather
> expensive.
>
> This commi
On 05/06/2019 02:10 AM, Andrii Nakryiko wrote:
> When BTF generation is enabled through CONFIG_DEBUG_INFO_BTF,
> scripts/link-vmlinux.sh detects if pahole version is too old and
> gracefully continues build process, skipping BTF generation build step.
> But if pahole is not available, build will st
On 04/30/2019 02:45 PM, Björn Töpel wrote:
> From: Björn Töpel
>
> When unmapping the AF_XDP memory regions used for the rings, an
> invalid address was passed to the munmap() calls. Instead of passing
> the beginning of the memory region, the descriptor region was passed
> to munmap.
>
> When t
On 04/30/2019 12:42 PM, David Laight wrote:
> From: Josh Elsasser
>> Sent: 29 April 2019 21:02
>> On Apr 29, 2019, at 12:16 PM, Jeff Kirsher
>> wrote:
>>
>>> From: Björn Töpel
>>>
>>> GCC will generate jump tables for switch-statements with more than 5
>>> case statements. An entry into the jump
On 05/06/2019 10:40 AM, Björn Töpel wrote:
> On Mon, 6 May 2019 at 10:26, Daniel Borkmann wrote:
>> On 04/30/2019 02:45 PM, Björn Töpel wrote:
>>> From: Björn Töpel
>>>
>>> When unmapping the AF_XDP memory regions used for the rings, an
>>> inv
On 05/02/2019 10:05 PM, John Fastabend wrote:
> On 4/30/19 7:06 PM, John Fastabend wrote:
>> Series of fixes for sockmap and ktls, see patches for descriptions.
>>
>> v2: fix build issue for CONFIG_TLS_DEVICE and fixup couple comments
>> from Jakub
>>
>> v3: fix issue where release could call u
On 04/30/2019 03:21 PM, Michael Ellerman wrote:
> Hi Daniel,
>
> I'm running selftests/bpf/test_tag and it's taking roughly half an hour
> to complete, is that expected?
>
> I don't really grok what the test is doing TBH, but it does appear to be
> doing it 5 times :)
>
> for (i = 0; i < 5
On 05/06/2019 11:24 AM, Björn Töpel wrote:
> From: Björn Töpel
>
> The patches with fixes tags added a cast-to-void in the places when
> the return value of a function was ignored.
>
> This is not common practice in the kernel, and is therefore removed in
> this patch.
>
On 05/04/2019 06:06 PM, Björn Töpel wrote:
> From: Björn Töpel
>
> When an AF_XDP socket is released/closed the XSKMAP still holds a
> reference to the socket in a "released" state. The socket will still
> use the netdev queue resource, and block newly created sockets from
> attaching to that que
On 05/06/2019 12:04 PM, Daniel Borkmann wrote:
> On 05/04/2019 06:06 PM, Björn Töpel wrote:
>> From: Björn Töpel
>>
>> When an AF_XDP socket is released/closed the XSKMAP still holds a
>> reference to the socket in a "released" state. The socket will still
Only bug fixes from this point forward given the merge window is open. PRs
will go out to David in a bit.
Thanks everyone,
Daniel
Hi David,
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) Two x32 JIT fixes: one which has buggy signed comparisons in 64
bit conditional jumps and another one for 64 bit negation, both
from Wang.
Please consider pulling these changes from:
On 05/03/2019 12:42 PM, Jiong Wang wrote:
> eBPF ISA specification requires high 32-bit cleared when low 32-bit
> sub-register is written. This applies to destination register of ALU32 etc.
> JIT back-ends must guarantee this semantic when doing code-gen.
>
> x86-64 and arm64 ISA has the same sema
On 05/03/2019 12:42 PM, Jiong Wang wrote:
> BPF helper call transfers execution from eBPF insns to native functions
> while verifier insn walker only walks eBPF insns. So, verifier can only
> knows argument and return value types from explicit helper function
> prototype descriptions.
>
> For 32-b
On 05/06/2019 03:49 PM, Daniel Borkmann wrote:
> On 05/03/2019 12:42 PM, Jiong Wang wrote:
>> eBPF ISA specification requires high 32-bit cleared when low 32-bit
>> sub-register is written. This applies to destination register of ALU32 etc.
>> JIT back-ends must guarantee thi
Hi David,
The following pull-request contains BPF updates for your *net-next* tree.
The main changes are:
1) Two AF_XDP libbpf fixes for socket teardown; first one an invalid
munmap and the other one an invalid skmap cleanup, both from Björn.
2) More graceful CONFIG_DEBUG_INFO_BTF handling w
On 05/09/2019 12:58 PM, Eric Dumazet wrote:
> On Thu, May 9, 2019 at 3:52 AM Eric Dumazet wrote:
>> On Wed, May 8, 2019 at 9:47 PM Alexei Starovoitov
>> wrote:
>>> On Wed, May 08, 2019 at 04:17:29PM -0700, Eric Dumazet wrote:
On Wed, May 8, 2019 at 4:09 PM Alexei Starovoitov
wrote:
>>>
ad code")
Fixes: 2cbd95a5c4fb ("bpf: change parameters of call/branch offset adjustment")
Reported-by: Frank Ch. Eigler
Signed-off-by: Daniel Borkmann
Reviewed-by: Jakub Kicinski
---
kernel/bpf/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel
Add a couple of tests to make sure branch offset adjustments are
correctly performed.
Signed-off-by: Daniel Borkmann
---
tools/testing/selftests/bpf/verifier/jump.c | 151
1 file changed, 151 insertions(+)
diff --git a/tools/testing/selftests/bpf/verifier/jump.c
b/tools
On 05/12/2019 09:29 AM, Kelsey Skunberg wrote:
> The following files are generated after building /selftests/bpf/ and
> should be added to .gitignore:
>
> - libbpf.pc
> - libbpf.so.*
>
> Signed-off-by: Kelsey Skunberg
Applied, thanks.
On 05/10/2019 04:51 PM, Quentin Monnet wrote:
> Another round of fixes for the doc in the BPF UAPI header, which can be
> turned into a manual page. First patch is the most important, as it fixes
> parsing for the bpf_strtoul() helper doc. Following patches are formatting
> fixes (nitpicks, mostly)
On 05/12/2019 03:09 AM, Stanislav Fomichev wrote:
> On 05/11, Andrii Nakryiko wrote:
>> On Fri, May 10, 2019 at 3:00 PM Stanislav Fomichev wrote:
>>> On 05/10, Andrii Nakryiko wrote:
On Fri, May 10, 2019 at 2:36 PM Stanislav Fomichev
wrote:
> On 05/10, Andrii Nakryiko wrote:
>>
On 05/10/2019 12:16 PM, Krzesimir Nowak wrote:
> On Thu, May 9, 2019 at 11:30 PM Daniel Borkmann wrote:
>> On 05/08/2019 06:08 PM, Krzesimir Nowak wrote:
>>> Commit 31fd85816dbe ("bpf: permits narrower load from bpf program
>>> context fields") made the verif
Nakryiko (1):
libbpf: detect supported kernel BTF features and sanitize BTF
Daniel Borkmann (3):
bpf: fix out of bounds backwards jmps due to dead code removal
bpf: add various test cases for backward jumps
Merge branch 'bpf-uapi-doc-fixes'
Kelsey S
: Daniel Borkmann
Acked-by: Martin KaFai Lau
---
include/linux/bpf.h | 1 +
kernel/bpf/syscall.c | 5 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 59631dd..4fb3aa2 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
This set fixes LRU map eviction in combination with map lookups out
of system call side from user space. Main patch is the second one and
test cases are adapted and added in the last one. Thanks!
Daniel Borkmann (3):
bpf: add map_lookup_elem_sys_only for lookups from syscall side
bpf, lru
map_flags:0x2): Pass
test_lru_sanity4 (map_type:10 map_flags:0x2): Pass
test_lru_sanity6 (map_type:10 map_flags:0x2): Pass
test_lru_sanity7 (map_type:10 map_flags:0x2): Pass
test_lru_sanity8 (map_type:10 map_flags:0x2): Pass
Signed-off-by: Daniel Borkmann
Acked-by: Martin KaFai Lau
---
tools
0] http://vger.kernel.org/bpfconf.html
Fixes: 29ba732acbee ("bpf: Add BPF_MAP_TYPE_LRU_HASH")
Fixes: 8f8449384ec3 ("bpf: Add BPF_MAP_TYPE_LRU_PERCPU_HASH")
Signed-off-by: Daniel Borkmann
Acked-by: Martin KaFai Lau
---
kernel/bpf/hashtab.c | 23 ++-
1 file ch
On 05/13/2019 06:59 PM, Eric Dumazet wrote:
> synchronize_rcu() is fine when the rcu callbacks only need
> to free memory (kfree_rcu() or direct kfree() call rcu call backs)
>
> __dev_map_entry_free() is a bit more complex, so we need to make
> sure that call queued __dev_map_entry_free() callback
On 05/13/2019 09:04 PM, Stanislav Fomichev wrote:
> Both of them are not declared in the headers and not used outside
> of bpf_trace.c file.
>
> Fixes: a38d1107f937c ("bpf: support raw tracepoints in modules")
> Signed-off-by: Stanislav Fomichev
Applied, thanks!
On 05/13/2019 04:19 PM, John Fastabend wrote:
> A couple fixes for sockmap code. Previously this was bundled with a tls
> fix for unhash() path however, that is becoming a larger fix so push
> these on their own.
Agree, applied, thanks!
On 05/14/2019 07:04 AM, Andrii Nakryiko wrote:
> On Mon, May 13, 2019 at 4:20 PM Daniel Borkmann wrote:
>>
>> Add a callback map_lookup_elem_sys_only() that map implementations
>> could use over map_lookup_elem() from system call side in case the
>> map implementation
meo == 0 (2019-05-16
01:36:13 +0200)
Alexei Starovoitov (1):
Merge branch 'lru-map-fix'
Daniel Borkmann (3):
bpf: add map_lookup_elem_sys_only for lookups from syscall side
bpf, lru: avoid messing with e
On 05/14/2019 11:12 PM, Stanislav Fomichev wrote:
> Otherwise, in case of an error, everything gets mushed together.
>
> Fixes: a5cb33464e53 ("selftests/bpf: make flow dissector tests more
> extensible")
> Signed-off-by: Stanislav Fomichev
Both applied, thanks!
On 05/14/2019 06:42 AM, John Fastabend wrote:
> The tcp_bpf_wait_data() routine needs to check timeo != 0 before
> calling sk_wait_event() otherwise we may see unexpected stalls
> on receiver.
>
> Arika did all the leg work here I just formaatted, posted and ran
> a few tests.
>
> Fixes: 604326b4
On 05/15/2019 05:38 AM, Stanislav Fomichev wrote:
> Otherwise libbpf is unusable from unprivileged process with
> kernel.kernel.unprivileged_bpf_disabled=1.
> All I get is EPERM from the probes, even if I just want to
> open an ELF object and look at what progs/maps it has.
>
> Instead of dying on
On 05/17/2019 06:34 AM, Alexei Starovoitov wrote:
> Fix bpf_get_current_task() declaration.
>
> Signed-off-by: Alexei Starovoitov
Applied, thanks!
On 05/17/2019 08:21 AM, Andrii Nakryiko wrote:
> kflag bit determines whether FWD is for struct or union. Use that bit.
>
> Fixes: c93cc69004df ("bpftool: add ability to dump BTF types")
> Signed-off-by: Andrii Nakryiko
Applied, thanks!
Hi David,
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) Fix bpftool's raw BTF dump in relation to forward declarations of union/
structs, and another fix to unexport logging helpers, from Andrii.
2) Fix inode permission check for retrieving bpf
On 10/04/2017 02:03 PM, Jesper Dangaard Brouer wrote:
[...]
+#define CPU_MAP_BULK_SIZE 8 /* 8 == one cacheline on 64-bit archs */
+struct xdp_bulk_queue {
+ void *q[CPU_MAP_BULK_SIZE];
+ unsigned int count;
+};
+
+/* Struct for every remote "destination" CPU in map */
+struct bpf_cpu
On 10/04/2017 02:03 PM, Jesper Dangaard Brouer wrote:
This patch connects cpumap to the xdp_do_redirect_map infrastructure.
Still no SKB allocation are done yet. The XDP frames are transferred
to the other CPU, but they are simply refcnt decremented on the remote
CPU. This served as a good ben
On 10/04/2017 02:03 PM, Jesper Dangaard Brouer wrote:
[...]
static int cpu_map_kthread_run(void *data)
{
struct bpf_cpu_map_entry *rcpu = data;
set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) {
+ unsigned int processed = 0, drops =
On 10/05/2017 10:34 AM, Peter Zijlstra wrote:
On Wed, Oct 04, 2017 at 04:00:56PM -0700, David Miller wrote:
From: Yonghong Song
Date: Mon, 2 Oct 2017 15:42:14 -0700
[Dave, Peter,
Previous communcation shows that this patch may potentially have
merge conflict with upcoming tip changes in
On 10/05/2017 03:28 PM, Stephen Smalley wrote:
[...]
+static int selinux_bpf_prog(struct bpf_prog *prog)
+{
+ u32 sid = current_sid();
+ struct bpf_security_struct *bpfsec;
+
+ bpfsec = prog->aux->security;
I haven't looked closely at the bpf code, but is it guaranteed that
pr
in the maps section
is the same size.
Signed-off-by: Craig Gallek
Thanks,
Acked-by: Daniel Borkmann
On 10/05/2017 04:41 PM, Craig Gallek wrote:
From: Craig Gallek
This is required to use BPF_MAP_TYPE_LPM_TRIE or any other map type
which requires flags.
Signed-off-by: Craig Gallek
Acked-by: Daniel Borkmann
On 10/05/2017 05:34 PM, Jakub Kicinski wrote:
Verifier log buffer can be quite large (up to 16MB currently).
As Eric Dumazet points out if we allow multiple verification
requests to proceed simultaneously, malicious user may use the
verifier as a way of allocating large amounts of unswappable
mem
On 10/05/2017 11:26 PM, Jakub Kicinski wrote:
On Thu, 05 Oct 2017 23:10:03 +0200, Daniel Borkmann wrote:
include/linux/bpf_verifier.h | 7 +++--
kernel/bpf/verifier.c| 64
+++-
2 files changed, 50 insertions(+), 21 deletions(-)
diff
On 10/06/2017 12:50 PM, Jesper Dangaard Brouer wrote:
On Thu, 05 Oct 2017 11:40:15 +0200
Daniel Borkmann wrote:
On 10/04/2017 02:03 PM, Jesper Dangaard Brouer wrote:
[...]
+#define CPU_MAP_BULK_SIZE 8 /* 8 == one cacheline on 64-bit archs */
+struct xdp_bulk_queue {
+ void *q
86727929
time ~11 sec ~4 sec
Fixes: dc503a8ad984 ("bpf/verifier: track liveness for pruning")
Signed-off-by: Alexei Starovoitov
LGTM, thanks!
Acked-by: Daniel Borkmann
Hi Shmulik,
On 10/09/2017 01:57 PM, Pablo Neira Ayuso wrote:
On Mon, Oct 09, 2017 at 01:18:23PM +0200, Pablo Neira Ayuso wrote:
On Fri, Oct 06, 2017 at 01:40:13PM -0400, Willem de Bruijn wrote:
On Fri, Oct 6, 2017 at 12:02 PM, Shmulik Ladkani wrote:
From: Shmulik Ladkani
Commit 2c16d603326
: [1] https://marc.info/?l=netfilter-devel&m=150564724607440&w=2
[2] https://marc.info/?l=netfilter-devel&m=150575727129880&w=2
Cc: Pablo Neira Ayuso
Cc: Willem de Bruijn
Reported-by: Rafael Buchbinder
Signed-off-by: Shmulik Ladkani
Acked-by: Daniel Borkmann
On 10/06/2017 06:12 PM, Jesper Dangaard Brouer wrote:
[...]
+static struct bpf_map *cpu_map_alloc(union bpf_attr *attr)
+{
+ struct bpf_cpu_map *cmap;
+ int err = -ENOMEM;
err init here is basically not needed since overriden later anyway
w/o being read, but ...
+ u64 cost;
On 10/09/2017 03:31 PM, Daniel Borkmann wrote:
On 10/06/2017 06:12 PM, Jesper Dangaard Brouer wrote:
[...]
+/* Pre-limit array size based on NR_CPUS, not final CPU check */
+if (cmap->map.max_entries > NR_CPUS)
Nit: needs to be >= NR_CPUS.
Scratch that comment, you ba
801 - 900 of 4724 matches
Mail list logo