diff mbox

[Natty] UBUNTU: SAUCE: disable_nx should not be in __cpuinitdata section for X86_32

Message ID 1333027766-8822-1-git-send-email-tim.gardner@canonical.com
State New
Headers show

Commit Message

Tim Gardner March 29, 2012, 1:29 p.m. UTC
BugLink: http://bugs.launchpad.net/bugs/968233

I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.

 AR      arch/x86/lib/lib.a
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
The function load_elf_binary() references
the variable __cpuinitdata disable_nx.
This is often because load_elf_binary lacks a __cpuinitdata
annotation or the annotation of disable_nx is wrong.

load_elf_binary() is definitely called after initialization.

This code was added by 'UBUNTU: ubuntu: nx-emu - i386: NX emulation', so
this is not an upstream problem.

Reported-by: Tetsuo Handa <from-ubuntu@I-love.SAKURA.ne.jp>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 arch/x86/mm/setup_nx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Seth Forshee March 29, 2012, 1:38 p.m. UTC | #1
On Thu, Mar 29, 2012 at 07:29:26AM -0600, Tim Gardner wrote:
> BugLink: http://bugs.launchpad.net/bugs/968233
> 
> I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.
> 
>  AR      arch/x86/lib/lib.a
>   LD      vmlinux.o
>   MODPOST vmlinux.o
> WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
> The function load_elf_binary() references
> the variable __cpuinitdata disable_nx.
> This is often because load_elf_binary lacks a __cpuinitdata
> annotation or the annotation of disable_nx is wrong.
> 
> load_elf_binary() is definitely called after initialization.
> 
> This code was added by 'UBUNTU: ubuntu: nx-emu - i386: NX emulation', so
> this is not an upstream problem.
> 
> Reported-by: Tetsuo Handa <from-ubuntu@I-love.SAKURA.ne.jp>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  arch/x86/mm/setup_nx.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
> index 90c9eff3..89fd946 100644
> --- a/arch/x86/mm/setup_nx.c
> +++ b/arch/x86/mm/setup_nx.c
> @@ -6,7 +6,11 @@
>  #include <asm/pgtable.h>
>  #include <asm/proto.h>
>  
> +#ifdef CONFIG_X86_32
> +int disable_nx; /* referenced by load_elf_binary() */
> +#else
>  int disable_nx __cpuinitdata;
> +#endif
>  
>  /*
>   * noexec = on|off
> -- 
> 1.7.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Stefan Bader March 29, 2012, 3:42 p.m. UTC | #2
On 29.03.2012 15:29, Tim Gardner wrote:
> BugLink: http://bugs.launchpad.net/bugs/968233
> 
> I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.
> 
>  AR      arch/x86/lib/lib.a
>   LD      vmlinux.o
>   MODPOST vmlinux.o
> WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
> The function load_elf_binary() references
> the variable __cpuinitdata disable_nx.
> This is often because load_elf_binary lacks a __cpuinitdata
> annotation or the annotation of disable_nx is wrong.
> 
> load_elf_binary() is definitely called after initialization.
> 
> This code was added by 'UBUNTU: ubuntu: nx-emu - i386: NX emulation', so
> this is not an upstream problem.
> 
> Reported-by: Tetsuo Handa <from-ubuntu@I-love.SAKURA.ne.jp>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  arch/x86/mm/setup_nx.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
> index 90c9eff3..89fd946 100644
> --- a/arch/x86/mm/setup_nx.c
> +++ b/arch/x86/mm/setup_nx.c
> @@ -6,7 +6,11 @@
>  #include <asm/pgtable.h>
>  #include <asm/proto.h>
>  
> +#ifdef CONFIG_X86_32
> +int disable_nx; /* referenced by load_elf_binary() */
> +#else
>  int disable_nx __cpuinitdata;
> +#endif
>  
>  /*
>   * noexec = on|off
Tim Gardner March 29, 2012, 3:48 p.m. UTC | #3

diff mbox

Patch

diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
index 90c9eff3..89fd946 100644
--- a/arch/x86/mm/setup_nx.c
+++ b/arch/x86/mm/setup_nx.c
@@ -6,7 +6,11 @@ 
 #include <asm/pgtable.h>
 #include <asm/proto.h>
 
+#ifdef CONFIG_X86_32
+int disable_nx; /* referenced by load_elf_binary() */
+#else
 int disable_nx __cpuinitdata;
+#endif
 
 /*
  * noexec = on|off