]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: thinkpad_acpi: Handle KCOV __init vs inline mismatches
authorKees Cook <kees@kernel.org>
Thu, 29 May 2025 18:18:37 +0000 (11:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:54 +0000 (16:25 +0200)
commit00fd05651900853f983de5ce3cb792f84a92357e
treeff0f0ab94553b03c33d06d137ba76140b53bb2d8
parenteb636446e390d4303c5c87aab59c7f3ad10241dd
platform/x86: thinkpad_acpi: Handle KCOV __init vs inline mismatches

[ Upstream commit 6418a8504187dc7f5b6f9d0649c03e362cb0664b ]

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[1], we have
to handle differences in how GCC's inline optimizations get resolved.
For thinkpad_acpi routines, this means forcing two functions to be
inline with __always_inline.

Link: https://lore.kernel.org/lkml/20250523043935.2009972-11-kees@kernel.org/
Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20250529181831.work.439-kees@kernel.org
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/thinkpad_acpi.c