From: Kees Cook <kees@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"David Gow" <davidgow@google.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Huacai Chen" <chenhuacai@loongson.cn>,
"Ingo Molnar" <mingo@kernel.org>,
"Jannik Glückert" <jannik.glueckert@gmail.com>,
"kernel test robot" <lkp@intel.com>, "Lee Jones" <lee@kernel.org>,
"Linux Kernel Functional Testing" <lkft@linaro.org>,
"Marco Elver" <elver@google.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <n.schier@avm.de>, "Nishanth Menon" <nm@ti.com>,
"Ritesh Harjani" <ritesh.list@gmail.com>,
"Thorsten Blum" <thorsten.blum@linux.dev>,
"Youling Tang" <tangyouling@kylinos.cn>
Subject: Re: [GIT PULL] hardening updates for v6.17-rc1
Date: Mon, 28 Jul 2025 23:10:19 -0700 [thread overview]
Message-ID: <31A791DF-C044-4883-9074-8D13A67DE89B@kernel.org> (raw)
In-Reply-To: <CAHk-=wjZkusqUg9nt66xYVeXxMcmeOw_-toc=-kwPi5Gad4y1A@mail.gmail.com>
On July 28, 2025 5:43:08 PM PDT, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>On Mon, 28 Jul 2025 at 17:01, Kees Cook <kees@kernel.org> wrote:
>>
>> Please pull these hardening updates for v6.17-rc1. Some notable things
>> that stand out diffstat: there are many scattered changes across arch code
>> to clean up __init vs KCOV instrumentation. Most are landing here via
>> the hardening tree but 2 landed separately in their respective trees:
>> loongarch in v6.16 already, and platform-drivers-x86 that is queued
>> for merging:
>
>Is this the cause of the new
>
> section mismatch in reference: volume_set_software_mute+0x6f
>(section: .text.unlikely) -> tpacpi_is_lenovo (section: .init.text)
>
>warning?
>
>It does seem to be a preexisting bug, with volume_set_software_mute()
>(not init) calling tpacpi_is_lenovo (which is marked __init for some
>unknown crazy reason).
>
>I'm just not seeing what changed to *not* inline that trivial
>single-instruction thing. So something really bad is happening to the
>compiler because of this hardening change.
The change is actually *removing* sanitizer instrumentation from __init functions, and this seems to cause GCC to play weird games with inline vs section markings vs coverage sanitizer options. I scratched my head over it for a while but since GCC has had this kind of "unstable" inlining behavior before, it looked like the fix in similar situations was to switch it to __always_inline. In other cases the use of __init was adjusted.
The fix is part of the platform-drivers-x86 PR, specifically:
https://lore.kernel.org/lkml/20250529181831.work.439-kees@kernel.org/
-Kees
--
Kees Cook
next prev parent reply other threads:[~2025-07-29 6:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 0:01 Kees Cook
2025-07-29 0:43 ` Linus Torvalds
2025-07-29 6:10 ` Kees Cook [this message]
2025-07-29 1:12 ` pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=31A791DF-C044-4883-9074-8D13A67DE89B@kernel.org \
--to=kees@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=chenhuacai@loongson.cn \
--cc=dan.j.williams@intel.com \
--cc=davidgow@google.com \
--cc=elver@google.com \
--cc=gustavoars@kernel.org \
--cc=hca@linux.ibm.com \
--cc=jannik.glueckert@gmail.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft@linaro.org \
--cc=lkp@intel.com \
--cc=mingo@kernel.org \
--cc=n.schier@avm.de \
--cc=nathan@kernel.org \
--cc=nm@ti.com \
--cc=ritesh.list@gmail.com \
--cc=tangyouling@kylinos.cn \
--cc=thorsten.blum@linux.dev \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®