On Thu, 22 May 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
> x86 this means forcing several functions to be inline with
> __always_inline.
> 
> Signed-off-by: Kees Cook <[email protected]>
> ---
> Cc: Thomas Gleixner <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: Borislav Petkov <[email protected]>
> Cc: Dave Hansen <[email protected]>
> Cc: <[email protected]>
> Cc: "H. Peter Anvin" <[email protected]>
> Cc: Paolo Bonzini <[email protected]>
> Cc: Vitaly Kuznetsov <[email protected]>
> Cc: Henrique de Moraes Holschuh <[email protected]>
> Cc: Hans de Goede <[email protected]>
> Cc: "Ilpo Järvinen" <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: Masami Hiramatsu <[email protected]>
> Cc: Ard Biesheuvel <[email protected]>
> Cc: Mike Rapoport <[email protected]>
> Cc: Michal Wilczynski <[email protected]>
> Cc: Juergen Gross <[email protected]>
> Cc: Andy Shevchenko <[email protected]>
> Cc: "Kirill A. Shutemov" <[email protected]>
> Cc: Roger Pau Monne <[email protected]>
> Cc: David Woodhouse <[email protected]>
> Cc: Usama Arif <[email protected]>
> Cc: "Guilherme G. Piccoli" <[email protected]>
> Cc: Thomas Huth <[email protected]>
> Cc: Brian Gerst <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: <[email protected]>
> ---

> diff --git a/drivers/platform/x86/thinkpad_acpi.c 
> b/drivers/platform/x86/thinkpad_acpi.c
> index e7350c9fa3aa..0518d5b1f4ec 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -559,12 +559,12 @@ static unsigned long __init tpacpi_check_quirks(
>       return 0;
>  }
>  
> -static inline bool __pure __init tpacpi_is_lenovo(void)
> +static __always_inline bool __pure tpacpi_is_lenovo(void)
>  {
>       return thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO;
>  }
>  
> -static inline bool __pure __init tpacpi_is_ibm(void)
> +static __always_inline bool __pure tpacpi_is_ibm(void)
>  {
>       return thinkpad_id.vendor == PCI_VENDOR_ID_IBM;
>  }

Hi Kees,

What's your plan on upstreaming route/timeline for this? I'd prefer to 
retain full control over this file as we were planning on some 
reorganization of files into lenovo/ subdir.


-- 
 i.

Reply via email to