Skip to content

[PERF] Optimize struct boundaries and bounds checking parameters in sentinel_bpf.c #4

@Jean-Regis-M

Description

@Jean-Regis-M

Description

Our eBPF telemetry hooks intercepting file and sys_execve loops are verified by the Linux Kernel prior to loading. To improve efficiency and avoid CPU caching misalignment across heterogeneous worker node infrastructures, we would like to enforce explicit 8-byte boundaries on all kernel trace payload events.

Proposed Scope

  1. Audit structures defined inside sentinel_common.h and ensure 32-bit and 64-bit alignment patterns prevent memory footprint padding issues across runtime limits.
  2. Confirm the placement of __attribute__((packed)) directives on all communication payloads.
  3. Review bounds checks immediately preceding critical memory read helpers like bpf_probe_read_user_str or bpf_probe_read_kernel_str to verify the verifier is fully informed of bounds layout definitions.

Expected Files to Modify

  • sentinel_common.h or sentinel_bpf.c in kernel bytecode targets.

Verification Steps

  • Run native compiler scripts and confirm compiler symbols map output cleanly.
  • Ensure the bytecode successfully passes the local eBPF loader verification checks and does not lead to loading errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions