Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2258871imw; Wed, 6 Jul 2022 02:53:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sm9Ykcmjix1cOH6BqoQK8CtmrdVP9g7W3dzTslOCu4cgQe/PXHTAUwldEcp5GP5GsFbMQ2 X-Received: by 2002:a17:902:da87:b0:16a:54e1:3426 with SMTP id j7-20020a170902da8700b0016a54e13426mr45173637plx.157.1657101184248; Wed, 06 Jul 2022 02:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657101184; cv=none; d=google.com; s=arc-20160816; b=mrLEjoRBzxp87lHhOapDjscoJgxBjZuxNEZbrt0aQ76PnY/dFitIK57atClldxNd7s HMjwEJ43UA41dWk9C1jgiDY52X/t0NKlbRMD4H6L4TW4xyczwvwuRdYpLqD50y0XEhuL keniiqE2H5Sj3TSYcdoyTVsJxRV35gE8tHt0TQi1SXCUS3GKYpWlI/bQ9v5fdBCwIaCH 7E92zm3KhJq6DWUPCvP9Bp4eio7jl4FYN2Jb9SQnFnuE3qR8E7ps7Zg/GgENsBXOsshV DmuB5Wi9kh/iWDnKqsSbhnIHnBjGSa5qtuSHW9hFtkdAobLGFur4+o2pFPcfI7VMLzrt QlFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=RJCqgLHMyoh5fPNOmNkId5fy7qIa6lJt0yPAETtAqMI=; b=bKBmJNXW/tWXehwMfGig8fDTGfFVV36ww2SVTnuHaWkDSOk1X7DYxhdBk/xwGPgtrZ sIk4HgmN4EOqxD0OTQCqcXng/NHeo//DCJo4gL9izzwbS+8uCuROa4I74/EVKt4Ggc7e duX4Dy2sPNQGn7141KIogWoTRHEoKI0AwQBb/1OWj0/76N+c5r4PGu+uPnOnPZcB6q6B 8NAC/4TLmtA5pnxV0k/3zJtR4ZOdZEXKL+Vok/9uql67NKVVrUpJHF/XM4EY8Hj5iijm cHFyS528sdktMGeaqJ9uv6lUkI2FpkSzZ7PTncoxO2dOOTBifhODef87ZpbtV9c+sjqh 1ETA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a17090aee8f00b001eedfa18559si3549778pjz.48.2022.07.06.02.52.48; Wed, 06 Jul 2022 02:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232349AbiGFJrr (ORCPT + 99 others); Wed, 6 Jul 2022 05:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232587AbiGFJrq (ORCPT ); Wed, 6 Jul 2022 05:47:46 -0400 Received: from imap2.colo.codethink.co.uk (imap2.colo.codethink.co.uk [78.40.148.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1858CBDC; Wed, 6 Jul 2022 02:47:33 -0700 (PDT) Received: from [167.98.27.226] (helo=[10.35.4.171]) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1o91cy-0000jJ-LW; Wed, 06 Jul 2022 10:47:24 +0100 Message-ID: Date: Wed, 6 Jul 2022 10:47:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [RFC PATCH] crypto: flush poison data Content-Language: en-GB To: Christoph Hellwig , LABBE Corentin Cc: herbert@gondor.apana.org.au, heiko@sntech.de, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev References: <20220701132735.1594822-1-clabbe@baylibre.com> <4570f6d8-251f-2cdb-1ea6-c3a8d6bb9fcf@codethink.co.uk> <20220705164213.GA14484@lst.de> From: Ben Dooks Organization: Codethink Limited. In-Reply-To: <20220705164213.GA14484@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 05/07/2022 17:42, Christoph Hellwig wrote: > On Tue, Jul 05, 2022 at 10:21:13AM +0200, LABBE Corentin wrote: >> >> I just copied what did drivers/crypto/xilinx/zynqmp-sha.c. >> I tried to do flush_dcache_range() but it seems to not be implemented on riscV. > > That driver is broken and should no have been merged in that form. > >> And flush_dcache_page(virt_to_page(addr), len) produce a kernel panic. > > And that's good so. Drivers have no business doing their own cache > flushing. That is the job of the dma-mapping implementation, so I'd > suggest to look for problems there. I'm not sure that the dma-mapping code for non-coherent riscv systems did get sorted. I couldn't find any when looking in 5.17. I expect the flush of the icache is also implicitly doing a dcache flush too as from what i've seen it is only being used when code or tlbs are being modified. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html