From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, "H. Peter Anvin" <hpa@linux.intel.com>,
Jiri Slaby <jslaby@suse.cz>
Subject: [ 17/19] x86-32, mm: Rip out x86_32 NUMA remapping code
Date: Wed, 10 Apr 2013 15:50:40 -0700 [thread overview]
Message-ID: <20130410225028.591009147@linuxfoundation.org> (raw)
In-Reply-To: <20130410225026.833809117@linuxfoundation.org>
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Hansen <dave@linux.vnet.ibm.com>
commit f03574f2d5b2d6229dcdf2d322848065f72953c7 upstream.
This code was an optimization for 32-bit NUMA systems.
It has probably been the cause of a number of subtle bugs over
the years, although the conditions to excite them would have
been hard to trigger. Essentially, we remap part of the kernel
linear mapping area, and then sometimes part of that area gets
freed back in to the bootmem allocator. If those pages get
used by kernel data structures (say mem_map[] or a dentry),
there's no big deal. But, if anyone ever tried to use the
linear mapping for these pages _and_ cared about their physical
address, bad things happen.
For instance, say you passed __GFP_ZERO to the page allocator
and then happened to get handed one of these pages, it zero the
remapped page, but it would make a pte to the _old_ page.
There are probably a hundred other ways that it could screw
with things.
We don't need to hang on to performance optimizations for
these old boxes any more. All my 32-bit NUMA systems are long
dead and buried, and I probably had access to more than most
people.
This code is causing real things to break today:
https://lkml.org/lkml/2013/1/9/376
I looked in to actually fixing this, but it requires surgery
to way too much brittle code, as well as stuff like
per_cpu_ptr_to_phys().
[ hpa: Cc: this for -stable, since it is a memory corruption issue.
However, an alternative is to simply mark NUMA as depends BROKEN
rather than EXPERIMENTAL in the X86_32 subclause... ]
Link: http://lkml.kernel.org/r/20130131005616.1C79F411@kernel.stglabs.ibm.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/Kconfig | 4 ----
arch/x86/mm/numa.c | 3 ---
arch/x86/mm/numa_internal.h | 6 ------
3 files changed, 13 deletions(-)
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1219,10 +1219,6 @@ config HAVE_ARCH_BOOTMEM
def_bool y
depends on X86_32 && NUMA
-config HAVE_ARCH_ALLOC_REMAP
- def_bool y
- depends on X86_32 && NUMA
-
config ARCH_HAVE_MEMORY_PRESENT
def_bool y
depends on X86_32 && DISCONTIGMEM
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -207,9 +207,6 @@ static void __init setup_node_data(int n
if (end && (end - start) < NODE_MIN_SIZE)
return;
- /* initialize remap allocator before aligning to ZONE_ALIGN */
- init_alloc_remap(nid, start, end);
-
start = roundup(start, ZONE_ALIGN);
printk(KERN_INFO "Initmem setup node %d %016Lx-%016Lx\n",
--- a/arch/x86/mm/numa_internal.h
+++ b/arch/x86/mm/numa_internal.h
@@ -21,12 +21,6 @@ void __init numa_reset_distance(void);
void __init x86_numa_init(void);
-#ifdef CONFIG_X86_64
-static inline void init_alloc_remap(int nid, u64 start, u64 end) { }
-#else
-void __init init_alloc_remap(int nid, u64 start, u64 end);
-#endif
-
#ifdef CONFIG_NUMA_EMU
void __init numa_emulation(struct numa_meminfo *numa_meminfo,
int numa_dist_cnt);
next prev parent reply other threads:[~2013-04-10 22:51 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 22:50 [ 00/19] 3.0.73-stable review Greg Kroah-Hartman
2013-04-10 22:50 ` [ 01/19] ASoC: dma-sh7760: Fix compile error Greg Kroah-Hartman
2013-04-10 22:50 ` [ 02/19] UBIFS: make space fixup work in the remount case Greg Kroah-Hartman
2013-04-10 22:50 ` [ 03/19] reiserfs: Fix warning and inode leak when deleting inode with xattrs Greg Kroah-Hartman
2013-04-11 7:33 ` Pawel Zawora
2013-04-11 19:04 ` Greg Kroah-Hartman
2013-04-10 22:50 ` [ 04/19] ALSA: hda - bug fix on return value when getting HDMI ELD info Greg Kroah-Hartman
2013-04-10 22:50 ` [ 05/19] ALSA: hda - fix typo in proc output Greg Kroah-Hartman
2013-04-10 22:50 ` [ 06/19] ext4: fixup 64-bit divides in 3.0-stable backport of upstream fix Greg Kroah-Hartman
2013-04-10 22:50 ` [ 07/19] libata: Use integer return value for atapi_command_packet_set Greg Kroah-Hartman
2013-04-10 22:50 ` [ 08/19] libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive Greg Kroah-Hartman
2013-04-10 22:50 ` [ 09/19] alpha: Add irongate_io to PCI bus resources Greg Kroah-Hartman
2013-04-10 22:50 ` [ 10/19] ftrace: Consistently restore trace function on sysctl enabling Greg Kroah-Hartman
2013-04-10 22:50 ` [ 11/19] powerpc: pSeries_lpar_hpte_remove fails from Adjunct partition being performed before the ANDCOND test Greg Kroah-Hartman
2013-04-10 22:50 ` [ 12/19] spinlocks and preemption points need to be at least compiler barriers Greg Kroah-Hartman
2013-04-10 22:50 ` [ 13/19] crypto: gcm - fix assumption that assoc has one segment Greg Kroah-Hartman
2013-04-10 22:50 ` [ 14/19] block: avoid using uninitialized value in from queue_var_store Greg Kroah-Hartman
2013-04-10 22:50 ` [ 15/19] thermal: return an error on failure to register thermal class Greg Kroah-Hartman
2013-04-10 22:50 ` [ 16/19] mm: prevent mmap_cache race in find_vma() Greg Kroah-Hartman
2013-04-10 22:50 ` Greg Kroah-Hartman [this message]
2013-04-10 22:50 ` [ 18/19] Revert "mwifiex: cancel cmd timer and free curr_cmd in shutdown process Greg Kroah-Hartman
2013-04-10 22:50 ` [ 19/19] rt2x00: rt2x00pci_regbusy_read() - only print register access failure once Greg Kroah-Hartman
2013-04-11 16:29 ` [ 00/19] 3.0.73-stable review Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130410225028.591009147@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=hpa@linux.intel.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).