mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	stable@vger.kernel.org
Subject: Re: [PATCH] x86/build: Do not allow X86_NATIVE_CPU to be enabled on non-x86_64 hosts
Date: Sat, 14 Nov 2026 13:46:05 -0700	[thread overview]
Message-ID: <20261114204605.GA173332@ax162> (raw)
In-Reply-To: <20261114202524.GBavjDtC9Z3j7PrV3Y@fat_crate.local>

On Sat, Nov 14, 2026 at 12:25:24PM -0800, Borislav Petkov wrote:
> This looks like a whack-a-mole-y fix to me. Especially if the other arches
> would have the same problem.

I made that comment more about the different architecture
implementations in the clang driver but I guess it could apply to the
kernel as well. However...

> So wouldn't a more generic fix checking
> 
> 	native arch == target arch
> 
> somewhere in the makefile be better?

No other architectures provide an option to turn on '-march=native' like
x86 does. It all lives within arch/x86, so I would just be adding a
check to arch/x86/Makefile instead of arch/x86/Kconfig.cpu. Making the
option unselectable seems like a better option. If other architectures
did want to add this option, I agree generically abstacting this check
would be reasonable.

-- 
Cheers,
Nathan

  reply	other threads:[~2026-11-14 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14  0:31 Nathan Chancellor
2026-11-14 20:25 ` Borislav Petkov
2026-11-14 20:46   ` Nathan Chancellor [this message]
2026-11-14 20:58     ` Borislav Petkov

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=20261114204605.GA173332@ax162 \
    --to=nathan@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=ndesaulniers@google.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.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

all inboxes | Powered by JetHome®