From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 044DFC7EE29 for ; Fri, 2 Jun 2023 10:26:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235310AbjFBK0M (ORCPT ); Fri, 2 Jun 2023 06:26:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235628AbjFBKY6 (ORCPT ); Fri, 2 Jun 2023 06:24:58 -0400 Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D93151A7; Fri, 2 Jun 2023 03:24:09 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1q51wh-00G2zk-Jk; Fri, 02 Jun 2023 18:23:48 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 02 Jun 2023 18:23:47 +0800 Date: Fri, 2 Jun 2023 18:23:47 +0800 From: Herbert Xu To: Arnd Bergmann Cc: Boris Brezillon , Arnaud Ebalard , Srujana Challa , "David S. Miller" , Arnd Bergmann , Kees Cook , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: marvell/cesa - Fix type mismatch warning Message-ID: References: <20230523083313.899332-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230523083313.899332-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 23, 2023 at 10:33:04AM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > Commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") uncovered > a type mismatch in cesa 3des support that leads to a memcpy beyond the > end of a structure: > > In function 'fortify_memcpy_chk', > inlined from 'mv_cesa_des3_ede_setkey' at drivers/crypto/marvell/cesa/cipher.c:307:2: > include/linux/fortify-string.h:583:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] > 583 | __write_overflow_field(p_size_field, size); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > This is probably harmless as the actual data that is copied has the correct > type, but clearly worth fixing nonetheless. > > Fixes: 4ada48397823 ("crypto: marvell/cesa - add Triple-DES support") > Cc: Kees Cook > Cc: Gustavo A. R. Silva" > Signed-off-by: Arnd Bergmann > --- > drivers/crypto/marvell/cesa/cipher.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt