lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AF9B6AD.8020505@zytor.com>
Date:	Tue, 10 Nov 2009 10:53:33 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Kees Cook <kees.cook@...onical.com>
CC:	Arjan van de Ven <arjan@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
	Pekka Enberg <penberg@...helsinki.fi>,
	Jan Beulich <jbeulich@...ell.com>,
	Vegard Nossum <vegardno@....uio.no>,
	Yinghai Lu <yinghai@...nel.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] [x86] detect and report lack of NX protections

On 11/10/2009 09:46 AM, Kees Cook wrote:
> 
> The kernel as-is does not set nx_enabled for 64-bit, so this message is
> skipped completely:
> 
>         if (nx_enabled)
>                 printk(KERN_INFO "NX (Execute Disable) protection: active\n");
> 
> The only time this printk is shown is on 32-bit with PAE (with NX).
> There is no "else" currently.
> 

The structure you have is:

	if (nx_enabled)
	else if (cpu_has_pae)

The test for cpu_has_pae is unconditional (you only #ifdef the message)
-- in fact, this should cause a compile-time error on 64 bits:

#undef  cpu_has_pae
#define cpu_has_pae             ___BUG___

	-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ