Skip to content

Conversation

@Molter73
Copy link
Collaborator

@Molter73 Molter73 commented Oct 23, 2025

Description

This patch makes it so detaching and reattaching programs is no longer needed for updating the list of monitored paths. This is achieved by first loading all the new paths into the BPF trie map and then removing the entries that are not part of the new configuration.

An integration test was added to ensure adding new paths does not remove existing paths accidentally.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

Added an integration test.

This patch makes it so detaching and reattaching programs is no longer
needed for updating the list of monitored paths. This is achieved by
first loading all the new paths into the BPF trie map and then removing
the entries that are not part of the new configuration.

An integration test was added to ensure adding new paths does not remove
existing paths accidentally.
@Molter73 Molter73 force-pushed the mauro/feat/reload-paths-on-the-fly branch from f8647ff to 8e12131 Compare October 23, 2025 11:40
Copy link
Contributor

@Stringy Stringy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was quick! LGTM

@Molter73 Molter73 merged commit bdbefbc into mauro/ROX-30836/hotreload-paths Oct 23, 2025
19 of 20 checks passed
@Molter73 Molter73 deleted the mauro/feat/reload-paths-on-the-fly branch October 23, 2025 12:58
Molter73 added a commit that referenced this pull request Oct 29, 2025
This patch makes it so detaching and reattaching programs is no longer
needed for updating the list of monitored paths. This is achieved by
first loading all the new paths into the BPF trie map and then removing
the entries that are not part of the new configuration.

An integration test was added to ensure adding new paths does not remove
existing paths accidentally.
Molter73 added a commit that referenced this pull request Oct 30, 2025
This patch makes it so detaching and reattaching programs is no longer
needed for updating the list of monitored paths. This is achieved by
first loading all the new paths into the BPF trie map and then removing
the entries that are not part of the new configuration.

An integration test was added to ensure adding new paths does not remove
existing paths accidentally.
Molter73 added a commit that referenced this pull request Oct 30, 2025
This patch makes it so detaching and reattaching programs is no longer
needed for updating the list of monitored paths. This is achieved by
first loading all the new paths into the BPF trie map and then removing
the entries that are not part of the new configuration.

An integration test was added to ensure adding new paths does not remove
existing paths accidentally.
Molter73 added a commit that referenced this pull request Oct 30, 2025
* ROX-30836: implement hotreloading for monitored paths

This patch implements hotreloading for the monitored paths.

In order to achieve this, the BPF worker will need to detach all LSM
hooks before messing with the prefix path map in order to prevent any
problems that may arise of events happening in undefined states. This is
achieved by keeping a list of links for the programs and dropping them,
then re-filling the list once the programs are re-attached. The path
prefix map is cleared by keeping a copy of the list of paths that are
being monitored, then the new list is added in and a copy of it is
stored.

* Add test for monitored paths hotreloading

* Reduce code duplication on BPF programs handling

* Minor cleanup

* feat(hot-reload): reload paths on the fly (#128)

This patch makes it so detaching and reattaching programs is no longer
needed for updating the list of monitored paths. This is achieved by
first loading all the new paths into the BPF trie map and then removing
the entries that are not part of the new configuration.

An integration test was added to ensure adding new paths does not remove
existing paths accidentally.

* Remove duplicated `RINGBUFFER_NAME` const
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants