lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 26 Oct 2023 16:02:03 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Vadim Fedorenko <vadfed@...a.com>, Martin KaFai Lau
 <martin.lau@...ux.dev>, Andrii Nakryiko <andrii@...nel.org>,
 Alexei Starovoitov <ast@...nel.org>, Mykola Lysenko <mykolal@...com>
Cc: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, bpf@...r.kernel.org,
 netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next 2/2] selftests: bpf: crypto skcipher algo
 selftests

On 10/26/23 3:59 AM, Vadim Fedorenko wrote:
> Add simple tc hook selftests to show the way to work with new crypto
> BPF API. Some weird structre and map are added to setup program to make
> verifier happy about dynptr initialization from memory. Simple AES-ECB
> algo is used to demonstrate encryption and decryption of fixed size
> buffers.
> 
> Signed-off-by: Vadim Fedorenko <vadfed@...a.com>
> ---
>   tools/testing/selftests/bpf/config            |   1 +
>   .../selftests/bpf/prog_tests/crypto_sanity.c  | 129 +++++++++++++++
>   .../selftests/bpf/progs/crypto_common.h       |  98 +++++++++++
>   .../selftests/bpf/progs/crypto_sanity.c       | 154 ++++++++++++++++++
>   4 files changed, 382 insertions(+)
>   create mode 100644 tools/testing/selftests/bpf/prog_tests/crypto_sanity.c
>   create mode 100644 tools/testing/selftests/bpf/progs/crypto_common.h
>   create mode 100644 tools/testing/selftests/bpf/progs/crypto_sanity.c
> 
> diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> index 02dd4409200e..2a5d6339831b 100644
> --- a/tools/testing/selftests/bpf/config
> +++ b/tools/testing/selftests/bpf/config
> @@ -14,6 +14,7 @@ CONFIG_CGROUP_BPF=y
>   CONFIG_CRYPTO_HMAC=y
>   CONFIG_CRYPTO_SHA256=y
>   CONFIG_CRYPTO_USER_API_HASH=y
> +CONFIG_CRYPTO_SKCIPHER=y
>   CONFIG_DEBUG_INFO=y
>   CONFIG_DEBUG_INFO_BTF=y
>   CONFIG_DEBUG_INFO_DWARF4=y

Quick note: for upstream CI side, more config seems missing, see the GHA failure:

https://github.com/kernel-patches/bpf/actions/runs/6654055344/job/18081734522

Notice: Success: 435/3403, Skipped: 32, Failed: 1
Error: #64 crypto_sanity
   Error: #64 crypto_sanity
   test_crypto_sanity:PASS:skel open 0 nsec
   test_crypto_sanity:PASS:ip netns add crypto_sanity_ns 0 nsec
   test_crypto_sanity:PASS:ip -net crypto_sanity_ns -6 addr add face::1/128 dev lo nodad 0 nsec
   test_crypto_sanity:PASS:ip -net crypto_sanity_ns link set dev lo up 0 nsec
   test_crypto_sanity:PASS:crypto_sanity__load 0 nsec
   open_netns:PASS:malloc token 0 nsec
   open_netns:PASS:open /proc/self/ns/net 0 nsec
   open_netns:PASS:open netns fd 0 nsec
   open_netns:PASS:setns 0 nsec
   test_crypto_sanity:PASS:open_netns 0 nsec
   test_crypto_sanity:PASS:if_nametoindex lo 0 nsec
   test_crypto_sanity:PASS:crypto_sanity__attach 0 nsec
   test_crypto_sanity:PASS:skb_crypto_setup fd 0 nsec
   test_crypto_sanity:PASS:skb_crypto_setup 0 nsec
   test_crypto_sanity:PASS:skb_crypto_setup retval 0 nsec
   test_crypto_sanity:FAIL:skb_crypto_setup status unexpected error: -95 (errno 2)
   libbpf: Kernel error message: Parent Qdisc doesn't exists
   close_netns:PASS:setns 0 nsec
Test Results:
              bpftool: PASS
  test_progs-no_alu32: FAIL (returned 1)
             shutdown: CLEAN
Error: Process completed with exit code 1.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ