-
Notifications
You must be signed in to change notification settings - Fork 5
bpf: refactor max_depth computation in bpf_get_stack() #5948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpf: refactor max_depth computation in bpf_get_stack() #5948
Conversation
|
Upstream branch: a578b54 |
cd9a59e to
41fb65e
Compare
|
Upstream branch: 6798668 |
53dce3e to
84d3b33
Compare
41fb65e to
bcefb31
Compare
|
Upstream branch: fd2e081 |
84d3b33 to
f98b2c3
Compare
bcefb31 to
9de6d74
Compare
|
Upstream branch: 32d3766 |
f98b2c3 to
574842d
Compare
9de6d74 to
607e46d
Compare
|
Upstream branch: f7528e4 |
574842d to
68d9b0e
Compare
607e46d to
0f635c7
Compare
|
Upstream branch: 61ee2cc |
68d9b0e to
d0feb74
Compare
0f635c7 to
cde4d9b
Compare
|
Upstream branch: 3ae4c52 |
d0feb74 to
96645a3
Compare
cde4d9b to
2b3c471
Compare
|
Upstream branch: b13448d |
96645a3 to
4ac9dab
Compare
2b3c471 to
2211108
Compare
|
Upstream branch: 180a46b |
4ac9dab to
35789c2
Compare
2211108 to
acca942
Compare
|
Upstream branch: 6ff4a0f |
35789c2 to
1c4162b
Compare
acca942 to
0821404
Compare
|
Upstream branch: 3547a61 |
1c4162b to
099637c
Compare
0821404 to
028d6d4
Compare
|
Upstream branch: 8cd189e |
099637c to
bd91183
Compare
028d6d4 to
0c300ac
Compare
|
Upstream branch: 815276d |
bd91183 to
f32c81d
Compare
0c300ac to
b38c040
Compare
A new helper function stack_map_calculate_max_depth() that computes the max depth for a stackmap. Acked-by: Yonghong Song <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Arnaud Lecomte <[email protected]>
Clean-up bounds checking for trace->nr in __bpf_get_stack by limiting it only to max_depth. Acked-by: Song Liu <[email protected]> Cc: Song Liu <[email protected]> Signed-off-by: Arnaud Lecomte <[email protected]>
Syzkaller reported a KASAN slab-out-of-bounds write in __bpf_get_stackid() when copying stack trace data. The issue occurs when the perf trace contains more stack entries than the stack map bucket can hold, leading to an out-of-bounds write in the bucket's data array. Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=c9b724fbb41cf2538b7b Fixes: ee2a098 ("bpf: Adjust BPF stack helper functions to accommodate skip > 0") Acked-by: Yonghong Song <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Arnaud Lecomte <[email protected]>
|
Upstream branch: 57cb269 |
f32c81d to
bdde657
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1001977 expired. Closing PR. |
Pull request for series with
subject: bpf: refactor max_depth computation in bpf_get_stack()
version: 9
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1001977