tetragon
tetragon copied to clipboard
Test and document the limitations of the fields in `TracingPolicy`
The documentation on TracingPolicy limitation might be outdated. It would be interesting to update the documentation and add tests case to make sure the limitations are prevented from the agent side instead of failing silently or creating an error on the BPF side.
I see two ways of doing that:
- experimentally, trying to break TracingPolicy and then someone can help to link to the BPF limitation.
- reading the BPF code to retrieve the limits.
Limitations include for example:
- max numbers of selectors
- max PID values for
matchPIDs - max number of
matchArgsper selector - max values for
matchBinaries - etc.
### Tasks
- [ ] Perform better user space TracingPolicy limitation validation
- [ ] Faster: annotate the doc to mention it is outdated
- [ ] Better: update the documentation
filter_file_buf() in basic.h limits the number of file matches to MAX_MATCH_FILE_VALUES. This is 8 on kernels >=5.2 and 2 on kernels <5.2.
Postfix file match limited to 50 chars on kernels >=5.2 and 40 on kernels <5.2.
File match equal and prefix limited to 128 chars on kernels >=5.2 and 32 on kernels <5.2.
#1408 will alleviate some of these limitations. e.g. number of matches becomes unbounded; equal and prefix lengths become 128 on all kernels; and postfix length becomes 128 characters on kernels >=5.2 and 96 on kernels <5.2.
This is old. File specific issues are refile with up to date info now.
well, it was the point of this issue because documentation is currently outdated.
well, it was the point of this issue because documentation is currently outdated.
Let's re-open it then? Maybe let's start with points where our current docs are outdated
Faster: annotate the doc to mention it is outdated
Doing that would be a great first step!