Commit 2ea598d
committed
bpf: don't use MAX_SELECTORS_MASK for args
Currently, the max number of selectors is the same as the max number of
configured args, so we don't have problems due to the fact that we use
the MAX_SELECTORS_MASK on arg indexes.
This change makes arg index masking use MAX_POSSIBLE_ARGS_INDEX for
clarity and to decouple these independent concepts.
EVENT_CONFIG_MAX_ARG is replaced everywhere with MAX_POSSIBLE_ARGS
because these two values cannot deviate. There are places where we mask
an index that is used for both event config and kprobe messages. This
consolidation helps in those cases.
Convenience masks are added for the usdt and reg arg masks, because
these arrays can/do have different sizes than the original arg arrays.
There is a limit on the number of args that a user can config. There is
also an unrelated limit about which args can be reached within a
tracepoint/function signature. Both of these limits are currently 5, but
they are logically unrelated limits. However, we use the same arg index
mask for both. This change decouples these two concepts from a masking
perspective so that we could increase the number of arguments that can
be reached from a function signature perspective without increasing the
allowed number of configured arguments.
Signed-off-by: Andy Strohman <astrohma@isovalent.com>1 parent daaa560 commit 2ea598d
File tree
4 files changed
+41
-23
lines changed- bpf
- lib
- process
4 files changed
+41
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | 49 | | |
51 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
73 | | - | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | | - | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
| 511 | + | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
| 575 | + | |
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
632 | 640 | | |
633 | 641 | | |
634 | | - | |
| 642 | + | |
635 | 643 | | |
636 | 644 | | |
637 | 645 | | |
| |||
645 | 653 | | |
646 | 654 | | |
647 | 655 | | |
648 | | - | |
649 | 656 | | |
650 | 657 | | |
651 | 658 | | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | 659 | | |
657 | 660 | | |
658 | 661 | | |
| |||
661 | 664 | | |
662 | 665 | | |
663 | 666 | | |
664 | | - | |
| 667 | + | |
665 | 668 | | |
666 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
667 | 673 | | |
668 | | - | |
| 674 | + | |
669 | 675 | | |
670 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
671 | 680 | | |
| 681 | + | |
672 | 682 | | |
673 | 683 | | |
674 | 684 | | |
| |||
753 | 763 | | |
754 | 764 | | |
755 | 765 | | |
756 | | - | |
| 766 | + | |
757 | 767 | | |
758 | 768 | | |
759 | 769 | | |
| |||
1009 | 1019 | | |
1010 | 1020 | | |
1011 | 1021 | | |
1012 | | - | |
| 1022 | + | |
1013 | 1023 | | |
1014 | 1024 | | |
1015 | 1025 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
0 commit comments