Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6354783rdb; Mon, 1 Jan 2024 21:17:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwpkBhUJsBlmsJW6Sv9zUIf6l7D40nf1VJnPnNhmH7x2vK/9AMIvgxbEMa05Ob5ADrddJJ X-Received: by 2002:a05:6512:3282:b0:50e:7314:e79e with SMTP id p2-20020a056512328200b0050e7314e79emr5135527lfe.110.1704172629572; Mon, 01 Jan 2024 21:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704172629; cv=none; d=google.com; s=arc-20160816; b=XU9JMSz9paGLtmYCKSPcTKEnep/eIK8RocERlrGWpT34HCrDwhpw64WniVg8+BmmUD gYavvs8tffkYXC97R6ooONb2IcrzYPTUXcNdyFeeVzMUCCSaprgyS2wPHiDskDqzjnrS 3L959wBc7ZtNzEwcxoeLr76KGZXkM6UAABfBcsnda6ANvOpazbmuO0Uo+1CwpA8vgvog 7bQNfa2ruamhl66cC7Rr0wX5mnlBZPJB5iAxANXRbPut3RTMli5TQUhRRVRS2N6qba8D y9dgY545UDuFCbot/XymX0MEBh3Twpf38p63D6vC/2/0Tf/YVHSxH+8edEx/wbokp6ay Gy3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=y0+e9jXb1APHsr8+SSFKuSYagZvt9QzyAw+8MedzV9k=; fh=kCTKjYoYXWnfbMC3MFiWNKK0aNA88cmkCr4LIzo4Af8=; b=fq8ViBBnGx5J2ueGqtoXgMGuFtSSgekQxy3Bnr1wM37kQiVIr7Y3ut904rtn6IfrMo ha/XTb6So21kSY09dZ/aXz1IvV5yA+h38gXGUIQlZql28orWeFHvk7ae+PWNMzJE6QdH cIWdFuZjJRzInEdBIWRhZp+PVN4W1OJ1XPm/tJtwyZBOsmTvKA/icdscYQCLDvnRjhnw iuq/B10KWEoLtJLS3hIuz3pQQMZPdlK/VLh4Wlv250QCN3kB4SB1x/cTBpT8wx7zzJpx x+hskcV0h8TTXJzPe0sIEaC79AuIPxoBFkr6TpPcdS8wdIUF7+6iFJOTc/WALdH+cJAp l1jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=d57lkx+u; spf=pass (google.com: domain of linux-kernel+bounces-14026-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14026-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f9-20020a50a6c9000000b00554a2109ff9si8356093edc.76.2024.01.01.21.17.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 21:17:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14026-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=d57lkx+u; spf=pass (google.com: domain of linux-kernel+bounces-14026-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14026-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 52BE71F21A32 for ; Tue, 2 Jan 2024 05:17:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05BFA10F8; Tue, 2 Jan 2024 05:17:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="d57lkx+u" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDF4FED6 for ; Tue, 2 Jan 2024 05:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5c1f8b0c149so2149015a12.3 for ; Mon, 01 Jan 2024 21:17:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1704172620; x=1704777420; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=y0+e9jXb1APHsr8+SSFKuSYagZvt9QzyAw+8MedzV9k=; b=d57lkx+u8DPZTyQ8PYYKSW17kBEU23T7rg/NVa/PDzZIMyd1RDdGBPdUtwBm5TB8XR jcoupajoOZ4YxxgqIEJ7XAtticgg/EDWSGhKR3NzXLmc4ao/zBzFb479qS6AuJZOAZWi /XWrqEb2g14EzpthImr8Wxd0V8m32mhfEJ8bcQKi9rcZWw5uI39EVkm6WRBjesGuIy4i ewrVZeWqTZCaSOfj/HMfI1EvxCwOkuaZWtMc9AfglGuFy4MRBZHmIchpWdjdGqryONro 2NJMd1bgWayHKHpWzUn393LTPgKLGBENxKACeWjJOFY6T7S/lVT4L5JRSoLXVCMEs9/Q dO8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704172620; x=1704777420; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y0+e9jXb1APHsr8+SSFKuSYagZvt9QzyAw+8MedzV9k=; b=HMMgWfoTSF12HpgTUqOI3rr/r/xIpRnYedLnjSyJvfqKX+BmTEGiDFCkYWTWezm2kc pGrUdait3llJnaF5i+2xOE5eR25f4fQfNZ6hr8HVR5dLZiTR3ukZZcLL04qa436ziCL5 pLIqRhom5k8ZIwONEzZ/ZpgL4Ng7Uz4CTKeHMVoxHF6MDtS7SW1kqV7f2i9qJVBzMZV4 68RMvLK9oSPrZjz9vFbfFvlkZ+DBDov3PqFMBrMtrjJR/T4EW1cDVk3DyRntPClsrMr7 asTkkc7IkKvj9t9wdD9WgpOnHWvcr0OSRuUeUygU5ewajy2NfO7XP/nXv+QYu29Op+T8 mJhw== X-Gm-Message-State: AOJu0Yzu7t1wKLy9d5+tqSTHxwydVxGiXR96YaD1F1h4H7+hhfd9clml +wnrMnPTO8zR/0TT38FgkaLUuOXb1przWg== X-Received: by 2002:a17:902:f814:b0:1d4:58eb:d901 with SMTP id ix20-20020a170902f81400b001d458ebd901mr5578770plb.41.1704172620140; Mon, 01 Jan 2024 21:17:00 -0800 (PST) Received: from ?IPv6:2402:7500:5d5:d389:6cac:304c:13db:9f1b? ([2402:7500:5d5:d389:6cac:304c:13db:9f1b]) by smtp.gmail.com with ESMTPSA id iw19-20020a170903045300b001d077da4ac4sm21114907plb.212.2024.01.01.21.16.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jan 2024 21:16:59 -0800 (PST) Content-Type: text/plain; charset=us-ascii Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Re: [PATCH v3 00/12] RISC-V: provide some accelerated cryptography implementations using vector extensions From: Jerry Shih In-Reply-To: <20231230035112.GC770@quark.localdomain> Date: Tue, 2 Jan 2024 13:16:54 +0800 Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , herbert@gondor.apana.org.au, davem@davemloft.net, conor.dooley@microchip.com, ardb@kernel.org, conor@kernel.org, heiko@sntech.de, phoebe.chen@sifive.com, hongrong.hsu@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Andy Chiu Content-Transfer-Encoding: quoted-printable Message-Id: References: <20231205092801.1335-1-jerry.shih@sifive.com> <20231222054827.GE52600@quark.localdomain> <20231230035112.GC770@quark.localdomain> To: Eric Biggers X-Mailer: Apple Mail (2.3445.9.7) On Dec 30, 2023, at 11:51, Eric Biggers wrote: > Hi Jerry, > On Thu, Dec 21, 2023 at 11:48:27PM -0600, Eric Biggers wrote: >> Hi Jerry, >>=20 >> On Tue, Dec 05, 2023 at 05:27:49PM +0800, Jerry Shih wrote: >>> Changelog v2: >>> - Turn to use simd skcipher interface for AES-CBC/CTR/ECB/XTS and >>> Chacha20. >>=20 >> If I understand correctly, the RISC-V kernel-mode vector support now = seems to be >> heading down the path of supporting softirq context, as I had = suggested >> originally. With patches 1-2 of Andy Chiu's latest patchset >> "[v7, 00/10] riscv: support kernel-mode Vector" >> = (https://lore.kernel.org/linux-riscv/20231221134318.28105-1-andy.chiu@sifi= ve.com). >> applied, the kernel has basic support for kernel-mode vector, = including in >> softirq context. >>=20 >> With that being the case, "skcipher" algorithms can just use the = RISC-V vector >> unit unconditionally, given that skcipher only supports task and = softirq >> context. Therefore, can you consider undoing your change that added = fallbacks >> using the simd helper (crypto/simd.c)? Thanks! >>=20 >=20 > I had a go at incorporating my suggestions into your patchset, and = rebasing the > patchset onto riscv/for-next plus the first two patches of "[v9, = 00/10] riscv: > support kernel-mode Vector". You can get the result from branch = "riscv-crypto" > of https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git. > Everything seems to work (tested in QEMU, as usual). >=20 > Please consider using it when you send out v4; thanks! I can even = send it out > myself, if you want, but I assume you're still "owning" the patchset. >=20 > - Eric Thank you. I sent the v4 patch. Link: = https://lore.kernel.org/all/20231231152743.6304-1-jerry.shih@sifive.com/ -Jerry=