Commit 70b79ec
bpf: Make bpf_skb_adjust_room metadata-safe
bpf_skb_adjust_room() may push or pull bytes from skb->data. In both cases,
skb metadata must be moved accordingly to stay accessible.
Replace existing memmove() calls, which only move payload, with a helper
that also handles metadata. Reserve enough space for metadata to fit after
skb_push.
Signed-off-by: Jakub Sitnicki <[email protected]>1 parent 5055618 commit 70b79ec
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3260 | 3260 | | |
3261 | 3261 | | |
3262 | 3262 | | |
3263 | | - | |
| 3263 | + | |
3264 | 3264 | | |
3265 | 3265 | | |
3266 | 3266 | | |
3267 | | - | |
| 3267 | + | |
3268 | 3268 | | |
3269 | 3269 | | |
3270 | 3270 | | |
| |||
3288 | 3288 | | |
3289 | 3289 | | |
3290 | 3290 | | |
3291 | | - | |
| 3291 | + | |
3292 | 3292 | | |
3293 | 3293 | | |
3294 | 3294 | | |
| |||
3496 | 3496 | | |
3497 | 3497 | | |
3498 | 3498 | | |
| 3499 | + | |
3499 | 3500 | | |
3500 | 3501 | | |
3501 | 3502 | | |
| |||
3506 | 3507 | | |
3507 | 3508 | | |
3508 | 3509 | | |
3509 | | - | |
| 3510 | + | |
3510 | 3511 | | |
3511 | 3512 | | |
3512 | 3513 | | |
| |||
0 commit comments