Re: [PATCH bpf-next v8 3/3] selftests: bpf: crypto skcipher algo selftests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 21, 2024 at 09:43 AM +01, Jakub Sitnicki wrote:
> On Mon, Jan 15, 2024 at 02:08 PM -08, Vadim Fedorenko wrote:
>> Add simple tc hook selftests to show the way to work with new crypto
>> BPF API. Some tricky dynptr initialization is used to provide empty iv
>> dynptr. Simple AES-ECB algo is used to demonstrate encryption and
>> decryption of fixed size buffers.
>>
>> Signed-off-by: Vadim Fedorenko <vadfed@xxxxxxxx>
>> ---
>
> [...]
>
>> diff --git a/tools/testing/selftests/bpf/prog_tests/crypto_sanity.c
>> b/tools/testing/selftests/bpf/prog_tests/crypto_sanity.c
>> new file mode 100644
>> index 000000000000..70bde9640651
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/prog_tests/crypto_sanity.c
>> @@ -0,0 +1,217 @@
>
> [...]
>
>> +static void deinit_afalg(void)
>> +{
>> +	if (tfmfd)
>> +		close(tfmfd);
>> +	if (opfd)
>> +		close(opfd);
>> +}
>
> Did you mean tfmfd/opfd != -1?
>
> [...]

Nevermind. I missed Martin's earlier feedback.




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux