[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H4RyZQTak5AgYj6TaXHyEefgw+wmXs9Gi8jUJWrUV5HQw@mail.gmail.com>
Date: Fri, 18 Jul 2025 17:18:03 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Kees Cook <kees@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Thomas Bogendoerfer <tsbogend@...ha.franken.de>, linux-mips@...r.kernel.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,
linux-arm-kernel@...ts.infradead.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 09/13] mips: Handle KCOV __init vs inline mismatch
Reviewed-by: Huacai Chen <chenhuacai@...ngson.cn>
On Fri, Jul 18, 2025 at 7:26 AM Kees Cook <kees@...nel.org> 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 mips this requires adding the __init annotation on
> init_mips_clocksource().
>
> Signed-off-by: Kees Cook <kees@...nel.org>
> ---
> Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> Cc: <linux-mips@...r.kernel.org>
> ---
> arch/mips/include/asm/time.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h
> index e855a3611d92..5e7193b759f3 100644
> --- a/arch/mips/include/asm/time.h
> +++ b/arch/mips/include/asm/time.h
> @@ -55,7 +55,7 @@ static inline int mips_clockevent_init(void)
> */
> extern int init_r4k_clocksource(void);
>
> -static inline int init_mips_clocksource(void)
> +static inline __init int init_mips_clocksource(void)
> {
> #ifdef CONFIG_CSRC_R4K
> return init_r4k_clocksource();
> --
> 2.34.1
>
>
Powered by blists - more mailing lists