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=-6.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 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 8EE46C3815B for ; Wed, 15 Apr 2020 11:07:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FEF120775 for ; Wed, 15 Apr 2020 11:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586948877; bh=ydZM5ZQd6L4FCHeqlO1xxm08ORMrOyUIgOLdCccTo/k=; h=Subject:To:Cc:From:Date:List-ID:From; b=ZyxOsMJcHGDptHJCxntQo3qm0ThA2MnsUGzgWI5YwOh2T5AqgBeKUpk40ydjmc1Kf e3KHAmqjAGx67Z6HcAO3lhp4atTtgDP8/V43mLj5lXrxtkiR8CWNfMoEuGwiPtSw9u MZYRsKEaEDbz6+LIO4/fDOvjAOdO8dpvAomHOpoU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393927AbgDOLH4 (ORCPT ); Wed, 15 Apr 2020 07:07:56 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34849 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2896746AbgDOLHd (ORCPT ); Wed, 15 Apr 2020 07:07:33 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D3A1F5C01AF; Wed, 15 Apr 2020 07:07:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 15 Apr 2020 07:07:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=eHY83M 5xMzh0xJSTG7VFr7VDQjAVYKtcIWuJE8uZ/Ho=; b=GkO2HO8a8ns0lpTUUM9Kp/ J9UWiJS2fwYHkPRMqzcbqourVG7pTFiU6xypJPlXKv9WeHrMCPmf/uqV7Lng4gcF HRAj2jZfArYsIShgRhUkG6m0xV6gPnkNMec/5fcHuZpK5TZ0ZZImS1jaFkvcspHc 1PF/f+rUPq1PqzK3GwcbkwJEdxc5wBA7NAQMKQHmDRATY5kC1pEEOAxgMiJqEhYe Ca5HY3WHnOFs3dUth79A9SWpHCcTFOS9dz+OtyKLGobRqEcEpA29Q9w16RRALOrV Lz9TBwCWMtR70FkC/XKhuysbBZ8tUqf+Nq+Dd4WrWAVyqpnoH/31V6f00XPnZu/g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfeefgddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucfkphepkeefrdekiedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgepuddtne curfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 6EBFD328005E; Wed, 15 Apr 2020 07:07:29 -0400 (EDT) Subject: FAILED: patch "[PATCH] crypto: ccree - dec auth tag size from cryptlen map" failed to apply to 4.19-stable tree To: gilad@benyossef.com, geert+renesas@glider.be, herbert@gondor.apana.org.au Cc: From: Date: Wed, 15 Apr 2020 13:07:27 +0200 Message-ID: <1586948847250254@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 8962c6d2c2b8ca51b0f188109015b15fc5f4da44 Mon Sep 17 00:00:00 2001 From: Gilad Ben-Yossef Date: Sun, 2 Feb 2020 18:19:14 +0200 Subject: [PATCH] crypto: ccree - dec auth tag size from cryptlen map Remove the auth tag size from cryptlen before mapping the destination in out-of-place AEAD decryption thus resolving a crash with extended testmgr tests. Signed-off-by: Gilad Ben-Yossef Reported-by: Geert Uytterhoeven Cc: stable@vger.kernel.org # v4.19+ Tested-by: Geert Uytterhoeven Signed-off-by: Herbert Xu diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drivers/crypto/ccree/cc_buffer_mgr.c index 885347b5b372..954f14bddf1d 100644 --- a/drivers/crypto/ccree/cc_buffer_mgr.c +++ b/drivers/crypto/ccree/cc_buffer_mgr.c @@ -894,8 +894,12 @@ static int cc_aead_chain_data(struct cc_drvdata *drvdata, if (req->src != req->dst) { size_for_map = areq_ctx->assoclen + req->cryptlen; - size_for_map += (direct == DRV_CRYPTO_DIRECTION_ENCRYPT) ? - authsize : 0; + + if (direct == DRV_CRYPTO_DIRECTION_ENCRYPT) + size_for_map += authsize; + else + size_for_map -= authsize; + if (is_gcm4543) size_for_map += crypto_aead_ivsize(tfm);