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 8AF494611C; Fri, 24 Jan 2025 10:38:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A18240E11; Fri, 24 Jan 2025 10:38:44 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by mails.dpdk.org (Postfix) with ESMTP id 6990E402E9 for ; Fri, 24 Jan 2025 10:38:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737711523; x=1769247523; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=yZVQpknXBUJ+LB5wUJ3Ce+MstlmX9KBF3PPPn+bl0YY=; b=F2ls5Lwj6b7/27RCxMs3wR4qTkEm8IcGvHmCX9llNCF925f2n5CSRwa6 lDnWxbh19B/5F3SSZmtPY51ioTFKYh5zU7FugZrHB3/l7vkOzSYreWLCD L9XL9eUUqgqYTMHNR7NWT8nr81CI1KMXCQ3WDiq1TU9T4/TVRg6xWW4v9 G2LjqHMVplKnXgEGMGZTyjy9EmzOjRfjEVbNJFgrG3T+ijPXskt63z5t2 XNB+o7PgIH8Pgh8evIhE231OHuR4KU3fbYI291dorxtLlWdERDd6Rg9C4 2jdptVsD6/9T+DBjGHYJnKMSj6Ozd0qH+LuB9UItsBhSsMmTmV/zMdacG A==; X-CSE-ConnectionGUID: wxK387heQlWCbcHwjscMbg== X-CSE-MsgGUID: G8FcW1afT66DAjBLB4kB5A== X-IronPort-AV: E=McAfee;i="6700,10204,11324"; a="49637720" X-IronPort-AV: E=Sophos;i="6.13,230,1732608000"; d="scan'208";a="49637720" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2025 01:38:42 -0800 X-CSE-ConnectionGUID: KblGrVBwTmig7grUlNmmrQ== X-CSE-MsgGUID: /dMmkSy5ReqFcPFBpjLvow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,230,1732608000"; d="scan'208";a="107546919" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Jan 2025 01:38:41 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Fri, 24 Jan 2025 01:38:40 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44 via Frontend Transport; Fri, 24 Jan 2025 01:38:40 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Fri, 24 Jan 2025 01:38:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HBpYuauzmQDcK7owln7Rs0kcOduebn+4i3oygdBxi6J+jyV4CKBHTTiTvJdkJN8kI42qzMybH8kkEToygg8/G/++vJcBxBVJ1tx//PPso3/DwyYrSlLkYpPqP9i43VEB/p7B5gGTeE98DnYTfgJArY4CylQD9WUk/RS9KdFTL1KBjQ81HvNusxZvhu2xMFW6XoFmYb3n3CyaTzYLVZMTBSlBiZd+veOUPDENXfzkDaKSNYA2nKQ8LbZemLGttPHllJJHpBSMXaQIdqmACkld5/J8SpIZL+hbKG5ajVobvxavOy3zgBZJYZHnkC8RKnzFHqZeJKjdjEq8pTCaNUa7WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9n/w2lfD25gH+0U9Wv/ttQbTgy2/kySdFGw7s3RFizk=; b=yEcOjKswlzZ0ZnNEn1uIwefnxHvO68/5Ygv/uhAg4SF5DPXThjKM+OilkelHlMi7TjzS9uSv+V3WWlEW2bz4KZQpQIJlBVJ3HkbFPB3OusEOHpcvOapcwCyjSTXKgDdvXZRsKsZTROCNxua48l7/RgDscqu2R1ATnPZPmMjalvt33QXd060wynVwQdyaDn+hlxcpLjXy5OqQfIxWZfQLO2d4dyswwh6XaZgZzI+aF9YJ1Cr9CtrEz9TujWJ61QmlSHdhbHgjw3YttG9smmVL++BpW/hJK25yzcJR0afz0r07yzk428V+LstTuIZC+tgWKcD2yDs1Jt+JFB43McNntA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DM4PR11MB8157.namprd11.prod.outlook.com (2603:10b6:8:187::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.17; Fri, 24 Jan 2025 09:38:25 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%5]) with mapi id 15.20.8377.009; Fri, 24 Jan 2025 09:38:24 +0000 Date: Fri, 24 Jan 2025 09:38:20 +0000 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= CC: Stephen Hemminger , Subject: Re: [PATCH] build: force gcc to initialize padding bits Message-ID: References: <20250123172048.134417-1-stephen@networkplumber.org> <98CBD80474FA8B44BF855DF32C47DC35E9F9E6@smartserver.smartshare.dk> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F9E6@smartserver.smartshare.dk> X-ClientProxiedBy: DU2PR04CA0317.eurprd04.prod.outlook.com (2603:10a6:10:2b5::22) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB8157:EE_ X-MS-Office365-Filtering-Correlation-Id: 540c7fef-d0ff-4bce-80f7-08dd3c5ad955 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?mFJDP5xxYQYfdrK17pJGqbuSaT1aWNgpoaSpoZk+2PdZyjRwFg6kN4jtRm?= =?iso-8859-1?Q?uuk/BM9x4nr2JzmGMz0sft0mvY6gs9P0YCSoVovtLhB+8JpHZeJgXIiRJr?= =?iso-8859-1?Q?8RcjREGU18SLh2mW9PqDeb9uC8IspKNm199v3Kdl122zUWH3K8WOgz5klu?= =?iso-8859-1?Q?uFWJzxpXdI890YFy9kwpOh5HuH80fwUqi0tXK7sQaDWa/x+EG6ncos7osd?= =?iso-8859-1?Q?NtHwInAbiUp1dstT0/U4NYfnn6aU6cwt62ekbUSurD3FwqqQY0MIoJnwvX?= =?iso-8859-1?Q?zS/J8+R1nQzcKIO9hvDGpI0b2tIpyemX/36rZx1XN4g0xcqjM8bWQncpmW?= =?iso-8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LKYjuU0wRRvMAHhnY2uoPONahP?= =?iso-8859-1?Q?5ntpFVbrMThN/q8st77Rl2z2H2F9nf/imb+KMczuuAMpZHLzhf9SUBf1nA?= =?iso-8859-1?Q?L3gFQs3iYQTT35Ft2w6ksBbMDs1/sUooqkBqh4awW7afzxKXVzVp2+yl7K?= =?iso-8859-1?Q?8GFUt34142IrOXj2kke0GMOd/dyBqsm+PSrXUjpc095ZnBq/2+X971OhxR?= =?iso-8859-1?Q?HD4gCXJdnuIFosWu?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?tARbIOI/hgw7vy8y7RWCFMDeShzHDz3EWIA7sVaATlYbn3oScxXweHr/6r?= =?iso-8859-1?Q?znOYmSGisgV2hnWPAfPsD9d3ltgLDokffNhvGUmh4xsZ8/TG5Bo/HuDYk2?= =?iso-8859-1?Q?b1C9pKkCmiU2AR26AXlNcYRyHe7xeiLPAa6zLrPrjCXPIHfluPAZnmEQAH?= =?iso-8859-1?Q?mEnKLu/c/u8pUnoDQagVOH68NKC6vscfYHRlxdENG0/DUrgbxbchfTLWQT?= =?iso-8859-1?Q?B+19qKRm4LZJPzuCMJm37++uY0MWoUU4Quu9NITmGlXI5uiO82FzsxYjH6?= =?iso-8859-1?Q?AXUKRAGkeEGLS1R58kwaGCYgtvekvFXuLoO8HrZHaj/FWWfod4zJRImBiN?= =?iso-8859-1?Q?V34x8ENEOtyjEVLTQqd5wjko1FwDYtPYqcxe3WQwzjAyCeGsMf/3dYVp7V?= =?iso-8859-1?Q?ICuhIQw7PVeh1xzw1KRghqzvqMbeiK8qsGVGtlA4wz2UYffejVXg294guV?= =?iso-8859-1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3evjdfGn93vTJ?= =?iso-8859-1?Q?OZVKAfSWOzxNoeP7aER+8olw+e/1P2fgoYBvUss7IYWwsfkZEQXRaGAzRM?= =?iso-8859-1?Q?f7AbZKRn5/ml0GYPyuwzdUVtM+keMfLUTzBPKoUDL9LSnKKzpjo3hck2A4?= =?iso-8859-1?Q?myxymEVBRxCrcT7IHJwqzKz9g43JIdfqreVeAxbEtw/nEVAIDCcG0GrYcd?= =?iso-8859-1?Q?C53S0xzMZ41LVZW5aCWSmPJJwN1PHy74oXPVOYIPDnn9nY9Sm0t5mGwf3G?= =?iso-8859-1?Q?GfzL8w9caShrqxszBDdbsF8ur66T5LawGilz7gRHP5rcJd2QEL295T/g?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 540c7fef-d0ff-4bce-80f7-08dd3c5ad955 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2025 09:38:24.9412 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WmgteWYzv3otJ/bfVcmIS/rgG/9wDkPylWibknW2m8T7zGDbo2jP5nuNjey88fXBDjn2vCmincRgUH7y1ZgfXd0TANpVI4aR4W5fHJ51YxE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB8157 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Jan 24, 2025 at 08:48:45AM +0100, Morten Brørup wrote: > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > Sent: Thursday, 23 January 2025 18.21 > > > > 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 the old behavior > > of initializing everything to zero. > > > > Signed-off-by: Stephen Hemminger > > --- > > config/meson.build | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/config/meson.build b/config/meson.build > > index 6aaad6d8a4..5c8b5a15f5 100644 > > --- a/config/meson.build > > +++ b/config/meson.build > > @@ -330,6 +330,9 @@ warning_flags = [ > > Is warning_flags the right location for this? > Alternatively, should warning_flags be renamed? > +1 to renaming warning flags, to e.g. "global_cflags"? > > # globally disabled warnings > > '-Wno-packed-not-aligned', > > '-Wno-missing-field-initializers', > > + > > + # guarantee that everything is zero when using initialization > > Maybe add ", like in the C23 standard" to the comment. > > > + '-fzero-init-padding-bits=all', > > ] > > > > if not dpdk_conf.get('RTE_ARCH_64') > > -- > > 2.45.2 > > I have read up on -fzero-init-padding-bits, and this is the correct solution. > Does this flag give us additional guarantees of padding being zero-initialized that were there before? From my reading of the gcc doc[1], "..padding-bits=union" corresponds to the old behaviour, right? This also means we will have different padding behaviour on clang and gcc, since clang (at least v18 on my board) doesn't support this flag. Do we see any issues with that? /Bruce [1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html > With or without suggested changes: > Acked-by: Morten Brørup >