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 B0FFC46211 for ; Thu, 13 Feb 2025 11:02:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC3EA42EE7; Thu, 13 Feb 2025 11:02:09 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 6174642EE7 for ; Thu, 13 Feb 2025 11:02:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739440927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3kNH3hFaoQk+ddvAjYrT8cvzh3IwFCDyZ5tBM32lrNk=; b=TNngnOQ/dNWSKUU8R33D+Ar9dx8jp/oqOVCIY1+A4PQKc5mQNpiMb34xoc4HAdjN8h0maK bVHq8A/XUm3e0K1r7HG0ju0A8wf66q+zua2h+TFVvPy/5RWdt2IeIhm9Lk6DQw+6LfGd1K eSyOwHHAVUSy5i4GxcKuDuuOnl0HCK0= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-495-9v4BhOmZOvaiEoXQLu9gxA-1; Thu, 13 Feb 2025 05:02:02 -0500 X-MC-Unique: 9v4BhOmZOvaiEoXQLu9gxA-1 X-Mimecast-MFC-AGG-ID: 9v4BhOmZOvaiEoXQLu9gxA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7D7BB19373D8; Thu, 13 Feb 2025 10:02:01 +0000 (UTC) Received: from rh.Home (unknown [10.45.224.21]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 690891800360; Thu, 13 Feb 2025 10:01:59 +0000 (UTC) From: Kevin Traynor 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 24.11.2 Date: Thu, 13 Feb 2025 09:58:27 +0000 Message-ID: <20250213095933.362078-60-ktraynor@redhat.com> In-Reply-To: <20250213095933.362078-1-ktraynor@redhat.com> References: <20250213095933.362078-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hUYqAX_6FDTGTOgClNB8k1VI0z9IcxKgaXC-JpCM6VA_1739440921 X-Mimecast-Originator: redhat.com 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 24.11.2 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/17/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/f6dc4ee6b4ae3eb4f28e2afb97d6d08cede0558b Thanks. Kevin --- >From f6dc4ee6b4ae3eb4f28e2afb97d6d08cede0558b 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 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/meson.build b/config/meson.build index 6aaad6d8a4..b6b3558e11 100644 --- a/config/meson.build +++ b/config/meson.build @@ -311,5 +311,5 @@ endif # -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', @@ -331,17 +331,20 @@ warning_flags = [ '-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 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') -- 2.48.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-12 17:29:40.898458398 +0000 +++ 0060-build-force-GCC-15-to-initialize-padding-bits.patch 2025-02-12 17:29:34.383946127 +0000 @@ -1 +1 @@ -From 3c015da37afecbeaa7c9ebf8cf2adcb20ab0e54d Mon Sep 17 00:00:00 2001 +From f6dc4ee6b4ae3eb4f28e2afb97d6d08cede0558b Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 3c015da37afecbeaa7c9ebf8cf2adcb20ab0e54d ] + @@ -20,2 +21,0 @@ -Cc: stable@dpdk.org - @@ -30 +30 @@ -index 710206095b..f31fef216c 100644 +index 6aaad6d8a4..b6b3558e11 100644 @@ -40 +40 @@ -@@ -331,14 +331,17 @@ warning_flags = [ +@@ -331,17 +331,20 @@ warning_flags = [ @@ -60,3 +59,0 @@ -@@ -352,5 +355,5 @@ if cc.has_argument('-Wvla') - endif -