On Mon, May 26, 2025 at 12:53:13AM +0300, Ilpo Järvinen wrote: > 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 <k...@kernel.org> > > --- > > Cc: Thomas Gleixner <t...@linutronix.de> > > Cc: Ingo Molnar <mi...@redhat.com> > > Cc: Borislav Petkov <b...@alien8.de> > > Cc: Dave Hansen <dave.han...@linux.intel.com> > > Cc: <x...@kernel.org> > > Cc: "H. Peter Anvin" <h...@zytor.com> > > Cc: Paolo Bonzini <pbonz...@redhat.com> > > Cc: Vitaly Kuznetsov <vkuzn...@redhat.com> > > Cc: Henrique de Moraes Holschuh <h...@hmh.eng.br> > > Cc: Hans de Goede <hdego...@redhat.com> > > Cc: "Ilpo Järvinen" <ilpo.jarvi...@linux.intel.com> > > Cc: "Rafael J. Wysocki" <raf...@kernel.org> > > Cc: Len Brown <l...@kernel.org> > > Cc: Masami Hiramatsu <mhira...@kernel.org> > > Cc: Ard Biesheuvel <a...@kernel.org> > > Cc: Mike Rapoport <r...@kernel.org> > > Cc: Michal Wilczynski <michal.wilczyn...@intel.com> > > Cc: Juergen Gross <jgr...@suse.com> > > Cc: Andy Shevchenko <andriy.shevche...@linux.intel.com> > > Cc: "Kirill A. Shutemov" <kirill.shute...@linux.intel.com> > > Cc: Roger Pau Monne <roger....@citrix.com> > > Cc: David Woodhouse <d...@amazon.co.uk> > > Cc: Usama Arif <usama.a...@bytedance.com> > > Cc: "Guilherme G. Piccoli" <gpicc...@igalia.com> > > Cc: Thomas Huth <th...@redhat.com> > > Cc: Brian Gerst <brge...@gmail.com> > > Cc: <k...@vger.kernel.org> > > Cc: <ibm-acpi-de...@lists.sourceforge.net> > > Cc: <platform-driver-...@vger.kernel.org> > > Cc: <linux-a...@vger.kernel.org> > > Cc: <linux-trace-kernel@vger.kernel.org> > > Cc: <linux-...@vger.kernel.org> > > Cc: <linux...@kvack.org> > > --- > > > 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'm not in a big rush. I'm hoping to have this all in place for v6.17, but the Clang feature won't be in a released compiler version until September. :) I can send this bit separately for your tree. Thanks for taking a look! -- Kees Cook