Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1877311rdb; Sun, 19 Nov 2023 14:32:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSJaDZ5zawTmxpolSQua+vHg0vw92tTO+dOkNIxCXwWP53KIuEvQuC02JsLQDSJRZ85jXN X-Received: by 2002:a25:8487:0:b0:d9a:4839:68fe with SMTP id v7-20020a258487000000b00d9a483968femr5591480ybk.43.1700433134796; Sun, 19 Nov 2023 14:32:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700433134; cv=none; d=google.com; s=arc-20160816; b=sfUADmLu+f1xUcdvJIL46OzUttS5dGEo46ZOCJSByPEWopiX/fm3DOuXWI2VAxGAkA pVQb8SgLdN6QyTalkePdW6s2Ps4bq8Cd2jTOBw4etH+dlfolINypUodzN1UqYL8yk/U9 LKg40ob8UwtG/HtpR9pAe2j8uQ5DU03DD7lSNVkBEwkrtyP77p1E8oZKzn9icyU9oDOB NLzaIcKKEr+QzsABUKoP8Rj7tSvMqXGHckX4Iwl8o+e7otJ5AnOwUkWlB/gqNzp774wv KK3JiBg0+EZsfWjEiHvXhvyrDvGprAKXycUYZvs85UFoYScL6qAtc6slnTNrQPqW9e+2 RJNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=7DHInlKAixtjHWpCSSb9nsEcmRnYPF01P98gw/ou6aY=; fh=thxoyNlPoWqZZshvgqrbiRnCqF2++zlp6OPkK9Qkx9w=; b=ZiEsjb7751KdoPsXghZYbA2aBOqysIE8AqG2Dazy7ok7cLjsoe9Y/+XCqgbwRAHjtx gXdNnlIVDBzXuuBoCeW4L+o9P2ZvHUHdmdFUZDZwLDXNdDAtmpCyXhEmNrIMxke9J7CZ prPV0BKr9HJihWQ2SqCpTTNSrn17cpu7RuQaafD5w7goJaJZTyXP4UOjls+UovjSsLwY g32/RFqFkfhQl64TzDGYM9boVj0TxXSXTdJupoiIXQhWwXrptlqA6aT6mDXFybjSAcCm Sh5xHU9r8s5+mV/Hx5BwPeirvfKiPxOQZBZjH9X5onw9DzMKTIFSZAKgRAwv5ZnVHC7S OJBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=X5xLKXQ9; spf=pass (google.com: domain of linux-crypto+bounces-192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l12-20020ad44d0c000000b0064f70ebac6asi6182190qvl.106.2023.11.19.14.32.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 14:32:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=X5xLKXQ9; spf=pass (google.com: domain of linux-crypto+bounces-192-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 721E21C203DF for ; Sun, 19 Nov 2023 22:32:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D19CC1BDC5 for ; Sun, 19 Nov 2023 22:32:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X5xLKXQ9" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AC8E107; Sun, 19 Nov 2023 13:58:15 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32f7c80ab33so2479447f8f.0; Sun, 19 Nov 2023 13:58:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700431093; x=1701035893; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7DHInlKAixtjHWpCSSb9nsEcmRnYPF01P98gw/ou6aY=; b=X5xLKXQ9sYzakXg8w1uPp7vdZ5El/h0D46ilttHnXh+8BTxaR7w4d8UU8FkVglEAhc 0Us/wGua7lDzVY5ahaa0gfFIcAkLAQ4XAOq+Gq2RAHhWdAO9wl6Jgyb7wvwAk/cL+HFY 8FeTDioAu8PxECEqgDbLiD+uz0MjFvAZeJhAGI7S/CBE/iLbEOZnoJIug+6fd3Zpd0/D vr+x3rU0uADGzlfThOmjhj50xoTeeOzpytbfbTdKN7rbyaL2BGWpkrRp/0a6JBrGtkM9 LGKneVx9SXMb2jT0X632aoYa4lrw1D/DvrpVE1oBAkGaalTY4YrJ7lNAkmoVxUrlQLqF kJQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700431093; x=1701035893; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7DHInlKAixtjHWpCSSb9nsEcmRnYPF01P98gw/ou6aY=; b=lCE8ZSCg1JFUfyQxZD2ULa91apVzG+Gga/VyyDsgfje7tv45MFFgBlb8KpjqYuhmjh ctqmgashQmfjtQA+WXIUHfbJDfkGQS3266RQGtbC2qpCaAlmiL/nQoWujgNgehOOx3Ue FkAO+dnOsRKBt0UHnMsexPWMa5HUA1X9OYDcoDIrk1jVVRaoFfd2lAaVgQ3782IG1klc yXzsOgfQa10KFMa8/KmaPnyXM67+OD3OycalKKdQ6uLkyKx3zElGw0yFJHB7qiIXy1Aj Hm671XOwwqfSqXiGyt71G0Ii5gIC7GC31b5Iee2ijgLoOfsFlHsNu6cdqDk7fK/VnyZC WZXw== X-Gm-Message-State: AOJu0Yz8d1EYQ/XFT1cSvMoCHnc1XJPVpLGyHC4J9cZ8rB90+xV6KUji HjHLN5iv5MDOkG+iY0lZ8FpkK+aW8Z8FyiYqG4lcU+6R X-Received: by 2002:adf:fd86:0:b0:32d:857c:d51d with SMTP id d6-20020adffd86000000b0032d857cd51dmr3326047wrr.60.1700431093124; Sun, 19 Nov 2023 13:58:13 -0800 (PST) Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231118225451.2132137-1-vadfed@meta.com> <20231118225451.2132137-2-vadfed@meta.com> In-Reply-To: <20231118225451.2132137-2-vadfed@meta.com> From: Alexei Starovoitov Date: Sun, 19 Nov 2023 13:58:01 -0800 Message-ID: Subject: Re: [PATCH bpf-next v5 2/2] selftests: bpf: crypto skcipher algo selftests To: Vadim Fedorenko Cc: Vadim Fedorenko , Jakub Kicinski , Martin KaFai Lau , Andrii Nakryiko , Alexei Starovoitov , Mykola Lysenko , Herbert Xu , Network Development , Linux Crypto Mailing List , bpf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 18, 2023 at 2:55=E2=80=AFPM Vadim Fedorenko w= rote: > > + > +SEC("fentry.s/bpf_fentry_test1") > +int BPF_PROG(skb_crypto_setup) > +{ > + struct bpf_crypto_lskcipher_ctx *cctx; > + struct bpf_dynptr key =3D {}; > + int err =3D 0; > + > + status =3D 0; > + > + bpf_dynptr_from_mem(crypto_key, sizeof(crypto_key), 0, &key); > + cctx =3D bpf_crypto_lskcipher_ctx_create(crypto_algo, &key, &err)= ; Direct string will work here, right? What's the reason to use global var?