From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="EFH9+cEm" Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [IPv6:2001:41d0:203:375::ba]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C92D5B for ; Fri, 17 Nov 2023 06:11:05 -0800 (PST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1700230262; 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=jvqlH893Qs090gMuZDW5woR6FI1KAQph3q4L6Hte+EM=; b=EFH9+cEmZcxTOoHKRuzmVXsgHzBoYX8ZmX9ShQV5ZQbC9O8C3SJL4bKxqHz3UM7U0Y6tN+ Z18iX65If7sYZttBVniYAzy9v4gPLrKxhdKR74ii/Yc2b3Pm+gMH2alIsECUdwAQ/OU2Pb f2cpDgEN4OW1N3GzdC+YbgELU2uep8Y= Date: Fri, 17 Nov 2023 09:10:59 -0500 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf-next v4 1/2] bpf: add skcipher API support to TC/XDP programs Content-Language: en-US To: Herbert Xu , Martin KaFai Lau Cc: kuba@kernel.org, andrii@kernel.org, ast@kernel.org, mykolal@fb.com, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-crypto@vger.kernel.org References: 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: 7bit X-Migadu-Flow: FLOW_OUT On 16/11/2023 19:59, Herbert Xu wrote: > Vadim Fedorenko wrote: >> Add crypto API support to BPF to be able to decrypt or encrypt packets >> in TC/XDP BPF programs. Only symmetric key ciphers are supported for >> now. Special care should be taken for initialization part of crypto algo >> because crypto_alloc_sync_skcipher() doesn't work with preemtion >> disabled, it can be run only in sleepable BPF program. Also async crypto >> is not supported because of the very same issue - TC/XDP BPF programs >> are not sleepable. >> >> Signed-off-by: Vadim Fedorenko > > Please use the newly introduced lskcipher interface instead of > skcipher. Oh, sounds like we do have proper API to work with buffers directly! Thanks for pointing to it, I'll send v5 soon.