1. 07 Feb, 2008 25 commits
  2. 06 Feb, 2008 15 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 · 3e6bdf47
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
        x86: fix deadlock, make pgd_lock irq-safe
        virtio: fix trivial build bug
        x86: fix mttr trimming
        x86: delay CPA self-test and repeat it
        x86: fix 64-bit sections
        generic: add __FINITDATA
        x86: remove suprious ifdefs from pageattr.c
        x86: mark the .rodata section also NX
        x86: fix iret exception recovery on 64-bit
        cpuidle: dubious one-bit signed bitfield in cpuidle.h
        x86: fix sparse warnings in powernow-k8.c
        x86: fix sparse error in traps_32.c
        x86: trivial sparse/checkpatch in quirks.c
        x86 ptrace: disallow null cs/ss
        MAINTAINERS: RDC R-321x SoC maintainer
        brk randomization: introduce CONFIG_COMPAT_BRK
        brk: check the lower bound properly
        x86: remove X2 workaround
        x86: make spurious fault handler aware of large mappings
        x86: make traps on entry code be debuggable in user space, 64-bit
      3e6bdf47
    • Ingo Molnar's avatar
      x86: fix deadlock, make pgd_lock irq-safe · 58d5d0d8
      Ingo Molnar authored
      lockdep just caught this one:
      
      =================================
      [ INFO: inconsistent lock state ]
      2.6.24 #38
      ---------------------------------
      inconsistent {in-softirq-W} -> {softirq-on-W} usage.
      swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (pgd_lock){-+..}, at: [<ffffffff8022a9ea>] mm_init+0x1da/0x250
      {in-softirq-W} state was registered at:
        [<ffffffffffffffff>] 0xffffffffffffffff
      irq event stamp: 394559
      hardirqs last  enabled at (394559): [<ffffffff80267f0a>] get_page_from_freelist+0x30a/0x4c0
      hardirqs last disabled at (394558): [<ffffffff80267d25>] get_page_from_freelist+0x125/0x4c0
      softirqs last  enabled at (393952): [<ffffffff80232f8e>] __do_softirq+0xce/0xe0
      softirqs last disabled at (393945): [<ffffffff8020c57c>] call_softirq+0x1c/0x30
      
      other info that might help us debug this:
      no locks held by swapper/1.
      
      stack backtrace:
      Pid: 1, comm: swapper Not tainted 2.6.24 #38
      
      Call Trace:
       [<ffffffff8024e1fb>] print_usage_bug+0x18b/0x190
       [<ffffffff8024f55d>] mark_lock+0x53d/0x560
       [<ffffffff8024fffa>] __lock_acquire+0x3ca/0xed0
       [<ffffffff80250ba8>] lock_acquire+0xa8/0xe0
       [<ffffffff8022a9ea>] ? mm_init+0x1da/0x250
       [<ffffffff809bcd10>] _spin_lock+0x30/0x70
       [<ffffffff8022a9ea>] mm_init+0x1da/0x250
       [<ffffffff8022aa99>] mm_alloc+0x39/0x50
       [<ffffffff8028b95a>] bprm_mm_init+0x2a/0x1a0
       [<ffffffff8028d12b>] do_execve+0x7b/0x220
       [<ffffffff80209776>] sys_execve+0x46/0x70
       [<ffffffff8020c214>] kernel_execve+0x64/0xd0
       [<ffffffff8020901e>] ? _stext+0x1e/0x20
       [<ffffffff802090ba>] init_post+0x9a/0xf0
       [<ffffffff809bc5f6>] ? trace_hardirqs_on_thunk+0x35/0x3a
       [<ffffffff8024f75a>] ? trace_hardirqs_on+0xba/0xd0
       [<ffffffff8020c1a8>] ? child_rip+0xa/0x12
       [<ffffffff8020bcbc>] ? restore_args+0x0/0x44
       [<ffffffff8020c19e>] ? child_rip+0x0/0x12
      
      turns out that pgd_lock has been used on 64-bit x86 in an irq-unsafe
      way for almost two years, since commit 8c914cb7.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      58d5d0d8
    • Ingo Molnar's avatar
      virtio: fix trivial build bug · a09771be
      Ingo Molnar authored
      fix build bug:
      
        drivers/virtio/virtio_balloon.c: In function 'fill_balloon':
        drivers/virtio/virtio_balloon.c:98: error: implicit declaration of function 'msleep'
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a09771be
    • Yinghai Lu's avatar
      x86: fix mttr trimming · 20651af9
      Yinghai Lu authored
      Pavel Emelyanov reported that his networking card did not work
      and bisected it down to:
      
      "
      The commit
      
        093af8d7
        x86_32: trim memory by updating e820
      
      broke my e1000 card: on loading driver says that
      
        e1000: probe of 0000:04:03.0 failed with error -5
      
      and the interface doesn't appear.
      "
      
      on a 32-bit kernel, base will overflow when try to do PAGE_SHIFT,
      and highest_addr will always less 4G.
      
      So use pfn instead of address to avoid the overflow when more than
      4g RAM is installed on a 32-bit kernel.
      
      Many thanks to Pavel Emelyanov for reporting and testing it.
      Bisected-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Tested-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      20651af9
    • Ingo Molnar's avatar
      x86: delay CPA self-test and repeat it · 971a52d6
      Ingo Molnar authored
      delay the CPA self-test so that any impact (corruption) of
      user-space pagetables can be triggered. Repeat the test
      every 30 seconds.
      
      this would have prevented the bug fixed by 8cb2a7c1,
      at its source.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      971a52d6
    • Sam Ravnborg's avatar
      x86: fix 64-bit sections · f1fbabb3
      Sam Ravnborg authored
      fix 64-bit section warnings.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f1fbabb3
    • Ingo Molnar's avatar
      generic: add __FINITDATA · 9f9975a5
      Ingo Molnar authored
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9f9975a5
    • Arjan van de Ven's avatar
      x86: remove suprious ifdefs from pageattr.c · cc842b82
      Arjan van de Ven authored
      The .rodata section really should just be read only; the config option
      is there to make breaking up the 2Mb page an option (so people whos machines
      give more performance for the 2Mb case can opt to do so).
      But when the page gets split anyway, this is no longer an issue, so
      clean up the code and remove the ifdefs
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      cc842b82
    • Arjan van de Ven's avatar
      x86: mark the .rodata section also NX · 984bb80d
      Arjan van de Ven authored
      The .rodata section shouldn't just be read-only,
      but also non-executable. This is free since we've broken
      up the 2MB page already anyway.
      
      also update test_nx to check for this.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      984bb80d
    • Roland McGrath's avatar
      x86: fix iret exception recovery on 64-bit · a57dae3a
      Roland McGrath authored
      This change broke recovery of exceptions in iret:
      
         commit 72fe4858
         Author: Glauber de Oliveira Costa <gcosta@redhat.com>
      
             x86: replace privileged instructions with paravirt macros
      
      The ENTRY(native_iret) macro adds alignment padding before the iretq
      instruction, so "iret_label" no longer points exactly at the instruction.
      It was sloppy to leave the old "iret_label" label behind when replacing
      its nearby use.  Removing it would have revealed the other use of the
      label later in the file, and upon noticing that use, anyone exercising
      the minimum of attention to detail expected of anyone touching this
      subtle code would realize it needed to change as well.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a57dae3a
    • Harvey Harrison's avatar
      cpuidle: dubious one-bit signed bitfield in cpuidle.h · b5556a67
      Harvey Harrison authored
      fix these sparse warnings:
      
        CHECK   arch/x86/kernel/acpi/cstate.c
      include/linux/cpuidle.h:82:17: error: dubious one-bit signed bitfield
        CHECK   arch/x86/kernel/acpi/processor.c
      include/linux/cpuidle.h:82:17: error: dubious one-bit signed bitfield
        CHECK   arch/x86/kernel/cpu/cpufreq/powernow-k7.c
      include/linux/cpuidle.h:82:17: error: dubious one-bit signed bitfield
        CHECK   arch/x86/kernel/cpu/cpufreq/powernow-k8.c
      include/linux/cpuidle.h:82:17: error: dubious one-bit signed bitfield
        CHECK   arch/x86/kernel/cpu/cpufreq/longhaul.c
      include/linux/cpuidle.h:82:17: error: dubious one-bit signed bitfield
        CHECK   arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
      include/linux/cpuidle.h:82:17: error: dubious one-bit signed bitfield
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b5556a67
    • Harvey Harrison's avatar
      x86: fix sparse warnings in powernow-k8.c · d7ac12fa
      Harvey Harrison authored
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:7: warning: symbol 'hi' shadows an earlier one
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:6: originally declared here
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:15: warning: symbol 'lo' shadows an earlier one
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:14: originally declared here
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d7ac12fa
    • Harvey Harrison's avatar
      x86: fix sparse error in traps_32.c · deef79ef
      Harvey Harrison authored
      This was being used to ensure the proper alignment of the FXSAVE/FXRSTOR data.
      This would create a sparse error in the _correct_ cases, hiding further
      warnings.  Use BUILD_BUG_ON instead.
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      deef79ef
    • Harvey Harrison's avatar
      x86: trivial sparse/checkpatch in quirks.c · 4a5a77d1
      Harvey Harrison authored
      arch/x86/kernel/quirks.c:384:3: warning: returning void-valued expression
      arch/x86/kernel/quirks.c:387:3: warning: returning void-valued expression
      arch/x86/kernel/quirks.c:390:3: warning: returning void-valued expression
      arch/x86/kernel/quirks.c:393:3: warning: returning void-valued expression
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4a5a77d1
    • Roland McGrath's avatar
      x86 ptrace: disallow null cs/ss · c63855d0
      Roland McGrath authored
      In my revamp of the x86 ptrace code for setting register values,
      I accidentally omitted a check that was there in the old code.
      Allowing %cs to be 0 causes a bad crash in recovery from iret failure.
      This patch fixes that regression against 2.6.24, and adds a comment
      that should help prevent this subtlety from being overlooked again.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c63855d0