From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93C914624E for ; Mon, 17 Feb 2025 18:06:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C8A9400D6; Mon, 17 Feb 2025 18:06:26 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id B1DFD40289 for ; Mon, 17 Feb 2025 18:06:23 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4394a0c65fcso50585345e9.1 for ; Mon, 17 Feb 2025 09:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739811983; x=1740416783; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=04nB5ca6HQOTEOsT5A8kQsrwHFV8zC9r2dIOzXNOWbk=; b=cJw1NL/81CMLl38JCxDImmwiqug8ERGIuPZsN6IjBnf75kN1eQo5U3x6jNgLRTScHD IqyYOEWcusO5oEdLt8NKXNtzM/1u/qObyJB+LiorKgNZGstjabzd5vC1nw706P48E7j2 OaOP5QxYQn2HwCMTE85SchZSzPbJBK/3WhQS/0udA+Mhq3ldQ5+bZQyvzXwzQUnk5713 mDmh6KbyBK7IdEFk3cDmD0eJ4qSFzIyJaGme1VWn6WcliFecMvTWVKc9oecLy0bDQRGP fCkBVY6RNrfClHxwIx2B8FuDgxBAyCrerTcB/UGBGzxpIUZrRFfeDmyntenHiIbQobns jeQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739811983; x=1740416783; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state: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/EFaHA2Cw== X-Received: by 2002:a05:600c:3594:b0:430:57e8:3c7e with SMTP id 5b1f17b1804b1-4396e730949mr94790595e9.28.1739811983018; Mon, 17 Feb 2025 09:06:23 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-439618a9ab0sm125724665e9.35.2025.02.17.09.06.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:06:22 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Bruce Richardson , dpdk stable Subject: patch 'build: force GCC 15 to initialize padding bits' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:00 +0000 Message-ID: <20250217170456.1068278-27-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/655a2accb3b6c327b3480b6543db644f8e4abbce Thanks. Luca Boccassi --- >From 655a2accb3b6c327b3480b6543db644f8e4abbce Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 24 Jan 2025 10:26:48 -0800 Subject: [PATCH] build: force GCC 15 to initialize padding bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 3c015da37afecbeaa7c9ebf8cf2adcb20ab0e54d ] With GCC 15, the compiler has changed the default behavior when initialization is used for aggregate variables. The new default is to follow the standard (C23) and not initialize everything by default. This breaks assumptions in some drivers and can be lead to other bugs. Use the new zero initialization flag to force of all fields to zero. Note: other compilers always initialize to zero in these cases. Only GCC seems to have decided to start initializing less as a silly attempt at optimization. Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Bruce Richardson --- config/meson.build | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/config/meson.build b/config/meson.build index c755083db0..2f07c187b9 100644 --- a/config/meson.build +++ b/config/meson.build @@ -262,7 +262,7 @@ add_project_arguments('-include', 'rte_config.h', language: 'c') # enable extra warnings and disable any unwanted warnings # -Wall is added by default at warning level 1, and -Wextra # at warning level 2 (DPDK default) -warning_flags = [ +global_cflags = [ # additional warnings in alphabetical order '-Wcast-qual', '-Wdeprecated', @@ -283,22 +283,25 @@ warning_flags = [ '-Wno-address-of-packed-member', '-Wno-packed-not-aligned', '-Wno-missing-field-initializers', + + # guarantee that all non-initialized parts of structure/union are zero + '-fzero-init-padding-bits=all', ] if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') # FIXME: Bugzilla 396 - warning_flags += '-Wno-zero-length-bounds' + global_cflags += '-Wno-zero-length-bounds' endif if not dpdk_conf.get('RTE_ARCH_64') # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!! - warning_flags += '-Wno-pointer-to-int-cast' + global_cflags += '-Wno-pointer-to-int-cast' endif if cc.get_id() == 'intel' warning_ids = [181, 188, 2203, 2279, 2557, 3179, 3656] foreach i:warning_ids - warning_flags += '-diag-disable=@0@'.format(i) + global_cflags += '-diag-disable=@0@'.format(i) endforeach endif -foreach arg: warning_flags +foreach arg: global_cflags if cc.has_argument(arg) add_project_arguments(arg, language: 'c') endif -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:17.825189826 +0000 +++ 0027-build-force-GCC-15-to-initialize-padding-bits.patch 2025-02-17 16:13:16.814441593 +0000 @@ -1 +1 @@ -From 3c015da37afecbeaa7c9ebf8cf2adcb20ab0e54d Mon Sep 17 00:00:00 2001 +From 655a2accb3b6c327b3480b6543db644f8e4abbce Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 3c015da37afecbeaa7c9ebf8cf2adcb20ab0e54d ] + @@ -20,2 +21,0 @@ -Cc: stable@dpdk.org - @@ -26,2 +26,2 @@ - config/meson.build | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) + config/meson.build | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) @@ -30 +30 @@ -index 710206095b..f31fef216c 100644 +index c755083db0..2f07c187b9 100644 @@ -33 +33 @@ -@@ -310,7 +310,7 @@ endif +@@ -262,7 +262,7 @@ add_project_arguments('-include', 'rte_config.h', language: 'c') @@ -42,2 +42,2 @@ -@@ -330,16 +330,19 @@ warning_flags = [ - # globally disabled warnings +@@ -283,22 +283,25 @@ warning_flags = [ + '-Wno-address-of-packed-member', @@ -50 +50,5 @@ - + if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0') + # FIXME: Bugzilla 396 +- warning_flags += '-Wno-zero-length-bounds' ++ global_cflags += '-Wno-zero-length-bounds' + endif @@ -63,5 +66,0 @@ - -@@ -351,7 +354,7 @@ if cc.has_argument('-Wvla') - endif - endif -