Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1916416rdb; Sun, 19 Nov 2023 16:32:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEynSp1RuA6pQ/dwxJt6XL63cpxNZ8go4mUx4oxrB9mIRkS9hw+jeBfd8PDpW8PHo0aqbWD X-Received: by 2002:a17:90a:c915:b0:283:9d7e:89aa with SMTP id v21-20020a17090ac91500b002839d7e89aamr10615935pjt.17.1700440322753; Sun, 19 Nov 2023 16:32:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700440322; cv=none; d=google.com; s=arc-20160816; b=BSlV6fgIqGCZPuhz6LDqUIQr//0BWqxeHbsH/ou+SXOE4AaENXhBo7neZGgrLL1vIb gHGymFCB0jVt2ii+wv3544ad51RVuqdgX0IT/q/nOZrQfq1bOy7dhOGGrO/WoTarOrpI PMSQMrj8y8gkQpjRJMjbmsdCnEdDfB/TRpyLSCjMEInPrfG03vTqQ98Jn1NCDDGSKEHK CoPIet1L3hQUUS1qJKM8CN8Mdnpl4wJjNpu37YtTtHRu0QXz1bglg3gHeLNZX9CnRJq4 Ru2rGm0kVx7GHioAwXqX9ciavR+jpMjcKgp5P2MQvUz4vlJHWlyXU0Illivugd6NGy2x bM/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=Ge1ESl70XYT5mVJCTL6jYd0++iV00VntBKPAsXCCsDE=; fh=GCKca7lyEYfcHE+E3YlL2CUtdvfUG0EbdshEJ35M0L0=; b=lHNO8k6tPOcAyfPQTokaZKCsu+aYFkmaOLFJN73Sf/zSgqIsENuP4B9z5sQbLkewcx pY24TAsNU9Ozt4fqDK+oGszdaFXU2W9jr4K9Y6TpVHNsgIQhBR/ag/4IJN+1uLzK8nyr SUBhU4XzQsOJ0o4suEkbequZu8o4p1J8HiTHJQ+dhqdYpr1zv0mxDyiYgf7jk9FVqOYn oEykHGZqRanPVjXVr0QGIrWXJwIWvgwRC+FxGbWdvRdsgHhcNSjYYqsRgs8z3t78Evdu LOaXV7z6Mmqp7eTKEJdXsloEJ+YPVOxg8PoCWjHP185a3p719IJ5/aleDEGRs6COgMyi msJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=mBrD3wgp; spf=pass (google.com: domain of linux-crypto+bounces-193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id gd10-20020a17090b0fca00b002772b8993ebsi6948513pjb.159.2023.11.19.16.32.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 16:32:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=mBrD3wgp; spf=pass (google.com: domain of linux-crypto+bounces-193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 39F552809B2 for ; Mon, 20 Nov 2023 00:32:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D64701FC2 for ; Mon, 20 Nov 2023 00:32:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="mBrD3wgp" X-Original-To: linux-crypto@vger.kernel.org Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72E77136 for ; Sun, 19 Nov 2023 15:52:55 -0800 (PST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1700437973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ge1ESl70XYT5mVJCTL6jYd0++iV00VntBKPAsXCCsDE=; b=mBrD3wgpdEviEZB2Y8gRoDomRsxMCkNEuqRsne8g4QP80QOeBrn9k5Xa05SVZBOImuHV4a R/ipDWylkH258pDk0FNWeK12mUNdP2bKNUaEpLfBjuVLEEmVnA1XfSyEpaSFzacLt8w0Lg bmxJJmNKByXD4E03VCWNHiSx0jS/ehI= Date: Sun, 19 Nov 2023 23:52:51 +0000 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v5 2/2] selftests: bpf: crypto skcipher algo selftests Content-Language: en-US To: Alexei Starovoitov , Vadim Fedorenko Cc: Jakub Kicinski , Martin KaFai Lau , Andrii Nakryiko , Alexei Starovoitov , Mykola Lysenko , Herbert Xu , Network Development , Linux Crypto Mailing List , bpf References: <20231118225451.2132137-1-vadfed@meta.com> <20231118225451.2132137-2-vadfed@meta.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 19.11.2023 21:58, Alexei Starovoitov wrote: > On Sat, Nov 18, 2023 at 2:55 PM Vadim Fedorenko wrote: >> >> + >> +SEC("fentry.s/bpf_fentry_test1") >> +int BPF_PROG(skb_crypto_setup) >> +{ >> + struct bpf_crypto_lskcipher_ctx *cctx; >> + struct bpf_dynptr key = {}; >> + int err = 0; >> + >> + status = 0; >> + >> + bpf_dynptr_from_mem(crypto_key, sizeof(crypto_key), 0, &key); >> + cctx = bpf_crypto_lskcipher_ctx_create(crypto_algo, &key, &err); > > Direct string will work here, right? > What's the reason to use global var? Mmm, yeah, should work. I'll update the test, thanks!