-
Notifications
You must be signed in to change notification settings - Fork 5
bpf: refactor max_depth computation in bpf_get_stack() #5739
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() #5739
Conversation
|
Upstream branch: bf0c2a8 |
5cf9e1c to
2c853dd
Compare
|
Upstream branch: 2caa6b8 |
5152a9e to
ba7164c
Compare
2c853dd to
5e1a4c1
Compare
|
Upstream branch: 0786654 |
ba7164c to
00a43b6
Compare
5e1a4c1 to
91606c1
Compare
|
Upstream branch: dc0fe95 |
00a43b6 to
185e0f4
Compare
91606c1 to
9e5d665
Compare
|
Upstream branch: c80d797 |
185e0f4 to
a506b3d
Compare
9e5d665 to
f86fd37
Compare
|
Upstream branch: abdaf49 |
a506b3d to
ca4084f
Compare
f86fd37 to
2842450
Compare
|
Upstream branch: 3ec8560 |
ca4084f to
d10ef1b
Compare
2842450 to
53b8665
Compare
|
Upstream branch: 1274163 |
d10ef1b to
bad6fbf
Compare
53b8665 to
26f4a08
Compare
|
Upstream branch: d87fdb1 |
bad6fbf to
91f54b8
Compare
26f4a08 to
032ad98
Compare
|
Upstream branch: dbe99ea |
91f54b8 to
79fabf1
Compare
032ad98 to
728c457
Compare
|
Upstream branch: 6850a33 |
79fabf1 to
fff2184
Compare
728c457 to
a5fe106
Compare
|
Upstream branch: dbe99ea |
fff2184 to
10db7d5
Compare
a5fe106 to
34c4028
Compare
|
Upstream branch: 5c42715 |
10db7d5 to
da5f8ff
Compare
34c4028 to
2ef6166
Compare
A new helper function stack_map_calculate_max_depth() that computes the max depth for a stackmap. Changes in v2: - Removed the checking 'map_size % map_elem_size' from stack_map_calculate_max_depth - Changed stack_map_calculate_max_depth params name to be more generic Changes in v3: - Changed map size param to size in max depth helper Changes in v4: - Fixed indentation in max depth helper for args Signed-off-by: Arnaud Lecomte <[email protected]>
|
Upstream branch: bf7a6a6 |
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. Changes in v2: - Fixed max_depth names across get stack id Changes in v4: - Removed unnecessary empty line in __bpf_get_stackid Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=c9b724fbb41cf2538b7b Signed-off-by: Arnaud Lecomte <[email protected]>
da5f8ff to
e5b9b61
Compare
Pull request for series with
subject: bpf: refactor max_depth computation in bpf_get_stack()
version: 4
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=991208