From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 002AAC432C3 for ; Thu, 28 Nov 2019 16:50:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C85D42178F for ; Thu, 28 Nov 2019 16:50:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Bpp6QlgD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KXOTFhYW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C85D42178F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=1gwxzXZbUvwOtFe813YgreR5MR1y40XbCI546Q0aKrA=; b=Bpp6QlgDgvKkPDsQSZuG+5CSLz abSR6z5JEAqYkpZD/eG9nB+LUzZbxz95e9NkEgFdCPOLqV57iiJJZteK1euXBBbhcGTIm9ziIcw5b HhXmWYWzB9p2BxtEMjqW8mJKnOgfyOtQobyOE8YmTLy/0ffzDv7ruRkcvJrdUfuZvT1YqTwSkjDwg pbzMOOCHeAgm3hWOfNZ+xP6PV0J5oIP5IyXtODLizQIae7AooVRix5lzV9et3CS4+nhpEvNZHyC6z luHpwBQOMqOGdd0Jt07QM6n7ewO3SaiU7ZvSPVPbbK0CMdn03CZBuFN1sWgwn427Kh1aioRSlItwA GlEavqyQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaN0B-00055j-VR; Thu, 28 Nov 2019 16:50:47 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iaMza-0003yn-Fq for linux-arm-kernel@lists.infradead.org; Thu, 28 Nov 2019 16:50:12 +0000 Received: by mail-pf1-x442.google.com with SMTP id y206so4752998pfb.0 for ; Thu, 28 Nov 2019 08:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jEs6QE+VfGFRlxMX16dTWWCBFFIHacBUeuklTX9eehk=; b=KXOTFhYW31M6DowFuVSnZZCtoVs9n/0m0NvfFFZd/SJgu5toTz3abL8mMkd78Ce33g jS4H5Xas4NpISrNogQilOVf2XtLcQFgi241JW6pdGzS9mAe1TpFBHF4dIwqlW2YBDkHi LcwZVULYkgOFnRsBSM5zGwnGB+uoPXjd8zsDy9LydhztAqwlpMUZBUjtnbLpM9/eZcPm B55+nvIbQgZJi8R9mKUwalRDzBnjtNK9Mow4lfWl94dyekaSG6aLvasftGqFRfTwvjev 4w2+wCx0fHYT80fgo1kSm6hUHDAFw5HJI/3UXjlz4QSPSaylm0almF6B7yg9RP1vvNF5 FDwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jEs6QE+VfGFRlxMX16dTWWCBFFIHacBUeuklTX9eehk=; b=aZylNfgIHRFvyzOtKQXAKH/c9NmYfNsZ3Yrx2FIpq7vFsBrhLOFdeseaoS2g5hVmw6 yVw92WAOI4G0gF5inLQtcdB1z5wzvcX1IuIVK0f2K7EaCrdUMAaJpVg1FRv0c8hozEKf NGNPIAL7KRjM9Gv3Z3aUDLW4NGmYE6f0lrQz9YRsx6tDGjZMVnWvQIx2QPAHuFvKX0oL KZUMNn21aRnviBSVyBZB/DBAFAXvKJaHQsoEW47S64vYF3IzDa5VfAGneQMUQTvsxJTt nU60/9Bjcb6QxhVZr1fHb3BgTp25yCCHa6sD/1lBsi9vA6DLAdYA+Aa2tMwRMjgd9NW+ zJEA== X-Gm-Message-State: APjAAAW3ewzyaLYASLXWn8Dn1UwhxoV1iSJ1dkwJYju8DX2aMKtmE6df kBXWSE0j+7TTIITC+S/lVb5wtQ== X-Google-Smtp-Source: APXvYqx8Qk2Of+BXuSVm+sEuntEca3roAUMLg6UeXFFjMVrolEG4T3O608o00roYtbf9Fj0Zeo7MNA== X-Received: by 2002:a63:e03:: with SMTP id d3mr6794337pgl.395.1574959806302; Thu, 28 Nov 2019 08:50:06 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id a15sm2450343pfh.169.2019.11.28.08.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 08:50:05 -0800 (PST) From: Mathieu Poirier To: stable@vger.kernel.org Subject: [stable 4.19][PATCH 02/17] crypto: stm31/hash - Fix hmac issue more than 256 bytes Date: Thu, 28 Nov 2019 09:49:47 -0700 Message-Id: <20191128165002.6234-3-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128165002.6234-1-mathieu.poirier@linaro.org> References: <20191128165002.6234-1-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191128_085010_548969_1D1CB0C1 X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lionel Debieve commit 0acabecebc912b3ba06289e4ef40476acc499a37 upstream Correct condition for the second hmac loop. Key must be only set in the first loop. Initial condition was wrong, HMAC_KEY flag was not properly checked. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu Cc: stable # 4.19 Signed-off-by: Mathieu Poirier --- drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index 590d7352837e..641b11077f47 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -365,7 +365,7 @@ static int stm32_hash_xmit_cpu(struct stm32_hash_dev *hdev, return -ETIMEDOUT; if ((hdev->flags & HASH_FLAGS_HMAC) && - (hdev->flags & ~HASH_FLAGS_HMAC_KEY)) { + (!(hdev->flags & HASH_FLAGS_HMAC_KEY))) { hdev->flags |= HASH_FLAGS_HMAC_KEY; stm32_hash_write_key(hdev); if (stm32_hash_wait_busy(hdev)) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel