From patchwork Mon Nov 16 12:12:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 56585 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1278842lbb; Mon, 16 Nov 2015 04:15:04 -0800 (PST) X-Received: by 10.66.252.129 with SMTP id zs1mr33701550pac.59.1447676101837; Mon, 16 Nov 2015 04:15:01 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id yn2si50389686pbb.236.2015.11.16.04.15.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2015 04:15:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyIex-0007Xa-Gz; Mon, 16 Nov 2015 12:13:23 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyIes-0007HF-LE for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2015 12:13:19 +0000 Received: by wmdw130 with SMTP id w130so108132780wmd.0 for ; Mon, 16 Nov 2015 04:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=5AThYeDAgD47ltXic/xP6VVYqXgsRAp/mrGHmiEnJ7E=; b=JptWKdyW237edaMM0QoUoW5xPzcESjtU2IZGL+DyUgOE8ezGocErDlYlR6VX5FNuT7 1WCqzB6saTsa/cXyvHHmB78Ty27TTSSzP9m14yNR5XpO2y/7YirjDGlIGOtpeghq96QN VTDRznEIr3+Pv+GhjCQagfVRUEO7YpKUn9Gef0IJk2Q2mqjiIsRwwFn43+1OruDnIrXs 4ZlO51mMFABahvxxfPAp5Wro+HU0i+OOJp4qJksFVlyXX4/L5gKiEFAwSYgz3YO2lFBZ KhfCyyoa0guslf28YsdChfIOxpLesN+TCoKJG0wCrpYbIg4fOpuMwZagzN14UgVRAUr0 z8NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5AThYeDAgD47ltXic/xP6VVYqXgsRAp/mrGHmiEnJ7E=; b=LOOz/4C7+d9+p2WjZmvmSmVdyUDzV8SPje8nBu0eRcgwp/ehaVUvnH7Pck12Asr1jc E49mHvq0N3yhpM8MhREi1nFwW/bw2qVeGpFLCMUr56w3XfcQn+lIuwB8f70TDOFuGSQX YNmRPOirkiu+mbp49yYyvvWcjMsweaA34t1/K73GKDWUsvqKpAGr00rBdjhxebkNIqNo E9rmB6Qr4HSJPBoEQA7MofYaEO8cCXPPTkflSJR74jC6ba+GOu7MDgvLuQqWi95mMknz xMIyoW25NmSsfpHAZ3ir4m30Fmikl7JCMnfWciW1k+EXg+1tmcf4LSDiLNqCtwYYMO5g rCYw== X-Gm-Message-State: ALoCoQlzrprupoCjJ5NtQJrwYlm1ehxZuYyVwa5ALlZvXxCI76wf/PicVnic7hAZzD8ZuvLIhs5y X-Received: by 10.28.182.11 with SMTP id g11mr19406282wmf.42.1447675976997; Mon, 16 Nov 2015 04:12:56 -0800 (PST) Received: from localhost.localdomain ([47.53.155.123]) by smtp.gmail.com with ESMTPSA id ft4sm34187032wjb.37.2015.11.16.04.12.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Nov 2015 04:12:56 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH] arm64: crypto: reduce priority of core AES cipher Date: Mon, 16 Nov 2015 13:12:48 +0100 Message-Id: <1447675968-21991-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151116_041318_861773_32B612FD X-CRM114-Status: GOOD ( 12.01 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The asynchronous, merged implementations of AES in CBC, CTR and XTS modes are preferred when available (i.e., when instantiating ablkciphers explicitly). However, the synchronous core AES cipher combined with the generic CBC mode implementation will produce a 'cbc(aes)' blkcipher that is callable asynchronously as well. To prevent this implementation from being used when the accelerated asynchronous implemenation is also available, lower its priority to 250 (i.e., below the asynchronous module's priority of 300). Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/aes-ce-cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/crypto/aes-ce-cipher.c b/arch/arm64/crypto/aes-ce-cipher.c index ce47792a983d..f7bd9bf0bbb3 100644 --- a/arch/arm64/crypto/aes-ce-cipher.c +++ b/arch/arm64/crypto/aes-ce-cipher.c @@ -237,7 +237,7 @@ EXPORT_SYMBOL(ce_aes_setkey); static struct crypto_alg aes_alg = { .cra_name = "aes", .cra_driver_name = "aes-ce", - .cra_priority = 300, + .cra_priority = 250, .cra_flags = CRYPTO_ALG_TYPE_CIPHER, .cra_blocksize = AES_BLOCK_SIZE, .cra_ctxsize = sizeof(struct crypto_aes_ctx),