13 Apr, 2015

3 commits


31 Mar, 2015

1 commit


30 Mar, 2015

6 commits

  • Pull ARM SoC fixes from Olof Johansson:
    "The latest and greatest fixes for ARM platform code. Worth pointing
    out are:

    - Lines-wise, largest is a PXA fix for dealing with interrupts on DT
    that was quite broken. It's still newish code so while we could
    have held this off, it seemed appropriate to include now

    - Some GPIO fixes for OMAP platforms added a few lines. This was
    also fixes for code recently added (this release).

    - Small OMAP timer fix to behave better with partially upstreamed
    platforms, which is quite welcome.

    - Allwinner fixes about operating point control, reducing
    overclocking in some cases for better stability.

    plus a handful of other smaller fixes across the map"

    * tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm64: juno: Fix misleading name of UART reference clock
    ARM: dts: sunxi: Remove overclocked/overvoltaged OPP
    ARM: dts: sun4i: a10-lime: Override and remove 1008MHz OPP setting
    ARM: socfpga: dts: fix spi1 interrupt
    ARM: dts: Fix gpio interrupts for dm816x
    ARM: dts: dra7: remove ti,hwmod property from pcie phy
    ARM: OMAP: dmtimer: disable pm runtime on remove
    ARM: OMAP: dmtimer: check for pm_runtime_get_sync() failure
    ARM: OMAP2+: Fix socbus family info for AM33xx devices
    ARM: dts: omap3: Add missing dmas for crypto
    ARM: dts: rockchip: disable gmac by default in rk3288.dtsi
    MAINTAINERS: add rockchip regexp to the ARM/Rockchip entry
    ARM: pxa: fix pxa interrupts handling in DT
    ARM: pxa: Fix typo in zeus.c
    ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage

    Linus Torvalds
     
  • …it/mripard/linux into fixes

    Allwinner fixes for 4.0

    There's a few fixes to merge for 4.0, one to add a select in the machine
    Kconfig option to fix a potential build failure, and two fixing cpufreq related
    issues.

    * tag 'sunxi-fixes-for-4.0' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
    ARM: dts: sunxi: Remove overclocked/overvoltaged OPP
    ARM: dts: sun4i: a10-lime: Override and remove 1008MHz OPP setting
    ARM: sunxi: Have ARCH_SUNXI select RESET_CONTROLLER for clock driver usage

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • …nd/linux-omap into fixes

    Fixes for omaps for the -rc cycle:

    - Fix a device tree based booting vs legacy booting regression for
    omap3 crypto hardware by adding the missing DMA channels.

    - Fix /sys/bus/soc/devices/soc0/family for am33xx devices.

    - Fix two timer issues that can cause hangs if the timer related
    hwmod data is missing like it often initially is for new SoCs.

    - Remove pcie hwmods entry from dts as that causes runtime PM to
    fail for the PHYs.

    - A paper bag type dts configuration fix for dm816x GPIO
    interrupts that I just noticed. This is most of the changes
    diffstat wise, but as it's a basic feature for connecting
    devices and things work otherwise, it should be fixed.

    * tag 'fixes-v4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: dts: Fix gpio interrupts for dm816x
    ARM: dts: dra7: remove ti,hwmod property from pcie phy
    ARM: OMAP: dmtimer: disable pm runtime on remove
    ARM: OMAP: dmtimer: check for pm_runtime_get_sync() failure
    ARM: OMAP2+: Fix socbus family info for AM33xx devices
    ARM: dts: omap3: Add missing dmas for crypto

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • Late fix for v4.0 on the SoCFPGA platform:
    - Fix interrupt number for SPI1 interface

    * tag 'socfpga_fix_for_v4.0_2' of git://git.rocketboards.org/linux-socfpga-next:
    ARM: socfpga: dts: fix spi1 interrupt

    Signed-off-by: Olof Johansson

    Olof Johansson
     
  • The UART reference clock speed is 7273.8 kHz, not 72738 kHz.

    Dots aren't usually used in node names even though ePAPR permits
    them. However, this can easily be avoided by expressing the
    frequency in Hz, not kHz.

    This patch changes the name to refclk7273800hz, reflecting the
    actual clock speed.

    Signed-off-by: Dave Martin
    Acked-by: Liviu Dudau
    Signed-off-by: Olof Johansson

    Dave Martin
     
  • arm: pxa: fixes for v4.0-rc5

    There are only 2 fixes, one for the zeus board about the regulator changes,
    where a typo prevented the zeus board from having a working can regulator,
    and one regression triggered by the interrupts IRQ shift of 16 affecting all
    boards.

    * tag 'fixes-for-v4.0-rc5' of https://github.com/rjarzmik/linux:
    ARM: pxa: fix pxa interrupts handling in DT
    ARM: pxa: Fix typo in zeus.c

    Signed-off-by: Olof Johansson

    Olof Johansson
     

29 Mar, 2015

4 commits

  • Pull x86 fix from Ingo Molnar:
    "Fix x86 syscall exit code bug that resulted in spurious non-execution
    of TIF-driven user-return worklets, causing big trouble for things
    like KVM that rely on user notifiers for correctness of their vcpu
    model, causing crashes like double faults"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/asm/entry: Check for syscall exit work with IRQs disabled

    Linus Torvalds
     
  • Pull parsic fixes from Helge Deller:
    "One patch from Mikulas fixes a bug on parisc by artifically
    incrementing the counter in pmd_free when the kernel tries to free
    the preallocated pmd.

    Other than that we now prevent that syscalls gets added without
    incrementing __NR_Linux_syscalls and fix the initial pmd setup code
    if a default page size greater than 4k has been selected"

    * 'parisc-4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix pmd code to depend on PT_NLEVELS value, not on CONFIG_64BIT
    parisc: mm: don't count preallocated pmds
    parisc: Add compile-time check when adding new syscalls

    Linus Torvalds
     
  • Pull kvm ppc bugfixes from Marcelo Tosatti.

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: PPC: Book3S HV: Fix instruction emulation
    KVM: PPC: Book3S HV: Endian fix for accessing VPA yield count
    KVM: PPC: Book3S HV: Fix spinlock/mutex ordering issue in kvmppc_set_lpcr()

    Linus Torvalds
     
  • Pull ARC fixes from Vineet Gupta:
    "We found some issues with signal handling taking down the system. I
    know its late, but these are important and all marked for stable.

    ARC signal handling related fixes uncovered during recent testing of
    NPTL tools"

    * tag 'arc-4.0-fixes-part-2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
    ARC: signal handling robustify
    ARC: SA_SIGINFO ucontext regs off-by-one

    Linus Torvalds
     

27 Mar, 2015

1 commit

  • Pull s390 fixes from Martin Schwidefsky:
    "A couple of bug fixes for s390.

    The ftrace comile fix is quite large for a -rc6 release, but it would
    be nice to have it in 4.0"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/smp: reenable smt after resume
    s390/mm: limit STACK_RND_MASK for compat tasks
    s390/ftrace: fix compile error if CONFIG_KPROBES is disabled
    s390/cpum_sf: add diagnostic sampling event only if it is authorized

    Linus Torvalds
     

26 Mar, 2015

4 commits

  • A malicious signal handler / restorer can DOS the system by fudging the
    user regs saved on stack, causing weird things such as sigreturn returning
    to user mode PC but cpu state still being kernel mode....

    Ensure that in sigreturn path status32 always has U bit; any other bogosity
    (gargbage PC etc) will be taken care of by normal user mode exceptions mechanisms.

    Reproducer signal handler:

    void handle_sig(int signo, siginfo_t *info, void *context)
    {
    ucontext_t *uc = context;
    struct user_regs_struct *regs = &(uc->uc_mcontext.regs);

    regs->scratch.status32 = 0;
    }

    Before the fix, kernel would go off to weeds like below:

    --------->8-----------
    [ARCLinux]$ ./signal-test
    Path: /signal-test
    CPU: 0 PID: 61 Comm: signal-test Not tainted 4.0.0-rc5+ #65
    task: 8f177880 ti: 5ffe6000 task.ti: 8f15c000

    [ECR ]: 0x00220200 => Invalid Write @ 0x00000010 by insn @ 0x00010698
    [EFA ]: 0x00000010
    [BLINK ]: 0x2007c1ee
    [ERET ]: 0x10698
    [STAT32]: 0x00000000 : 8-----------

    Reported-by: Alexey Brodkin
    Cc:
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • The regfile provided to SA_SIGINFO signal handler as ucontext was off by
    one due to pt_regs gutter cleanups in 2013.

    Before handling signal, user pt_regs are copied onto user_regs_struct and copied
    back later. Both structs are binary compatible. This was all fine until
    commit 2fa919045b72 (ARC: pt_regs update #2) which removed the empty stack slot
    at top of pt_regs (corresponding to first pad) and made the corresponding
    fixup in struct user_regs_struct (the pad in there was moved out of
    @scratch - not removed altogether as it is part of ptrace ABI)

    struct user_regs_struct {
    + long pad;
    struct {
    - long pad;
    long bta, lp_start, lp_end,....
    } scratch;
    ...
    }

    This meant that now user_regs_struct was off by 1 reg w.r.t pt_regs and
    signal code needs to user_regs_struct.scratch to reflect it as pt_regs,
    which is what this commit does.

    This problem was hidden for 2 years, because both save/restore, despite
    using wrong location, were using the same location. Only an interim
    inspection (reproducer below) exposed the issue.

    void handle_segv(int signo, siginfo_t *info, void *context)
    {
    ucontext_t *uc = context;
    struct user_regs_struct *regs = &(uc->uc_mcontext.regs);

    printf("regs %x %x\n", scratch.r8, regs->scratch.r9);
    }

    int main()
    {
    struct sigaction sa;

    sa.sa_sigaction = handle_segv;
    sa.sa_flags = SA_SIGINFO;
    sigemptyset(&sa.sa_mask);
    sigaction(SIGSEGV, &sa, NULL);

    asm volatile(
    "mov r7, 7 \n"
    "mov r8, 8 \n"
    "mov r9, 9 \n"
    "mov r10, 10 \n"
    :::"r7","r8","r9","r10");

    *((unsigned int*)0x10) = 0;
    }

    Fixes: 2fa919045b72ec892e "ARC: pt_regs update #2: Remove unused gutter at start of pt_regs"
    CC:
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • Pull arch/metag fix from James Hogan:
    "Another metag architecture fix for v4.0

    This is another single fix, for an include dependency problem when
    using ioremap_wc() from asm/io.h without also including asm/pgtable.h"

    * tag 'metag-fixes-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    metag: Fix ioremap_wc/ioremap_cached build errors

    Linus Torvalds
     
  • Patch queue for 4.0 - 2015-03-25

    A few bug fixes for Book3S HV KVM:

    - Fix spinlock ordering
    - Fix idle guests on LE hosts
    - Fix instruction emulation

    Marcelo Tosatti
     

25 Mar, 2015

8 commits

  • After a suspend/resume cycle we missed to enable smt again, which leads
    to all sorts of bugs, since the kernel assumes smt is enabled, while the
    hardware thinks it is not.

    Reported-and-tested-by: Sebastian Ott
    Reported-by: Stefan Haberland
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Pull two arm64 fixes from Catalin Marinas:

    - switch_mm() fix where init_mm.pgd ends up in the user TTBR0;
    swapper_pg_dir is not suitable for user mappings

    - this_cpu accessors fix for preemption safety

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: percpu: Make this_cpu accessors pre-empt safe
    arm64: Use the reserved TTBR0 if context switching to the init_mm

    Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:

    - Fix the MCE code to use CONFIG_KVM_BOOK3S_64_HANDLER

    - Little endian fixes for post mobility device tree update

    - Add PVR for POWER8NVL processor

    - Fixes for hypervisor doorbell handling

    * tag 'powerpc-4.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
    powerpc/book3s: Fix the MCE code to use CONFIG_KVM_BOOK3S_64_HANDLER
    powerpc/pseries: Little endian fixes for post mobility device tree update
    powerpc: Add PVR for POWER8NVL processor
    powerpc/powernv: Fixes for hypervisor doorbell handling

    Linus Torvalds
     
  • Pull kvm fixes from Marcelo Tosatti:
    "Fix for higher-order page allocation failures, fix Xen-on-KVM with
    x2apic, L1 crash with unrestricted guest mode (nested VMX)"

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    kvm: avoid page allocation failure in kvm_set_memory_region()
    KVM: x86: call irq notifiers with directed EOI
    KVM: nVMX: mask unrestricted_guest if disabled on L0

    Linus Torvalds
     
  • Without proper regulator support for individual boards, it is dangerous
    to have overclocked/overvoltaged OPPs in the list. Cpufreq will increase
    the frequency without the accompanying voltage increase, resulting in
    an unstable system.

    Remove them for now. We can revisit them with the new version of OPP
    bindings, which support boost settings and frequency ranges, among
    other things.

    Signed-off-by: Chen-Yu Tsai
    Signed-off-by: Maxime Ripard

    Chen-Yu Tsai
     
  • The Olimex A10-Lime is known to be unstable when running at 1008MHz.

    Signed-off-by: Chen-Yu Tsai
    Signed-off-by: Maxime Ripard

    Chen-Yu Tsai
     
  • We currently have a race: if we're preempted during syscall
    exit, we can fail to process syscall return work that is queued
    up while we're preempted in ret_from_sys_call after checking
    ti.flags.

    Fix it by disabling interrupts before checking ti.flags.

    Reported-by: Stefan Seyfried
    Reported-by: Takashi Iwai
    Signed-off-by: Andy Lutomirski
    Acked-by: Denys Vlasenko
    Cc: Jiri Kosina
    Cc: Tejun Heo
    Fixes: 96b6352c1271 ("x86_64, entry: Remove the syscall exit audit")
    Link: http://lkml.kernel.org/r/189320d42b4d671df78c10555976bb10af1ffc75.1427137498.git.luto@kernel.org
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • this_cpu operations were implemented for arm64 in:
    5284e1b arm64: xchg: Implement cmpxchg_double
    f97fc81 arm64: percpu: Implement this_cpu operations

    Unfortunately, it is possible for pre-emption to take place between
    address generation and data access. This can lead to cases where data
    is being manipulated by this_cpu for a different CPU than it was
    called on. Which effectively breaks the spec.

    This patch disables pre-emption for the this_cpu operations
    guaranteeing that address generation and data manipulation take place
    without a pre-emption in-between.

    Fixes: 5284e1b4bc8a ("arm64: xchg: Implement cmpxchg_double")
    Fixes: f97fc810798c ("arm64: percpu: Implement this_cpu operations")
    Reported-by: Mark Rutland
    Acked-by: Will Deacon
    Signed-off-by: Steve Capper
    [catalin.marinas@arm.com: remove space after type cast]
    Signed-off-by: Catalin Marinas

    Steve Capper
     

24 Mar, 2015

4 commits

  • kvm_ioapic_update_eoi() wasn't called if directed EOI was enabled.
    We need to do that for irq notifiers. (Like with edge interrupts.)

    Fix it by skipping EOI broadcast only.

    Bug: https://bugzilla.kernel.org/show_bug.cgi?id=82211
    Signed-off-by: Radim Krčmář
    Reviewed-by: Paolo Bonzini
    Tested-by: Bandan Das
    Signed-off-by: Marcelo Tosatti

    Radim Krčmář
     
  • The idle_task_exit() function may call switch_mm() with next ==
    &init_mm. On arm64, init_mm.pgd cannot be used for user mappings, so
    this patch simply sets the reserved TTBR0.

    Cc:
    Reported-by: Jon Medhurst (Tixy)
    Tested-by: Jon Medhurst (Tixy)
    Signed-off-by: Catalin Marinas

    Catalin Marinas
     
  • Pull sparc fixes from David Miller:
    "Some perf bug fixes from David Ahern, and the fix for that nasty
    memmove() bug"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc64: Fix several bugs in memmove().
    sparc: Touch NMI watchdog when walking cpus and calling printk
    sparc: perf: Add support M7 processor
    sparc: perf: Make counting mode actually work
    sparc: perf: Remove redundant perf_pmu_{en|dis}able calls

    Linus Torvalds
     
  • Firstly, handle zero length calls properly. Believe it or not there
    are a few of these happening during early boot.

    Next, we can't just drop to a memcpy() call in the forward copy case
    where dst
    Reported-by: Bob Picco
    Signed-off-by: David S. Miller

    David S. Miller
     

23 Mar, 2015

5 commits

  • When ioremap_wc() or ioremap_cached() are used without first including
    asm/pgtable.h, the _PAGE_CACHEABLE or _PAGE_WR_COMBINE definitions
    aren't found, resulting in build errors like the following (in
    next-20150323 due to "lib: devres: add a helper function for
    ioremap_wc"):

    lib/devres.c: In function ‘devm_ioremap_wc’:
    lib/devres.c:91: error: ‘_PAGE_WR_COMBINE’ undeclared

    We can't easily include asm/pgtable.h in asm/io.h due to dependency
    problems, so split out the _PAGE_* definitions from asm/pgtable.h into a
    separate asm/pgtable-bits.h header (as a couple of other architectures
    already do), and include that in io.h instead.

    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org
    Cc: Abhilash Kesavan
    Cc: Greg Kroah-Hartman

    James Hogan
     
  • Make the code which sets up the pmd depend on PT_NLEVELS == 3, not on
    CONFIG_64BIT. The reason is, that a 64bit kernel with a page size
    greater than 4k doesn't need the pmd and thus has PT_NLEVELS = 2.

    Signed-off-by: Helge Deller

    Helge Deller
     
  • The patch dc6c9a35b66b520cf67e05d8ca60ebecad3b0479 that counts pmds
    allocated for a process introduced a bug on 64-bit PA-RISC kernels.

    The PA-RISC architecture preallocates one pmd with each pgd. This
    preallocated pmd can never be freed - pmd_free does nothing when it is
    called with this pmd. When the kernel attempts to free this preallocated
    pmd, it decreases the count of allocated pmds. The result is that the
    counter underflows and this error is reported.

    This patch fixes the bug by artifically incrementing the counter in
    pmd_free when the kernel tries to free the preallocated pmd.

    Signed-off-by: Mikulas Patocka
    Acked-by: Kirill A. Shutemov
    Signed-off-by: Helge Deller

    Mikulas Patocka
     
  • Signed-off-by: Helge Deller

    Helge Deller
     
  • commit id 2ba9f0d has changed CONFIG_KVM_BOOK3S_64_HV to tristate to allow
    HV/PR bits to be built as modules. But the MCE code still depends on
    CONFIG_KVM_BOOK3S_64_HV which is wrong. When user selects
    CONFIG_KVM_BOOK3S_64_HV=m to build HV/PR bits as a separate module the
    relevant MCE code gets excluded.

    This patch fixes the MCE code to use CONFIG_KVM_BOOK3S_64_HANDLER. This
    makes sure that the relevant MCE code is included when HV/PR bits
    are built as a separate modules.

    Fixes: 2ba9f0d88750 ("kvm: powerpc: book3s: Support building HV and PR KVM as module")
    Cc: stable@vger.kernel.org # v3.14+
    Signed-off-by: Mahesh Salgaonkar
    Acked-by: Paul Mackerras
    Signed-off-by: Michael Ellerman

    Mahesh Salgaonkar
     

22 Mar, 2015

3 commits

  • Pull power management and ACPI fixes from Rafael Wysocki:
    "These are fixes for recent regressions (PCI/ACPI resources and at91
    RTC locking), a stable-candidate powercap RAPL driver fix and two ARM
    cpuidle fixes (one stable-candidate too).

    Specifics:

    - Revert a recent PCI commit related to IRQ resources management that
    introduced a regression for drivers attempting to bind to devices
    whose previous drivers did not balance pci_enable_device() and
    pci_disable_device() as expected (Rafael J Wysocki).

    - Fix a deadlock in at91_rtc_interrupt() introduced by a typo in a
    recent commit related to wakeup interrupt handling (Dan Carpenter).

    - Allow the power capping RAPL (Running-Average Power Limit) driver
    to use different energy units for domains within one CPU package
    which is necessary to handle Intel Haswell EP processors correctly
    (Jacob Pan).

    - Improve the cpuidle mvebu driver's handling of Armada XP SoCs by
    updating the target residency and exit latency numbers for those
    chips (Sebastien Rannou).

    - Prevent the cpuidle mvebu driver from calling cpu_pm_enter() twice
    in a row before cpu_pm_exit() is called on the same CPU which
    breaks the core's assumptions regarding the usage of those
    functions (Gregory Clement)"

    * tag 'pm+acpi-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    Revert "x86/PCI: Refine the way to release PCI IRQ resources"
    rtc: at91rm9200: double locking bug in at91_rtc_interrupt()
    powercap / RAPL: handle domains with different energy units
    cpuidle: mvebu: Update cpuidle thresholds for Armada XP SOCs
    cpuidle: mvebu: Fix the CPU PM notifier usage

    Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:

    - mm switching fix where the kernel pgd ends up in the user TTBR0 after
    returning from an EFI run-time services call

    - fix __GFP_ZERO handling for atomic pool and CMA DMA allocations (the
    generic code does get the gfp flags, so it's left with the arch code
    to memzero accordingly)

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: Honor __GFP_ZERO in dma allocations
    arm64: efi: don't restore TTBR0 if active_mm points at init_mm

    Linus Torvalds
     
  • Pull ARM fixes from Russell King:
    "Another few ARM fixes. Fabrice fixed the L2 cache DT parsing to allow
    prefetch configuration to be specified even when the cache size
    parsing fails.

    Laura noticed that the setting of page attributes wasn't working for
    modules due to is_module_addr() always returning false.

    Marc Gonzalez (aka Mason) noticed a potential latent bug with the way
    we read one of the CPUID registers (where we could attempt to read a
    non-present CPUID register which may fault.)

    I've fixed an issue where 32-bit DMA masks were failing with memory
    which extended to the top of physical address space, and I've also
    added debugging output of the page tables when we hit a data access
    exception which we don't specifically handle - prompted by the lack of
    information in a bug report"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8313/1: Use read_cpuid_ext() macro instead of inline asm
    ARM: 8311/1: Don't use is_module_addr in setting page attributes
    ARM: 8310/1: l2c: Fix prefetch settings dt parsing
    ARM: dump pgd, pmd and pte states on unhandled data abort faults
    ARM: dma-api: fix off-by-one error in __dma_supported()

    Linus Torvalds
     

21 Mar, 2015

1 commit