lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241107204504.GA3432398@thelio-3990X>
Date: Thu, 7 Nov 2024 13:45:04 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Rong Xu <xur@...gle.com>
Cc: Alice Ryhl <aliceryhl@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Arnd Bergmann <arnd@...db.de>, Bill Wendling <morbo@...gle.com>,
	Borislav Petkov <bp@...en8.de>, Breno Leitao <leitao@...ian.org>,
	Brian Gerst <brgerst@...il.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	David Li <davidxl@...gle.com>, Han Shen <shenhan@...gle.com>,
	Heiko Carstens <hca@...ux.ibm.com>,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Jann Horn <jannh@...gle.com>, Jonathan Corbet <corbet@....net>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Juergen Gross <jgross@...e.com>,
	Justin Stitt <justinstitt@...gle.com>, Kees Cook <kees@...nel.org>,
	Masahiro Yamada <masahiroy@...nel.org>,
	"Mike Rapoport (IBM)" <rppt@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Nicolas Schier <nicolas@...sle.eu>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Sami Tolvanen <samitolvanen@...gle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Wei Yang <richard.weiyang@...il.com>, workflows@...r.kernel.org,
	Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
	Maksim Panchenko <max4bolt@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Andreas Larsson <andreas@...sler.com>,
	Yonghong Song <yonghong.song@...ux.dev>,
	Yabin Cui <yabinc@...gle.com>,
	Krzysztof Pszeniczny <kpszeniczny@...gle.com>,
	Sriraman Tallam <tmsriram@...gle.com>,
	Stephane Eranian <eranian@...gle.com>, x86@...nel.org,
	linux-arch@...r.kernel.org, sparclinux@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH v7 7/7] Add Propeller configuration for kernel build

Hi Rong,

On Sat, Nov 02, 2024 at 10:51:14AM -0700, Rong Xu wrote:
> diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller
> new file mode 100644
> index 0000000000000..344190717e471
> --- /dev/null
> +++ b/scripts/Makefile.propeller
> @@ -0,0 +1,28 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +# Enable available and selected Clang Propeller features.
> +ifdef CLANG_PROPELLER_PROFILE_PREFIX
> +  CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=list=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt -ffunction-sections
> +  KBUILD_LDFLAGS += --symbol-ordering-file=$(CLANG_PROPELLER_PROFILE_PREFIX)_ld_profile.txt --no-warn-symbol-ordering
> +else
> +  CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=labels
> +endif

It appears that '-fbasic-block-sections=labels' has been deprecated in
the main branch of LLVM, as I see a warning repeated over and over when
building allmodconfig:

  clang: warning: argument '-fbasic-block-sections=labels' is deprecated, use '-fbasic-block-address-map' instead [-Wdeprecated]

https://github.com/llvm/llvm-project/commit/7b7747dc1d3da1a829503ea9505b4cecce4f5bda

Sorry that I missed this during testing, as I was only using clang-19 at
the time.

I think you can send a fixup on top of Masahiro's branch:

https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kbuild

> +# Propeller requires debug information to embed module names in the profiles.
> +# If CONFIG_DEBUG_INFO is not enabled, set -gmlt option. Skip this for AutoFDO,
> +# as the option should already be set.
> +ifndef CONFIG_DEBUG_INFO
> +  ifndef CONFIG_AUTOFDO_CLANG
> +    CFLAGS_PROPELLER_CLANG += -gmlt
> +  endif
> +endif
> +
> +ifdef CONFIG_LTO_CLANG_THIN
> +  ifdef CLANG_PROPELLER_PROFILE_PREFIX
> +    KBUILD_LDFLAGS += --lto-basic-block-sections=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt
> +  else
> +    KBUILD_LDFLAGS += --lto-basic-block-sections=labels

I think this might have a similar problem but I have not tested.

> +  endif
> +endif
> +
> +export CFLAGS_PROPELLER_CLANG

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ