diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2018-06-03 07:47:19 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2018-06-03 07:47:30 -0700 |
| commit | 69b450789136f70005f8d36315d875158ea430cf (patch) | |
| tree | b1908b2e47a80412aa94f0f2b217b7b0de0a3956 /kernel/trace | |
| parent | 25c1013e0464340aeb090a11c6d0b154bc52afd7 (diff) | |
| parent | 10a76564ae865cbf30ed30e8cbdc1a047e0559ae (diff) | |
| download | blackbird-obmc-linux-69b450789136f70005f8d36315d875158ea430cf.tar.gz blackbird-obmc-linux-69b450789136f70005f8d36315d875158ea430cf.zip | |
Merge branch 'misc-BPF-improvements'
Daniel Borkmann says:
====================
This set adds various patches I still had in my queue, first two
are test cases to provide coverage for the recent two fixes that
went to bpf tree, then a small improvement on the error message
for gpl helpers. Next, we expose prog and map id into fdinfo in
order to allow for inspection of these objections currently used
in applications. Patch after that removes a retpoline call for
map lookup/update/delete helpers. A new helper is added in the
subsequent patch to lookup the skb's socket's cgroup v2 id which
can be used in an efficient way for e.g. lookups on egress side.
Next one is a fix to fully clear state info in tunnel/xfrm helpers.
Given this is full cap_sys_admin from init ns and has same priv
requirements like tracing, bpf-next should be okay. A small bug
fix for bpf_asm follows, and next a fix for context access in
tracing which was recently reported. Lastly, a small update in
the maintainer's file to add patchwork url and missing files.
Thanks!
v2 -> v3:
- Noticed a merge artefact inside uapi header comment, sigh,
fixed now.
v1 -> v2:
- minor fix in getting context access work on 32 bit for tracing
- add paragraph to uapi helper doc to better describe kernel
build deps for cggroup helper
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/trace')
| -rw-r--r-- | kernel/trace/bpf_trace.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index af1486d9a0ed..752992ce3513 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -880,8 +880,14 @@ static bool pe_prog_is_valid_access(int off, int size, enum bpf_access_type type return false; if (type != BPF_READ) return false; - if (off % size != 0) - return false; + if (off % size != 0) { + if (sizeof(unsigned long) != 4) + return false; + if (size != 8) + return false; + if (off % size != 4) + return false; + } switch (off) { case bpf_ctx_range(struct bpf_perf_event_data, sample_period): |

