Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1397450ybg; Wed, 29 Jul 2020 13:08:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaMx3WsBBV0ZwrtTJD6WS82lhRzu40DVw2Uax5uPp8W5/L5SFAf0OP1wLs/c5atwsmAzOx X-Received: by 2002:a50:93a2:: with SMTP id o31mr33147801eda.203.1596053302071; Wed, 29 Jul 2020 13:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596053302; cv=none; d=google.com; s=arc-20160816; b=Ce3/lwFHqoAWZdVqtWZlm46BhpfEOMwRC2uthN/tFOErtvzu49nD5O9TVaVkEmTsPB 6ft8+iKoDSsF5ezpkXQYLUiNxcTrNMtCc1xwjQwKj+YNXbupJUMi8D++n/VKSC4oUcEs G7YGUtulzVLqoRbNfKM66hfK1Wkml6dmpDlwFYTE1E16zx0ptM8rT3BVGMTTgHYdcQGB FOMhEZu6Ihj/LHGh6FRK1GZj773RqFTTmnPddsuEFrXqLSHvFZ5uO03UmIDPERu2omHH KBo1ZMUwa72Y9w0VtifN6HSMu4aU5/oH1QsltWROEdh0UUqqZJGqo3CS4XliSVuvteV2 GFNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Tqq8uQhYkhOPIBRrfXpqyIPG3QsiZf9SVXBeXdyVXSo=; b=KsDwJK9dLALXOkVV+5ddIX1tkI2FcAFKuPJiDGwqy7Q2UVzaCWRG1LzZ0SLVGwexxC AwcNJ/OrEFA+h7gRCa9YaqfQAOY0CnletVunjEaRNmQL0op8yG1Vw7sQ/wdBAMf5MU07 6hMkCsqaF681H+ETDzQJuN+qcthodb13sbfwhLRFZ1D0f9pZxupUgbHhOmXWd/16jrmn gNuOymIgr2SREyHXFTm3Vp+Z7bw+N4vUh03ceift5mr79a/r1tOcU1LstZsFxN8dFl+p KTOf+Jvpeo116ZhyV9yjsuPQzkZb2hMbdt6vRaL2UjsuxzLRqucYXvjJNr8vfnaVMMdn TnRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=juWnMg3i; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si1628760ejj.363.2020.07.29.13.07.33; Wed, 29 Jul 2020 13:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=juWnMg3i; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726606AbgG2UG4 (ORCPT + 99 others); Wed, 29 Jul 2020 16:06:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:47738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbgG2UG4 (ORCPT ); Wed, 29 Jul 2020 16:06:56 -0400 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4099420658 for ; Wed, 29 Jul 2020 20:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596053215; bh=e0KNsMRF8PEhDQuCHiRqDtR1FSDwYF++FqK8GxV5J5U=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=juWnMg3iFPGtQvLRVnzfiLYhsEFldz5qr1VCd08kYvKQWMYen9EVDxCmzCrhIryMX 6Z4vk2w4Sho7nZpJYRNZ1B6LoLXH40958p04JYdxrhxS228LPR6yEDSgq8aKtUC9um WcJsA4dR6jH3uDjRcwHz2vVuvbBhsgDDsHa0dDAE= Received: by mail-oi1-f181.google.com with SMTP id u63so10065374oie.5 for ; Wed, 29 Jul 2020 13:06:55 -0700 (PDT) X-Gm-Message-State: AOAM531Pq3XwK6d/CfQsJGCVYpyYrMO12AVkj33JdD+rHH+z8D75nrCQ qNr/J5agYawJtyL6lZAwNOEBK2w2jZkTvLvJGUg= X-Received: by 2002:aca:cc0a:: with SMTP id c10mr9550140oig.174.1596053214596; Wed, 29 Jul 2020 13:06:54 -0700 (PDT) MIME-Version: 1.0 References: <2a55b661-512b-9479-9fff-0f2e2a581765@candelatech.com> <04d8e7e3-700b-44b2-e8f2-5126abf21a62@candelatech.com> <9e6927a6-8f70-009a-ad76-4f11a396e43a@candelatech.com> In-Reply-To: <9e6927a6-8f70-009a-ad76-4f11a396e43a@candelatech.com> From: Ard Biesheuvel Date: Wed, 29 Jul 2020 23:06:43 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Help getting aesni crypto patch upstream To: Ben Greear Cc: Linux Crypto Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, 29 Jul 2020 at 22:29, Ben Greear wrote: > > On 7/29/20 12:09 PM, Ard Biesheuvel wrote: > > On Wed, 29 Jul 2020 at 15:27, Ben Greear wrote: > >> > >> On 7/28/20 11:06 PM, Ard Biesheuvel wrote: > >>> On Wed, 29 Jul 2020 at 01:03, Ben Greear wrote: > >>>> > >>>> Hello, > >>>> > >>>> As part of my wifi test tool, I need to do decrypt AES on the CPU, and the only way this > >>>> performs well is to use aesni. I've been using a patch for years that does this, but > >>>> recently somewhere between 5.4 and 5.7, the API I've been using has been removed. > >>>> > >>>> Would anyone be interested in getting this support upstream? I'd be happy to pay for > >>>> the effort. > >>>> > >>>> Here is the patch in question: > >>>> > >>>> https://github.com/greearb/linux-ct-5.7/blob/master/wip/0001-crypto-aesni-add-ccm-aes-algorithm-implementation.patch > >>>> > >>>> Please keep me in CC, I'm not subscribed to this list. > >>>> > >>> > >>> Hi Ben, > >>> > >>> Recently, the x86 FPU handling was improved to remove the overhead of > >>> preserving/restoring of the register state, so the issue that this > >>> patch fixes may no longer exist. Did you try? > >>> > >>> In any case, according to the commit log on that patch, the problem is > >>> in the MAC generation, so it might be better to add a cbcmac(aes) > >>> implementation only, and not duplicate all the CCM boilerplate. > >>> > >> > >> Hello, > >> > >> I don't know all of the details, and do not understand the crypto subsystem, > >> but I am pretty sure that I need at least some of this patch. > >> > > > > Whether this is true is what I am trying to get clarified. > > > > Your patch works around a performance bottleneck related to the use of > > AES-NI instructions in the kernel, which has been addressed recently. > > If the issue still exists, we can attempt to devise a fix for it, > > which may or may not be based on this patch. > > Ok, I can do the testing. Do you expect 5.7-stable has all the needed > performance improvements? > Yes. > Thanks, > Ben > > > > >> If you can suggest a patch to try I'll be happy to test it to see how it > >> performs. > >> > > > > Please share performance numbers of an old kernel with this patch > > applied, and a recent one without. If that shows there is in fact an > > issue, we will do something about it. > > > >> > >> -- > >> Ben Greear > >> Candela Technologies Inc http://www.candelatech.com > > > > > -- > Ben Greear > Candela Technologies Inc http://www.candelatech.com