public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Bill Wendling" <morbo@google.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Josh Poimboeuf" <jpoimboe@kernel.org>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
	"Justin Stitt" <justinstitt@google.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	llvm@lists.linux.dev
Subject: Re: clang and drm issue: objtool warnings from clang build
Date: Tue, 29 Apr 2025 11:17:42 +0200	[thread overview]
Message-ID: <20250429091742.GF4198@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CAHk-=wgrT9++rFTnM1vh3bwx2Pcc18anDGQCwEL+0d2nDm3p+A@mail.gmail.com>

On Mon, Apr 28, 2025 at 12:34:27PM -0700, Linus Torvalds wrote:

> And yes, this really is a very potential and real security issue. In
> the kernel I don't think we have this ever happening, partly because a
> lot of configurations use gcc which afaik doesn't have this particular
> horrendous model of UD.

I see more and more people use clang, in a large part because of Rust.

Anyway, I've seen clang pull this stop-codegen-on-UB trick before (link
was upstream in the thread) and yes, it is horrific crap. At the time I
proposed emitting at the very least a UD2 instruction rather than just
straight up stopping code gen, but I think your proposal for a code-gen
knob to just not do this 'optimisation' at all is much better.

  parent reply	other threads:[~2025-04-29  9:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-26 17:42 clang and drm issue: objtool warnings from clang build Linus Torvalds
2025-04-26 17:52 ` Linus Torvalds
2025-04-26 20:05   ` Nathan Chancellor
2025-04-26 20:56     ` Linus Torvalds
2025-04-26 23:23       ` Nathan Chancellor
2025-04-27  0:31         ` Linus Torvalds
2025-04-28 18:08           ` Bill Wendling
2025-04-28 19:34             ` Linus Torvalds
2025-04-28 19:54               ` Josh Poimboeuf
2025-04-28 20:57                 ` Linus Torvalds
2025-04-28 20:58               ` Bill Wendling
2025-04-29  9:17               ` Peter Zijlstra [this message]
2025-04-28 17:53       ` Bill Wendling

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=20250429091742.GF4198@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jpoimboe@kernel.org \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=simona@ffwll.ch \
    --cc=sunpeng.li@amd.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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