Currently we put allowed mount paths in a BPF hash map, where those paths are values and for cheching each mount, we iterate over that whole map and search for the string match. Not very optimal.
Instead, we should try to use LPM_TRIE maps which allow to match the prefix in optimal way:
Currently we put allowed mount paths in a BPF hash map, where those paths are values and for cheching each mount, we iterate over that whole map and search for the string match. Not very optimal.
Instead, we should try to use LPM_TRIE maps which allow to match the prefix in optimal way: