Message ID | 20230110135042.2940847-13-vincent.whitchurch@axis.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2759250wrt; Tue, 10 Jan 2023 05:57:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXvCbg+zd2IYaa23F5NebUACcjoSsS7grXQNIrOSWBiQ2+5erB/rFQ54HQ3LB6o3D4WQ6pxj X-Received: by 2002:a05:6a20:d817:b0:ad:58d4:2a7a with SMTP id iv23-20020a056a20d81700b000ad58d42a7amr86197492pzb.22.1673359045503; Tue, 10 Jan 2023 05:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673359045; cv=none; d=google.com; s=arc-20160816; b=HlWR7y/Pj31FIJqW67adG/wOZjobB4F70adlxuwQ6eeNPS3wpalfjmo2sU+Ea3MHXw 9Xhe8IwMuO5ruX58q0ldXpw84uSusSdpIoCOrgO0vdGUB8qSF5NkXtj637d8xtr3PV+T zYnPMBuis+FDB4iU0+6GGvmIJ7ImR8gKPlgiXJuAjxofxNxuKHl03YmCE/xbValYVKK+ ozHOLAOF2q92nK77EcsSHSo1wew5+bS0UUBxAXsVCeIeafS3uRNmhv6QZyBsOWyM7Wr6 7G7sUE77rkAiKGYMhd/w5pN/o2P5gSvF1oUaI6AXMPTjLkQjknVRbkenSsWPKYKVLUc/ ZCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0o6C4Z0fqkBE+QbzIuVUWhJF6tXZkBBn8amIrYpgsE4=; b=e6Dio/3QPNfJp6yjyAQxtHOhouPsZKEnaO2Ad0HcFBUzD7yYmhfbCanbFlizeVLz1e 92sUJKovnpRuC3LANYfbLqZajJ20LpsdlTMKkzduJvclSXfLTgpqv3KdQjgUI96MoH9O Yge3OhON3E4CXG4/pR/a79ZPjSK0+Ac6l5oDLExzWEXQ/yypgDAkEOp8aMxIqBpoGfcO lCU4opip6eJnUzVbDehNb4jxq7wmpd9TgL0QNiiW7cECQnExqdqpAoA3c4TNSndU1pIY 9SL3f8PrrFG9Ul0+pzjHAgn7grsRlO+prsNsMUS1qPDNDs4twcSU+8Cj+v4SihsNZYqB TzbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=eKXy+xQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n23-20020a637217000000b00477ffa1aaf7si13237750pgc.50.2023.01.10.05.57.13; Tue, 10 Jan 2023 05:57:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=eKXy+xQV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238310AbjAJNvx (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Tue, 10 Jan 2023 08:51:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238381AbjAJNvE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Jan 2023 08:51:04 -0500 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2661138AEC; Tue, 10 Jan 2023 05:50:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1673358661; x=1704894661; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0o6C4Z0fqkBE+QbzIuVUWhJF6tXZkBBn8amIrYpgsE4=; b=eKXy+xQVwCBCX6t2xBW3l2KdBQ6wmn9gCPW25aAMe2t1SLCJ6kzTAOAD iVd+MBXn+/oYxP2zkvpmujAE/4+37pDG82jFXVchoWEIp/xbENNOHRo8S xUvK0EYLvRTGwTVX1pKyQ0wEnoxMXFSSWCtBBcx5Oy3RGLSX22Do+RePz sHp+shW1c6MLddkqVL2UNYhNUOkcC80tc9xHAilqSS11UIHcLX7K4m+Za +I/8CDbq66mQyrkjlJ5YTXxv++hGiVYJyu4upslD6EDIRFkLdrVS6hstx yeh1OhLe5yVyd5F/k3IT5sW3nNCsLTB/axmdDcIvpKkdKH/C8jVPsWp+R g==; From: Vincent Whitchurch <vincent.whitchurch@axis.com> To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>, <jesper.nilsson@axis.com>, <lars.persson@axis.com> CC: <kernel@axis.com>, Vincent Whitchurch <vincent.whitchurch@axis.com>, <linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH 12/12] crypto: axis - allow small size for AEAD Date: Tue, 10 Jan 2023 14:50:42 +0100 Message-ID: <20230110135042.2940847-13-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230110135042.2940847-1-vincent.whitchurch@axis.com> References: <20230110135042.2940847-1-vincent.whitchurch@axis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754644134148503096?= X-GMAIL-MSGID: =?utf-8?q?1754644134148503096?= |
Series |
crypto: axis - make tests pass
|
|
Commit Message
Vincent Whitchurch
Jan. 10, 2023, 1:50 p.m. UTC
Allow sizes smaller than the AES block size to fix this failure with
CRYPTO_MANAGER_EXTRA_TESTS:
alg: aead: artpec-gcm-aes decryption failed on test vector "random:
alen=0 plen=1 authsize=4 klen=32 novrfy=0"; expected_error=0,
actual_error=-22, cfg="random: inplace_one_sglist may_sleep use_final
src_divs=[<reimport>9.71%@+778, <flush>23.43%@+2818, 52.69%@+6,
<flush>11.98%@+1030, 2.19%@+3986] iv_offset=40 key_offset=32"
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
---
drivers/crypto/axis/artpec6_crypto.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index 938faf3afa69..b6fa2af42cd0 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -1452,8 +1452,6 @@ static int artpec6_crypto_aead_decrypt(struct aead_request *req) struct artpec6_crypto_aead_req_ctx *req_ctx = aead_request_ctx(req); req_ctx->decrypt = true; - if (req->cryptlen < AES_BLOCK_SIZE) - return -EINVAL; ret = artpec6_crypto_common_init(&req_ctx->common, &req->base,