Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2900332rdg; Mon, 16 Oct 2023 20:16:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsxbZudSgJXUbqbvG0JTDXQQGGQtY4jkcve4lIPwKngZ5+/NjU8nCkDeULhnXxI02pWK1O X-Received: by 2002:a17:90b:1650:b0:27d:67a:e8c0 with SMTP id il16-20020a17090b165000b0027d067ae8c0mr987968pjb.22.1697512585854; Mon, 16 Oct 2023 20:16:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697512585; cv=none; d=google.com; s=arc-20160816; b=hh0EadU11BVYbYlhQfTVrVHcc5DLybIhXBhmKcBaoveAzSa0Klrf4wIBftb89ww78J w0SFj/4hbfdUDkeJKTdzBZPIAoSP/BY9p//M8T/8/QCwAci2x6+X7oSAIdQXmUoWDv+W kBVeFqp5+SPVVb8psf1zsPk+7iFABwKuY2Ibc+1JOHyWslSyEU6FkPw/KCoW9tEBhqdp nD9ZbZZSnoBnpYsDnT4wke1YnrlPFgHm1KvLNwpqFvsPCBlzFX3wq60m0oDpEasRiSEy jEzEctBh+cfBBMUygWEkJTwoq3RkxHQ17WPcOBiqRxhw2wMiGvclaAXnsQbjLNSaGoi1 uEog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=36p7hjT+A38HS4l5C7P/0jdk1W5Itbg4B7zzdQvLGUE=; fh=TWJbTIHU5BQSXhJUb8AKNUxwx8MLZ6wZ+ImxS4ji3S8=; b=NTIcd83tT9aGCFS23RwEPIOhGolaOq26nUhKYnNK55yU4DC48GFrrzsr+OIRnpqedB dElYQq4m5myK6O7XOmiNH9IWNJ8G7QFJUi9/zlS5igA+eqUmS2Bqjx/YRIUslbANcyQa sEV19SDp1Nz4ObOQGjkBOl+FKmNqIQqQYBPNk7jBYTogcYV6Wh7Aq1CIg66T4w+tjzIW QD4UAkgKTGzgoVMIzibUUDCOt/0/74AL4mUipyW+vNUZKDUqZcmk6F/I3BdacakCTM6H mnWDsdBYLkxQsnvE9dCj2WW7tzxyozlKU3+H0RaM+01nOeEqT14ZSpT6NPnufp0ssYpr io7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BghjNEQL; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id pc2-20020a17090b3b8200b0027cd01b6caasi8410455pjb.47.2023.10.16.20.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 20:16:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BghjNEQL; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2F1BF809C189; Mon, 16 Oct 2023 20:16:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbjJQDQJ (ORCPT + 99 others); Mon, 16 Oct 2023 23:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231955AbjJQDQI (ORCPT ); Mon, 16 Oct 2023 23:16:08 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D99D5A2 for ; Mon, 16 Oct 2023 20:16:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B357C433C7; Tue, 17 Oct 2023 03:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697512565; bh=W909EX/bMwqmKU7n36c5bbEhq1FO67xh9XZ3fKEdRR0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BghjNEQLKg9ABsmgI3DlWgaPiHtpcr84z1jzFpwFnTDvLXeGuhBSAKSIP6tYbHovz NbPyWtUPYLaYLa9TsHYxRQ37INFpArDmjkpFIKZdkKdfjr8l4H2qFOiB/e2K6PvZ9d Pnkd5BK/diDwlGpaOveLx7c0+4obQq/oDoO2gRGQj+MhDaAIMvPIpvIKYCTRaVRl35 lnkaYGi3HSnhaapTvlrME2fHSZrQBkkX4vThMPnJDvpOXPY2I5UhQ/zKfi/GODJ+gJ AJLr6bV54yeLEIcYfghbXS+vcTRoL+c1wJeFWyeEHJrSdy8yKF4anLTRbwEN3gYlmA LemY8SYK04rMg== Date: Mon, 16 Oct 2023 20:16:03 -0700 From: Eric Biggers To: Ben Greear Cc: Ard Biesheuvel , Herbert Xu , Linux Crypto Mailing List Subject: Re: [PATCH v2] crypto: aesni - add ccm(aes) algorithm implementation Message-ID: <20231017031603.GB1907@sol.localdomain> References: <20201210121627.GB28441@gondor.apana.org.au> <20201215091902.GA21455@gondor.apana.org.au> <062a2258-fad4-2c6f-0054-b0f41786ff85@candelatech.com> <6e20b593-393c-9fa1-76aa-b78951b1f2f3@candelatech.com> <32a44a29-c5f4-f5fa-496f-a9dc98d8209d@candelatech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32a44a29-c5f4-f5fa-496f-a9dc98d8209d@candelatech.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 16 Oct 2023 20:16:21 -0700 (PDT) On Mon, Oct 16, 2023 at 01:50:05PM -0700, Ben Greear wrote: > On 11/12/22 06:59, Ard Biesheuvel wrote: > > On Fri, 11 Nov 2022 at 23:29, Ben Greear wrote: > > > > > > On 11/9/22 2:05 AM, Ard Biesheuvel wrote: > > > > On Wed, 9 Nov 2022 at 04:52, Herbert Xu wrote: > > > > > > > > > > On Tue, Nov 08, 2022 at 10:50:48AM -0800, Ben Greear wrote: > > > > > > > > > > > > While rebasing my patches onto 6.1-rc4, I noticed my aesni for ccm(aes) patch didn't apply cleanly, > > > > > > and I found this patch described below is applied now. Does this upstream patch mean that aesni is already > > > > > > supported upstream now? Or is it specific to whatever xctr is? If so, > > > > > > any chance the patch is wanted upstream now? > > > > > > > > > > AFAICS the xctr patch has nothing to do with what you were trying > > > > > to achieve with wireless. My objection still stands with regards > > > > > to wireless, we should patch wireless to use the async crypto > > > > > interface and not hack around it in the Crypto API. > > > > > > > > > > > > > Indeed. Those are just add/add conflicts because both patches > > > > introduce new code into the same set of files. The resolution is > > > > generally to keep both sides. > > > > > > > > As for Herbert's objection: I will note here that in the meantime, > > > > arm64 now has gotten rid of the scalar fallbacks entirely in AEAD and > > > > skipcher implementations, because those are only callable in task or > > > > softirq context, and the arm64 SIMD wrappers now disable softirq > > > > processing. This means that the condition that results in the fallback > > > > being needed can no longer occur, making the SIMD helper dead code on > > > > arm64. > > > > > > > > I suppose we might do the same thing on x86, but since the kernel mode > > > > SIMD handling is highly arch specific, you'd really need to raise this > > > > with the x86 maintainers. > > > > > > > > > > Hello Ard, > > > > > > Could you please review the attached patch to make sure I merged it properly? My concern > > > is the cleanup section and/or some problems I might have introduced related to the similarly > > > named code that was added upstream. > > > > > > > I don't think the logic is quite right, although it rarely matter. > > > > I've pushed my version here - it invokes the static call for CTR so it > > will use the faster AVX version if the CPU supports it. > > > > https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=aesni-ccm-v6.1 > > Hello Ard, > > It looks like something changed again in the intel-aesni logic for 6.6 kernel. I was able to do a small > change to the patch to get it to compile, but the kernel crashes when I bring up a wlan port in > 6.6. When I remove the aesni patch, the station comes up without crashing. The aesni patch worked > fine in 6.5 as far as I can tell. > > I'm attaching my slightly modified version of the patch you sent previous. If you have time to > investigate this it would be much appreciated. > > Thanks, > Ben If this patch is useful, shouldn't it be upstreamed? - Eric