From: Dave Hansen <dave.hansen@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86_64: test that userspace stack is in fact NX
Date: Tue, 3 Oct 2023 13:46:20 -0700 [thread overview]
Message-ID: <1dad6a33-1cd0-0d0f-29c5-97fd2807f07a@intel.com> (raw)
In-Reply-To: <ZRxr79i5PAXRXjqr@gmail.com>
On 10/3/23 12:30, Ingo Molnar wrote:
> * Ingo Molnar <mingo@kernel.org> wrote:
>> Because not having NX in 2023 on any system that is threatened is a
>> big security vulnerability in itself, and whether the vendor or owner
>> intentionally did that or not doesn't really matter, and a failing
>> kernel testcase will be the least of their problems.
> BTW., it's also questionable whether the owner is *aware* of the fact that
> NX is not available: what if some kernel debug option cleared the NX flag,
> unintended, or there's some serious firmware bug?
>
> However unlikely those situations might be, I think unconditionally warning
> about NX not available is a very 2023 thing to do.
100% agree for x86_64. Any sane x86_64 system has NX and the rest are
noise that can live with the error message, unless someone shows up with
a compelling reason why not.
For 32-bit, the situation is reversed. The majority of 32-bit-only CPUs
never had NX. The only reason to even *do* this check on 32-bit is that
we think folks are running i386 kernels on x86_64 hardware _or_ we just
don't care about 32-bit in the first place.
In the end, I think if we're going to do this test on i386, we should
_also_ do the 5-lines-of-code CPUID check. But I honestly don't care
that much. I wouldn't NAK (or not merge) this patch over it.
next prev parent reply other threads:[~2023-10-03 20:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 16:31 Alexey Dobriyan
2023-10-02 13:12 ` Ingo Molnar
2023-10-03 13:03 ` Alexey Dobriyan
2023-10-02 14:23 ` Dave Hansen
2023-10-03 13:00 ` Alexey Dobriyan
2023-10-03 14:23 ` Dave Hansen
2023-10-03 19:06 ` Ingo Molnar
2023-10-03 19:30 ` Ingo Molnar
2023-10-03 20:46 ` Dave Hansen [this message]
2023-10-03 21:53 ` H. Peter Anvin
2023-10-03 16:18 ` [PATCH v2] x86: " Alexey Dobriyan
2023-10-03 19:01 ` Ingo Molnar
2023-10-03 19:12 ` [tip: x86/mm] selftests/x86/mm: Add new " tip-bot2 for Alexey Dobriyan
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=1dad6a33-1cd0-0d0f-29c5-97fd2807f07a@intel.com \
--to=dave.hansen@intel.com \
--cc=adobriyan@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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®