projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bpf: introduce bpf_perf_event_output() helper
[cascardo/linux.git]
/
kernel
/
bpf
/
arraymap.c
diff --git
a/kernel/bpf/arraymap.c
b/kernel/bpf/arraymap.c
index
f2d9e69
..
e3cfe46
100644
(file)
--- a/
kernel/bpf/arraymap.c
+++ b/
kernel/bpf/arraymap.c
@@
-295,6
+295,8
@@
static void *perf_event_fd_array_get_ptr(struct bpf_map *map, int fd)
return (void *)attr;
if (attr->type != PERF_TYPE_RAW &&
+ !(attr->type == PERF_TYPE_SOFTWARE &&
+ attr->config == PERF_COUNT_SW_BPF_OUTPUT) &&
attr->type != PERF_TYPE_HARDWARE) {
perf_event_release_kernel(event);
return ERR_PTR(-EINVAL);