From: Matt Fleming <matt@codeblueprint.co.uk>
To: Kosuke Tatsukawa <tatsu@ab.jp.nec.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH 1/2] x86: Fix kernel panic when booting with XD disabled in uEFI firmware
Date: Tue, 8 Dec 2015 12:25:57 +0000 [thread overview]
Message-ID: <20151208122557.GA2518@codeblueprint.co.uk> (raw)
In-Reply-To: <17EC94B0A072C34B8DCF0D30AD16044A0288EFC7@BPXM09GP.gisp.nec.co.jp>
On Mon, 07 Dec, at 11:10:43PM, Kosuke Tatsukawa wrote:
>
> Thank you pointing that out.
>
> linux-4.4-rc3 booted without a problem on a real server even with XD
> turned off by the firmware. I didn't notice this before because I was
> using an older version of the kernel on the real server, and doing
> investigation on a KVM guest.
>
> The "noexec=off" kernel parameter still seems to come up with EFI
> runtime service disabled though. Do you think this should be left alone
> as an disadvantage for using a bad option?
Good question.
I couldn't find any other examples of code that returns an error if
PAGE_NX isn't supported either by the hardware or via the noexec
command line option. Things like set_memory_x() and set_memory_nx()
return success without actually doing anything.
While I'm all for using hardware security features wherever possible,
such as force-enabling it in commit 04633df0c43d ("x86/cpu: Call
verify_cpu() after having entered long mode too"), if the user has
explicitly turned it off on the kernel command line, we should still
try and provide EFI services.
Borislav, what do you think about stripping PAGE_NX from 'page_flags'
in kernel_map_pages_in_pgd() if NX isn't supported, rather than
returning EINVAL? At least that way EFI runtime services would still
work.
next prev parent reply other threads:[~2015-12-08 12:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 23:58 [PATCH 1/2] x86: Fix kernel panic when booting with XD disabled in uEFI firmware Kosuke Tatsukawa
2015-12-04 16:40 ` Matt Fleming
2015-12-07 23:10 ` Kosuke Tatsukawa
2015-12-08 12:25 ` Matt Fleming [this message]
2015-12-08 14:19 ` Borislav Petkov
2015-12-08 20:30 ` Kees Cook
2015-12-08 20:39 ` H. Peter Anvin
2015-12-08 20:54 ` Borislav Petkov
2015-12-15 0:07 ` Andy Lutomirski
2015-12-08 20:56 ` 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=20151208122557.GA2518@codeblueprint.co.uk \
--to=matt@codeblueprint.co.uk \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tatsu@ab.jp.nec.com \
--cc=tglx@linutronix.de \
--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