From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E69BC282C3 for ; Thu, 24 Jan 2019 22:14:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3397218D0 for ; Thu, 24 Jan 2019 22:14:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="Urc6HW6D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726517AbfAXWO4 (ORCPT ); Thu, 24 Jan 2019 17:14:56 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44043 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbfAXWO4 (ORCPT ); Thu, 24 Jan 2019 17:14:56 -0500 Received: by mail-pg1-f195.google.com with SMTP id t13so3271671pgr.11 for ; Thu, 24 Jan 2019 14:14:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=8mpx4BWeLpo9RAVoqcUNTb+7o0Sb38wJishHalktne4=; b=Urc6HW6DFt0BegQNGCj3nvc6ddvnNUbThjJsFSUY3QMd/uXu3YOxFPX69YPHssHF5X F6CkObxqzBPrdZ58LU3yB996hWG/0MauTAAql6WDu0a1x8JtGZulcK/EI+1qbBvZBwVs gQ446Fq/oOBDFnrqngjc+6rleCpNbScawEzdCYERqJmHYbSmDyvoHph5PXbJ6Fk44amf 3afAEi1fzqaVm6cq9JfOVpo1QC6QX5Iht5gVym/cKBzeZOKWJt0pIdJbLREVKo6Jb4vY cGIQhyr2jCljoRc8GxdXI1sjH5Cq7jZWA+LeSGIHOBZNrt9Xh7+M/whcE10vFP66mKn6 3Fmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=8mpx4BWeLpo9RAVoqcUNTb+7o0Sb38wJishHalktne4=; b=sF9qyA7VF9nhTH7h1o2xBoZwgWJZKj0DDvU+rNKLKJe9lAHZ9f80JN0usE092kgF+b +ms4O3brGIHOiIQDNH4jHvfqDHuu3hm/0eNsq7PfTcLjocubtoFSljC6dBRfxmK2vdWv hJFnwwshrPfdw5VysL2HcYIkkqLupFB0MEfgONSWHSzy6sofsmlYdyx6Iy0A3pCcRs8K Nsq+oFKsFSeHCPmGHOsas9s6tPnxFrYm3qlNo1aRXbKl+sT9yEdrTq/7qLfu+CxG5vEb WGXo8hMgdYeGj/yIKetFGACOiWphNn9fmj+XCqy+fLm2fORhI+Y1n9l/UP7+JmHYz5HP tHBw== X-Gm-Message-State: AJcUukdAuhYCrLFg/NtezS9qgydUS7omR92x1wrSRIV2aTf0Hpcw3UYh GqHtkMEe0lD5rf4Ul2LjSYQluQ== X-Google-Smtp-Source: ALg8bN6GcyUbrrP7yOq/GVNsBNZRW8wIYdas132d5Ze3FFgmRbr+PdzFwzo7JzzVkIk/GQ3T5Ir3Qw== X-Received: by 2002:a62:a209:: with SMTP id m9mr8461041pff.218.1548368095624; Thu, 24 Jan 2019 14:14:55 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id p24sm35154625pfk.155.2019.01.24.14.14.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Jan 2019 14:14:55 -0800 (PST) Date: Thu, 24 Jan 2019 14:14:52 -0800 From: Jakub Kicinski To: Dave Watson Cc: "netdev@vger.kernel.org" , Dave Miller , Vakul Garg , Boris Pismenny , Aviad Yehezkel , John Fastabend , Daniel Borkmann Subject: Re: [PATCH net-next 1/7] net: tls: Save iv in tls_rec for async crypto requests Message-ID: <20190124141452.062d6d36@cakuba.netronome.com> In-Reply-To: <20190124172146.q4acuud6z35wevm4@davejwatson-mba.dhcp.thefacebook.com> References: <20190124172146.q4acuud6z35wevm4@davejwatson-mba.dhcp.thefacebook.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 24 Jan 2019 17:20:12 +0000, Dave Watson wrote: > aead_request_set_crypt takes an iv pointer, and we change the iv > soon after setting it. Some async crypto algorithms don't save the iv, > so we need to save it in the tls_rec for async requests. > > Found by hardcoding x64 aesni to use async crypto manager (to test the async > codepath), however I don't think this combination can happen in the wild. > Presumably other hardware offloads will need this fix, but there have been > no user reports. > > Fixes: a42055e8d2c30 ("Add support for async encryption of records...") > Signed-off-by: Dave Watson This one should target net, no?