12 Apr, 2015

4 commits


09 Apr, 2015

1 commit


07 Apr, 2015

1 commit

  • Conflicts:
    drivers/net/ethernet/mellanox/mlx4/cmd.c
    net/core/fib_rules.c
    net/ipv4/fib_frontend.c

    The fib_rules.c and fib_frontend.c conflicts were locking adjustments
    in 'net' overlapping addition and removal of code in 'net-next'.

    The mlx4 conflict was a bug fix in 'net' happening in the same
    place a constant was being replaced with a more suitable macro.

    Signed-off-by: David S. Miller

    David S. Miller
     

04 Apr, 2015

2 commits


03 Apr, 2015

2 commits

  • Pull xen regression fixes from David Vrabel:
    "Fix two regressions in the balloon driver's use of memory hotplug when
    used in a PV guest"

    * tag 'stable/for-linus-4.0-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/balloon: before adding hotplugged memory, set frames to invalid
    x86/xen: prepare p2m list for memory hotplug

    Linus Torvalds
     
  • Conflicts:
    drivers/net/usb/asix_common.c
    drivers/net/usb/sr9800.c
    drivers/net/usb/usbnet.c
    include/linux/usb/usbnet.h
    net/ipv4/tcp_ipv4.c
    net/ipv6/tcp_ipv6.c

    The TCP conflicts were overlapping changes. In 'net' we added a
    READ_ONCE() to the socket cached RX route read, whilst in 'net-next'
    Eric Dumazet touched the surrounding code dealing with how mini
    sockets are handled.

    With USB, it's a case of the same bug fix first going into net-next
    and then I cherry picked it back into net.

    Signed-off-by: David S. Miller

    David S. Miller
     

02 Apr, 2015

4 commits

  • Some of the CYCLE_ACTIVITY.* events can only be scheduled on
    counter 2. Due to a typo Haswell matched those with
    INTEL_EVENT_CONSTRAINT, which lead to the events never
    matching as the comparison does not expect anything
    in the umask too. Fix the typo.

    Signed-off-by: Andi Kleen
    Signed-off-by: Peter Zijlstra (Intel)
    Link: http://lkml.kernel.org/r/1425925222-32361-1-git-send-email-andi@firstfloor.org
    Signed-off-by: Ingo Molnar

    Andi Kleen
     
  • For supporting Intel LBR branches filtering, Intel LBR sharing logic
    mechanism is introduced from commit b36817e88630 ("perf/x86: Add Intel
    LBR sharing logic"). It modifies __intel_shared_reg_get_constraints() to
    config lbr_sel, which is finally used to set LBR_SELECT.

    However, the intel_shared_regs_constraints() function is called after
    intel_pebs_constraints(). The PEBS event will return immediately after
    intel_pebs_constraints(). So it's impossible to filter branches for PEBS
    events.

    This patch moves intel_shared_regs_constraints() ahead of
    intel_pebs_constraints().

    We can safely do that because the intel_shared_regs_constraints() function
    only returns empty constraint if its rejecting the event, otherwise it
    returns NULL such that we continue calling intel_pebs_constraints() and
    x86_get_event_constraint().

    Signed-off-by: Kan Liang
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: eranian@google.com
    Link: http://lkml.kernel.org/r/1427467105-9260-1-git-send-email-kan.liang@intel.com
    Signed-off-by: Ingo Molnar

    Kan Liang
     
  • This patch fixes an error in kgdb for x86_64 which would report
    the value of dx when asked to give the value of si.

    Signed-off-by: Steffen Liebergeld
    Cc: Jason Wessel
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Steffen Liebergeld
     
  • When I wrote the opportunistic SYSRET code, I missed an important difference
    between SYSRET and IRET.

    Both instructions are capable of setting EFLAGS.TF, but they behave differently
    when doing so:

    - IRET will not issue a #DB trap after execution when it sets TF.
    This is critical -- otherwise you'd never be able to make forward progress when
    returning to userspace.

    - SYSRET, on the other hand, will trap with #DB immediately after
    returning to CPL3, and the next instruction will never execute.

    This breaks anything that opportunistically SYSRETs to a user
    context with TF set. For example, running this code with TF set
    and a SIGTRAP handler loaded never gets past 'post_nop':

    extern unsigned char post_nop[];
    asm volatile ("pushfq\n\t"
    "popq %%r11\n\t"
    "nop\n\t"
    "post_nop:"
    : : "c" (post_nop) : "r11");

    In my defense, I can't find this documented in the AMD or Intel manual.

    Fix it by using IRET to restore TF.

    Signed-off-by: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Fixes: 2a23c6b8a9c4 ("x86_64, entry: Use sysret to return to userspace when possible")
    Link: http://lkml.kernel.org/r/9472f1ca4c19a38ecda45bba9c91b7168135fcfa.1427923514.git.luto@kernel.org
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     

01 Apr, 2015

3 commits

  • The ASRock Q1900DC-ITX mainboard (Baytrail-D) hangs randomly in
    both BIOS and UEFI mode while rebooting unless reboot=pci is
    used. Add a quirk to reboot via the pci method.

    The problem is very intermittent and hard to debug, it might succeed
    rebooting just fine 40 times in a row - but fails half a dozen times
    the next day. It seems to be slightly less common in BIOS CSM mode
    than native UEFI (with the CSM disabled), but it does happen in either
    mode. Since I've started testing this patch in late january, rebooting
    has been 100% reliable.

    Most of the time it already hangs during POST, but occasionally it
    might even make it through the bootloader and the kernel might even
    start booting, but then hangs before the mode switch. The same symptoms
    occur with grub-efi, gummiboot and grub-pc, just as well as (at least)
    kernel 3.16-3.19 and 4.0-rc6 (I haven't tried older kernels than 3.16).
    Upgrading to the most current mainboard firmware of the ASRock
    Q1900DC-ITX, version 1.20, does not improve the situation.

    ( Searching the web seems to suggest that other Bay Trail-D mainboards
    might be affected as well. )
    --
    Signed-off-by: Stefan Lippers-Hollmann
    Cc:
    Cc: Matt Fleming
    Link: http://lkml.kernel.org/r/20150330224427.0fb58e42@mir
    Signed-off-by: Ingo Molnar

    Stefan Lippers-Hollmann
     
  • Space allocated for paca is based off nr_cpu_ids,
    but pnv_alloc_idle_core_states() iterates paca with
    cpu_nr_cores()*threads_per_core, which is using NR_CPUS.

    This causes pnv_alloc_idle_core_states() to write over memory,
    which is outside of paca array and may later lead to various panics.

    Fixes: 7cba160ad789 (powernv/cpuidle: Redesign idle states management)
    Signed-off-by: Jan Stancek
    Signed-off-by: Michael Ellerman

    Jan Stancek
     
  • This driver is 64 bit only, and so this driver and device are ready
    for 2038. This patch changes the driver to the new PHC and also
    carries the timespec64 parameter on out to the gxio_mpipe_get-
    set_timestamp functions, making explicit the fact that the tv_sec
    field is 64 bits wide.

    Not even compile tested.

    Signed-off-by: Richard Cochran
    Acked-by: Chris Metcalf
    Signed-off-by: David S. Miller

    Richard Cochran
     

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
     

28 Mar, 2015

1 commit


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

5 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
     
  • struct kiocb now is a generic I/O container, so move it to fs.h.
    Also do a #include diet for aio.h while we're at it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • 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

6 commits

  • The irqclass_sub_desc array and enum interruption_class are out of sync
    thus /proc/interrupts is broken. Remove IRQIO_CLW.

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Sebastian Ott
     
  • 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