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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 480F7C33CB6 for ; Thu, 23 Jan 2020 20:09:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25C4F21D7E for ; Thu, 23 Jan 2020 20:09:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729281AbgAWUJG (ORCPT ); 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-Google-Smtp-Source: APXvYqza9kKl70hhT8tgf/+Mkh35IoAIwHVHXs0FQsmG0LhbXki0VWdjBWY8SEXw+Tz1hJ5wmPBUzSOk6KjxSTgNats= 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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