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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91202C54EBE for ; Thu, 12 Jan 2023 22:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F++4VGxac3Y091yfohKOOlp2zgrZI1EE8XDD4I5WLSw=; b=an6AU7Wt6hkrIE olAclM6Y8RIV7+/ddjy8hxs7LefqhSjQmg1kEUQCfCKq3D1q4izCyMQwzwrHjVA0FwmP98tkB0Z5X foEAo6bf8v+aduyBn5hgdXKFvtnHFNJP8l8Z0HN9bwZaXFWrMOxd0iF48EDZYTrJSYJEQrCHjhGfD DCeM9U2X9T6gHL3mtEiNzd4PXdu0WMm0YMbb4VVwAqRPorxai6VBxRvjBxk1VrFMZbbLFgbw8BTq2 1+yeYljYJRBCGhPaI1DcissE63UK30I6FGAyBGglXuvsaUdA2ZexKNZMqdHJdialOy9vnOMKn9qhX hVywGBjiecBoTAW7jyCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pG5tG-00HM9l-Vm; Thu, 12 Jan 2023 22:17:43 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pG5tD-00HM9K-Gr for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 22:17:40 +0000 Received: by mail-pj1-x1036.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so22499087pjj.4 for ; Thu, 12 Jan 2023 14:17:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=duA6Un7MMHsWwDUG6Y+g/Vg750sAKeltAfxhDAJWOzI=; b=esi4sIDLgCeEJk+u0yjNbzcOwnXIyrdFqNgIf/C/hPkZydzpXkwVQAN68jczLwo5Vy DjaWv1FKrmoOVsI/0IYwX7hEP8bcbjLX9gMOv2qJZ01Sb6xTbGwFMOr7weCr1vnx3hO8 JxqhFjo+y4XHo7VkWAHe0Pp4x16s1XVBDAvHI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=duA6Un7MMHsWwDUG6Y+g/Vg750sAKeltAfxhDAJWOzI=; b=uXdwzHhUDhAUtbiC/k3nrt2IUwg4F4a1UWYRVb5x+RpT27XoaasFdRhm526bsCJKdJ GE77vn/MPjL5WT+WtxZaWtgWAeyKWBAnNekncrPAKiMW6iUZfSI5I276EaGf7ZIf62q3 PHuJpktwVdinigPAVnOzzlAbNyjsSLBj/ipXGGoyQ2Bzb92Bv07c9Cpw0wOoHIHa55vP N8tCRx6YA0Bk8RdDRFuF0WpUj/Ai2ARqNBSSirmB7yBzZk5Q0TU6Rg6YfqADk0nimxyL HO2HY0EeLm3T3wbCPDYBL3ycyiHXGa/ERyzkiHFS2Rasf4LD2fEMjVBs/2w5fyWiiZIv XpVw== X-Gm-Message-State: AFqh2kqv56tuCcvjuhrvvQYltPISGh0hHZX/iMuOYvbdBpRqqK/IBIyt gt90gxI4gDpVWcscHkvBgFrbn1c1q05/6N5U X-Google-Smtp-Source: AMrXdXu4y1USXbmB33jWp7T1TGYvEnF6MOtrQLu8xzf4Ek5Cp8Os7yBkCc4yDy30ibdWeK8h+3oGNQ== X-Received: by 2002:a17:902:9685:b0:192:f5a8:3099 with SMTP id n5-20020a170902968500b00192f5a83099mr26592237plp.5.1673561857844; Thu, 12 Jan 2023 14:17:37 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z9-20020a170903018900b00189db296776sm12808100plg.17.2023.01.12.14.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 14:17:37 -0800 (PST) Date: Thu, 12 Jan 2023 14:17:36 -0800 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Neal Liu , Herbert Xu , "David S. Miller" , Joel Stanley , Andrew Jeffery , linux-aspeed@lists.ozlabs.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] crypto: aspeed - Replace zero-length array with flexible-array member Message-ID: <202301121417.EE86BDD5C@keescook> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_141739_598451_20F6C7FF X-CRM114-Status: GOOD ( 10.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 09, 2023 at 07:39:17PM -0600, Gustavo A. R. Silva wrote: > Zero-length arrays are deprecated[1] and we are moving towards > adopting C99 flexible-array members instead. So, replace zero-length > array declaration in struct aspeed_sham_ctx with flex-array > member. > > 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 [2]. > > Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] > Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] > Link: https://github.com/KSPP/linux/issues/78 > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel