From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 491EA37FF64; Mon, 23 Mar 2026 22:11:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774303863; cv=none; b=d82ixtXpwmwdGqEdQ98fiXL/T2IgoTrea4WUi0IguM2Q70rVU+B3wTCLHDfh9aMKPmpQxiGmaxl0UOXaobGsJn0XBLblM3RBd40+z1vYxsdXCohNl3B+DlTdrd5isWxyyUX5VEW2FZebQAD9swmxOagaZXJzp7nNTP7K8h7l4y8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774303863; c=relaxed/simple; bh=QmWFET9bvrs9i8OF0DvDcoUHyYG1evZeedhQK2jkq7g=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=mFE8kmjSTC+yOwJGrPCATaxCN8f8TfdIP1naQz6abXEeA5Lc6oaG7S1Ovyo9ir+ZEYpkgW4KZ7JHyHgqfy2Tox4e8s8LkMjIflBmdqNZkAKgLoFHTuNxq4n1soBHUl+Z4v+ka96vfWvSjPx33MSpBRFGuL/RjOENZfRpgR2eTWY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=A0mn6jrD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="A0mn6jrD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE3F0C2BC9E; Mon, 23 Mar 2026 22:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774303863; bh=QmWFET9bvrs9i8OF0DvDcoUHyYG1evZeedhQK2jkq7g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A0mn6jrDRkkotL0ADM4z8hjc55Rp81tZDxRdlLJjStnOUzMWqWAuqiPb6IXBeD+C0 x6es1PD41J5l84ogH7DiycTlmrDI8IxicV/pTWzq2lj9Nt5GyBJnq06C7qoPkLHQUr II58ooGZtJLKAU+C+zCon+Co9NCgVIeslsmyvJKE= Date: Mon, 23 Mar 2026 15:11:00 -0700 From: Andrew Morton To: Leo Yan Cc: Arnaldo Carvalho de Melo , Ian Rogers , Namhyung Kim , James Clark , Kees Cook , Quentin Monnet , Nathan Chancellor , Nicolas Schier , Nick Desaulniers , Bill Wendling , Justin Stitt , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Adrian Hunter , Masami Hiramatsu , William Breathitt Gray , Barry Song , Qinxin Xia , Bartosz Golaszewski , Kent Gibson , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Jonathan Cameron , David Lechner , Nuno =?ISO-8859-1?Q?S=E1?= , Andy Shevchenko , Willy Tarreau , Thomas =?ISO-8859-1?Q?Wei=DF?= =?ISO-8859-1?Q?schuh?= , Josh Poimboeuf , Robert Moore , Len Brown , Srinivas Pandruvada , Tejun Heo , David Vernet , Andrea Righi , Changwoo Min , Mark Brown , Steven Rostedt , Gabriele Monaco , Shuah Khan , Jiri Kosina , Benjamin Tissoires , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Bartosz Golaszewski , Jonathan Cameron Subject: Re: [PATCH v6 00/24] tools build: Append -fzero-init-padding-bits=all option Message-Id: <20260323151100.a89f36efc411c9c96e1e24bd@linux-foundation.org> In-Reply-To: <20260323-tools_build_fix_zero_init-v6-0-235858c51af9@arm.com> References: <20260323-tools_build_fix_zero_init-v6-0-235858c51af9@arm.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 23 Mar 2026 15:13:21 +0000 Leo Yan wrote: > GCC-15 doesn't guarantee that a {0} initializer clears the whole union [1]. > This may cause bugs if data is not intialized properly. > > The kernel enabld the -fzero-init-padding-bits=all option to tackle the > issue, which was merged in commit dce4aab8441d ("kbuild: Use > -fzero-init-padding-bits=all"). > > This series propagates the same flag to the tools build. It uses > tools/scripts/Makefile.include as the central place to add the > option to EXTRA_CFLAGS and HOST_EXTRACFLAGS for the CC and HOSTCC > compilers. Each project under tools/ appends the variables as needed. > > BPF/bpftool related patches will be sent separately, as maintainers > prefer them to go via the BPF tree. Some questions from AI review. Some probably legit, some probably not: https://sashiko.dev/#/patchset/20260323-tools_build_fix_zero_init-v6-0-235858c51af9@arm.com