Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1376822ybg; Wed, 29 Jul 2020 12:32:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqUZBu81J7gQ/mg0AFqbUUqoPfYQ1au2Cgi/G0dToDw+bIBdemUmZM3NDcv4+Y9aULGHne X-Received: by 2002:a17:906:8506:: with SMTP id i6mr5727115ejx.446.1596051133479; Wed, 29 Jul 2020 12:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596051133; cv=none; d=google.com; s=arc-20160816; b=HX6r+Kice5za8YdPdGKBJd5tPbz4hhY/qGb7OM67tl/nCCU9Xg3He93qgIKTYhr5+q j5t7vyzuLpwoEUa2z4N0rJm7YLA1qDt3QDjjW+NUeKkLSuIrp7/il9BI+15jLhJOnMxO F5alHF5I75L89ljN3UhwMtGW7fYdL3Zllt0HaIuS5OcvcYidGzGp7t9kwTZ98S6V878y KfVKRO5xUdzaRTBlHN+uuVBwCpxFllrejaRfAC9Wnu50A1/weoBkpnMaoXoOngpUFBOU R+z6/BL4BzsVVsB4fNRRUh3Fz+b2/aMFFwMADBE4LiGK1iKsRzswiOiq8Z/huZ+tOYLo Vpug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:dkim-filter; bh=DW6E5K0GrWAZAehZmpuYvJNZKdg3Y537ZOtr2eEBAh4=; b=urHRmirf8Ez+4oC3am3Rw4fO2MvY7sIU332QSBOubv+8PG7nnm+xGHxVLPVFVqh9Yb EqnfgkREhOd7MjyyyOSeVpJ151hTBECF8IgqzTOzAzY3akDBi7Wf1WWnVKNGlN3+SJAn A+3z40dcR+SzYMdTM1KJOYJZ9yeT+K1mqccal1lwTb2BkUvHkVgqBy0DabcYasnhOhoV 9927n0unikvW43FOxsJdoEU+3iDQczVAnh9ORGhpZJ4VXDMjuXLnDxr8s5l7Cbx9IIUp W/D8VV+6eAfLRYBZVigjJoyCEOqyoqSYqwZ6CZLIkldDIp8WVzVHfguvazRRuTEN6pL/ JJyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=EdFNEpoN; 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=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr10si2279438ejc.698.2020.07.29.12.31.48; Wed, 29 Jul 2020 12:32:13 -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=@candelatech.com header.s=default header.b=EdFNEpoN; 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=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726817AbgG2T3Z (ORCPT + 99 others); Wed, 29 Jul 2020 15:29:25 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:49234 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbgG2T3Z (ORCPT ); Wed, 29 Jul 2020 15:29:25 -0400 Received: from [192.168.254.5] (unknown [50.34.202.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id 7257E13C2B0; Wed, 29 Jul 2020 12:29:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 7257E13C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1596050964; bh=5hTAhHWamyxEdM5ZqvzWxALOgu/3aIGxE+N2OUVDpE8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=EdFNEpoNR4QjdmEQxYvw1I3EolQppzAGg/pCh6xylf+Qi152n91vj0o+Nj9D8TahN rtO0Ofd0MinnNqXQD7e4X0k7CgO3ZzmKJpKmf5by30kVJQJKKcbCrRBXd0E6jqg+oD BTYYEF1O10gTnR3S8tz8FRPoLB0npgKr8wCP7wE8= Subject: Re: Help getting aesni crypto patch upstream To: Ard Biesheuvel Cc: Linux Crypto Mailing List References: <2a55b661-512b-9479-9fff-0f2e2a581765@candelatech.com> <04d8e7e3-700b-44b2-e8f2-5126abf21a62@candelatech.com> From: Ben Greear Organization: Candela Technologies Message-ID: <9e6927a6-8f70-009a-ad76-4f11a396e43a@candelatech.com> Date: Wed, 29 Jul 2020 12:29:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-MW Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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? 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