From patchwork Thu Mar 29 13:25:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 149392 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 E9E03B6EEF for ; Fri, 30 Mar 2012 00:26:11 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SDFMO-0002VP-TL; Thu, 29 Mar 2012 13:25:52 +0000 Received: from mail.tpi.com ([70.99.223.143]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SDFML-0002UR-FU for kernel-team@lists.ubuntu.com; Thu, 29 Mar 2012 13:25:49 +0000 Received: from [10.0.2.6] (host-174-45-43-11.hln-mt.client.bresnan.net [174.45.43.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.tpi.com (Postfix) with ESMTP id 0350A31324B; Thu, 29 Mar 2012 06:24:35 -0700 (PDT) Message-ID: <4F7462B7.2010004@canonical.com> Date: Thu, 29 Mar 2012 07:25:11 -0600 From: Tim Gardner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120313 Thunderbird/11.0 MIME-Version: 1.0 To: Tetsuo Handa Subject: Re: [Precise] Section mismatch warnings References: <201203290547.q2T5laa6024767@www262.sakura.ne.jp> In-Reply-To: <201203290547.q2T5laa6024767@www262.sakura.ne.jp> X-Enigmail-Version: 1.4 Cc: kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list Reply-To: tim.gardner@canonical.com 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 On 03/28/2012 11:47 PM, Tetsuo Handa wrote: > load_elf_binary() is definitely called after initialization. Good catch. This same issue also exists in older kernels where we've applied the NX emulation patches. http://bugs.launchpad.net/bugs/968233 rtg From e540f21852043a4d8e8cf5e505607909d0ab0f51 Mon Sep 17 00:00:00 2001 From: Tim Gardner Date: Thu, 29 Mar 2012 06:21:01 -0600 Subject: [PATCH] UBUNTU: SAUCE: disable_nx should not be in __cpuinitdata section for X86_32 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 Signed-off-by: Tim Gardner --- 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 #include +#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