2722c59
>From e540f21852043a4d8e8cf5e505607909d0ab0f51 Mon Sep 17 00:00:00 2001
2722c59
From: Tim Gardner <tim.gardner@canonical.com>
2722c59
Date: Thu, 29 Mar 2012 06:21:01 -0600
2722c59
Subject: [PATCH] UBUNTU: SAUCE: disable_nx should not be in __cpuinitdata
2722c59
 section for X86_32
2722c59
2722c59
I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.
2722c59
2722c59
 AR      arch/x86/lib/lib.a
2722c59
  LD      vmlinux.o
2722c59
  MODPOST vmlinux.o
2722c59
WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
2722c59
The function load_elf_binary() references
2722c59
the variable __cpuinitdata disable_nx.
2722c59
This is often because load_elf_binary lacks a __cpuinitdata
2722c59
annotation or the annotation of disable_nx is wrong.
2722c59
2722c59
load_elf_binary() is definitely called after initialization.
2722c59
2722c59
This code was added by 'UBUNTU: ubuntu: nx-emu - i386: NX emulation', so
2722c59
this is not an upstream problem.
2722c59
2722c59
Reported-by: Tetsuo Handa <from-ubuntu@I-love.SAKURA.ne.jp>
2722c59
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
2722c59
---
2722c59
 arch/x86/mm/setup_nx.c |    4 ++++
2722c59
 1 files changed, 4 insertions(+), 0 deletions(-)
2722c59
2722c59
diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
2722c59
index 90c9eff3..89fd946 100644
2722c59
--- a/arch/x86/mm/setup_nx.c
2722c59
+++ b/arch/x86/mm/setup_nx.c
2722c59
@@ -6,7 +6,11 @@
2722c59
 #include <asm/pgtable.h>
2722c59
 #include <asm/proto.h>
2722c59
 
2722c59
+#ifdef CONFIG_X86_32
2722c59
+int disable_nx; /* referenced by load_elf_binary() */
2722c59
+#else
2722c59
 int disable_nx __cpuinitdata;
2722c59
+#endif
2722c59
 
2722c59
 /*
2722c59
  * noexec = on|off
2722c59
-- 
2722c59
1.7.9.1
2722c59