This is a note to let you know that I've just added the patch titled
[PATCH] Revert "x86: Cleanup highmap after brk is concluded"
to the 2.6.38-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
revert-x86-cleanup-highmap-after-brk-is-concluded.patch
and it can be found in the queue-2.6.38 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From a056dab5800b78dd284c8a6252fcd53e220003c3 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <[email protected]>
Date: Mon, 11 Apr 2011 16:01:32 -0700
Subject: [PATCH] Revert "x86: Cleanup highmap after brk is concluded"
This reverts upstream commit e5f15b45ddf3afa2bbbb10c7ea34fb32b6de0a0e
It caused problems in the stable tree and should not have been there.
Cc: Yinghai Lu <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/x86/kernel/head64.c | 3 +++
arch/x86/kernel/setup.c | 5 -----
arch/x86/mm/init.c | 19 +++++++++++++++++++
arch/x86/mm/init_64.c | 11 +++++------
4 files changed, 27 insertions(+), 11 deletions(-)
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -77,6 +77,9 @@ void __init x86_64_start_kernel(char * r
/* Make NULL pointers segfault */
zap_identity_mappings();
+ /* Cleanup the over mapped high alias */
+ cleanup_highmap();
+
max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT;
for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -297,9 +297,6 @@ static void __init init_gbpages(void)
static inline void init_gbpages(void)
{
}
-static void __init cleanup_highmap(void)
-{
-}
#endif
static void __init reserve_brk(void)
@@ -925,8 +922,6 @@ void __init setup_arch(char **cmdline_p)
*/
reserve_brk();
- cleanup_highmap();
-
memblock.current_limit = get_max_mapped();
memblock_x86_fill();
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -276,6 +276,25 @@ unsigned long __init_refok init_memory_m
load_cr3(swapper_pg_dir);
#endif
+#ifdef CONFIG_X86_64
+ if (!after_bootmem && !start) {
+ pud_t *pud;
+ pmd_t *pmd;
+
+ mmu_cr4_features = read_cr4();
+
+ /*
+ * _brk_end cannot change anymore, but it and _end may be
+ * located on different 2M pages. cleanup_highmap(), however,
+ * can only consider _end when it runs, so destroy any
+ * mappings beyond _brk_end here.
+ */
+ pud = pud_offset(pgd_offset_k(_brk_end), _brk_end);
+ pmd = pmd_offset(pud, _brk_end - 1);
+ while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1))
+ pmd_clear(pmd);
+ }
+#endif
__flush_tlb_all();
if (!after_bootmem && e820_table_end > e820_table_start)
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -51,7 +51,6 @@
#include <asm/numa.h>
#include <asm/cacheflush.h>
#include <asm/init.h>
-#include <asm/setup.h>
static int __init parse_direct_gbpages_off(char *arg)
{
@@ -294,18 +293,18 @@ void __init init_extra_mapping_uc(unsign
* to the compile time generated pmds. This results in invalid pmds up
* to the point where we hit the physaddr 0 mapping.
*
- * We limit the mappings to the region from _text to _brk_end. _brk_end
- * is rounded up to the 2MB boundary. This catches the invalid pmds as
+ * We limit the mappings to the region from _text to _end. _end is
+ * rounded up to the 2MB boundary. This catches the invalid pmds as
* well, as they are located before _text:
*/
void __init cleanup_highmap(void)
{
unsigned long vaddr = __START_KERNEL_map;
- unsigned long vaddr_end = __START_KERNEL_map + (max_pfn_mapped <<
PAGE_SHIFT);
- unsigned long end = roundup((unsigned long)_brk_end, PMD_SIZE) - 1;
+ unsigned long end = roundup((unsigned long)_end, PMD_SIZE) - 1;
pmd_t *pmd = level2_kernel_pgt;
+ pmd_t *last_pmd = pmd + PTRS_PER_PMD;
- for (; vaddr + PMD_SIZE - 1 < vaddr_end; pmd++, vaddr += PMD_SIZE) {
+ for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) {
if (pmd_none(*pmd))
continue;
if (vaddr < (unsigned long) _text || vaddr > end)
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.38/alsa-hda-fix-single-internal-mic-on-alc275-sony-vaio-vpcsb1c5e.patch
queue-2.6.38/sound-oss-remove-offset-from-load_patch-callbacks.patch
queue-2.6.38/staging-usbip-bugfix-add-number-of-packets-for-isochronous-frames.patch
queue-2.6.38/staging-iio-imu-adis16400-add-delay-after-self-test.patch
queue-2.6.38/alsa-hda-fix-dock-mic-for-lenovo-x220-tablet.patch
queue-2.6.38/asoc-imx-fix-burstsize-for-dma.patch
queue-2.6.38/netfilter-xtables-fix-reentrancy.patch
queue-2.6.38/acer-wmi-does-not-set-persistence-state-by-rfkill_init_sw_state.patch
queue-2.6.38/pci-acpi-report-aspm-support-to-bios-if-not-disabled-from-command-line.patch
queue-2.6.38/econet-4-byte-infoleak-to-the-network.patch
queue-2.6.38/ath9k-fix-kernel-panic-in-ar2427.patch
queue-2.6.38/staging-usbip-bugfixes-related-to-kthread-conversion.patch
queue-2.6.38/scsi_transport_iscsi-make-priv_sess-file-writeable-only-by-root.patch
queue-2.6.38/perf-better-fit-max-unprivileged-mlock-pages-for-tools-needs.patch
queue-2.6.38/perf-fix-task_struct-reference-leak.patch
queue-2.6.38/ses-avoid-kernel-panic-when-lun-0-is-not-mapped.patch
queue-2.6.38/cciss-fix-lost-command-issue.patch
queue-2.6.38/treat-writes-as-new-when-holes-span-across-page-boundaries.patch
queue-2.6.38/staging-hv-use-sync_bitops-when-interacting-with-the-hypervisor.patch
queue-2.6.38/ubifs-fix-oops-on-error-path-in-read_pnode.patch
queue-2.6.38/media-radio-wl1273-fix-build-errors.patch
queue-2.6.38/alsa-pcm-fix-infinite-loop-in-snd_pcm_update_hw_ptr0.patch
queue-2.6.38/drm-radeon-kms-add-some-sanity-checks-to-obj-info-record-parsingi-v2.patch
queue-2.6.38/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch
queue-2.6.38/alsa-hda-add-dock-mic-quirk-for-lenovo-thinkpad-x220.patch
queue-2.6.38/drivers-leds-leds-lp5521.c-world-writable-sysfs-engine-files.patch
queue-2.6.38/x86-64-mm-put-early-page-table-high.patch
queue-2.6.38/mm-avoid-wrapping-vm_pgoff-in-mremap.patch
queue-2.6.38/drivers-rtc-rtc-ds1511.c-world-writable-sysfs-nvram-file.patch
queue-2.6.38/revert-x86-cleanup-highmap-after-brk-is-concluded.patch
queue-2.6.38/mfd-ab3500-world-writable-debugfs-register-files.patch
queue-2.6.38/alsa-hda-hdmi-fix-mcp7x-audio-infoframe-checksums.patch
queue-2.6.38/drivers-media-video-tlg2300-pd-video.c-remove-second-mutex_unlock-in-pd_vidioc_s_fmt.patch
queue-2.6.38/watchdog-s3c2410_wdt.c-convert-release_resource-to-release_region-release_mem_region.patch
queue-2.6.38/char-tpm-fix-unitialized-usage-of-data-buffer.patch
queue-2.6.38/staging-hv-fix-garp-not-sent-after-quick-migration.patch
queue-2.6.38/drivers-misc-ep93xx_pwm.c-world-writable-sysfs-files.patch
queue-2.6.38/alsa-hda-fix-spdif-out-regression-on-alc889.patch
queue-2.6.38/revert-net-sunrpc-use-static-const-char-arrays.patch
queue-2.6.38/p54usb-ids-for-two-new-devices.patch
queue-2.6.38/ecryptfs-unlock-page-in-write_begin-error-path.patch
queue-2.6.38/bluetooth-bnep-fix-buffer-overflow.patch
queue-2.6.38/amd64_edac-fix-potential-memleak.patch
queue-2.6.38/mac80211-fix-a-crash-in-minstrel_ht-in-ht-mode-with-no-supported-mcs-rates.patch
queue-2.6.38/hid-hid-magicmouse-increase-evdev-buffer-size.patch
queue-2.6.38/rose-prevent-heap-corruption-with-bad-facilities.patch
queue-2.6.38/ipv6-netfilter-ip6_tables-fix-infoleak-to-userspace.patch
queue-2.6.38/rt2x00-fix-cancelling-uninitialized-work.patch
queue-2.6.38/watchdog-convert-release_resource-to-release_region-release_mem_region.patch
queue-2.6.38/x86-mtrr-pat-fix-one-cpu-getting-out-of-sync-during-resume.patch
queue-2.6.38/crypto-aesni-intel-fixed-problem-with-packets-that-are-not-multiple-of-64bytes.patch
queue-2.6.38/asoc-explicitly-say-registerless-widgets-have-no-register.patch
queue-2.6.38/asoc-fix-codec-device-name-for-corgi.patch
queue-2.6.38/net-fix-ethtool-set_flags-not-intended-einval-return-value.patch
queue-2.6.38/mac80211-initialize-sta-last_rx-in-sta_info_alloc.patch
queue-2.6.38/xfs-register-the-inode-cache-shrinker-before-quotachecks.patch
queue-2.6.38/mfd-ab3100-world-writable-debugfs-_priv-files.patch
queue-2.6.38/btrfs-fix-uninitialized-root-flags-for-subvolumes.patch
queue-2.6.38/irda-prevent-heap-corruption-on-invalid-nickname.patch
queue-2.6.38/quota-don-t-write-quota-info-in-dquot_commit.patch
queue-2.6.38/inotify-fix-double-free-corruption-of-stuct-user.patch
queue-2.6.38/alsa-ens1371-fix-creative-ectiva-support.patch
queue-2.6.38/relax-si_code-check-in-rt_sigqueueinfo-and-rt_tgsigqueueinfo.patch
queue-2.6.38/bridge-netfilter-fix-information-leak.patch
queue-2.6.38/staging-usbip-bugfix-for-isochronous-packets-and-optimization.patch
queue-2.6.38/watchdog-sp5100_tco.c-check-if-firmware-has-set-correct-value-in-tcobase.patch
queue-2.6.38/myri10ge-fix-rmmod-crash.patch
queue-2.6.38/irda-validate-peer-name-and-attribute-lengths.patch
queue-2.6.38/iwlwifi-accept-eeprom-version-0x423-for-iwl6000.patch
queue-2.6.38/nilfs2-fix-data-loss-in-mmap-page-write-for-hole-blocks.patch
queue-2.6.38/powerpc-fix-accounting-of-softirq-time-when-idle.patch
queue-2.6.38/input-synaptics-fix-crash-in-synaptics_module_init.patch
queue-2.6.38/ubifs-do-not-read-flash-unnecessarily.patch
queue-2.6.38/netfilter-h323-bug-in-parsing-of-asn1-seqof-field.patch
queue-2.6.38/b43-allocate-receive-buffers-big-enough-for-max-frame-len-offset.patch
queue-2.6.38/asoc-imx-set-watermarks-for-mx2-dma.patch
queue-2.6.38/alsa-vmalloc-buffers-should-use-normal-mmap.patch
queue-2.6.38/ses-show-devices-for-enclosures-with-no-page-7.patch
queue-2.6.38/ath9k-fix-a-chip-wakeup-related-crash-in-ath9k_start.patch
queue-2.6.38/sound-oss-opl3-validate-voice-and-channel-indexes.patch
queue-2.6.38/staging-iio-imu-adis16400-fix-up-spi-messages-cs_change-behavior.patch
queue-2.6.38/mfd-ab8500-world-writable-debugfs-register-files.patch
queue-2.6.38/alsa-hda-new-ad1984a-model-for-dell-precision-r5500.patch
queue-2.6.38/drm-radeon-kms-add-some-new-ontario-pci-ids.patch
queue-2.6.38/netfilter-ip_tables-fix-infoleak-to-userspace.patch
queue-2.6.38/netfilter-ipt_clusterip-fix-buffer-overflow.patch
queue-2.6.38/alsa-fix-yet-another-race-in-disconnection.patch
queue-2.6.38/drivers-leds-leds-lp5523.c-world-writable-engine-sysfs-files.patch
queue-2.6.38/netfilter-arp_tables-fix-infoleak-to-userspace.patch
queue-2.6.38/bluetooth-add-support-for-apple-macbook-pro-8-2.patch
queue-2.6.38/staging-iio-imu-adis16400-fix-addresses-of-gyro-and-accel-calibration-offset.patch
queue-2.6.38/ubifs-fix-debugging-failure-in-dbg_check_space_info.patch
queue-2.6.38/perf-rebase-max-unprivileged-mlock-threshold-on-top-of-page-size.patch
queue-2.6.38/wl12xx-fix-potential-buffer-overflow-in-testmode-nvs-push.patch
queue-2.6.38/bluetooth-sco-fix-information-leak-to-userspace.patch
queue-2.6.38/rt2x00-fix-radio-off-hang-issue-for-pcie-interface.patch
queue-2.6.38/staging-iio-imu-adis16400-make-sure-only-enabled-scan_elements-are-pushed-into-the-ring.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable