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 77246C77B75 for ; Wed, 17 May 2023 03:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232523AbjEQDoa (ORCPT ); Tue, 16 May 2023 23:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232525AbjEQDoA (ORCPT ); Tue, 16 May 2023 23:44:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02BE040F2; Tue, 16 May 2023 20:44:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8B1D461631; Wed, 17 May 2023 03:43:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 701DBC433EF; Wed, 17 May 2023 03:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684295039; bh=Q2ZbDs6s6Qb4ow2/OkPPdJPXinCRf1wvSh2xDl0bANU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SmUEVUPMUu7tHPzGAeEv5ytuXrKtHB42dhqUTv15zKAMY2EM1sx/kW7CVlKRD/Xtw FIeO/PFkb78wR/nRnxBllzYD/cJNyNbyJeFKXEtLFjE3ICunclMIbWgejDHzyPMYew gOXanAeOUQGVMEiO2deXaRoPAuFo4Al7760SG7Nqpk1pWdd8zxsez5+BsfodX959A4 xmSRT7p4Xpax6KJfgmCkkwOHCMYyuNGhtsP4IDq4D5pKODBEU0l00nfR4+p9aMKa9w Y3t+eW+0b+HBPPJLLERl1W9gvbtMIwHLj+c22a9FrStpId4cNkQQVU1zhhiS3/v1In C5D/EGWQbfGBA== Date: Tue, 16 May 2023 21:44:46 -0600 From: "Gustavo A. R. Silva" To: Kees Cook Cc: Stanimir Varbanov , Vikash Garodia , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] media: venus: Replace one-element arrays with flexible-array members Message-ID: References: <202305161318.4AF9203EB@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202305161318.4AF9203EB@keescook> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Tue, May 16, 2023 at 01:18:39PM -0700, Kees Cook wrote: > On Tue, May 16, 2023 at 02:17:32PM -0600, Gustavo A. R. Silva wrote: > > One-element arrays are deprecated, and we are replacing them with flexible > > array members instead. So, replace one-element arrays with flexible-array > > members in multiple structures, and refactor the rest of the code, > > accordingly. > > > > This helps with the ongoing efforts to tighten the FORTIFY_SOURCE > > routines on memcpy() and help us make progress towards globally > > enabling -fstrict-flex-arrays=3 [1]. > > > > This results in no differences in binary output. > > > > Link: https://github.com/KSPP/linux/issues/79 > > Link: https://github.com/KSPP/linux/issues/291 > > Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] > > Signed-off-by: Gustavo A. R. Silva > > Oh fun, a subtraction variant! :) This code has everything, subtractions and additions :p https://lore.kernel.org/linux-hardening/ZGQn63U4IeRUiJWb@work/ > Reviewed-by: Kees Cook Thanks! -- Gustavo