Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2563898ybl; Sun, 26 Jan 2020 05:38:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxc9jq3pP1E5vAws5fEbXKoA7Kl3sfJ/s3IUurh/0V/NEz/2ce8MkywxpVS6EHCBBBvaGbj X-Received: by 2002:a05:6808:487:: with SMTP id z7mr4934575oid.59.1580045911798; Sun, 26 Jan 2020 05:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580045911; cv=none; d=google.com; s=arc-20160816; b=W6SKCAonzGsoeMIB//ntDrHL8Pt7VJwYawBXK0JD43EGDF49b2eDXL1JRK1xJzZzzR ye6fP/9hwzUFr54tVYgmMhmvYbgvT7AIhOj6xPWt33GjY2C1xjoXH2MP8iszsP2p7ahP LMwjJrSMF2j5ZOYI2vfoy6NELrqypbf8FwXfYVvC9LBUvJbGV0QrvYDYTJqSFoEEI39a uBDU/oWzkMnbILqJKqS9F7wMjNRyBwXdg6Lw+Ysa9vShgc1Sm5SlCBccgozCJG+hFpi2 bOPJMvhT94H/ydZIUhGhVsQUZX4Vf4XaOz1XsBMTzhm9QZEPApPCVOuEMPi04FZYBHNY 8M8A== 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=6eLMDTU2DdPGk8XS1y0kzPwySf3dVWxuBK+qfT4vpSQ=; b=xkEHl9AKmtZf+fKBiaXrMVt8X7d7+GJgWHdRyf78QMAF279gzdupHTbknDMIFBvCYh OPymYoEhGueWlCFpZC0K6mLvdbFkffeY7tlErnETEebcMUnuOplQvHaQJ8vdO/Q5PORM FbfdVJa5ocjyEayaItoj7QjRbJHK0yZGLgK5od0jj+e2+w+DCaxr/kEyhiohfSIylNc0 hnPGsgsXZudCGfb+NWng1YVs3w0Eo7SZAR61ggVCPpbDn5VPcjFdO5JwROfScmicEnDI EHex013ooT0KewXHDj5DNBFlW+m3Q5EQc1DDleWy2hId96qjYEoBRmf9Dd2fw8x2mSQl dZUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=ZfbIppOE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125si2514257oia.253.2020.01.26.05.38.20; Sun, 26 Jan 2020 05:38:31 -0800 (PST) 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=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=ZfbIppOE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727228AbgAZNiR (ORCPT + 99 others); Sun, 26 Jan 2020 08:38:17 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:38516 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbgAZNiR (ORCPT ); Sun, 26 Jan 2020 08:38:17 -0500 Received: by mail-vs1-f66.google.com with SMTP id r18so4051244vso.5 for ; Sun, 26 Jan 2020 05:38:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benyossef-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6eLMDTU2DdPGk8XS1y0kzPwySf3dVWxuBK+qfT4vpSQ=; b=ZfbIppOEH4vp7GQxcacxvAI6ZWnd5bWP/Y1usgF7+j7P3djAoJVN3DFHhU6b0Cy7x9 tkYech8F7MjSaGpfn0QtHmNSXXWQCZFDZhVwEaG2e4866Wb2WJT7sY0v0JW1AMMtYcRf KiyYsJ8Vpm550nzQvV0TUE59Y5NmfG1VeD9qTxpCCKWOGEJMyt6+kuFqu6pRsI80zBZT 62jaQCatKaOIVkoi56/eoNkGf9wEEaXqjBpI/21z+h2uDYGh27c8BqXmmBttmk81WzGh qtn82rqeiA1fWlUbi/vmcCTdLIdmdXUU9t0erzkAFUagiqte4werw9jxgRAOdQNngazj 7aUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6eLMDTU2DdPGk8XS1y0kzPwySf3dVWxuBK+qfT4vpSQ=; b=Ame3MgVyH8uVmnGQsfYmydDgm5+LHjvHErk0ghbfrPagk4ytvV/FCp9ZfElH0H12C8 mgb4n0IsKvp49JfPzEC+veI0ZDUUwWcAZb78eoE53Hy2XMS880JmlKfuf/JEQmgf9JSi h6Ocwrer67qqnehLKwZFRN39IS6Is3TJ3Q2/l2bqHpBDJpB/2c+/Xu+1hDYQhPGY3cRA VUItQq/t8dEYHmQb7x6LVtomD/pLcQnLyndAIiKjaotsUkm8BXTWkDfgl0933dqEkV0D Z/Zq775oKJmFCVOwRutnZF/PhTagmdY0f2amBnxiWHfYKkNPVj2r9cY0F+119lIOffeu PVag== X-Gm-Message-State: APjAAAU/SFwPvrAKia8XSQzOwLxWYYltHUlUHt534L62esYlOAPxF3OV P3NaHUnoA3vzGgKktb7r3B2OgD16MAgHYu5gP6cOvtDdO6nt/w== X-Received: by 2002:a67:fb14:: with SMTP id d20mr7020032vsr.136.1580045896049; Sun, 26 Jan 2020 05:38:16 -0800 (PST) MIME-Version: 1.0 References: <20200116101447.20374-1-gilad@benyossef.com> In-Reply-To: From: Gilad Ben-Yossef Date: Sun, 26 Jan 2020 15:37:58 +0200 Message-ID: Subject: Re: [PATCH 00/11] crypto: ccree - fixes and cleanups To: Geert Uytterhoeven Cc: Herbert Xu , "David S. Miller" , Ofir Drang , Hadar Gat , Linux Crypto Mailing List , Linux Kernel Mailing List , Linux-Renesas , Christoph Hellwig 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 Thu, Jan 23, 2020 at 10:09 PM Geert Uytterhoeven wrote: > > Hi Gilad, > > On Thu, Jan 23, 2020 at 7:19 PM Gilad Ben-Yossef wrote: > > On Thu, Jan 23, 2020 at 5:46 PM Geert Uytterhoeven wrote: > > > On Thu, Jan 23, 2020 at 12:44 PM Gilad Ben-Yossef wrote: > > > > On Wed, Jan 22, 2020 at 6:51 PM Geert Uytterhoeven wrote: > > > > > On Thu, Jan 16, 2020 at 11:25 AM Gilad Ben-Yossef wrote: > > > > > > A bunch of fixes and code cleanups for the ccree driver > > > > > > > > > > Thank you! > > > > > > > > > > I wanted to give this a try, but it looks like CCREE is no longer working > > > > > on R-Car H3, both with/without this series. > > > > > > > > > > E.g. with renesas-devel[*] and renesas_defconfig + > > > > > CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=n, I get the following crash: > > > > > > > > Thank you for the bug report Geert! > > > > > > > > My R-Car board is on loan at the moment to another project. I didn't > > > > see this on our internal test board. > > > > I will track down my R-Car board and reproduce this - hopefully > > > > beginning of next week and will get back to you. > > > > > > In the mean time, I've bisected this failure to commit cdfee5623290bc89 > > > ("driver core: initialize a default DMA mask for platform device"). > > > However, this looks like a red herring, and seems to be only an exposer > > > of an underlying problem. > > > > Thank you for continue digging into this. > > > > > What's happening is that cc_map_aead_request() receives a request with > > > cryptlen = 0. Due to DRV_CRYPTO_DIRECTION_ENCRYPT, the length to map is > > > increased by 8. This seems to works fine if there is sufficient space > > > in the request's scatterlist. However, if the scatterlist has only a > > > single entry of size zero, cc_map_sg() tries to map a zero-length DMA > > > buffer, and the BUG)() is triggered. > > > > > > > OK, this does rings a bell - can you verify please if > > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is enabled and if it does can you > > see if it happens if it is turned off? > > No, I didn't have that option enabled. OK, I still did not get reunited with my R-Cat board, but I think I have a direction. I'm about to send an RFC patch which while probably does not address the root cause will stop the crash if the issue is what I think it is and so will let me know what you are seeing is what I think you are seeing. I'd be delighted if you can give it a spin... Thanks, Gilad