FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 10-18-2009, 04:16 PM
Kees Cook
 
Default fix report of cs-limit nx-emulation

This is a correction to the patch titled "UBUNTU: SAUCE: [x86] implement
cs-limit nx-emulation for ia32" so that NX capabilities are correctly
reported based on actual hardware and arch details.

BugLink: http://bugs.launchpad.net/bugs/454285

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/x86/mm/init.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 10de7ed..817fa01 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -77,6 +77,7 @@ static void __init set_nx(void)
#else
static inline void set_nx(void)
{
+ nx_enabled = ( (__supported_pte_mask & _PAGE_NX) == _PAGE_NX );
}
#endif

@@ -213,8 +214,13 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
if (nx_enabled)
printk(KERN_INFO "NX (Execute Disable) protection: active
");
else
+#ifdef CONFIG_X86_32
printk(KERN_INFO "Using x86 segment limits to approximate "
"NX protection
");
+#else
+ printk(KERN_WARNING "Warning: NX (Execute Disable) protection "
+ "missing in CPU or disabled in BIOS!
");
+#endif

/* Enable PSE if available */
if (cpu_has_pse)
--
1.6.3.3


--------------070703010202010604050704
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

--------------070703010202010604050704--
 

Thread Tools




All times are GMT. The time now is 06:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org