Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1579641pxb; Mon, 8 Mar 2021 00:42:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgahO7+XEwqoaRodAHmqtlrdZ85W6oh7+WAR7+/fI+LfUXZfhU7IDg8KI4FiL623UwzhHA X-Received: by 2002:a17:906:a090:: with SMTP id q16mr13853120ejy.236.1615192971068; Mon, 08 Mar 2021 00:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615192971; cv=none; d=google.com; s=arc-20160816; b=zrC3cirz+o9vWUe3PNHmEaDGYXLDuBddHnAc6kNzurWQmA6FXHvze+ZvzhSwyOHABl UL7m+fQHRnAH+Jy8Ez/Z+Dm6M1zg/9hO3w0qqmaFINQfASyr10OoE44hcqsPwoDbKHTA mnIX9Luxc6G7VLKeQ44SoiMmt1mcUEtwfFczKf9rRlF3kbD3PeKC2dBK1Rbzjl2cb17a B4n6RSJC8qTvH+01jZQJfyKEWFMLKfdzneqVPz0JRaBtPxk8R5tXmyThAr3IgyJezuiH 7x7GFtlafzEjaPLVdUcOh+j2BSLPp97rm6K1rLB8ygPnG157UZyZF50jSMg5skJNtXN3 0dyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6H9bKBRSgTzwqV1qwc23qlNXla4DG53Q8VsQfLNSypk=; b=SpfREm+9LBnDFQowyv72imA/LrD0cnd5vscFkYy0Iqx6dn5koKDZcZrRUSdWWhJrNi hBVzR/8viv2JxxB8kww2nhWfzWYk9+qnZ2B2CENGugy0s9Siu5Lw4uVtgzfU/m96n65a HOVty9/R6AhAccTOemQtIBorREme0SKLOrAgnuSPlTsqBKe6xPAetnT6lC7MRLAIMbvD k8c76RXFHyQFbDpKEFq8ij1szTmBWC8hWIfJxf/lwD6DJqSJAFGN2foMsIl3mfpdh5qh Jn0uR2ADNpDy8WucmUzmk3Koy1+WHjOj1V2lhZ7wHx0MKIItHa/PVVSsOVkvlBTaPM+e NoiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si6598315ejh.95.2021.03.08.00.42.22; Mon, 08 Mar 2021 00:42:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234592AbhCHFmD (ORCPT + 99 others); Mon, 8 Mar 2021 00:42:03 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:47200 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234459AbhCHFlq (ORCPT ); Mon, 8 Mar 2021 00:41:46 -0500 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lJ8e4-00015E-AL; Mon, 08 Mar 2021 16:41:33 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Mon, 08 Mar 2021 16:41:32 +1100 Date: Mon, 8 Mar 2021 16:41:32 +1100 From: Herbert Xu To: kernel test robot Cc: Ard Biesheuvel , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Ondrej Mosnacek , Linux Crypto Mailing List Subject: [PATCH] crypto: aegis128 - Move simd prototypes into aegis.h Message-ID: <20210308054132.GA14854@gondor.apana.org.au> References: <202102280353.5krQC7aq-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202102280353.5krQC7aq-lkp@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sun, Feb 28, 2021 at 03:14:55AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4 > commit: a4397635afea5d127548d64e0055ed471ef2d5be crypto: aegis128 - provide a SIMD implementation based on NEON intrinsics > date: 1 year, 6 months ago > config: arm64-randconfig-r035-20210226 (attached as .config) > compiler: aarch64-linux-gcc (GCC) 9.3.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4397635afea5d127548d64e0055ed471ef2d5be > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git fetch --no-tags linus master > git checkout a4397635afea5d127548d64e0055ed471ef2d5be > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > >> crypto/aegis128-neon.c:17:6: warning: no previous prototype for 'crypto_aegis128_have_simd' [-Wmissing-prototypes] > 17 | bool crypto_aegis128_have_simd(void) > | ^~~~~~~~~~~~~~~~~~~~~~~~~ ---8<--- This patch fixes missing prototype warnings in crypto/aegis128-neon.c. Fixes: a4397635afea ("crypto: aegis128 - provide a SIMD...") Reported-by: kernel test robot Signed-off-by: Herbert Xu diff --git a/crypto/aegis.h b/crypto/aegis.h index 6920ebe77679..6ef9c174c973 100644 --- a/crypto/aegis.h +++ b/crypto/aegis.h @@ -21,9 +21,28 @@ union aegis_block { u8 bytes[AEGIS_BLOCK_SIZE]; }; +struct aegis_state; + +extern int aegis128_have_aes_insn; + #define AEGIS_BLOCK_ALIGN (__alignof__(union aegis_block)) #define AEGIS_ALIGNED(p) IS_ALIGNED((uintptr_t)p, AEGIS_BLOCK_ALIGN) +bool crypto_aegis128_have_simd(void); +void crypto_aegis128_update_simd(struct aegis_state *state, const void *msg); +void crypto_aegis128_init_simd(struct aegis_state *state, + const union aegis_block *key, + const u8 *iv); +void crypto_aegis128_encrypt_chunk_simd(struct aegis_state *state, u8 *dst, + const u8 *src, unsigned int size); +void crypto_aegis128_decrypt_chunk_simd(struct aegis_state *state, u8 *dst, + const u8 *src, unsigned int size); +int crypto_aegis128_final_simd(struct aegis_state *state, + union aegis_block *tag_xor, + unsigned int assoclen, + unsigned int cryptlen, + unsigned int authsize); + static __always_inline void crypto_aegis_block_xor(union aegis_block *dst, const union aegis_block *src) { diff --git a/crypto/aegis128-core.c b/crypto/aegis128-core.c index 89dc1c559689..c4f1bfa1d04f 100644 --- a/crypto/aegis128-core.c +++ b/crypto/aegis128-core.c @@ -58,21 +58,6 @@ static bool aegis128_do_simd(void) return false; } -bool crypto_aegis128_have_simd(void); -void crypto_aegis128_update_simd(struct aegis_state *state, const void *msg); -void crypto_aegis128_init_simd(struct aegis_state *state, - const union aegis_block *key, - const u8 *iv); -void crypto_aegis128_encrypt_chunk_simd(struct aegis_state *state, u8 *dst, - const u8 *src, unsigned int size); -void crypto_aegis128_decrypt_chunk_simd(struct aegis_state *state, u8 *dst, - const u8 *src, unsigned int size); -int crypto_aegis128_final_simd(struct aegis_state *state, - union aegis_block *tag_xor, - unsigned int assoclen, - unsigned int cryptlen, - unsigned int authsize); - static void crypto_aegis128_update(struct aegis_state *state) { union aegis_block tmp; diff --git a/crypto/aegis128-neon.c b/crypto/aegis128-neon.c index 94d591a002a4..a7856915ec85 100644 --- a/crypto/aegis128-neon.c +++ b/crypto/aegis128-neon.c @@ -30,7 +30,7 @@ bool crypto_aegis128_have_simd(void) return IS_ENABLED(CONFIG_ARM64); } -void crypto_aegis128_init_simd(union aegis_block *state, +void crypto_aegis128_init_simd(struct aegis_state *state, const union aegis_block *key, const u8 *iv) { @@ -39,14 +39,14 @@ void crypto_aegis128_init_simd(union aegis_block *state, kernel_neon_end(); } -void crypto_aegis128_update_simd(union aegis_block *state, const void *msg) +void crypto_aegis128_update_simd(struct aegis_state *state, const void *msg) { kernel_neon_begin(); crypto_aegis128_update_neon(state, msg); kernel_neon_end(); } -void crypto_aegis128_encrypt_chunk_simd(union aegis_block *state, u8 *dst, +void crypto_aegis128_encrypt_chunk_simd(struct aegis_state *state, u8 *dst, const u8 *src, unsigned int size) { kernel_neon_begin(); @@ -54,7 +54,7 @@ void crypto_aegis128_encrypt_chunk_simd(union aegis_block *state, u8 *dst, kernel_neon_end(); } -void crypto_aegis128_decrypt_chunk_simd(union aegis_block *state, u8 *dst, +void crypto_aegis128_decrypt_chunk_simd(struct aegis_state *state, u8 *dst, const u8 *src, unsigned int size) { kernel_neon_begin(); @@ -62,7 +62,7 @@ void crypto_aegis128_decrypt_chunk_simd(union aegis_block *state, u8 *dst, kernel_neon_end(); } -int crypto_aegis128_final_simd(union aegis_block *state, +int crypto_aegis128_final_simd(struct aegis_state *state, union aegis_block *tag_xor, unsigned int assoclen, unsigned int cryptlen, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt