selftests/bpf: Test __szk precision with a NULL nullable buffer

When a nullable buffer is passed as NULL, check_mem_size_reg() is skipped,
so the __szk memory size must be marked precise through the scalar argument
path instead. Exercise this with bpf_dynptr_slice() and a NULL buffer.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/bpf/20260801074633.1595644-12-ameryhung@gmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
Amery Hung 2026-08-01 00:46:26 -07:00 • committed by Kumar Kartikeya Dwivedi
commit f88caee62e
No known key found for this signature in database
GPG key ID: 472D377B63542F83
2 changed files with 30 additions and 0 deletions