Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2026650rwb; Sat, 24 Sep 2022 01:23:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Fc/Dp5Qu4Piw3OmbE3FNx4I4mGBWinrZcvtAtvnk9D6fQ3Gfz19hBrCLyXOJBpPxr/C6f X-Received: by 2002:a17:90b:3149:b0:202:e9e9:632f with SMTP id ip9-20020a17090b314900b00202e9e9632fmr25891906pjb.96.1664007788020; Sat, 24 Sep 2022 01:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664007788; cv=none; d=google.com; s=arc-20160816; b=AjqPr9I/B9wfWpWAYu01bRV1BoeOJUnUy/NQ6+LehrFvRg6fEtA0sKdYlZNKx8JQ7B ymoNGdyTZCWzdBY87ebNdArRWhtXqn5s4+z8wBX7zS+wwWa7CipcfwfgmRm/Aq9K0wt+ lyO1rd8x/MoW07EVACBepKZ1reJ6O9t+JNe89zSovkVdrFgphgIzNt1se0AosDSSb3EL n1oddsuHbLCcpvH4Q3Bq5a3y3qhdjMgivPSxuLzpnEWZZjjPoGEb/oQK00iz/l3p67F5 P7cHJU2ledXTkj0loednDeV3RK62AtbOIUbOcdWFImDvd5NwlWIX+LabBg6aa4SpMETi kI9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=xoXBsds2qFr5mi1AbzgwBpg9T59I/b7ZFxYREKgvyDg=; b=yrKmGLa3sSkZxcZoeQh+5PBZREgcZbCcg6elD5hWRx/jwcm24xzhA5J/J2/mcrGYdZ ZBpshz99dk+e2MMSdv7ll/PcsHrdny03lAuagRg7pRvpoM1k24QrwWWvcL/KjZTScAAS mLvnYTEALMiOyZ5Fb0rrxiTEw3/U3nkBSjuZP5M2a/eDKwPu8l2A6Oo74VZYQIFs2g8l Xh6Yx0UlcF+7abPk/CSKIJz9crYRbAdu5RtMWh66cTjPWUQ6M9Q/nQAwWmDNanxjtBf9 0lOUk5keEaep7sWqYcbHe2rxIQ7JJPEGXi3ZRCSt2PJCCTI5v5Eohr8T3roO0PIMrKtq QhQw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a62e705000000b005352aeae657si10398257pfh.199.2022.09.24.01.22.47; Sat, 24 Sep 2022 01:23:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233717AbiIXISn (ORCPT + 99 others); Sat, 24 Sep 2022 04:18:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233751AbiIXISJ (ORCPT ); Sat, 24 Sep 2022 04:18:09 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57061131 for ; Sat, 24 Sep 2022 01:16:49 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oc0L7-007wck-5k; Sat, 24 Sep 2022 18:16:46 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Sat, 24 Sep 2022 16:16:45 +0800 Date: Sat, 24 Sep 2022 16:16:45 +0800 From: Herbert Xu To: Peter Harliman Liem Cc: atenart@kernel.org, linux-crypto@vger.kernel.org, linux-lgm-soc@maxlinear.com Subject: Re: [PATCH v3 1/2] crypto: inside_secure - Avoid dma map if size is zero Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 Tue, Sep 13, 2022 at 04:03:47PM +0800, Peter Harliman Liem wrote: > >From commit d03c54419274 ("dma-mapping: disallow .map_sg > operations from returning zero on error"), dma_map_sg() > produces warning if size is 0. This results in visible > warnings if crypto length is zero. > To avoid that, we avoid calling dma_map_sg if size is zero. > > Signed-off-by: Peter Harliman Liem > --- > v3: > Remove fixes tag > Add corresponding change for dma_unmap_sg > v2: > Add fixes tag > > .../crypto/inside-secure/safexcel_cipher.c | 44 +++++++++++++------ > 1 file changed, 31 insertions(+), 13 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt