1. 26 Jan, 2009 16 commits
  2. 25 Jan, 2009 1 commit
    • Ingo Molnar's avatar
      x86: use standard PIT frequency · e1b4d114
      Ingo Molnar authored
      the RDC and ELAN platforms use slighly different PIT clocks, resulting in
      a timex.h hack that changes PIT_TICK_RATE during build time. But if a
      tester enables any of these platform support .config options, the PIT
      will be miscalibrated on standard PC platforms.
      
      So use one frequency - in a subsequent patch we'll add a quirk to allow
      x86 platforms to define different PIT frequencies.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e1b4d114
  3. 23 Jan, 2009 8 commits
  4. 22 Jan, 2009 7 commits
  5. 21 Jan, 2009 7 commits
    • H. Peter Anvin's avatar
      x86: add MSR_IA32_MISC_ENABLE bits to <asm/msr-index.h> · bdf21a49
      H. Peter Anvin authored
      Impact: None (new bit definitions currently unused)
      
      Add bit definitions for the MSR_IA32_MISC_ENABLE MSRs to
      <asm/msr-index.h>.
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      bdf21a49
    • Suresh Siddha's avatar
      x86: fix PTE corruption issue while mapping RAM using /dev/mem · 95971342
      Suresh Siddha authored
      Beschorner Daniel reported:
      > hwinfo problem since 2.6.28, showing this in the oops:
      >	Corrupted page table at address 7fd04de3ec00
      
      Also, PaX Team reported a regression with this commit:
      
      >	commit 9542ada8
      >	Author: Suresh Siddha <suresh.b.siddha@intel.com>
      >	Date:   Wed Sep 24 08:53:33 2008 -0700
      >
      >	    x86: track memtype for RAM in page struct
      
      This commit breaks mapping any RAM page through /dev/mem, as the
      reserve_memtype() was not initializing the return attribute type and as such
      corrupting the PTE entry that was setup with the return attribute type.
      
      Because of this bug, application mapping this RAM page through /dev/mem
      will die with "Corrupted page table at address xxxx" message in the kernel
      log and also the kernel identity mapping which maps the underlying RAM
      page gets converted to UC.
      
      Fix this by initializing the return attribute type before calling
      reserve_ram_pages_type()
      Reported-by: default avatarPaX Team <pageexec@freemail.hu>
      Reported-and-tested-by: default avatarBeschorner Daniel <Daniel.Beschorner@facton.com>
      Tested-and-Acked-by: default avatarPaX Team <pageexec@freemail.hu>
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      95971342
    • Thomas Renninger's avatar
      x86: mtrr fix debug boot parameter · 731f1872
      Thomas Renninger authored
      while looking at:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=11541
      
      I realized that the mtrr.show param cannot work, because
      the code is processed much too early.
      
      This patch:
       - Declares mtrr.show as early_param
       - Stays consistent with the previous param (which I doubt
         that it ever worked), so mtrr.show=1 would still work
       - Declares mtrr_show as initdata
      Signed-off-by: default avatarThomas Renninger <trenn@suse.de>
      Acked-by: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      731f1872
    • Suresh Siddha's avatar
      x86: fix page attribute corruption with cpa() · a1e46212
      Suresh Siddha authored
      Impact: fix sporadic slowdowns and warning messages
      
      This patch fixes a performance issue reported by Linus on his
      Nehalem system. While Linus reverted the PAT patch (commit
      58dab916) which exposed the issue,
      existing cpa() code can potentially still cause wrong(page attribute
      corruption) behavior.
      
      This patch also fixes the "WARNING: at arch/x86/mm/pageattr.c:560" that
      various people reported.
      
      In 64bit kernel, kernel identity mapping might have holes depending
      on the available memory and how e820 reports the address range
      covering the RAM, ACPI, PCI reserved regions. If there is a 2MB/1GB hole
      in the address range that is not listed by e820 entries, kernel identity
      mapping will have a corresponding hole in its 1-1 identity mapping.
      
      If cpa() happens on the kernel identity mapping which falls into these holes,
      existing code fails like this:
      
      	__change_page_attr_set_clr()
      		__change_page_attr()
      			returns 0 because of if (!kpte). But doesn't
      			set cpa->numpages and cpa->pfn.
      		cpa_process_alias()
      			uses uninitialized cpa->pfn (random value)
      			which can potentially lead to changing the page
      			attribute of kernel text/data, kernel identity
      			mapping of RAM pages etc. oops!
      
      This bug was easily exposed by another PAT patch which was doing
      cpa() more often on kernel identity mapping holes (physical range between
      max_low_pfn_mapped and 4GB), where in here it was setting the
      cache disable attribute(PCD) for kernel identity mappings aswell.
      
      Fix cpa() to handle the kernel identity mapping holes. Retain
      the WARN() for cpa() calls to other not present address ranges
      (kernel-text/data, ioremap() addresses)
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a1e46212
    • Ingo Molnar's avatar
      Revert "x86: signal: change type of paramter for sys_rt_sigreturn()" · 552b8aa4
      Ingo Molnar authored
      This reverts commit 4217458d.
      
      Justin Madru bisected this commit, it was causing weird Firefox
      crashes.
      
      The reason is that GCC mis-optimizes (re-uses) the on-stack parameters of
      the calling frame, which corrupts the syscall return pt_regs state and
      thus corrupts user-space register state.
      
      So we go back to the slightly less clean but more optimization-safe
      method of getting to pt_regs. Also add a comment to explain this.
      
      Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=12505Reported-and-bisected-by: default avatarJustin Madru <jdm64@gawab.com>
      Tested-by: default avatarJustin Madru <jdm64@gawab.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      552b8aa4
    • Andi Kleen's avatar
      x86: use early clobbers in usercopy*.c · e0a96129
      Andi Kleen authored
      Impact: fix rare (but currently harmless) miscompile with certain configs and gcc versions
      
      Hugh Dickins noticed that strncpy_from_user() was miscompiled
      in some circumstances with gcc 4.3.
      
      Thanks to Hugh's excellent analysis it was easy to track down.
      
      Hugh writes:
      
      > Try building an x86_64 defconfig 2.6.29-rc1 kernel tree,
      > except not quite defconfig, switch CONFIG_PREEMPT_NONE=y
      > and CONFIG_PREEMPT_VOLUNTARY off (because it expands a
      > might_fault() there, which hides the issue): using a
      > gcc 4.3.2 (I've checked both openSUSE 11.1 and Fedora 10).
      >
      > It generates the following:
      >
      > 0000000000000000 <__strncpy_from_user>:
      >    0:   48 89 d1                mov    %rdx,%rcx
      >    3:   48 85 c9                test   %rcx,%rcx
      >    6:   74 0e                   je     16 <__strncpy_from_user+0x16>
      >    8:   ac                      lods   %ds:(%rsi),%al
      >    9:   aa                      stos   %al,%es:(%rdi)
      >    a:   84 c0                   test   %al,%al
      >    c:   74 05                   je     13 <__strncpy_from_user+0x13>
      >    e:   48 ff c9                dec    %rcx
      >   11:   75 f5                   jne    8 <__strncpy_from_user+0x8>
      >   13:   48 29 c9                sub    %rcx,%rcx
      >   16:   48 89 c8                mov    %rcx,%rax
      >   19:   c3                      retq
      >
      > Observe that "sub %rcx,%rcx; mov %rcx,%rax", whereas gcc 4.2.1
      > (and many other configs) say "sub %rcx,%rdx; mov %rdx,%rax".
      > Isn't it returning 0 when it ought to be returning strlen?
      
      The asm constraints for the strncpy_from_user() result were missing an
      early clobber, which tells gcc that the last output arguments
      are written before all input arguments are read.
      
      Also add more early clobbers in the rest of the file and fix 32-bit
      usercopy.c in the same way.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      [ since this API is rarely used and no in-kernel user relies on a 'len'
        return value (they only rely on negative return values) this miscompile
        was never noticed in the field. But it's worth fixing it nevertheless. ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e0a96129
    • Matthew Ranostay's avatar
      ALSA: hda: 83xxx port 0xe DAC selection · 65557f35
      Matthew Ranostay authored
      On the 92hd8xxx codecs port 0xe needs the connection selected to be the
      last DAC in the list.
      Signed-off-by: default avatarMatthew Ranostay <mranostay@embeddedalley.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      65557f35
  6. 20 Jan, 2009 1 commit