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

fix: Docker container ID parsing with cgroupfs driver #293

Merged
merged 6 commits into from
Jul 1, 2024

Commits on Jun 26, 2024

  1. fix: Docker container ID parsing with cgroupfs driver

    The format of cgroup path is different for systemd and cgroupfs
    drivers.
    
    For systemd driver, it's
    
    ```
    0::/system.slice/docker-d4ea646fc22c701dbb146e52db4e9125dcca2eebb2f5552f90fedbb28a0f0716.scope
    ```
    
    For cgroupfs driver, it's
    
    ```
    0::/docker/2cf2e0be458a80acb354c953f7bb03de5d2d277dfcb8ebaa6575f95668a0c15f
    ```
    
    Handle both formats.
    vadorovsky committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    c222780 View commit details
    Browse the repository at this point in the history
  2. fix: Use buf_parent only internally in get_container_info

    And only if necessary.
    vadorovsky committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    ec5aa8d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a92ce73 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. fix: Handle offsets and their bounds in buffer_append_str

    Before this change, we were trying to handle offsets by doing pointer
    arithmetics (like `str + offset` where `str` is `char*` and `offset`
    an integer).
    
    Verifier in kernels <6.0 was not happy with that and was complaining
    about unchecked bounds.
    
    Fix that by making `buffer_append_str` aware of offsets and doing all
    the bound checks there.
    vadorovsky committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    871258e View commit details
    Browse the repository at this point in the history
  2. fix: Use container_id_buffer also for parent_buf

    * It's cleaner.
    * Using `char` array was triggering verifier errors on kernel 6.0.
    vadorovsky committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    2583a4e View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Configuration menu
    Copy the full SHA
    02cf37b View commit details
    Browse the repository at this point in the history