From patchwork Sun Sep 15 21:02:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 11146151 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03BAF1746 for ; Sun, 15 Sep 2019 21:02:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4DE5206A4 for ; Sun, 15 Sep 2019 21:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568581355; bh=dbglPfhWeKuOJlRsHFa9I8fePXi1fCBsiP5NhIZ89SI=; h=Date:From:To:Cc:Subject:List-ID:From; b=kiSgDi9mVvnnhVQ6zcaaBTwNV1UWO2aSSxIsKnZsMBTX3eZTulsGZQUUYFCzPr19e xnHtQwZCwovhYksc2MYOCNSqCgqr/gbibr8DjrcCtR7gD6tSnPPMn9+AQZwZUKmONM QL7WkEwvDNY/25ygVIrv93sQ+/lN8G9SDovH/soM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728216AbfIOVCb (ORCPT ); Sun, 15 Sep 2019 17:02:31 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:38324 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbfIOVCb (ORCPT ); Sun, 15 Sep 2019 17:02:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aOYuSu+DysqaW6OXxGQc9xt8yb25q+4i2GsEgLjhPMI=; b=ZyxjqBwGWVC28mUC0xW/yBaQX Iv8Z1xz5It1/J6NkB5fXulwtEsvShqpJsXBExvzOf9b0I1QX3ZNhTM0wWJl/05mmnXJDuNSPPLPQR qTlViTmxFUWxigrWn9wb8ZQMcVfTZI+zjFXLRTRf0ovdeBJHUaBq9nbhK1nXR4qtLJVSU=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i9bf7-0001NN-TA; Sun, 15 Sep 2019 21:02:25 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 062AD27415FF; Sun, 15 Sep 2019 22:02:24 +0100 (BST) Date: Sun, 15 Sep 2019 22:02:24 +0100 From: Mark Brown To: Ard Biesheuvel , Harald Freudenberger , Vasily Gorbik , Herbert Xu , Linux Crypto List Cc: Linux Next Mailing List , Linux Kernel Mailing List Subject: linux-next: manual merge of the crypto tree with the s390 tree Message-ID: <20190915210224.GG4352@sirena.co.uk> MIME-Version: 1.0 Content-Disposition: inline X-Cookie: Man and wife make one fool. 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 Hi all, Today's linux-next merge of the crypto tree got a conflict in: arch/s390/crypto/aes_s390.c between commit: 9e323d45ba94262 ("s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding") from the s390 tree and commit: ce68acbcb6a5d5d ("crypto: s390/xts-aes - invoke fallback for ciphertext stealing") from the crypto tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. +++ b/arch/s390/crypto/aes_s390.c @@@ -586,10 -586,7 +586,10 @@@ static int xts_aes_encrypt(struct blkci struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm); struct blkcipher_walk walk; + if (!nbytes) + return -EINVAL; + - if (unlikely(!xts_ctx->fc)) + if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0)) return xts_fallback_encrypt(desc, dst, src, nbytes); blkcipher_walk_init(&walk, dst, src, nbytes); @@@ -603,10 -600,7 +603,10 @@@ static int xts_aes_decrypt(struct blkci struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm); struct blkcipher_walk walk; + if (!nbytes) + return -EINVAL; + - if (unlikely(!xts_ctx->fc)) + if (unlikely(!xts_ctx->fc || (nbytes % XTS_BLOCK_SIZE) != 0)) return xts_fallback_decrypt(desc, dst, src, nbytes); blkcipher_walk_init(&walk, dst, src, nbytes); diff --cc arch/s390/crypto/aes_s390.c index 6d2dbb5089d5c,d4f6fd42a1050..0000000000000 --- a/arch/s390/crypto/aes_s390.c