Commit 430e8c1
tetragon: Add additional returnCopy test
This test confirms that we don't confuse the meaning of index. Arguments
have a position (index) within the args section of a tracing policy
spec. The arg's position defined within the spec is not related to the
arg's position (index) within the function signature or tracepoint that
is being hooked.
We had a bug where we confused the meaning of index. Retprobes need to
overwrite a argument value that not available at function entry. We
locate the argument which needs to be overwritten by referencing its
position within the tracing policy spec. The bug happened because we
overwrote based on arg's position within the function signature.
As such, returnCopy only worked as expected when the user defined the
args in the tracing policy spec in the same order as they appear in the
function/tracepoint signature.
This returnCopy test is constructed such that the configured argument's
index within the spec does not correspond to the arguments position
within the function signature.
Signed-off-by: Andy Strohman <astrohma@isovalent.com>1 parent 3368d2f commit 430e8c1
1 file changed
+46
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
558 | 604 | | |
559 | 605 | | |
560 | 606 | | |
| |||
0 commit comments