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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250718130400.GB11056@google.com>
Date: Fri, 18 Jul 2025 14:04:00 +0100
From: Lee Jones <lee@...nel.org>
To: Kees Cook <kees@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Nishanth Menon <nm@...com>,
	Russell King <linux@...linux.org.uk>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Santosh Shilimkar <ssantosh@...nel.org>,
	Allison Randal <allison@...utok.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-arm-kernel@...ts.infradead.org,
	Ingo Molnar <mingo@...nel.org>,
	"Gustavo A. R. Silva" <gustavoars@...nel.org>,
	Christoph Hellwig <hch@....de>,
	Andrey Konovalov <andreyknvl@...il.com>,
	Andrey Ryabinin <ryabinin.a.a@...il.com>,
	Ard Biesheuvel <ardb@...nel.org>,
	Masahiro Yamada <masahiroy@...nel.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Nicolas Schier <nicolas.schier@...ux.dev>,
	Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>, linux-kernel@...r.kernel.org,
	x86@...nel.org, kasan-dev@...glegroups.com,
	linux-doc@...r.kernel.org, kvmarm@...ts.linux.dev,
	linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
	linux-efi@...r.kernel.org, linux-hardening@...r.kernel.org,
	linux-kbuild@...r.kernel.org, linux-security-module@...r.kernel.org,
	linux-kselftest@...r.kernel.org, sparclinux@...r.kernel.org,
	llvm@...ts.linux.dev
Subject: Re: [PATCH v3 05/13] arm: Handle KCOV __init vs inline mismatches

On Thu, 17 Jul 2025, Kees Cook wrote:

> When KCOV is enabled all functions get instrumented, unless
> the __no_sanitize_coverage attribute is used. To prepare for
> __no_sanitize_coverage being applied to __init functions, we have to
> handle differences in how GCC's inline optimizations get resolved. For
> arm this exposed several places where __init annotations were missing
> but ended up being "accidentally correct". Fix these cases and force
> several functions to be inline with __always_inline.
> 
> Acked-by: Nishanth Menon <nm@...com>
> Signed-off-by: Kees Cook <kees@...nel.org>
> ---
> Cc: Russell King <linux@...linux.org.uk>
> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Nishanth Menon <nm@...com>
> Cc: Santosh Shilimkar <ssantosh@...nel.org>
> Cc: Lee Jones <lee@...nel.org>
> Cc: Allison Randal <allison@...utok.net>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: <linux-arm-kernel@...ts.infradead.org>
> ---
>  include/linux/mfd/dbx500-prcmu.h  | 2 +-

Acked-by: Lee Jones <lee@...nel.org>

>  arch/arm/mm/cache-feroceon-l2.c   | 2 +-
>  arch/arm/mm/cache-tauros2.c       | 2 +-
>  drivers/clocksource/timer-orion.c | 2 +-
>  drivers/soc/ti/pm33xx.c           | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
> index 98567623c9df..828362b7860c 100644
> --- a/include/linux/mfd/dbx500-prcmu.h
> +++ b/include/linux/mfd/dbx500-prcmu.h
> @@ -213,7 +213,7 @@ struct prcmu_fw_version {
>  
>  #if defined(CONFIG_UX500_SOC_DB8500)
>  
> -static inline void prcmu_early_init(void)
> +static inline void __init prcmu_early_init(void)
>  {
>  	db8500_prcmu_early_init();
>  }
> diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c
> index 25dbd84a1aaf..2bfefb252ffd 100644
> --- a/arch/arm/mm/cache-feroceon-l2.c
> +++ b/arch/arm/mm/cache-feroceon-l2.c
> @@ -295,7 +295,7 @@ static inline u32 read_extra_features(void)
>  	return u;
>  }
>  
> -static inline void write_extra_features(u32 u)
> +static inline void __init write_extra_features(u32 u)
>  {
>  	__asm__("mcr p15, 1, %0, c15, c1, 0" : : "r" (u));
>  }
> diff --git a/arch/arm/mm/cache-tauros2.c b/arch/arm/mm/cache-tauros2.c
> index b1e1aba602f7..bfe166ccace0 100644
> --- a/arch/arm/mm/cache-tauros2.c
> +++ b/arch/arm/mm/cache-tauros2.c
> @@ -177,7 +177,7 @@ static inline void __init write_actlr(u32 actlr)
>  	__asm__("mcr p15, 0, %0, c1, c0, 1\n" : : "r" (actlr));
>  }
>  
> -static void enable_extra_feature(unsigned int features)
> +static void __init enable_extra_feature(unsigned int features)
>  {
>  	u32 u;
>  
> diff --git a/drivers/clocksource/timer-orion.c b/drivers/clocksource/timer-orion.c
> index 49e86cb70a7a..61f1e27fc41e 100644
> --- a/drivers/clocksource/timer-orion.c
> +++ b/drivers/clocksource/timer-orion.c
> @@ -43,7 +43,7 @@ static struct delay_timer orion_delay_timer = {
>  	.read_current_timer = orion_read_timer,
>  };
>  
> -static void orion_delay_timer_init(unsigned long rate)
> +static void __init orion_delay_timer_init(unsigned long rate)
>  {
>  	orion_delay_timer.freq = rate;
>  	register_current_timer_delay(&orion_delay_timer);
> diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
> index dfdff186c805..dc52a2197d24 100644
> --- a/drivers/soc/ti/pm33xx.c
> +++ b/drivers/soc/ti/pm33xx.c
> @@ -145,7 +145,7 @@ static int am33xx_do_sram_idle(u32 wfi_flags)
>  	return pm_ops->cpu_suspend(am33xx_do_wfi_sram, wfi_flags);
>  }
>  
> -static int __init am43xx_map_gic(void)
> +static int am43xx_map_gic(void)
>  {
>  	gic_dist_base = ioremap(AM43XX_GIC_DIST_BASE, SZ_4K);
>  
> -- 
> 2.34.1
> 

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ