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 F3CE8C636D4 for ; Fri, 3 Feb 2023 17:54:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233650AbjBCRy2 (ORCPT ); Fri, 3 Feb 2023 12:54:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233172AbjBCRyS (ORCPT ); Fri, 3 Feb 2023 12:54:18 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4B4351C4A for ; Fri, 3 Feb 2023 09:54:14 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id l4-20020a17090a850400b0023013402671so9483755pjn.5 for ; Fri, 03 Feb 2023 09:54:14 -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:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=FglzRedEledpe7U/HZFQU5fjwrxpiFTlIoZfizmZKxo=; b=jbL6W/faZm4W+GkDNARtVIQSEx2ADO2QYfIC86h2ZMHc5o/ZEBFOY5YrRkhNg2iOpB /63HbsfHa9WGzx3zbFmY1UfIUIuxKXcouG1MM1zxPt90HwxBo5dELOThuq4wIWGKm/i2 DiYYIrK7jDHD/1It501CO+Y9SysMFq67N+Mtg= 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:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FglzRedEledpe7U/HZFQU5fjwrxpiFTlIoZfizmZKxo=; b=KPuD3m0q4LpI+8l7Q2nXxkCMvd3VuptcNYzUcgWX4VjYbki8c41wSLdAveogBVLHBN HsdMpywdzVjYJs0DQm3Xp8Onfuqqvck6IX3mvQXKOWnaK/fLMKV3Ayc/jmimeeJQeKMP hV6EOnkGcJw7CnnEJR1GGxvNGWigMQ6O+aHmLkRROMPvq8AirLPPapDYZUpKyqjdOlOF DZAWx9ep/YWkZ8UuxsE9KJRUrycITfFuPYLa+ptH/5Cj3fWPd65II6nFnicqpW1lxSEI 9zo7jDr+AidJWDpTugiKcA9bR2iUdwIwIKz7SyuCpLraz2w9Q9S7/KLXrMgEdyKpUHAu GfKA== X-Gm-Message-State: AO0yUKWcgkH2OGEVTSk5dU3QqsVAI0sOlMm5m8KArYSxbY/BW0uYZQ38 lYTASujX3PlZPY5sdnSP2qBJU53MT2+Z7Eln X-Google-Smtp-Source: AK7set/Z7WE5Ld13ny7sgCsxLEEjOYX9qnYiq/CIu1TV+5vNxcdynZYDJopTLqfhZ/z5xziON6sH4Q== X-Received: by 2002:a17:902:c611:b0:194:5fc9:f55a with SMTP id r17-20020a170902c61100b001945fc9f55amr8907518plr.35.1675446854374; Fri, 03 Feb 2023 09:54:14 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id e12-20020a170902784c00b00192b23b8451sm1889641pln.108.2023.02.03.09.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 09:54:13 -0800 (PST) Message-ID: <63dd4a45.170a0220.e6dee.365d@mx.google.com> X-Google-Original-Message-ID: <202302031754.@keescook> Date: Fri, 3 Feb 2023 17:54:13 +0000 From: Kees Cook To: "Gustavo A. R. Silva" Cc: Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] xen: Replace one-element array with flexible-array member References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 02, 2023 at 07:28:23PM -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 array with flexible-array > member in struct xen_page_directory. > > 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/255 > Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook -- Kees Cook