Skip to content
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

Stop tracking skb in the end of its lifetime #241

Merged
merged 2 commits into from
Aug 30, 2023
Merged

Stop tracking skb in the end of its lifetime #241

merged 2 commits into from
Aug 30, 2023

Commits on Aug 28, 2023

  1. Inject ebpf pcap filter more robustically

    Previous injection assumes the next instruction to `printk()` is
    "goto <label_return>", which isn't guaranteed by clang.
    
    Technically, previous injection adds a ret insn to implement "exit
    immediately if not matched":
    
        asm.Return().WithSymbol("return")
    
    which forces us to remove the duplicated assumed "goto <label_return>"
    after `printk()`.
    
    This commit improves the way to inject ebpf pcap filter without such
    assumption by setting proper values to registers to avoid adding ret
    insn.
    
    Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
    jschwinger233 committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    143aa6c View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. Stop tracking skb in the end of its lifetime

    `kfree_skbmem` marks the end of an skb's lifetime, so we stop
    tracking it at that time when `--filter-track-skb` is enabled.
    
    Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
    jschwinger233 committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    f96c270 View commit details
    Browse the repository at this point in the history