]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'bpf-make-trusted-args-nullable'
authorAlexei Starovoitov <ast@kernel.org>
Thu, 13 Jun 2024 23:33:04 +0000 (16:33 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 13 Jun 2024 23:33:05 +0000 (16:33 -0700)
Vadim Fedorenko says:

====================
bpf: make trusted args nullable

Current verifier checks for the arg to be nullable after checking for
certain pointer types. It prevents programs to pass NULL to kfunc args
even if they are marked as nullable. This patchset adjusts verifier and
changes bpf crypto kfuncs to allow null for IV parameter which is
optional for some ciphers. Benchmark shows ~4% improvements when there
is no need to initialise 0-sized dynptr.

v3:
- add special selftest for nullable parameters
v2:
- adjust kdoc accordingly
====================

Link: https://lore.kernel.org/r/20240613211817.1551967-1-vadfed@meta.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Trivial merge