Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2329816ybp; Thu, 10 Oct 2019 05:59:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAF3c4Oo1cr+oTZZL76hd56tnPIYX2HtuJKigrF7ZHi2XdZkmn6wqfkS11TCGGWjP6dFhK X-Received: by 2002:a17:906:8315:: with SMTP id j21mr8103977ejx.244.1570712389098; Thu, 10 Oct 2019 05:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570712389; cv=none; d=google.com; s=arc-20160816; b=AchH+ph9i7D6tRkGPty2o3h/WKhNf9SQsPgM6x3nFPuZ6Q6DNcfmZv63CH3VKqoxDs ubcahKjYqQRSvfJH8rG2slcG6nPywsISUpRO3ulLhM2t+mdoZ4FFg6v4sI7ZKniqPRuc 2cCB4oe8aeHy+rlvf0IRNJW4ILOY/badj2LGCgD4kRs7gnUIqtGkndPFT9VKgQch8mas 9SHN4ToAwR+VYKvXh8rmfP4rOvlnPj1z1l/SFGncV8kpD1HZ6WHuFv4cZve83PbQONwR 4P+eGDIKqF2diGUlRnsi5BqrqHBkKGl7c6SHagN0qJoMqLQWDVDgWepTWFHOAy5YXuDH WvbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nHTKXfmHqdo9k73X9yiuYQ+HZvWI+Mqojt9frte32JA=; b=tNTHQSCXFTdP0jAVyUHpGvZ28ut/djebyyEriPg0pIsj0YhawzN50x1NS4Ysyqenus 99hgdGULayvUCGczjktxervZsWUqsNpPwvf8qrydrYnd5yHoo4mVt+DdhDkQr9y1KqAC Q4+QETj3c0I30K5sbwPFthPflqNI1ZGrZCSZl2OH2Get9x0U6Xigezq/z3tt6R29gpPi gvl/xmxC5SAcs0T7KUvJHbupptYyrTZnkhDuGdoGHbLWswO/E1sQ9FQkiFygASCeW1s2 th0gN9eRSpIlv5IQuhBy1bqDXz0LhNenSiPCx5CAyHmGCuCzF1enGodqKocCnI3ho/ne 64Ww== 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 r2si2928388ejj.90.2019.10.10.05.59.24; Thu, 10 Oct 2019 05:59:49 -0700 (PDT) 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 S2387800AbfJJM5B (ORCPT + 99 others); Thu, 10 Oct 2019 08:57:01 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:37664 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733300AbfJJM5B (ORCPT ); Thu, 10 Oct 2019 08:57:01 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1iIY01-0001u3-P0; Thu, 10 Oct 2019 23:56:58 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 10 Oct 2019 23:56:53 +1100 Date: Thu, 10 Oct 2019 23:56:53 +1100 From: Herbert Xu To: Ayush Sawal Cc: linux-crypto@vger.kernel.org, smueller@chronox.de, Atul Gupta Subject: Re: [af_alg v2] crypto:af_alg cast ki_complete ternary op to int Message-ID: <20191010125653.GH31566@gondor.apana.org.au> References: <20191004175058.11850-1-ayush.sawal@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191004175058.11850-1-ayush.sawal@chelsio.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Oct 04, 2019 at 10:50:58AM -0700, Ayush Sawal wrote: > when libkcapi test is executed using HW accelerator, cipher operation > return -74.Since af_alg_async_cb->ki_complete treat err as unsigned int, > libkcapi receive 429467222 even though it expect -ve value. > > Hence its required to cast resultlen to int so that proper > error is returned to libkcapi. > > AEAD one shot non-aligned test 2(libkcapi test) > ./../bin/kcapi -x 10 -c "gcm(aes)" -i 7815d4b06ae50c9c56e87bd7 > -k ea38ac0c9b9998c80e28fb496a2b88d9 -a > "853f98a750098bec1aa7497e979e78098155c877879556bb51ddeb6374cbaefc" > -t "c4ce58985b7203094be1d134c1b8ab0b" -q > "b03692f86d1b8b39baf2abb255197c98" > > Signed-off-by: Ayush Sawal > Signed-off-by: Atul Gupta > Signed-off-by: Herbert Xu > > v1: cast err and resultlen to long > Signed-off-by: Ayush Sawal > --- > crypto/af_alg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt