Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1156170pxf; Fri, 2 Apr 2021 02:49:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFDclfPLT13YLtgaEJT0/lWmfPR6zxcHUkk/t505M5Gg4K+LQPK//9rVwdSkcZnXkfacnJ X-Received: by 2002:a02:3085:: with SMTP id q127mr11967954jaq.137.1617356953095; Fri, 02 Apr 2021 02:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617356953; cv=none; d=google.com; s=arc-20160816; b=Ov1eT95SBEC0KGtXvg2tByvDpQnsmvvWlLVto/ypa07KIu26keZ/AzdmD1UdygIB6a Yq8tOgx/ylbgDS5+QgkkXKStA6Gw2JyVzE1paWgYzy61KumzbRvgaCm6LQ1TCz+gek1p EF07IiCOu5Ox7x3ufzL7U1cnmexLK76pi0QdTr9XtuGuwoRkyXBoeXFJlL8Wxf4f4LhY bT1KH26xFpJnGyU5lcZVlq5M1fB8I69C7Layh6Rk6b5GXX5ayq91l/4vWPAq/M+GO5Hc l+u3LvhpCD7Q3JXC/4cnYCU2GtWdnK2PEPH8xauszFpJQff9wdQbNeOTnrH/mrIytl02 kdCQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1XChpPkmuTnCbhvWKugzDvPqUx0gOaORgLyWh4ia6rE=; b=BYL1UsTJL30sVAIRA4BJtjBYsFpeBWAdh+xOUhNfblHzDz45UNv22EKChxHBRebiW/ 48qpdmianNtYQIYN1mUxyHm567CxxJ+4Ris/6D61MIMbFzYlQ+vcNWZKyLLwLUM9bJFE ekYD2yzXflWErdeEEQnciKTerPLAsqOZAhmhO9lU+xmu3XQ1sKZUTCgzavEijZq5Gpbg 4SrMklOh3VucIxghCXfpfpPVDozoOM8GS9F8oaBh3hjzatiLqdwCzmvPFlguvO/+Nt00 9pVdswevywybHrxfA3vYFMNqVdW6KLWUvX9S3Zq9Fjj/YYW3EqX90z+ZE8pqI/RjBXOx /kig== 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 b5si8315197jat.99.2021.04.02.02.49.00; Fri, 02 Apr 2021 02:49:13 -0700 (PDT) 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 S234448AbhDBJsz (ORCPT + 99 others); Fri, 2 Apr 2021 05:48:55 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:33790 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234217AbhDBJsz (ORCPT ); Fri, 2 Apr 2021 05:48:55 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lSGOu-0003UO-NG; Fri, 02 Apr 2021 20:47:37 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 02 Apr 2021 20:47:36 +1100 Date: Fri, 2 Apr 2021 20:47:36 +1100 From: Herbert Xu To: Arnd Bergmann Cc: "David S. Miller" , "Jason A. Donenfeld" , Arnd Bergmann , Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Ard Biesheuvel , Arvind Sankar , Masahiro Yamada , Eric Biggers , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH] crypto: poly1305: fix poly1305_core_setkey() declaration Message-ID: <20210402094736.GC24509@gondor.apana.org.au> References: <20210322170542.1791154-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210322170542.1791154-1-arnd@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Mar 22, 2021 at 06:05:15PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc-11 points out a mismatch between the declaration and the definition > of poly1305_core_setkey(): > > lib/crypto/poly1305-donna32.c:13:67: error: argument 2 of type ‘const u8[16]’ {aka ‘const unsigned char[16]’} with mismatched bound [-Werror=array-parameter=] > 13 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 raw_key[16]) > | ~~~~~~~~~^~~~~~~~~~~ > In file included from lib/crypto/poly1305-donna32.c:11: > include/crypto/internal/poly1305.h:21:68: note: previously declared as ‘const u8 *’ {aka ‘const unsigned char *’} > 21 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 *raw_key); > > This is harmless in principle, as the calling conventions are the same, > but the more specific prototype allows better type checking in the > caller. > > Change the declaration to match the actual function definition. > The poly1305_simd_init() is a bit suspicious here, as it previously > had a 32-byte argument type, but looks like it needs to take the > 16-byte POLY1305_BLOCK_SIZE array instead. > > Fixes: 1c08a104360f ("crypto: poly1305 - add new 32 and 64-bit generic versions") > Signed-off-by: Arnd Bergmann > --- > arch/arm/crypto/poly1305-glue.c | 2 +- > arch/arm64/crypto/poly1305-glue.c | 2 +- > arch/mips/crypto/poly1305-glue.c | 2 +- > arch/x86/crypto/poly1305_glue.c | 6 +++--- > include/crypto/internal/poly1305.h | 3 ++- > include/crypto/poly1305.h | 6 ++++-- > lib/crypto/poly1305-donna32.c | 3 ++- > lib/crypto/poly1305-donna64.c | 3 ++- > lib/crypto/poly1305.c | 3 ++- > 9 files changed, 18 insertions(+), 12 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt