Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2125551pxb; Sun, 18 Apr 2021 20:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG6Yak7u9poo0moG8LcF6q2Lkx17q6o1BFxJNytE+XhXHtkjQ25B8X9360z8tvfJZ6kzMb X-Received: by 2002:a63:687:: with SMTP id 129mr9519485pgg.17.1618801362294; Sun, 18 Apr 2021 20:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618801362; cv=none; d=google.com; s=arc-20160816; b=cHwL+6bQDAZPGFc0qCh8XYR/psUDE0rq2yIIvFUwd88Qn4XSceLkKaBs85ZTKX517B jdjOkeo8DRCEPxGqFjhFiRXB0350+G5XfVIiNNdPi2iPLH3UEgSwu3UvNsuCJNDBx+z4 NktTv7aAZp3OjqJbHggS3nripejlaysv0M44eQFYqmCzRUlJa91+V+vg4Q9n2AfpwMjo hLqRYG2JwW44riXNAMQjP8Mh1Z6lN1QKnE1MkibtQ6N6lVb8TMEE5/4qOnH/cocXWDm2 sTQmGFyrL94wilO49iYESRhfQ1wcmYJ1C0aFuW1lOOh2k8L7xrtXWA02xlHuKjKXiEiT ZmxQ== 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:dkim-signature; bh=7wC8QKTZ9xEtfwhjX+LEpEPMChmLBOlIJZB30u0tbsA=; b=gSPxF2uPmQftKyMiuPVHaBUeyorPoGU9279y2O+HdOmI5S8cd6rjE5NHq05+7TKDfG 9lhWolydQiQAeY/cTfi+6cJIvsKImmnNYMuvvJ9FGbDaeDQ7BDJlqohOa4eZgPsrp4mM f/x4O1Y2tHgNuYUJ32pZTbgiFDhbKo4yyQHKX+KqUWJoD87ZrL29yP7TjRS5DeK7evtV XOoOc1ddIjprI+vfTvKk2ZwsTQwG/VYZN4IUebDdUTcAIh/w4yE0t99Lxwu2RuLG0Ly/ vmnPMUaEq0n8r/6pUHJ7aAU+3+VYIJz/qQt85NFpLnGhHLB8XWuYwKESjIvMmT6V4sFc p0OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uvdz1wJB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si17565658pff.157.2021.04.18.20.02.18; Sun, 18 Apr 2021 20:02:42 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Uvdz1wJB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237316AbhDSDCo (ORCPT + 99 others); Sun, 18 Apr 2021 23:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237256AbhDSDCn (ORCPT ); Sun, 18 Apr 2021 23:02:43 -0400 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83648C061761 for ; Sun, 18 Apr 2021 20:02:14 -0700 (PDT) Received: by mail-ot1-x32f.google.com with SMTP id e89-20020a9d01e20000b0290294134181aeso5504544ote.5 for ; Sun, 18 Apr 2021 20:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7wC8QKTZ9xEtfwhjX+LEpEPMChmLBOlIJZB30u0tbsA=; b=Uvdz1wJBOBjBaXaPv6ZIzSTvt21UnnYo9XTaOjEIipgENy1+TkdxAELnu9I11RV3xM ewyJmzytDcNgT0mul+pu7uItN8CdSU0E/OjJl+I1o6I5xYNGRQoBoeBNB83BaTVFo4L9 mLIzUbdEVt9YMoHLINVWGKECJeFo0k69soG2KxlBR9CwMULm/A3kbLuWd2+If5kXjRr+ t/xurUh2hYvGMqSksLyPOOSJaTNb5C3T1u1z/7L9O8d2Dt8DaWMXmPsucKpdiqutgbKo MhqqRyVCR9Bs2wQ4VdiUebeSUJiRI5x2zoqDKcfc0YLZlL5YwGJ0eVaiTZ0ZBk5n6L2o 1wAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7wC8QKTZ9xEtfwhjX+LEpEPMChmLBOlIJZB30u0tbsA=; b=mP09Vjl9ofgi8XkpOLFieztezUlBxvVSP4snzAWZrZoIOHIswxcSUminelfwX1YLcf 5JL3TdMv9qwLhepcvjMK/0WAzLTf7iybjexnPyBbbQLVEckngG/VPDmBP7jSLk+1hsSG 6BazhYoccDy23Nj3PYTihJBDSvwWOFHqqpUThOFzw4QgT0Fuo/pMAZHg6OPMycVZge9T HXEAERE4lmC+3uhdPcmy1OoJ3QhKIB+SUPa75joypEYtq24hR53rNOsQai/Uu2szqdHp Aq5sKKG/0fOUtVnK9O+dD8K/A+PfmpQxTHb2AC9MzGNf0pkSZnxkSTCAgt0fCos4mWF1 qMTg== X-Gm-Message-State: AOAM531a13i0HYz7WfI4uo2MYcHTviR/HZoQsWTBYpr/iuOgkeHvJ7cg yesx33ctuMQqvVzL7G5n+noNuA== X-Received: by 2002:a9d:5541:: with SMTP id h1mr12472367oti.246.1618801333755; Sun, 18 Apr 2021 20:02:13 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id a6sm2863108oiw.44.2021.04.18.20.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 20:02:13 -0700 (PDT) Date: Sun, 18 Apr 2021 22:02:11 -0500 From: Bjorn Andersson To: Thara Gopinath Cc: herbert@gondor.apana.org.au, davem@davemloft.net, ebiggers@google.com, ardb@kernel.org, sivaprak@codeaurora.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [Patch v2 1/7] crypto: qce: common: Add MAC failed error checking Message-ID: <20210419030211.GI1538589@yoga> References: <20210417132503.1401128-1-thara.gopinath@linaro.org> <20210417132503.1401128-2-thara.gopinath@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210417132503.1401128-2-thara.gopinath@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat 17 Apr 08:24 CDT 2021, Thara Gopinath wrote: > MAC_FAILED gets set in the status register if authenthication fails > for ccm algorithms(during decryption). Add support to catch and flag > this error. > Reviewed-by: Bjorn Andersson Regards, Bjorn > Signed-off-by: Thara Gopinath > --- > > v1->v2: > - Split the error checking for -ENXIO and -EBADMSG into if-else clause > so that the code is more readable as per Bjorn's review comment. > > drivers/crypto/qce/common.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/crypto/qce/common.c b/drivers/crypto/qce/common.c > index dceb9579d87a..dd76175d5c62 100644 > --- a/drivers/crypto/qce/common.c > +++ b/drivers/crypto/qce/common.c > @@ -419,6 +419,8 @@ int qce_check_status(struct qce_device *qce, u32 *status) > */ > if (*status & STATUS_ERRORS || !(*status & BIT(OPERATION_DONE_SHIFT))) > ret = -ENXIO; > + else if (*status & BIT(MAC_FAILED_SHIFT)) > + ret = -EBADMSG; > > return ret; > } > -- > 2.25.1 >