Commit 0621021
committed
bpf: Generalize check_ctx_reg for reuse with other types
jira VULN-140
pre-cve CVE-2022-23222
commit-author Daniel Borkmann <[email protected]>
commit be80a1d
upstream-diff A merge confict arised because 3363bd0 ("bpf: Extend
kfunc with PTR_TO_CTX, PTR_TO_MEM argument support") does not exist
in our tree
Generalize the check_ctx_reg() helper function into a more generic named one
so that it can be reused for other register types as well to check whether
their offset is non-zero. No functional change.
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: John Fastabend <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
(cherry picked from commit be80a1d)
Signed-off-by: Pratham Patel <[email protected]>1 parent f56053c commit 0621021
3 files changed
+14
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
| 489 | + | |
| 490 | + | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5492 | 5492 | | |
5493 | 5493 | | |
5494 | 5494 | | |
5495 | | - | |
| 5495 | + | |
5496 | 5496 | | |
5497 | 5497 | | |
5498 | 5498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3659 | 3659 | | |
3660 | 3660 | | |
3661 | 3661 | | |
3662 | | - | |
3663 | | - | |
| 3662 | + | |
| 3663 | + | |
3664 | 3664 | | |
3665 | | - | |
3666 | | - | |
| 3665 | + | |
| 3666 | + | |
3667 | 3667 | | |
3668 | 3668 | | |
3669 | 3669 | | |
3670 | | - | |
3671 | | - | |
| 3670 | + | |
| 3671 | + | |
3672 | 3672 | | |
3673 | 3673 | | |
3674 | 3674 | | |
3675 | 3675 | | |
3676 | 3676 | | |
3677 | 3677 | | |
3678 | 3678 | | |
3679 | | - | |
| 3679 | + | |
| 3680 | + | |
3680 | 3681 | | |
3681 | 3682 | | |
3682 | 3683 | | |
| |||
4112 | 4113 | | |
4113 | 4114 | | |
4114 | 4115 | | |
4115 | | - | |
| 4116 | + | |
4116 | 4117 | | |
4117 | 4118 | | |
4118 | 4119 | | |
| |||
4914 | 4915 | | |
4915 | 4916 | | |
4916 | 4917 | | |
4917 | | - | |
| 4918 | + | |
4918 | 4919 | | |
4919 | 4920 | | |
4920 | 4921 | | |
| |||
9051 | 9052 | | |
9052 | 9053 | | |
9053 | 9054 | | |
9054 | | - | |
| 9055 | + | |
9055 | 9056 | | |
9056 | 9057 | | |
9057 | 9058 | | |
| |||
0 commit comments