bpf: crypto: make state and IV dynptr nullable
authorVadim Fedorenko <vadfed@meta.com>
Thu, 13 Jun 2024 21:18:14 +0000 (14:18 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 13 Jun 2024 23:33:04 +0000 (16:33 -0700)
commit65d6d61d25968d1f13a478a6f303ed8d6b978a77
treeda75dcfa04bc84a5b49b0f5088448ea6bd12ebb9
parenta90797993afcb0eaf6bf47a062ff47eb3810a6d5
bpf: crypto: make state and IV dynptr nullable

Some ciphers do not require state and IV buffer, but with current
implementation 0-sized dynptr is always needed. With adjustment to
verifier we can provide NULL instead of 0-sized dynptr. Make crypto
kfuncs ready for this.

Reviewed-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
Link: https://lore.kernel.org/r/20240613211817.1551967-3-vadfed@meta.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/crypto.c