mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Andy Shevchenko <andy@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Peter Collingbourne <pcc@google.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [GIT PULL] string fixes for v6.15-rc1
Date: Sun, 06 Apr 2025 18:32:58 -0700	[thread overview]
Message-ID: <FFE5FB0B-CC92-4A25-8014-E7548AD1C469@kernel.org> (raw)
In-Reply-To: <CAHk-=whVfxi4KRu-H=tsgSdoGdDz1bvu0_miJT0BTgAf4igpdg@mail.gmail.com>



On April 6, 2025 12:04:04 PM PDT, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>On Sun, 6 Apr 2025 at 10:54, Kees Cook <kees@kernel.org> wrote:
>>
>> - Add wcslen() to support more Clang libcalls (Nathan Chancellor)
>
>Oh Christ.
>
>Does clang not know how expensive function calls can be?
>
>I really think the right fix here would have been to say "don't do
>that", rather than make that function available.

I should have said "libcall optimizations". It's not just blindly constructing calls. This is the same kind of thing that has been heavily discussed before for bcmp() and stpcpy(). The resolution from those threads was to add the symbol, as the least of many bad options:
https://lore.kernel.org/all/CAK7LNAQHj-GeqH_5WpKo7gA6qZAiX8OOxxnL1v-SNZwRHFSXQQ@mail.gmail.com/


-- 
Kees Cook

  parent reply	other threads:[~2025-04-07  1:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-06 17:54 Kees Cook
2025-04-06 19:04 ` Linus Torvalds
2025-04-06 19:31   ` Linus Torvalds
2025-04-07  1:32   ` Kees Cook [this message]
2025-04-07  2:04     ` Linus Torvalds
2025-04-07 17:37       ` Nathan Chancellor
2025-04-07 19:02         ` Linus Torvalds
2025-04-07 19:25           ` Nathan Chancellor
2025-04-07 20:25             ` Linus Torvalds
2025-04-07 21:01               ` Nathan Chancellor
2025-04-07 20:23       ` David Laight

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=FFE5FB0B-CC92-4A25-8014-E7548AD1C469@kernel.org \
    --to=kees@kernel.org \
    --cc=andreyknvl@gmail.com \
    --cc=andy@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=pcc@google.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@kernel.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®