07 Feb, 2008

40 commits

  • The early per-cpu handling needs a slight tweak to work when booting
    on a non-zero cpu.

    We got away with this for a long time, but can't any longer as now
    even printk() calls functions (cpu_clock() for example) that thus make
    early references to per-cpu variables.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
    9p: fix p9_printfcall export
    9p: transport API reorganization
    9p: add remove function to trans_virtio
    9p: Convert semaphore to spinlock for p9_idpool
    9p: fix mmap to be read-only
    9p: add support for sticky bit
    9p: Fix soft lockup in virtio transport
    9p: fix bug in attach-per-user
    9p: block-based virtio client
    9p: create transport rpc cut-thru
    9p: fix bug in p9_clone_stat

    Linus Torvalds
     
  • ERROR: "p9_printfcall" [net/9p/9pnet_virtio.ko] undefined!

    Signed-off-by: Andrew Morton
    Acked-by: Eric Van Hensbergen

    Andrew Morton
     
  • This merges the mux.c (including the connection interface) with trans_fd
    in preparation for transport API changes. Ultimately, trans_fd will need
    to be rewritten to clean it up and simplify the implementation, but this
    reorganization is viewed as the first step.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • Request from rusty:
    Just cleaning up patches for 2.6.25 merge, and noticed that
    net/9p/trans_virtio.c doesn't have a remove function. This will crash when
    removing the module (console doesn't have one because it can't really be
    removed).

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • When booting from v9fs, down_interruptible in p9_idpool_get() triggered a BUG
    as it was being called with IRQs disabled. A spinlock seems like the right
    thing to be using since the idr functions go out of their way not to sleep.

    This patch eliminates the BUG by converting the semaphore to a spinlock.

    Signed-off-by: Anthony Liguori
    Acked-by: Eric Van Hensbergen

    Anthony Liguori
     
  • v9fs was allowing writable mmap which could lead to kernel BUG() cases.
    This sets the mmap function to generic_file_readonly_mmap which (correctly)
    returns an error to applications which open mmap for writing.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • GDM gets unhappy if /var/gdm doesn't have the sticky bit set. This patch adds
    support for the sticky bit in much the same way setuid/setgid is supported.

    With this patch, I can launch X from a v9fs rootfs (although I quickly run out
    of fds in the server once gnome starts up).

    Signed-off-by: Anthony Liguori
    Acked-by: Eric Van Hensbergen

    Anthony Liguori
     
  • This fixes a poorly placed spinlock which could result in a
    soft lockup condition.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • When a new user attached at a directory other than the root, he would end
    up in the parent directory of the cwd. This was due to a logic error in
    the code which attaches the user at the mount point and walks back to the
    cwd. This patch fixes that.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • This replaces the console-based virto client with a block-based
    client using a single request queue.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • Add a new transport function which allows a cut-thru directly to
    the transport instead of processing request through the mux if the
    cut-thru exists.

    Signed-off-by: Eric Van Hensbergen

    Eric Van Hensbergen
     
  • This patch fixes a bug in the copying of 9P
    stat information where string references
    weren't being updated properly.

    Signed-off-by: Martin Sava
    Signed-off-by: Eric Van Hensbergen

    Martin Stava
     
  • Docbook fatal error, file was moved:
    docproc: linux-2.6.24-git15/drivers/base/dmapool.c: No such file or directory

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • * 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

    Linus Torvalds
     
  • 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: [] mm_init+0x1da/0x250
    {in-softirq-W} state was registered at:
    [] 0xffffffffffffffff
    irq event stamp: 394559
    hardirqs last enabled at (394559): [] get_page_from_freelist+0x30a/0x4c0
    hardirqs last disabled at (394558): [] get_page_from_freelist+0x125/0x4c0
    softirqs last enabled at (393952): [] __do_softirq+0xce/0xe0
    softirqs last disabled at (393945): [] 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:
    [] print_usage_bug+0x18b/0x190
    [] mark_lock+0x53d/0x560
    [] __lock_acquire+0x3ca/0xed0
    [] lock_acquire+0xa8/0xe0
    [] ? mm_init+0x1da/0x250
    [] _spin_lock+0x30/0x70
    [] mm_init+0x1da/0x250
    [] mm_alloc+0x39/0x50
    [] bprm_mm_init+0x2a/0x1a0
    [] do_execve+0x7b/0x220
    [] sys_execve+0x46/0x70
    [] kernel_execve+0x64/0xd0
    [] ? _stext+0x1e/0x20
    [] init_post+0x9a/0xf0
    [] ? trace_hardirqs_on_thunk+0x35/0x3a
    [] ? trace_hardirqs_on+0xba/0xd0
    [] ? child_rip+0xa/0x12
    [] ? restore_args+0x0/0x44
    [] ? 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 8c914cb704a11460e.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • 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: Rusty Russell
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Pavel Emelyanov reported that his networking card did not work
    and bisected it down to:

    "
    The commit

    093af8d7f0ba3c6be1485973508584ef081e9f93
    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: Pavel Emelyanov
    Signed-off-by: Yinghai Lu
    Tested-by: Pavel Emelyanov
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     
  • 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 8cb2a7c1e95e472b5,
    at its source.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • fix 64-bit section warnings.

    Signed-off-by: Ingo Molnar

    Sam Ravnborg
     
  • Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • 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: Arjan van de Ven
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     
  • 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: Arjan van de Ven
    Signed-off-by: Ingo Molnar

    Arjan van de Ven
     
  • This change broke recovery of exceptions in iret:

    commit 72fe4858544292ad64600765cb78bc02298c6b1c
    Author: Glauber de Oliveira Costa

    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: Roland McGrath
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • 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: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • 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: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • 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: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • 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: Harvey Harrison
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Harvey Harrison
     
  • 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: Roland McGrath
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • Signed-off-by: Florian Fainelli
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Florian Fainelli
     
  • based on similar patch from: Pavel Machek

    Introduce CONFIG_COMPAT_BRK. If disabled then the kernel is free
    (but not obliged to) randomize the brk area.

    Heap randomization breaks ancient binaries, so we keep COMPAT_BRK
    enabled by default.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • There is a check in sys_brk(), that tries to make sure that we do not
    underflow the area that is dedicated to brk heap.

    The check is however wrong, as it assumes that brk area starts immediately
    after the end of the code (+bss), which is wrong for example in
    environments with randomized brk start. The proper way is to check whether
    the address is not below the start_brk address.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Ingo Molnar

    Jiri Kosina
     
  • With the spurious handler fix, the X2 does not lock up anymore.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • In very rare cases, on certain CPUs, we could end up in the spurious
    fault handler and ignore a large pud/pmd mapping. The resulting pte
    pointer points into the mapped physical space and dereferencing it
    will fault recursively.

    Make the code aware of large mappings and do the permission check
    on the pmd/pud entry, when a large pud/pmd mapping is detected.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Unify the x86-64 behavior for 32-bit processes that set
    bogus %cs/%ss values (the only ones that can fault in iret)
    match what the native i386 behavior is. (do not kill the task
    via do_exit but generate a SIGSEGV signal)

    [ tglx@linutronix.de: build fix ]

    Signed-off-by: Roland McGrath
    Signed-off-by: Ingo Molnar

    Roland McGrath
     
  • * 'async-tx-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop:
    async_tx: allow architecture specific async_tx_find_channel implementations
    async_tx: replace 'int_en' with operation preparation flags
    async_tx: kill tx_set_src and tx_set_dest methods
    async_tx: kill ASYNC_TX_ASSUME_COHERENT
    iop-adma: use LIST_HEAD instead of LIST_HEAD_INIT
    async_tx: use LIST_HEAD instead of LIST_HEAD_INIT
    async_tx: fix compile breakage, mark do_async_xor __always_inline

    Linus Torvalds
     
  • Signed-off-by: Daniel Walker
    Signed-off-by: Linus Torvalds

    Daniel Walker
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
    SELinux: Remove security_get_policycaps()
    security: allow Kconfig to set default mmap_min_addr protection

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    ata_piix.c:piix_init_one() must be __devinit
    sata_via.c: Remove missleading comment.
    libata-core: unblacklist HITACHI drives
    sata_nv: fix ATAPI issues with memory over 4GB (v7)
    ata: drivers/ata/sata_mv.c needs dmapool.h
    libata: kill now unused n_iter and fix sata_fsl
    ahci: fix CAP.NP and PI handling
    sata_mv: Support SoC controllers
    Rename: linux/pata_platform.h to linux/ata_platform.h

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
    virtio net: fix oops on interface-up
    Fix PHY Lib support for gianfar and ucc_geth
    forcedeth: preserve registers
    forcedeth: phy status fix
    forcedeth: restart tx/rx
    ipvs: Make wrr "no available servers" error message rate-limited
    [PPPOL2TP]: Label unused warning when CONFIG_PROC_FS is not set.
    [NET_SCHED]: cls_flow: support classification based on VLAN tag
    [VLAN]: Constify skb argument to vlan_get_tag()
    [NET_SCHED]: cls_flow: fix key mask validity check
    [NET_SCHED]: em_meta: fix compile warning
    b43: Fix DMA for 30/32-bit DMA engines
    b43: fix build with CONFIG_SSB_PCIHOST=n
    mac80211: Is not EXPERIMENTAL anymore
    iwl3945-base.c: fix off-by-one errors
    b43legacy: fix DMA slot resource leakage
    b43legacy: drop packets we are not able to encrypt
    b43legacy: fix suspend/resume
    b43legacy: fix PIO crash
    Generic HDLC - use random_ether_addr()
    ...

    Linus Torvalds