On Tue, 03 Mar 2026 12:08:44, Eduard Zingerman wrote: > On Tue, 2026-03-03 at 20:54 +1100, Slava Imameev wrote: > > Single and multi-level pointer params and return value test coverage > > for BPF trampolines: > > - fentry/fexit programs covering struct and void double/triple > > pointer parameters and return values > > - verifier context tests covering pointers as parameters, these > > tests cover single and double pointers to int, enum 32 and 64, > > void, function, and double pointers to struct, triple pointers > > for void > > - verifier context tests covering single and double pointers to > > float, to check proper error is returned as pointers to float > > are not supported > > - verifier context tests covering pointers as return values > > - verifier context tests for lsm to check trusted parameters > > handling > > - verifier context tests covering out-of-bound access after cast > > - verifier BPF helper tests to validate no change in verifier > > behavior > > > > Signed-off-by: Slava Imameev <[email protected]> > > --- > > Again, I probably miss a point, but with current implementation it > seems sufficient in verifier_ctx_ptr_param() to add one or two > tests accessing void** or similar and checking verification log > to validate that parameter has expected type scalar(). > Why so many tests are necessary?
This reflects my belief in more comprehensive test coverage. I can certainly reduce the number of tests if this seems excessive, but I made 90% of the added tests one-liners to keep them maintainable. These changes add support for multilevel pointers, so double and triple pointers need to be checked at minimum. I think adding checks for any new type support is beneficial. I tried to verify a broader set of conditions that might be broken by future changes. I tried to make most tests one-liners to facilitate future modification.

