[PATCH] nx-emu: fix inverted report of disable_nx

Tim Gardner tim.gardner at canonical.com
Mon Nov 22 20:20:43 UTC 2010


On 11/21/2010 12:03 AM, Kees Cook wrote:
> This nx-emu commit:
> http://git.kernel.org/?p=linux/kernel/git/frob/linux-2.6-roland.git;a=commitdiff;h=b86f45c02494d4cba26caf132e8a178854e812fd
> was intended to replace "exec_shield" with "!disable_nx", but in
> x86_report_nx() it was not correctly inverted resulting in a backward
> report to dmesg about the state of nx-emu.
>
> Signed-off-by: Kees Cook<kees.cook at canonical.com>
> ---
>   arch/x86/mm/setup_nx.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
> index b936b25..1d7a269 100644
> --- a/arch/x86/mm/setup_nx.c
> +++ b/arch/x86/mm/setup_nx.c
> @@ -42,7 +42,7 @@ void __init x86_report_nx(void)
>   {
>   	if (!cpu_has_nx) {
>   #ifdef CONFIG_X86_32
> -		if (disable_nx)
> +		if (!disable_nx)
>   			printk(KERN_INFO "NX (Execute Disable) protection: "
>   			       "approximated by x86 segment limits\n");
>   		else

Applied to Ubuntu natty

-- 
Tim Gardner tim.gardner at canonical.com




More information about the kernel-team mailing list