Skip to content
  1. Aug 19, 2010
    • Joerg Roedel's avatar
      x86-32: Separate 1:1 pagetables from swapper_pg_dir · fd89a137
      Joerg Roedel authored
      
      
      This patch fixes machine crashes which occur when heavily exercising the
      CPU hotplug codepaths on a 32-bit kernel. These crashes are caused by
      AMD Erratum 383 and result in a fatal machine check exception. Here's
      the scenario:
      
      1. On 32-bit, the swapper_pg_dir page table is used as the initial page
      table for booting a secondary CPU.
      
      2. To make this work, swapper_pg_dir needs a direct mapping of physical
      memory in it (the low mappings). By adding those low, large page (2M)
      mappings (PAE kernel), we create the necessary conditions for Erratum
      383 to occur.
      
      3. Other CPUs which do not participate in the off- and onlining game may
      use swapper_pg_dir while the low mappings are present (when leave_mm is
      called). For all steps below, the CPU referred to is a CPU that is using
      swapper_pg_dir, and not the CPU which is being onlined.
      
      4. The presence of the low mappings in swapper_pg_dir can result
      in TLB entries for addresses below __PAGE_OFFSET to be established
      speculatively. These TLB entries are marked global and large.
      
      5. When the CPU with such TLB entry switches to another page table, this
      TLB entry remains because it is global.
      
      6. The process then generates an access to an address covered by the
      above TLB entry but there is a permission mismatch - the TLB entry
      covers a large global page not accessible to userspace.
      
      7. Due to this permission mismatch a new 4kb, user TLB entry gets
      established. Further, Erratum 383 provides for a small window of time
      where both TLB entries are present. This results in an uncorrectable
      machine check exception signalling a TLB multimatch which panics the
      machine.
      
      There are two ways to fix this issue:
      
              1. Always do a global TLB flush when a new cr3 is loaded and the
              old page table was swapper_pg_dir. I consider this a hack hard
              to understand and with performance implications
      
              2. Do not use swapper_pg_dir to boot secondary CPUs like 64-bit
              does.
      
      This patch implements solution 2. It introduces a trampoline_pg_dir
      which has the same layout as swapper_pg_dir with low_mappings. This page
      table is used as the initial page table of the booting CPU. Later in the
      bringup process, it switches to swapper_pg_dir and does a global TLB
      flush. This fixes the crashes in our test cases.
      
      -v2: switch to swapper_pg_dir right after entering start_secondary() so
      that we are able to access percpu data which might not be mapped in the
      trampoline page table.
      
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      LKML-Reference: <20100816123833.GB28147@aftab>
      Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      fd89a137
    • Hans Rosenfeld's avatar
      x86, cpu: Fix regression in AMD errata checking code · 07a7795c
      Hans Rosenfeld authored
      
      
      A bug in the family-model-stepping matching code caused the presence of
      errata to go undetected when OSVW was not used. This causes hangs on
      some K8 systems because the E400 workaround is not enabled.
      
      Signed-off-by: default avatarHans Rosenfeld <hans.rosenfeld@amd.com>
      LKML-Reference: <1282141190-930137-1-git-send-email-hans.rosenfeld@amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      07a7795c
  2. Aug 16, 2010
    • Linus Torvalds's avatar
      Linux 2.6.36-rc1 · da5cabf8
      Linus Torvalds authored
      da5cabf8
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · 2245ba2a
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        gcc-4.6: ACPI: fix unused but set variables in ACPI
        ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS
        ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
        ACPI processor: remove deprecated ACPI procfs I/F
        ACPI power_resource: remove unused procfs I/F
        ACPI: remove deprecated ACPI procfs I/F
        ACPI: introduce drivers/acpi/sysfs.c
        ACPI: introduce module parameter acpi.aml_debug_output
        ACPI: introduce drivers/acpi/debugfs.c
        ACPI, APEI, ERST debug support
        ACPI, APEI, Manage GHES as platform devices
        ACPI, APEI, Rename CPER and GHES severity constants
        ACPI, APEI, Fix a typo of error path of apei_resources_request
        ACPI / ACPICA: Fix reference counting problems with GPE handlers
        ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
        ACPI / Sleep: Drop acpi_suspend_finish()
        ACPI / Sleep: Consolidate suspend and hibernation routines
        ACPI / Wakeup: Simplify enabling of wakeup devices
        ACPI / Sleep: Rework enabling wakeup devices
        ACPI / Sleep: Free NVS copy if suspending of devices fails
      
      Fixed up totally buggered "ACPI: fix unused but set variables in ACPI"
      patch that doesn't even compile in the merge.
      
      Thanks to Sedat Dilek <sedat.dilek@googlemail.com> for noticing the
      breakage before I even pulled.  And a big "Grrr.." at Len for not even
      bothering to compile the tree before asking me to pull.
      2245ba2a
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/iommu-2.6 · e2e96c66
      Linus Torvalds authored
      * git://git.infradead.org/iommu-2.6:
        intel-iommu: Fix 32-bit build warning with __cmpxchg()
        intr-remap: allow disabling source id checking
      e2e96c66
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/mtd-2.6 · 7355a5a6
      Linus Torvalds authored
      * git://git.infradead.org/mtd-2.6:
        mtd/nand_ids: Fix buswidth
        mtd/m25p80: fix test for end of loop
        mtd/m25p80: retlen is never NULL
        MIPS: Fix gen_nand probe structures contents
        gen_nand: Test if nr_chips field is valid
        BFIN: Fix gen_nand probe structures contents
        nand/denali: move all hardware initialization work to denali_hw_init
        nand/denali: Add a page check in denali_read_page & denali_read_page_raw
        nand/denali: use cpu_relax() while waiting for hardware interrupt
        nand/denali: change read_status function method
        nand/denali: Fixed check patch warnings
        ARM: Fix gen_nand probe structures contents
        mtd/nand_base: fix kernel-doc warnings & typos
        nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
        nand/denali: Fixed handle ECC error bugs
        nand/denali: use iowrite32() to replace denali_write32()
        nand/denali: Fixed probe function bugs
      7355a5a6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 7a1b29a8
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: don't validate CROSS_COMPILE needlessly
        arch/tile: export only COMMAND_LINE_SIZE to userspace.
        arch/tile: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
        arch/tile: Rename the hweight() implementations to __arch_hweight()
        arch/tile: extend syscall ABI to set r1 on return as well.
        arch/tile: Various cleanups.
        arch/tile: support backtracing on TILE-Gx
        arch/tile: Fix a couple of issues with the COMPAT code for TILE-Gx.
        arch/tile: Use separate, better minsec values for clocksource and sched_clock.
        arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd.
        arch: tile: mm: pgtable.c: Removed duplicated #include
        arch: tile: kernel/proc.c Removed duplicated #include
        Add fanotify syscalls to <asm-generic/unistd.h>.
        arch/tile: support new kunmap_atomic() naming convention.
        tile: remove unused ISA_DMA_THRESHOLD define
      
      Conflicts in arch/tile/configs/tile_defconfig (pick the mainline version
      with the reduced defconfig).
      7a1b29a8
    • Chris Metcalf's avatar
      arch/tile: don't validate CROSS_COMPILE needlessly · a5854dd7
      Chris Metcalf authored
      
      
      With this change, the arch/tile Makefile will only check for a valid
      combination of CROSS_COMPILE vs "uname -m" for a few common targets
      that are typically the ones we get wrong (vmlinux, all, and modules).
      The change handles the case of an empty "make" goal like "make all".
      
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      a5854dd7
    • Linus Torvalds's avatar
      mm: fix up some user-visible effects of the stack guard page · d7824370
      Linus Torvalds authored
      
      
      This commit makes the stack guard page somewhat less visible to user
      space. It does this by:
      
       - not showing the guard page in /proc/<pid>/maps
      
         It looks like lvm-tools will actually read /proc/self/maps to figure
         out where all its mappings are, and effectively do a specialized
         "mlockall()" in user space.  By not showing the guard page as part of
         the mapping (by just adding PAGE_SIZE to the start for grows-up
         pages), lvm-tools ends up not being aware of it.
      
       - by also teaching the _real_ mlock() functionality not to try to lock
         the guard page.
      
         That would just expand the mapping down to create a new guard page,
         so there really is no point in trying to lock it in place.
      
      It would perhaps be nice to show the guard page specially in
      /proc/<pid>/maps (or at least mark grow-down segments some way), but
      let's not open ourselves up to more breakage by user space from programs
      that depends on the exact deails of the 'maps' file.
      
      Special thanks to Henrique de Moraes Holschuh for diving into lvm-tools
      source code to see what was going on with the whole new warning.
      
      Reported-and-tested-by: default avatarFrançois Valenduc <francois.valenduc@tvcablenet.be>
      Reported-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d7824370
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 1b68c959
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        ALSA: sound/usb/format: silence uninitialized variable warnings
        MAINTAINERS: Add Ian Lartey as comaintaner for Wolfson devices
        MAINTAINERS: Make Wolfson entry also cover CODEC drivers
        ASoC: Only tweak WM8994 chip configuration on devices up to rev D
        ASoC: Optimise DSP performance for WM8994
        ALSA: hda - Fix dynamic ADC change working again
        ALSA: hda - Restrict PCM parameters per ELD information over HDMI
        sound: oss: sh_dac_audio.c removed duplicated #include
      1b68c959
    • Linus Torvalds's avatar
      Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6 · 5a417946
      Linus Torvalds authored
      * 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
        intel_idle: recognize Lincroft Atom Processor
        intel_idle: no longer EXPERIMENTAL
        intel_idle: disable module support
        intel_idle: add support for Westmere-EX
        intel_idle: delete power_policy modparam, and choose substate functions
        intel_idle: delete substates DEBUG modparam
      5a417946
    • Chris Metcalf's avatar
      arch/tile: export only COMMAND_LINE_SIZE to userspace. · 3b3c1b9d
      Chris Metcalf authored
      
      
      This fixes a failure in "make headers_check" for tile.
      I hadn't realized this file was exported to userspace by default.
      
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      3b3c1b9d
  3. Aug 15, 2010