linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Security] [PATCH v3 0/4] x86: clear XD_DISABLED flag on Intel to regain NX
@ 2010-11-09 18:11 Kees Cook
  2010-11-09 18:14 ` [PATCH 1/4] x86: rename verify_cpu_64.S to verify_cpu.S Kees Cook
                   ` (4 more replies)
  0 siblings, 5 replies; 35+ messages in thread
From: Kees Cook @ 2010-11-09 18:11 UTC (permalink / raw)
  To: x86, linux-kernel

Hi,

This is a re-send of an earlier patch series that got side-tracked. I'd
like to get this into the kernel in some form, so I'd like to try
submission again, as I think it is important.

Intel CPUs have an additional MSR bit to indicate if the BIOS was
configured to disable NX. This bit was traditionally used for operating
systems that did not understand how to handle the NX bit. Since Linux
understands this, this BIOS flag should be ignored by default.

In a review[1] of reported hardware being used by Ubuntu bug reporters,
almost 10% of systems had an incorrectly configured BIOS, leaving their
systems unable to use the NX features of their CPU.

This change will clear the MSR_IA32_MISC_ENABLE_XD_DISABLE bit so that NX
cannot be inappropriately controlled by the BIOS on Intel CPUs.  If, under
very strange hardware configurations, NX actually needs to be disabled,
"noexec=off" can be used to restore the prior behavior.

Based on feedback from HPA, this was reworked to extend the existing
"verify_cpu" routines, and to more tightly confine which CPUs will call
MSR_IA32_MISC_ENABLE. Since it includes some re-arrangements of files, I
tried to break the patches up into their logical steps.

-Kees

[1] http://www.outflux.net/blog/archives/2010/02/18/data-mining-for-nx-bit/

-- 
Kees Cook
Ubuntu Security Team

^ permalink raw reply	[flat|nested] 35+ messages in thread
* [Security] [PATCH v5 0/4] x86: clear XD_DISABLED flag on Intel to regain NX
@ 2010-11-10 18:35 Kees Cook
  2010-11-10 18:35 ` [PATCH 3/4] x86: call verify_cpu during 32bit CPU startup Kees Cook
  0 siblings, 1 reply; 35+ messages in thread
From: Kees Cook @ 2010-11-10 18:35 UTC (permalink / raw)
  To: x86, linux-kernel; +Cc: Pekka Enberg, Alan Cox, Ingo Molnar

Resending with Alan Cox's Acks, at Ingo's request.

Intel CPUs have an additional MSR bit to indicate if the BIOS was
configured to disable NX. This bit was traditionally used for operating
systems that did not understand how to handle the NX bit. Since Linux
understands this, this BIOS flag should be ignored by default.

In a review[1] of reported hardware being used by Ubuntu bug reporters,
almost 10% of systems had an incorrectly configured BIOS, leaving their
systems unable to use the NX features of their CPU.

This change will clear the MSR_IA32_MISC_ENABLE_XD_DISABLE bit so that NX
cannot be inappropriately controlled by the BIOS on Intel CPUs. If, under
very strange hardware configurations, NX actually needs to be disabled,
"noexec=off" can be used to restore the prior behavior.

-Kees

[1] http://www.outflux.net/blog/archives/2010/02/18/data-mining-for-nx-bit/

---
Changelog:
v2 - rearranged use of verify_cpu()
v3 - resent, show stats on systems that need it
v4 - expanded commit messages, added acks
v5 - added acks

^ permalink raw reply	[flat|nested] 35+ messages in thread
* [Security] [PATCH v4 0/4] x86: clear XD_DISABLED flag on Intel to regain NX
@ 2010-11-09 22:17 Kees Cook
  2010-11-09 22:18 ` [PATCH 3/4] x86: call verify_cpu during 32bit CPU startup Kees Cook
  0 siblings, 1 reply; 35+ messages in thread
From: Kees Cook @ 2010-11-09 22:17 UTC (permalink / raw)
  To: x86, linux-kernel

Resending with updates to commit messages and Pekka Enberg's Acks.

Intel CPUs have an additional MSR bit to indicate if the BIOS was
configured to disable NX. This bit was traditionally used for operating
systems that did not understand how to handle the NX bit. Since Linux
understands this, this BIOS flag should be ignored by default.

In a review[1] of reported hardware being used by Ubuntu bug reporters,
almost 10% of systems had an incorrectly configured BIOS, leaving their
systems unable to use the NX features of their CPU.

This change will clear the MSR_IA32_MISC_ENABLE_XD_DISABLE bit so that NX
cannot be inappropriately controlled by the BIOS on Intel CPUs.  If, under
very strange hardware configurations, NX actually needs to be disabled,
"noexec=off" can be used to restore the prior behavior.

-Kees

[1] http://www.outflux.net/blog/archives/2010/02/18/data-mining-for-nx-bit/

---
Changelog:
v2 - rearranged use of verify_cpu()
v3 - resent, show stats on systems that need it
v4 - expanded commit messages, added acks

-- 
Kees Cook
Ubuntu Security Team

^ permalink raw reply	[flat|nested] 35+ messages in thread
* [PATCH v2 0/4] x86: clear XD_DISABLED flag on Intel to regain NX
@ 2010-06-19  5:50 Kees Cook
  2010-06-19  5:52 ` [PATCH 3/4] x86: call verify_cpu during 32bit CPU startup Kees Cook
  0 siblings, 1 reply; 35+ messages in thread
From: Kees Cook @ 2010-06-19  5:50 UTC (permalink / raw)
  To: x86
  Cc: H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Alexander Potashev,
	Tim Abbott, Sam Ravnborg, Jan Beulich, Jeremy Fitzhardinge,
	linux-kernel

This will clear the MSR_IA32_MISC_ENABLE_XD_DISABLE bit so that NX cannot
be inappropriately controlled by the BIOS on Intel CPUs.  If NX actually
needs to be disabled, "noexec=off" can be used.

Based on feedback from HPA, this was reworked to extend the existing
"verify_cpu" routines, and to more tightly confine which CPUs will call
MSR_IA32_MISC_ENABLE.  Since it includes some re-arrangements of files, I
tried to break the patches up into their logical steps.

-Kees

-- 
Kees Cook
Ubuntu Security Team

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2010-11-14  6:33 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-09 18:11 [Security] [PATCH v3 0/4] x86: clear XD_DISABLED flag on Intel to regain NX Kees Cook
2010-11-09 18:14 ` [PATCH 1/4] x86: rename verify_cpu_64.S to verify_cpu.S Kees Cook
2010-11-09 18:46   ` Pekka Enberg
2010-11-09 19:00     ` Kees Cook
2010-11-09 19:59       ` Pekka Enberg
2010-11-09 19:02     ` Kees Cook
2010-11-09 19:11       ` Pekka Enberg
2010-11-09 18:15 ` [PATCH 2/4] x86: clear XD_DISABLED flag on Intel to regain NX Kees Cook
2010-11-10 16:11   ` Andi Kleen
2010-11-10 16:47     ` Kees Cook
2010-11-10 17:42       ` Andi Kleen
2010-11-10 18:15         ` Kees Cook
2010-11-09 18:15 ` [PATCH 3/4] x86: call verify_cpu during 32bit CPU startup Kees Cook
2010-11-09 19:09   ` Pekka Enberg
2010-11-09 19:19     ` Kees Cook
2010-11-09 19:46       ` Pekka Enberg
2010-11-09 19:56         ` Kees Cook
2010-11-09 20:28           ` Pekka Enberg
2010-11-09 20:48             ` Kees Cook
2010-11-09 20:50               ` Pekka Enberg
2010-11-09 18:15 ` [PATCH 4/4] x86: only CPU features determine NX capabilities Kees Cook
2010-11-09 18:31 ` [Security] [PATCH v3 0/4] x86: clear XD_DISABLED flag on Intel to regain NX Alan Cox
2010-11-09 18:56   ` Kees Cook
2010-11-09 22:50     ` Alan Cox
2010-11-09 23:53       ` Kees Cook
2010-11-10  0:21         ` Alan Cox
2010-11-10  0:43           ` Kees Cook
2010-11-10  1:10             ` Kees Cook
2010-11-10 11:11               ` Alan Cox
2010-11-10 11:15                 ` Ingo Molnar
2010-11-11 15:15               ` Rogier Wolff
  -- strict thread matches above, loose matches on Subject: below --
2010-11-10 18:35 [Security] [PATCH v5 " Kees Cook
2010-11-10 18:35 ` [PATCH 3/4] x86: call verify_cpu during 32bit CPU startup Kees Cook
2010-11-14  6:33   ` Yinghai Lu
2010-11-09 22:17 [Security] [PATCH v4 0/4] x86: clear XD_DISABLED flag on Intel to regain NX Kees Cook
2010-11-09 22:18 ` [PATCH 3/4] x86: call verify_cpu during 32bit CPU startup Kees Cook
2010-06-19  5:50 [PATCH v2 0/4] x86: clear XD_DISABLED flag on Intel to regain NX Kees Cook
2010-06-19  5:52 ` [PATCH 3/4] x86: call verify_cpu during 32bit CPU startup Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).