Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1855954ybi; Thu, 20 Jun 2019 05:07:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWZ3HTWUA2gnFJUWtfNtfZwdLaNCcn7LE/DjyY+3+dnf4uKTDc3MPmrGjdDqK+xJgRJk6Y X-Received: by 2002:a17:90a:2768:: with SMTP id o95mr2761542pje.37.1561032472539; Thu, 20 Jun 2019 05:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561032472; cv=none; d=google.com; s=arc-20160816; b=HbdhtArmUweS/NLXe1npdktwDyyGPYCMCGlm+W+sE6eX8D1LoRIyPD4CeLMNfJXKee mmBNxcg9VRpmyhBQk4AAPdu42od5hCjJmd4crWqyqD9w8LdcqJZg+VafwxtITycrzcQu vfD39vbcCpv2UQHVVEkxoPdA2Ut/v4OYe+pZCZiqsN0kWx0LSPHWChmnkIYqloAwPN5j eVEIBAqgeNeLwSyRcZkUsHgQoUKsIxTNZpRk4jSbiQ6fAnBefOvAQ5rDV6PK2HyJxw3m 8JUCqHbZ2tg/bZe97TMW921CIG2g+WgAkaSuMeQ025U9qj1qaQ05tWYIWpxt2Y1nVK3L C9yA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fWInJZV9G+ALRJgF96UsSfEQo+Nr0jEpCwgfg6RpTMM=; b=ZcwrrNGtBeziobP79V8iVBAC8aTy4WaaY4yC6aoFSTnQntcSn8JfQEo6Yuk4ZI3IRe 5v+HIIg2w66C5ab797BZ68Yds9oj17vFO9v+y2qUaI6W8M5E+akwNZBh+wNx+GzFPaEA 2eTCbwWt9OCpx40TzODRuViFqepuQXtokf4uRBJYa9OG1zPOH5OSsyTQIt4arqs9H1Xd Kaz9dso4MPdGB6THpM6KA5GaZ//a/rt6pR1x0M+gTpSmGSO9qYM9p+cG/tZq9VCzLak6 +43S7WQQsoSB5B6F8qtT8j1nn/gljVijL6oWRqfixjjna1Ju5Nn/AuD1X3tlR/7JEVsy KMdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="SGfxMA/a"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi8si17610366plb.352.2019.06.20.05.07.34; Thu, 20 Jun 2019 05:07:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="SGfxMA/a"; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726951AbfFTMHc (ORCPT + 99 others); Thu, 20 Jun 2019 08:07:32 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45783 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbfFTMHc (ORCPT ); Thu, 20 Jun 2019 08:07:32 -0400 Received: by mail-wr1-f67.google.com with SMTP id f9so2729973wre.12; Thu, 20 Jun 2019 05:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fWInJZV9G+ALRJgF96UsSfEQo+Nr0jEpCwgfg6RpTMM=; b=SGfxMA/auQHLkjCgvzy0/rjhdXFIiOZlY0xzr+gfOk7tLshPSeHj+jIxIolAyT+jFv +r5X8Fj1S8DUeDW3+IUPVrXwprGK+agASiHedUIulI23OiGdiYeM7b4/xy7KBuDLEHAo /84H+i9fvFy6V20/mfV09aqD+TUxjXwSSTWQsNXUatr+YDfLPEQRzHBhngxQCJLG8uOS hUMaPFT2jnr+BqLVCC6rP9xApL7IG4fLUP16mQwnF+9FxqVvICkBroWrNZJJjPx8dzVe s0vTiPb2IIC29pKLCKcxEnK+7PvS9Hn8PtrJjxWUmtTmrPnzaMZKgS9d8CFibgfoHf+O 1zIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fWInJZV9G+ALRJgF96UsSfEQo+Nr0jEpCwgfg6RpTMM=; b=m3WAJYCSTeYuUVv1aWlvxoDRYFVW+AKvvOTbCpOqwAMQALtqoVQTw1xkkThF63opoy Wplo/xt6ytRbydzfk/gKBONwivsBoQyuzyfrusyuXW+EmOlzDEK8wcIB9L9foG5WkPR8 P4dHFuZtpulGEbBTu2binRza6RSbJmCoB6htYS2amoc3qftQ7TNnG2wA+MBCJAe2IT30 mzdth7MuntZrwNMrKiKwmDfTXPCmtV4l5JmFdIgMb6rlKjymHzg2ynuM4wZQ7J5O2/9f uvEwVA4z2Yn8EjqQ/bYowck+DX5uiAHeH4X4EAMBDq366X2ddvBux3QxR6+fu3L1aVXk I3Mg== X-Gm-Message-State: APjAAAUFgeAyLqIbE30HUOq4eM7ler+K46Arzdny1shHofzkkDVXskUR v6JroaBVbhoVOyoHlaHOiNg= X-Received: by 2002:adf:ebcd:: with SMTP id v13mr16823195wrn.263.1561032449986; Thu, 20 Jun 2019 05:07:29 -0700 (PDT) Received: from debian64.daheim (pD9E29A96.dip0.t-ipconnect.de. [217.226.154.150]) by smtp.gmail.com with ESMTPSA id y19sm6251145wmc.21.2019.06.20.05.07.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 20 Jun 2019 05:07:28 -0700 (PDT) Received: from localhost.daheim ([127.0.0.1] helo=debian64.localnet) by debian64.daheim with esmtp (Exim 4.92) (envelope-from ) id 1hdvqh-0001xc-SZ; Thu, 20 Jun 2019 14:07:27 +0200 From: Christian Lamparter To: Hauke Mehrtens Cc: herbert@gondor.apana.org.au, davem@davemloft.net, gregkh@linuxfoundation.org, stable , linux-crypto@vger.kernel.org, Amit Pundir Subject: Re: crypto: crypto4xx - properly set IV after de- and encrypt breaks kernel 4.4 Date: Thu, 20 Jun 2019 14:07:27 +0200 Message-ID: <4226536.PGTo7a8ESG@debian64> In-Reply-To: <9d744c3b-d4ff-b84b-527b-fc050794499b@hauke-m.de> References: <9d744c3b-d4ff-b84b-527b-fc050794499b@hauke-m.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thursday, June 20, 2019 11:36:50 AM CEST Hauke Mehrtens wrote: > Hi, > > The patch "crypto: crypto4xx - properly set IV after de- and encrypt" > causes a compile error on kernel 4.4. 3.18 as well. > > When I revert this commit it compiles for me again: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e9a60ab1609a7d975922adad1bf9c46ac6954584 > > I do not have hardware to test if it is really working. I have a few APM821XX. But please note drivers without commit b66c685a482117d4e9ee987d252ca673689a5302 Author: Christian Lamparter Date: Fri Dec 22 21:18:36 2017 +0100 crypto: crypto4xx - support Revision B parts don't work on those and I do have my doubts that 460EX series (and older) would either. I also don't believe that the inital driver as it was submitted would have worked. From what I've seen in their SDK, they patched the testmgr at the time to either disable tests or provided their own... so, might as well revert these patches for 4.4 and 3.18. Because... > drivers/crypto/amcc/crypto4xx_core.c: In function > 'crypto4xx_ablkcipher_done': > drivers/crypto/amcc/crypto4xx_core.c:649:21: warning: dereferencing > 'void *' pointer > if (pd_uinfo->sa_va->sa_command_0.bf.save_iv == SA_SAVE_IV) { This would probably need 9e0a0b3a1 ("crypto: crypto4xx - pointer arithmetic overhaul") which is a big patch. > ^ > drivers/crypto/amcc/crypto4xx_core.c:649:21: error: request for member > 'sa_command_0' in something not a structure or union > drivers/crypto/amcc/crypto4xx_core.c:650:38: error: implicit declaration > of function 'crypto_skcipher_reqtfm' [-Werror=implicit-function-declaration] > struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); > ^ This would require adding #include to crypto4xx_core.c The patch that added it upstream was ce05ffe10457 ("crypto: crypto4xx - convert to skcipher") But this is more than just a one-liner. > drivers/crypto/amcc/crypto4xx_core.c:650:61: error: 'req' undeclared > (first use in this function) > struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); > ^ > drivers/crypto/amcc/crypto4xx_core.c:650:61: note: each undeclared > identifier is reported only once for each function it appears in see "#include " > drivers/crypto/amcc/crypto4xx_core.c:652:3: error: implicit declaration > of function 'crypto4xx_memcpy_from_le32' > [-Werror=implicit-function-declaration] > crypto4xx_memcpy_from_le32((u32 *)req->iv, > ^ crypto4xx_memcpy_from_le32 is from 4865b122d4af ("crypto: crypto4xx - use the correct LE32 format for IV and key defs") I think crypto4xx_memcpy_le() could work in this place. But again I do have my doubts that the device works without said patch. > drivers/crypto/amcc/crypto4xx_core.c:653:19: warning: dereferencing > 'void *' pointer > pd_uinfo->sr_va->save_iv, > ^ > drivers/crypto/amcc/crypto4xx_core.c:653:19: error: request for member > 'save_iv' in something not a structure or union See "crypto: crypto4xx - pointer arithmetic overhaul". > drivers/crypto/amcc/crypto4xx_core.c:654:4: error: implicit declaration > of function 'crypto_skcipher_ivsize' [-Werror=implicit-function-declaration] > crypto_skcipher_ivsize(skcipher)); > ^ see "#include " (Yeaah, there seems to be a limit of what automatic cherry-picking of patches can do :( )