Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1041653ybl; Thu, 23 Jan 2020 12:24:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzfxzZYUJurX7Hy1u2sPOIpc8x5w2VJGUeBH2ramMuAeZODn4wn0tjyPx46C8kj89h+hDgu X-Received: by 2002:a05:6808:611:: with SMTP id y17mr11400344oih.146.1579811089254; Thu, 23 Jan 2020 12:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579811089; cv=none; d=google.com; s=arc-20160816; b=u7hMCEGWzlYcpyI4XWXwddy6KJeT6xIuFKRPpL/yeHU+L/y8mrkkq2fP198xyDgjEE KO7Qw7WKbmaNWpLHvMCp14TUDWjZurIAUvUrnoHxmUxuFqzeCY1MPzNjJjmhl5UdwCVN 8zTrBlmoIHB/pASjDCXF12xSk7ZSWhxi8hdX+WJgVRjuSEExXClLKPsC5c7m6uMrSzRj jBAGfjoSgEuvTlc8/zNfh3KpGVUFTcZ7bynHFDmniFYjuL3EzI/jhXCfRVejxK2SLacV UFZOttHVfqvtb7oedL2+k/k5X8WSL+7gjVkOLQuAEbHMNvcmXVCmcxNd5eizuSY8MN5d 9o8g== 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; bh=vVKGzcjzgYKfbH5GrgrPtRduy6O94J9VHLSrUFzfF0o=; b=0pH+GW82Tkr1vkDbMJH9/206dSb4R/9/iqn0xJztaBTekgWoc51tzEPNPK08h9hhS0 d3JX5O/6fnpTMBE/YJkK77wpWbF0jOyTtwN5uxiw/6IoM7lbFzWVWSoit8uqcDo5m3fz AbnizJdukslppNeKJoTHJNQz50gWJRUEYKolhvRGP0x6miIIWA1i02f4T9/PUhUau1KY 0DxKWlLBYs6Tp21FUaiFPgxd+Q/gOJ7UVEJ7jX7zKkQqQ1tNeDx/RckuKNK3+6qBJ5SP s23oEwXQJuyWF7oRx2iyQM02LWJnOya1KWtys1FbEgaTZ/lzJb8nmwNcAaEtF1v7NKIr BC2g== ARC-Authentication-Results: i=1; mx.google.com; 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 w23si1768150oti.39.2020.01.23.12.24.30; Thu, 23 Jan 2020 12:24:49 -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; 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 S1729143AbgAWUJG (ORCPT + 99 others); Thu, 23 Jan 2020 15:09:06 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:44577 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727141AbgAWUJG (ORCPT ); Thu, 23 Jan 2020 15:09:06 -0500 Received: by mail-oi1-f194.google.com with SMTP id d62so4114517oia.11; Thu, 23 Jan 2020 12:09:05 -0800 (PST) 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=vVKGzcjzgYKfbH5GrgrPtRduy6O94J9VHLSrUFzfF0o=; b=Lux9AFY2jlUsplSHb94BI+HoqGW7dWouvo2aFvkTCcGd9fvHhEWSO3CC7HEGtYVDQ2 a53pS8GIJajr2KKILndYts6MuXD17MaiQ0Qt8wMfWh43W69iOogbfeDWsaav+OD52kWS OYHqwbltn0yYwygbO+UlULsvUiKPCT8ZYlx2JxWfEFLHT6dMPA6y3G79pItmz1XQ5fj8 da75ZfM0VEoZ3/DJyrO93+9uV3Ilg9HKEUrK9jhAd0aYRJdSmUrDWOCJr0cZ+BQucC3V aEWt7UJ/4+h6XHAP8fXxqhHQDMWNzYU+961+mTUk2LBBzQ5eBpOTA/CggQKSSYSaPYZo 4hGg== X-Gm-Message-State: APjAAAUTK5BjU9TMwTpOFaR3OLDdxtmkXA1JpofXT+OyC96xhCzXLLkN 8u+crsYyxcENBu51rAdHBT4Y0ahnQH4uj96/w34= X-Received: by 2002:aca:48cd:: with SMTP id v196mr12160145oia.102.1579810145435; Thu, 23 Jan 2020 12:09:05 -0800 (PST) MIME-Version: 1.0 References: <20200116101447.20374-1-gilad@benyossef.com> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 23 Jan 2020 21:08:52 +0100 Message-ID: Subject: Re: [PATCH 00/11] crypto: ccree - fixes and cleanups To: Gilad Ben-Yossef 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 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. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds