r4200 - in dists/sid/linux-2.6/debian: . patches-debian
patches-debian/series
Dann Frazier
dannf at costa.debian.org
Wed Sep 14 16:55:08 UTC 2005
Author: dannf
Date: 2005-09-14 16:55:08 +0000 (Wed, 14 Sep 2005)
New Revision: 4200
Added:
dists/sid/linux-2.6/debian/patches-debian/module-unify-per-cpu-data.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches-debian/series/2.6.12-6
Log:
* module-unify-per-cpu-data.patch: Unifies per cpu data handling for UP
and SMP builds. This fixes a bug detected on ia64 whose symptom was
unloadable modules in UP builds. (closes: #325070)
Modified: dists/sid/linux-2.6/debian/changelog
===================================================================
--- dists/sid/linux-2.6/debian/changelog 2005-09-14 12:26:13 UTC (rev 4199)
+++ dists/sid/linux-2.6/debian/changelog 2005-09-14 16:55:08 UTC (rev 4200)
@@ -4,8 +4,13 @@
* [SECURITY] THe seq_file memory leak fix included in 2.6.12-6
as part of upstream's 2.6.12.6 patchset is now CAN-2005-2800.
- -- Simon Horman <horms at debian.org> Fri, 9 Sep 2005 11:38:06 +0900
+ [ dann frazier ]
+ * module-unify-per-cpu-data.patch: Unifies per cpu data handling for UP
+ and SMP builds. This fixes a bug detected on ia64 whose symptom was
+ unloadable modules in UP builds. (closes: #325070)
+ -- dann frazier <dannf at debian.org> Tue, 13 Sep 2005 18:02:36 -0600
+
linux-2.6 (2.6.12-6) unstable; urgency=high
[ Andres Salomon, Bastian Blank ]
Added: dists/sid/linux-2.6/debian/patches-debian/module-unify-per-cpu-data.patch
===================================================================
--- dists/sid/linux-2.6/debian/patches-debian/module-unify-per-cpu-data.patch 2005-09-14 12:26:13 UTC (rev 4199)
+++ dists/sid/linux-2.6/debian/patches-debian/module-unify-per-cpu-data.patch 2005-09-14 16:55:08 UTC (rev 4200)
@@ -0,0 +1,131 @@
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Make UP & SMP kernels treat module per-cpu data the same
+## DP: Description: See the patch header for more details.
+## DP: Patch author: Peter Chubb <peterc at gelato.unsw.edu.au>
+## DP: Upstream status: submitted
+##
+
+From: Peter Chubb <peterc at gelato.unsw.edu.au>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Message-ID: <17174.35525.283392.703723 at berry.gelato.unsw.EDU.AU>
+Date: Thu, 1 Sep 2005 14:59:49 +1000
+To: linux-ia64 at vger.kernel.org, tony.luck at intel.com, dmosberger at gmail.com
+Cc: linux-kernel at vger.kernel.org
+In-Reply-To: <ed5aea43050830150112ee6103 at mail.gmail.com>
+References:
+ <B8E391BBE9FE384DAA4C5C003888BE6F0443A5FA at scsmsx401.amr.corp.intel.com>
+ <ed5aea430508301229386fc596 at mail.gmail.com>
+ <17172.54563.329758.846131 at wombat.chubb.wattle.id.au>
+X-Mailer: VM 7.19 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid
+Comments: Hyperbole mail buttons accepted, v04.18.
+X-Face:
+ GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P at e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h#
+ !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[,(&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9%
+ \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j!
+X-SA-Exim-Connect-IP: 203.143.160.117
+X-SA-Exim-Mail-From: peterc at gelato.unsw.edu.au
+Subject: RE: ip_contrack refuses to load if built UP as a module on IA64
+X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on
+ lemon.gelato.unsw.edu.au
+X-Spam-Level:
+X-Spam-Status: No, score=-2.3 required=5.0 tests=ALL_TRUSTED,AWL
+ autolearn=ham version=3.0.4
+X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:39:27 +0000)
+X-SA-Exim-Scanned: Yes (on lemon.gelato.unsw.edu.au)
+Sender: linux-ia64-owner at vger.kernel.org
+Precedence: bulk
+X-Mailing-List: linux-ia64 at vger.kernel.org
+X-PMX-Version: 5.0.3.165339, Antispam-Engine: 2.1.0.0, Antispam-Data:
+ 2005.8.31.39
+X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ldl.fc.hp.com
+X-Evolution-Source: imap://dannf@linux.fc.hp.com/
+Content-Transfer-Encoding: 8bit
+
+
+
+This patch makes UP and SMP do the same thing as far as module per-cpu
+data go.
+
+Unfortunately it affects core code.
+
+To repeat the problem:
+ IA64 keeps per-cpu data in a small data area that is referenced by a
+ 22-bit offset, for both UP and SMP cases. If a module defines
+ per-cpu data, it too will end up in the small-data area. But the
+ module loader at present special-cases the UP treatment of per-cpu
+ data, assumes that it is in the GP-relative data area, and does
+ nothing (for SMP it allocates space, and copies initialised data
+ items into it)
+
+ The effect is that modules defining per-cpu data fail to load if
+ they're built UP, because of an impossible relocation.
+
+ The appended patch makes the treatment of per-cpu data uniform
+ between UP and SMP cases. For most architectures, the per-cpu data
+ section will be empty for UP, and so the per-cpu setup code will not
+ be invoked.
+
+Signed-off-by: Peter Chubb <peterc at gelato.unsw.edu.au>
+
+diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
+--- a/arch/ia64/kernel/module.c
++++ b/arch/ia64/kernel/module.c
+@@ -951,4 +951,10 @@ percpu_modcopy (void *pcpudst, const voi
+ if (cpu_possible(i))
+ memcpy(pcpudst + __per_cpu_offset[i], src, size);
+ }
++#else
++void
++percpu_modcopy (void *pcpudst, const void *src, unsigned long size)
++{
++ memcpy(pcpudst, src, size);
++}
+ #endif /* CONFIG_SMP */
+diff --git a/kernel/module.c b/kernel/module.c
+--- a/kernel/module.c
++++ b/kernel/module.c
+@@ -209,7 +209,6 @@ static struct module *find_module(const
+ return NULL;
+ }
+
+-#ifdef CONFIG_SMP
+ /* Number of blocks used and allocated. */
+ static unsigned int pcpu_num_used, pcpu_num_allocated;
+ /* Size of each block. -ve means used. */
+@@ -352,29 +351,7 @@ static int percpu_modinit(void)
+ return 0;
+ }
+ __initcall(percpu_modinit);
+-#else /* ... !CONFIG_SMP */
+-static inline void *percpu_modalloc(unsigned long size, unsigned long align,
+- const char *name)
+-{
+- return NULL;
+-}
+-static inline void percpu_modfree(void *pcpuptr)
+-{
+- BUG();
+-}
+-static inline unsigned int find_pcpusec(Elf_Ehdr *hdr,
+- Elf_Shdr *sechdrs,
+- const char *secstrings)
+-{
+- return 0;
+-}
+-static inline void percpu_modcopy(void *pcpudst, const void *src,
+- unsigned long size)
+-{
+- /* pcpusec should be 0, and size of that section should be 0. */
+- BUG_ON(size != 0);
+-}
+-#endif /* CONFIG_SMP */
++
+
+ #ifdef CONFIG_MODULE_UNLOAD
+ #define MODINFO_ATTR(field) \
+-
+To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
Modified: dists/sid/linux-2.6/debian/patches-debian/series/2.6.12-6
===================================================================
--- dists/sid/linux-2.6/debian/patches-debian/series/2.6.12-6 2005-09-14 12:26:13 UTC (rev 4199)
+++ dists/sid/linux-2.6/debian/patches-debian/series/2.6.12-6 2005-09-14 16:55:08 UTC (rev 4200)
@@ -1 +1,2 @@
+ 2.6.12.6.patch
++ module-unify-per-cpu-data.patch
More information about the Kernel-svn-changes
mailing list