From patchwork Sun Nov 21 07:03:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 72433 X-Patchwork-Delegate: tim.gardner@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 6B09FB7120 for ; Sun, 21 Nov 2010 18:04:03 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PK3xl-0000tL-68; Sun, 21 Nov 2010 07:03:49 +0000 Received: from smtp.outflux.net ([198.145.64.163]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PK3xi-0000tA-Kt for kernel-team@lists.ubuntu.com; Sun, 21 Nov 2010 07:03:47 +0000 Received: from www.outflux.net (serenity-end.outflux.net [10.2.0.2]) by vinyl.outflux.net (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id oAL73hgX018019; Sat, 20 Nov 2010 23:03:43 -0800 Date: Sat, 20 Nov 2010 23:03:42 -0800 From: Kees Cook To: kernel-team@lists.ubuntu.com, kernel@lists.fedoraproject.org Subject: [PATCH] nx-emu: fix inverted report of disable_nx Message-ID: <20101121070342.GE4617@outflux.net> MIME-Version: 1.0 Content-Disposition: inline Organization: Ubuntu X-MIMEDefang-Filter: outflux$Revision: 1.316 $ X-HELO: www.outflux.net X-Scanned-By: MIMEDefang 2.67 on 10.2.0.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com 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 --- 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