28 Jan, 2013

19 commits


25 Jan, 2013

1 commit

  • The MSI specification has several constraints in comparison with
    MSI-X, most notable of them is the inability to configure MSIs
    independently. As a result, it is impossible to dispatch
    interrupts from different queues to different CPUs. This is
    largely devalues the support of multiple MSIs in SMP systems.

    Also, a necessity to allocate a contiguous block of vector
    numbers for devices capable of multiple MSIs might cause a
    considerable pressure on x86 interrupt vector allocator and
    could lead to fragmentation of the interrupt vectors space.

    This patch overcomes both drawbacks in presense of IRQ remapping
    and lets devices take advantage of multiple queues and per-IRQ
    affinity assignments.

    Signed-off-by: Alexander Gordeev
    Cc: Bjorn Helgaas
    Cc: Suresh Siddha
    Cc: Yinghai Lu
    Cc: Matthew Wilcox
    Cc: Jeff Garzik
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/c8bd86ff56b5fc118257436768aaa04489ac0a4c.1353324359.git.agordeev@redhat.com
    Signed-off-by: Ingo Molnar

    Alexander Gordeev
     

24 Jan, 2013

5 commits

  • This patch updates x2apic initializaition code to allow x2apic
    on VMware platform even without interrupt remapping support.
    The hypervisor_x2apic_available hook was added in x2apic
    initialization code and used by KVM and XEN, before this.
    I have also cleaned up that code to export this hook through the
    hypervisor_x86 structure.

    Compile tested for KVM and XEN configs, this patch doesn't have
    any functional effect on those two platforms.

    On VMware platform, verified that x2apic is used in physical
    mode on products that support this.

    Signed-off-by: Alok N Kataria
    Reviewed-by: Doug Covelli
    Reviewed-by: Dan Hecht
    Acked-by: H. Peter Anvin
    Cc: Konrad Rzeszutek Wilk
    Cc: Jeremy Fitzhardinge
    Cc: Avi Kivity
    Link: http://lkml.kernel.org/r/1358466282.423.60.camel@akataria-dtop.eng.vmware.com
    Signed-off-by: Ingo Molnar

    Alok N Kataria
     
  • Since circa 3.5, we've had dozens of reports of people hitting
    this warning. Forwarded reports have been met with silence, so
    just remove the warning if no-one cares.

    Example reports:

    https://bugzilla.redhat.com/show_bug.cgi?id=797687
    https://bugzilla.redhat.com/show_bug.cgi?id=867174
    https://bugzilla.redhat.com/show_bug.cgi?id=894865

    Signed-off-by: Dave Jones
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20130118175847.GA27662@redhat.com
    Signed-off-by: Ingo Molnar

    Dave Jones
     
  • Pull more USB fixes from Greg Kroah-Hartman:
    "Here are some more USB fixes for the 3.8-rc4 tree.

    Some gadget driver fixes, and finally resolved the ehci-mxc driver
    build issues (it's just some code moving around and being deleted)."

    * tag 'usb-3.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: EHCI: fix build error in ehci-mxc
    USB: EHCI: add a name for the platform-private field
    USB: EHCI: fix incorrect configuration test
    USB: EHCI: Move definition of EHCI_STATS to ehci.h
    USB: UHCI: fix IRQ race during initialization
    usb: gadget: FunctionFS: Fix missing braces in parse_opts
    usb: dwc3: gadget: fix ep->maxburst for ep0
    ARM: i.MX clock: Change the connection-id for fsl-usb2-udc
    usb: gadget: fsl_mxc_udc: replace MX35_IO_ADDRESS to ioremap
    usb: gadget: fsl-mxc-udc: replace cpu_is_xxx() with platform_device_id
    usb: musb: cppi_dma: drop '__init' annotation

    Linus Torvalds
     
  • Pull m68k fixes from Geert Uytterhoeven:
    "The asm-generic changeset has been ack'ed by Arnd."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Wire up finit_module
    asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs()
    m68k: Provide dma_alloc_attrs()/dma_free_attrs()

    Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:
    - ELF coredump fix (more registers dumped than what user space expects)
    - SUBARCH name generation (s/aarch64/arm64/)

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
    arm64: makefile: fix uname munging when setting ARCH on native machine
    arm64: elf: fix core dumping to match what glibc expects

    Linus Torvalds
     

23 Jan, 2013

4 commits

  • Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    . revert 20b279 - require exclude_guest to use PEBS - kernel side, now
    older binaries will continue working for things like cycles:pp
    without needing to pass extra modifiers, from David Ahern.

    . Fix building from 'make perf-*-src-pkg' tarballs, broken by UAPI,
    from Sebastian Andrzej Siewior

    [ Pulling directly, Ingo would normally pull but has been unresponsive ]

    * tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
    perf tools: Fix building from 'make perf-*-src-pkg' tarballs
    perf x86: revert 20b279 - require exclude_guest to use PEBS - kernel side

    Linus Torvalds
     
  • Pull parisc fixes from Helge Deller:
    "Improve the stability of the linux kernel on the parisc architecture"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: sigaltstack doesn't round ss.ss_sp as required
    parisc: improve ptrace support for gdb single-step
    parisc: don't claim cpu irqs more than once
    parisc: avoid undefined shift in cnv_float.h

    Linus Torvalds
     
  • putreg() assumes that the tracee is not running and pt_regs_access() can
    safely play with its stack. However a killed tracee can return from
    ptrace_stop() to the low-level asm code and do RESTORE_REST, this means
    that debugger can actually read/modify the kernel stack until the tracee
    does SAVE_REST again.

    set_task_blockstep() can race with SIGKILL too and in some sense this
    race is even worse, the very fact the tracee can be woken up breaks the
    logic.

    As Linus suggested we can clear TASK_WAKEKILL around the arch_ptrace()
    call, this ensures that nobody can ever wakeup the tracee while the
    debugger looks at it. Not only this fixes the mentioned problems, we
    can do some cleanups/simplifications in arch_ptrace() paths.

    Probably ptrace_unfreeze_traced() needs more callers, for example it
    makes sense to make the tracee killable for oom-killer before
    access_process_vm().

    While at it, add the comment into may_ptrace_stop() to explain why
    ptrace_stop() still can't rely on SIGKILL and signal_pending_state().

    Reported-by: Salman Qazi
    Reported-by: Suleiman Souhlal
    Suggested-by: Linus Torvalds
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • The kernel's internal definition of ELF_NGREG uses struct pt_regs, which
    means that we disagree with userspace on the size of coredumps since
    glibc correctly uses the user-visible struct user_pt_regs.

    This patch fixes our ELF_NGREG definition to use struct user_pt_regs
    and introduces our own ELF_CORE_COPY_REGS to convert between the user
    and kernel structure definitions.

    Cc:
    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     

21 Jan, 2013

1 commit

  • The ia64 function "thread_matches()" has no users since commit
    e868a55c2a8c ("[IA64] remove find_thread_for_addr()"). Remove it.

    This allows us to make ptrace_check_attach() static to kernel/ptrace.c,
    which is good since we'll need to change the semantics of it and fix up
    all the callers.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

19 Jan, 2013

2 commits

  • Pull Xen fixes from Konrad Rzeszutek Wilk:
    - CVE-2013-0190/XSA-40 (or stack corruption for 32-bit PV kernels)
    - Fix racy vma access spotted by Al Viro
    - Fix mmap batch ioctl potentially resulting in large O(n) page allcations.
    - Fix vcpu online/offline BUG:scheduling while atomic..
    - Fix unbound buffer scanning for more than 32 vCPUs.
    - Fix grant table being incorrectly initialized
    - Fix incorrect check in pciback
    - Allow privcmd in backend domains.

    Fix up whitespace conflict due to ugly merge resolution in Xen tree in
    arch/arm/xen/enlighten.c

    * tag 'stable/for-linus-3.8-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: Fix stack corruption in xen_failsafe_callback for 32bit PVOPS guests.
    Revert "xen/smp: Fix CPU online/offline bug triggering a BUG: scheduling while atomic."
    xen/gntdev: remove erronous use of copy_to_user
    xen/gntdev: correctly unmap unlinked maps in mmu notifier
    xen/gntdev: fix unsafe vma access
    xen/privcmd: Fix mmap batch ioctl.
    Xen: properly bound buffer access when parsing cpu/*/availability
    xen/grant-table: correctly initialize grant table version 1
    x86/xen : Fix the wrong check in pciback
    xen/privcmd: Relax access control in privcmd_ioctl_mmap

    Linus Torvalds
     
  • Pull m68knommu arch fixes from Greg Ungerer:
    "This contains a couple of fixes, both affecting compilation of non-mmu
    m68k targets."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68k: fix conditional use of init_pointer_table
    m68knommu: add KMAP definitions for non-MMU definitions

    Linus Torvalds
     

18 Jan, 2013

3 commits


17 Jan, 2013

5 commits

  • This fixes CVE-2013-0190 / XSA-40

    There has been an error on the xen_failsafe_callback path for failed
    iret, which causes the stack pointer to be wrong when entering the
    iret_exc error path. This can result in the kernel crashing.

    In the classic kernel case, the relevant code looked a little like:

    popl %eax # Error code from hypervisor
    jz 5f
    addl $16,%esp
    jmp iret_exc # Hypervisor said iret fault
    5: addl $16,%esp
    # Hypervisor said segment selector fault

    Here, there are two identical addls on either option of a branch which
    appears to have been optimised by hoisting it above the jz, and
    converting it to an lea, which leaves the flags register unaffected.

    In the PVOPS case, the code looks like:

    popl_cfi %eax # Error from the hypervisor
    lea 16(%esp),%esp # Add $16 before choosing fault path
    CFI_ADJUST_CFA_OFFSET -16
    jz 5f
    addl $16,%esp # Incorrectly adjust %esp again
    jmp iret_exc

    It is possible unprivileged userspace applications to cause this
    behaviour, for example by loading an LDT code selector, then changing
    the code selector to be not-present. At this point, there is a race
    condition where it is possible for the hypervisor to return back to
    userspace from an interrupt, fault on its own iret, and inject a
    failsafe_callback into the kernel.

    This bug has been present since the introduction of Xen PVOPS support
    in commit 5ead97c84 (xen: Core Xen implementation), in 2.6.23.

    Signed-off-by: Frediano Ziglio
    Signed-off-by: Andrew Cooper
    Cc: stable@vger.kernel.org
    Signed-off-by: Konrad Rzeszutek Wilk

    Andrew Cooper
     
  • Pull second round of sound fixes from Takashi Iwai:
    "Yet a few more fixes popped up in this week.

    The biggest change here is the addition of pinctrl support for Atmel,
    which turned out to be almost mandatory to make things working.

    The rest are a few fixes for M-Audio usb-audio device and a fix for
    regression of HD-audio HDMI codecs with alsactl in the recent kernel."

    * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda/hdmi - Work around "alsactl restore" errors
    ALSA: usb-audio: selector map for M-Audio FT C400
    ALSA: usb-audio: M-Audio FT C400 skip packet quirk
    ALSA: usb-audio: correct M-Audio C400 clock source quirk
    ALSA: usb - fix race in creation of M-Audio Fast track pro driver
    ASoC: atmel-ssc: add pinctrl selection to driver
    ARM: at91/dts: add pinctrl support for SSC peripheral

    Linus Torvalds
     
  • Pull s390 KVM fix from Gleb Natapov.

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    s390/kvm: Fix BUG in include/linux/kvm_host.h:745

    Linus Torvalds
     
  • Pull SuperH fixes from Paul Mundt.

    * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
    sh: ecovec: add sample amixer settings
    sh: Fix up stack debugging build.
    sh: wire up finit_module syscall.
    sh: Fix FDPIC binary loader
    sh: clkfwk: bugfix: sh_clk_div_enable() care sh_clk_div_set_rate() if div6
    sh: define TASK_UNMAPPED_BASE as a page aligned constant

    Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:
    - Page protection fixes, including proper PAGE_NONE handling
    - Timezone vdso sequence counting fix
    - Additional compat syscall wiring

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
    arm64: compat: add syscall table entries for new syscalls
    arm64: mm: introduce present, faulting entries for PAGE_NONE
    arm64: mm: only wrprotect clean ptes if they are present
    arm64: vdso: remove broken, redundant sequence counting for timezones

    Linus Torvalds