Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp327543pxj; Wed, 23 Jun 2021 23:34:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5RlA/aZIsecVdvFJUp9okVf4j/eT7NkF9l1oHdMEzb64z8ldJQxliJRp81t11FOj/++sm X-Received: by 2002:a17:907:10c3:: with SMTP id rv3mr3669351ejb.420.1624516445383; Wed, 23 Jun 2021 23:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624516445; cv=none; d=google.com; s=arc-20160816; b=mdBvBF0LwiRaSdU+1XT/AvcJpN0GKc/aKnI8n5a/zaAdLkE3fa5JMRgpYPesucEo2P AXNjFcG537Gy6VpzXMbVLpwUgB8Ee7jAnmAfyQUegFec5ChQGvE+B/qMxidNTchV6/gE TxBsR3nXGCMWQ/1uJDdPSpcK/0jEqBp1ixo57AZUJis3AaA6k2G6FBziVYX0Nl/vUfAq uV6prwVrEbEottZ66DgnKR18Qa0vkW2T+vNlwnPYHZrww/MeieciIroBWxiU4FbF0Ust JxbR8e1HfYmKotE0aBDgh7FIIai/5eVDD0OsUr3PiDcE9wJ6Ae6PrA5m5VdACSV0BCeH 5IYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zTVauYicf5wMCDB1GEdEz+cf7SdZfJvdxhEOxd7em2E=; b=htBP6NhW/KnjIJR6RzYg0b19Zc5LMXi3uuDU7lDFoKEK2r6gYlKGEQyFpqRLa8P8kt 8cJTQCnQmd6cOLBcVlcEveLHBMCRkGXTLh2pmEJH2cDyuNy8Yr0ZXu6euJ672hN/7Xlu I0BDiatDeYP9uWKq0OLbAx1j9pOMZK6Go0XyrohHuJyAEyjYf/DzrkCU11oIizi0TRJ9 SwygFD/3yp7D3gDX9y7rJulc9wbneBFstFN+TJC/kiHWye1az3woO3QagmoHqMWa7vg0 rH27B7BapDz/bU+iaH2fHDpwe+4/uBmNlTMT0CRkvKBlT34bel2Rmi5qdNW2VXhNHyAr wnDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j16si1768954edr.422.2021.06.23.23.33.32; Wed, 23 Jun 2021 23:34:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbhFXGfn (ORCPT + 99 others); Thu, 24 Jun 2021 02:35:43 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:50834 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbhFXGfm (ORCPT ); Thu, 24 Jun 2021 02:35:42 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1lwIun-0005DQ-BZ; Thu, 24 Jun 2021 14:32:41 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1lwIuN-0000Wf-O4; Thu, 24 Jun 2021 14:32:15 +0800 Date: Thu, 24 Jun 2021 14:32:15 +0800 From: Herbert Xu To: Ira Weiny Cc: Christoph Hellwig , Jens Axboe , Thomas Gleixner , Thomas Bogendoerfer , Geoff Levand , Ilya Dryomov , Dongsheng Yang , Mike Snitzer , "James E.J. Bottomley" , dm-devel@redhat.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ceph-devel@vger.kernel.org, linux-arch@vger.kernel.org, "David S. Miller" , Christoph Lameter , Linux Crypto Mailing List Subject: [PATCH] crypto: scatterwalk - Remove obsolete PageSlab check Message-ID: <20210624063215.GA31721@gondor.apana.org.au> References: <20210615132456.753241-1-hch@lst.de> <20210615132456.753241-2-hch@lst.de> <20210618030157.GA1905674@iweiny-DESK2.sc.intel.com> <20210618033728.GA16787@gondor.apana.org.au> <20210618181258.GC1905674@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210618181258.GC1905674@iweiny-DESK2.sc.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Jun 18, 2021 at 11:12:58AM -0700, Ira Weiny wrote: > > Interesting! Thanks! > > Digging around a bit more I found: > > https://lore.kernel.org/patchwork/patch/439637/ Nice find. So we can at least get rid of the PageSlab call from the Crypto API. ---8<--- As it is now legal to call flush_dcache_page on slab pages we no longer need to do the check in the Crypto API. Reported-by: Ira Weiny Signed-off-by: Herbert Xu diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h index c837d0775474..7af08174a721 100644 --- a/include/crypto/scatterwalk.h +++ b/include/crypto/scatterwalk.h @@ -81,12 +81,7 @@ static inline void scatterwalk_pagedone(struct scatter_walk *walk, int out, struct page *page; page = sg_page(walk->sg) + ((walk->offset - 1) >> PAGE_SHIFT); - /* Test ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE first as - * PageSlab cannot be optimised away per se due to - * use of volatile pointer. - */ - if (ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE && !PageSlab(page)) - flush_dcache_page(page); + flush_dcache_page(page); } if (more && walk->offset >= walk->sg->offset + walk->sg->length) -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt