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.33-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.33.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.33 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.33 longterm 
tree,
please let <[email protected]> know about it.


>From 7ba690b889e9b7e340ea5d838f26958a40d77dd9 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <[email protected]>
Date: Mon, 11 Apr 2011 16:06:59 -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
@@ -76,6 +76,9 @@ void __init x86_64_start_kernel(char * r
        /* Make NULL pointers segfault */
        zap_identity_mappings();
 
+       /* Cleanup the over mapped high alias */
+       cleanup_highmap();
+
        for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
 #ifdef CONFIG_EARLY_PRINTK
                set_intr_gate(i, &early_idt_handlers[i]);
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -295,9 +295,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)
@@ -898,8 +895,6 @@ void __init setup_arch(char **cmdline_p)
 
        reserve_brk();
 
-       cleanup_highmap();
-
        /*
         * Find and reserve possible boot-time SMP configuration:
         */
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -283,6 +283,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
@@ -49,7 +49,6 @@
 #include <asm/numa.h>
 #include <asm/cacheflush.h>
 #include <asm/init.h>
-#include <asm/setup.h>
 #include <linux/bootmem.h>
 
 static unsigned long dma_reserve __initdata;
@@ -258,18 +257,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 longterm-queue-2.6.33 which might be from [email protected] 
are

/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/squashfs-handle-corruption-of-directory-structure.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/gro-reset-dev-pointer-on-reuse.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/sound-oss-remove-offset-from-load_patch-callbacks.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/staging-usbip-bugfix-add-number-of-packets-for-isochronous-frames.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/powerpc-fix-default_machine_crash_shutdown-ifdef-botch.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/sound-oss-midi_synth-check-get_user-return-value.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/econet-4-byte-infoleak-to-the-network.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ext4-fix-credits-computing-for-indirect-mapped-files.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/staging-usbip-bugfixes-related-to-kthread-conversion.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/perf-better-fit-max-unprivileged-mlock-pages-for-tools-needs.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/repair-gdbstub-to-match-the-gdbserial-protocol-specification.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ses-avoid-kernel-panic-when-lun-0-is-not-mapped.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/cciss-fix-lost-command-issue.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/treat-writes-as-new-when-holes-span-across-page-boundaries.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/staging-hv-use-sync_bitops-when-interacting-with-the-hypervisor.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ubifs-fix-oops-on-error-path-in-read_pnode.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ecryptfs-ecryptfs_keyring_auth_tok_for_sig-bug-fix.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/mm-avoid-wrapping-vm_pgoff-in-mremap.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/drivers-rtc-rtc-ds1511.c-world-writable-sysfs-nvram-file.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/revert-x86-cleanup-highmap-after-brk-is-concluded.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/net-tipc-fix-information-leak-to-userland.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/powerpc-kexec-add-ifdef-config_ppc_std_mmu_64-to-ppc64-code.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/inet_diag-make-sure-we-actually-run-the-same-bytecode-we-audited.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/econet-fix-crash-in-aun_incoming.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/char-tpm-fix-unitialized-usage-of-data-buffer.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/drivers-misc-ep93xx_pwm.c-world-writable-sysfs-files.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/alsa-hda-fix-spdif-out-regression-on-alc889.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/p54usb-ids-for-two-new-devices.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ecryptfs-unlock-page-in-write_begin-error-path.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/exec-make-argv-envp-memory-visible-to-oom-killer.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/net-ax25-fix-information-leak-to-userland.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/bluetooth-bnep-fix-buffer-overflow.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/rose-prevent-heap-corruption-with-bad-facilities.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ipv6-netfilter-ip6_tables-fix-infoleak-to-userspace.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/x86-mtrr-pat-fix-one-cpu-getting-out-of-sync-during-resume.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/asoc-explicitly-say-registerless-widgets-have-no-register.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/xfs-prevent-leaking-uninitialized-stack-memory-in-fsgeometry_v1.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/mac80211-initialize-sta-last_rx-in-sta_info_alloc.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/mfd-ab3100-world-writable-debugfs-_priv-files.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/btrfs-fix-uninitialized-root-flags-for-subvolumes.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/irda-prevent-heap-corruption-on-invalid-nickname.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/quota-don-t-write-quota-info-in-dquot_commit.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/alsa-ens1371-fix-creative-ectiva-support.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/relax-si_code-check-in-rt_sigqueueinfo-and-rt_tgsigqueueinfo.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/bridge-netfilter-fix-information-leak.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/staging-usbip-bugfix-for-isochronous-packets-and-optimization.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/myri10ge-fix-rmmod-crash.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/irda-validate-peer-name-and-attribute-lengths.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/nilfs2-fix-data-loss-in-mmap-page-write-for-hole-blocks.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/gro-reset-skb_iif-on-reuse.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ubifs-do-not-read-flash-unnecessarily.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/exec-copy-and-paste-the-fixes-into-compat_do_execve-paths.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/netfilter-h323-bug-in-parsing-of-asn1-seqof-field.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/b43-allocate-receive-buffers-big-enough-for-max-frame-len-offset.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ses-show-devices-for-enclosures-with-no-page-7.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/net-packet-fix-information-leak-to-userland.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ath9k-fix-a-chip-wakeup-related-crash-in-ath9k_start.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/sound-oss-opl3-validate-voice-and-channel-indexes.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/alsa-hda-new-ad1984a-model-for-dell-precision-r5500.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/netfilter-ip_tables-fix-infoleak-to-userspace.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/irda-prevent-integer-underflow-in-irlmp_enumdevices.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/netfilter-ipt_clusterip-fix-buffer-overflow.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/alsa-fix-yet-another-race-in-disconnection.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/netfilter-arp_tables-fix-infoleak-to-userspace.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/bluetooth-add-support-for-apple-macbook-pro-8-2.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/ubifs-fix-debugging-failure-in-dbg_check_space_info.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/bluetooth-sco-fix-information-leak-to-userspace.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/atm-solos-pci-don-t-include-frame-pseudo-header-on-transmit-hex-dump.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/can-use-inode-instead-of-kernel-address-for-proc-file.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.33/queue-2.6.33/nfsd-fix-auth_domain-reference-leak-on-nlm-operations.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to