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