24 Oct, 2013

3 commits

  • In latest UEFI spec(by now it is 2.4) memory error definition
    for CPER (UEFI 2.4 Appendix N Common Platform Error Record)
    adds some new fields. These fields help people to locate
    memory error to an actual DIMM location.

    Original-author: Tony Luck
    Signed-off-by: Chen, Gong
    Reviewed-by: Borislav Petkov
    Reviewed-by: Mauro Carvalho Chehab
    Acked-by: Naveen N. Rao
    Signed-off-by: Tony Luck

    Chen, Gong
     
  • This patch adds a new interface to decode memory device (type 17)
    to help error reporting on DIMMs.

    Original-author: Tony Luck
    Signed-off-by: Chen, Gong
    Acked-by: Naveen N. Rao
    Acked-by: Borislav Petkov
    Reviewed-by: Mauro Carvalho Chehab
    Signed-off-by: Tony Luck

    Chen, Gong
     
  • This H/W error log driver (a.k.a eMCA driver) is implemented based on
    http://www.intel.com/content/www/us/en/architecture-and-technology/enhanced-mca-logging-xeon-paper.html

    After errors are captured, more detailed platform specific information
    can be got via this new enhanced H/W error log driver. Most notably we
    can track memory errors back to the DIMM slot silk screen label.

    Signed-off-by: Chen, Gong
    Signed-off-by: Tony Luck

    Chen, Gong
     

19 Oct, 2013

1 commit


16 Oct, 2013

4 commits

  • Pull device tree fixes and reverts from Grant Likely:
    "One bug fix and three reverts. The reverts back out the slightly
    controversial feeding the entire device tree into the random pool and
    the reserved-memory binding which isn't fully baked yet. Expect the
    reserved-memory patches at least to resurface for v3.13.

    The bug fixes removes a scary but harmless warning on SPARC that was
    introduced in the v3.12 merge window. v3.13 will contain a proper fix
    that makes the new code work on SPARC.

    On the plus side, the diffstat looks *awesome*. I love removing lines
    of code"

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    Revert "drivers: of: add initialization code for dma reserved memory"
    Revert "ARM: init: add support for reserved memory defined by device tree"
    Revert "of: Feed entire flattened device tree into the random pool"
    of: fix unnecessary warning on missing /cpus node

    Linus Torvalds
     
  • Pull DMA-mapping fix from Marek Szyprowski:
    "A bugfix for the IOMMU-based implementation of dma-mapping subsystem
    for ARM architecture"

    * 'fixes-for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    ARM: dma-mapping: Always pass proper prot flags to iommu_map()

    Linus Torvalds
     
  • Pull kvm fix from Gleb Natapov.

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: Enable pvspinlock after jump_label_init() to avoid VM hang

    Linus Torvalds
     
  • Pull Xen fixes from Stefano Stabellini:
    "A small fix for Xen on x86_32 and a build fix for xen-tpmfront on
    arm64"

    * tag 'stable/for-linus-3.12-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen: Fix possible user space selector corruption
    tpm: xen-tpmfront: fix missing declaration of xen_domain

    Linus Torvalds
     

15 Oct, 2013

4 commits

  • We use jump label to enable pv-spinlock. With the changes in (442e0973e927
    Merge branch 'x86/jumplabel'), the jump label behaviour has changed
    that would result in eventual hang of the VM since we would end up in a
    situation where slow path locks would halt the vcpus but we will not be
    able to wakeup the vcpu by lock releaser using unlock kick.

    Similar problem in Xen and more detailed description is available in
    a945928ea270 (xen: Do not enable spinlocks before jump_label_init()
    has executed)

    This patch splits kvm_spinlock_init to separate jump label changes with
    pvops patching and also make jump label enabling after jump_label_init().

    Signed-off-by: Raghavendra K T
    Reviewed-by: Paolo Bonzini
    Reviewed-by: Steven Rostedt
    Signed-off-by: Gleb Natapov

    Raghavendra K T
     
  • This reverts commit 10bcdfb8ba24760f715f0a700c3812747eddddf5. There is
    no consensus on the bindings for the reserved memory, so the code for
    handing it will be reverted.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Grant Likely

    Marek Szyprowski
     
  • The UV3 hub revision ID is different than expected. The first
    revision was supposed to start at 1 but instead will start at 0.

    Signed-off-by: Russ Anderson
    Cc: # v3.9, v3.10, v3.11
    Link: http://lkml.kernel.org/r/20131014161733.GA6274@sgi.com
    Signed-off-by: Ingo Molnar

    Russ Anderson
     
  • Pull ARM fixes from Russell King:
    "Some more ARM fixes, nothing particularly major here. The biggest
    change is to fix the SMP_ON_UP code so that it works with TI's Aegis
    cores"

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7851/1: check for number of arguments in syscall_get/set_arguments()
    ARM: 7846/1: Update SMP_ON_UP code to detect A9MPCore with 1 CPU devices
    ARM: 7845/1: sharpsl_param.c: fix invalid memory access for pxa devices
    ARM: 7843/1: drop asm/types.h from generic-y
    ARM: 7842/1: MCPM: don't explode if invoked without being initialized first

    Linus Torvalds
     

14 Oct, 2013

5 commits

  • I have a randconfig here which has enabled only

    CONFIG_MICROCODE=y
    CONFIG_MICROCODE_OLD_INTERFACE=y

    with both

    # CONFIG_MICROCODE_INTEL is not set
    # CONFIG_MICROCODE_AMD is not set

    off. Which makes building the microcode functionality a little
    pointless. Don't do that in such cases then.

    Signed-off-by: Borislav Petkov
    Link: http://lkml.kernel.org/r/1381682189-14470-1-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar

    Borislav Petkov
     
  • In ftrace_syscall_enter(),
    syscall_get_arguments(..., 0, n, ...)
    if (i == 0) { ...; n--;}
    memcpy(..., n * sizeof(args[0]));
    If 'number of arguments(n)' is zero and 'argument index(i)' is also zero in
    syscall_get_arguments(), none of arguments should be copied by memcpy().
    Otherwise 'n--' can be a big positive number and unexpected amount of data
    will be copied. Tracing system calls which take no argument, say sync(void),
    may hit this case and eventually make the system corrupted.
    This patch fixes the issue both in syscall_get_arguments() and
    syscall_set_arguments().

    Cc:
    Acked-by: Will Deacon
    Signed-off-by: AKASHI Takahiro
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    AKASHI Takahiro
     
  • Pull ARM SoC fixes from Olof Johansson:
    "A small batch of fixes this week, mostly OMAP related. Nothing stands
    out as particularly controversial.

    Also a fix for a 3.12-rc1 timer regression for Exynos platforms,
    including the Chromebooks"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: exynos: dts: Update 5250 arch timer node with clock frequency
    ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
    ARM: mach-omap2: board-generic: fix undefined symbol
    ARM: dts: Fix pinctrl mask for omap3
    ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
    ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT

    Linus Torvalds
     
  • Without the "clock-frequency" property in arch timer node, could able
    to see the below crash dump.

    [] (unwind_backtrace+0x0/0xf4) from [] (show_stack+0x10/0x14)
    [] (show_stack+0x10/0x14) from [] (dump_stack+0x7c/0xb0)
    [] (dump_stack+0x7c/0xb0) from [] (Ldiv0_64+0x8/0x18)
    [] (Ldiv0_64+0x8/0x18) from [] (clockevents_config.part.2+0x1c/0x74)
    [] (clockevents_config.part.2+0x1c/0x74) from [] (clockevents_config_and_register+0x20/0x2c)
    [] (clockevents_config_and_register+0x20/0x2c) from [] (arch_timer_setup+0xa8/0x134)
    [] (arch_timer_setup+0xa8/0x134) from [] (arch_timer_init+0x1f4/0x24c)
    [] (arch_timer_init+0x1f4/0x24c) from [] (clocksource_of_init+0x34/0x58)
    [] (clocksource_of_init+0x34/0x58) from [] (time_init+0x20/0x2c)
    [] (time_init+0x20/0x2c) from [] (start_kernel+0x1e0/0x39c)

    THis is because the Exynos u-boot, for example on the Chromebooks, doesn't set
    up the CNTFRQ register as expected by arch_timer. Instead, we have to specify
    the frequency in the device tree like this.

    Signed-off-by: Yuvaraj Kumar C D
    [olof: Changed subject, added comment, elaborated on commit message]
    Signed-off-by: Olof Johansson

    Yuvaraj Kumar C D
     
  • …kernel/git/tmlind/linux-omap into fixes

    From Tony Lindgren:

    Few fixes for omap3 related hangs and errors that people have
    noticed now that people are actually using the device tree
    based booting for omap3.

    Also one regression fix for timer compile for dra7xx when
    omap5 is not selected, and a LED regression fix for n900.

    * tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
    ARM: mach-omap2: board-generic: fix undefined symbol
    ARM: dts: Fix pinctrl mask for omap3
    ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
    ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT

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

    Olof Johansson
     

13 Oct, 2013

10 commits


12 Oct, 2013

2 commits

  • ARCompact TRAP_S insn used for breakpoints, commits before exception is
    taken (updating architectural PC). So ptregs->ret contains next-PC and
    not the breakpoint PC itself. This is different from other restartable
    exceptions such as TLB Miss where ptregs->ret has exact faulting PC.
    gdb needs to know exact-PC hence ARC ptrace GETREGSET provides for
    @stop_pc which returns ptregs->ret vs. EFA depending on the
    situation.

    However, writing stop_pc (SETREGSET request), which updates ptregs->ret
    doesn't makes sense stop_pc doesn't always correspond to that reg as
    described above.

    This was not an issue so far since user_regs->ret / user_regs->stop_pc
    had same value and both writing to ptregs->ret was OK, needless, but NOT
    broken, hence not observed.

    With gdb "jump", they diverge, and user_regs->ret updating ptregs is
    overwritten immediately with stop_pc, which this patch fixes.

    Reported-by: Anton Kolesov
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • Pull MIPS fix from Ralf Baechle:
    "Just one fix. The stack protector was loading the value of the canary
    instead of its address"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: stack protector: Fix per-task canary switch

    Linus Torvalds
     

11 Oct, 2013

3 commits


10 Oct, 2013

4 commits

  • Due to the way kernel is initialized under Xen is possible that the
    ring1 selector used by the kernel for the boot cpu end up to be copied
    to userspace leading to segmentation fault in the userspace.

    Xen code in the kernel initialize no-boot cpus with correct selectors (ds
    and es set to __USER_DS) but the boot one keep the ring1 (passed by Xen).
    On task context switch (switch_to) we assume that ds, es and cs already
    point to __USER_DS and __KERNEL_CSso these selector are not changed.

    If processor is an Intel that support sysenter instruction sysenter/sysexit
    is used so ds and es are not restored switching back from kernel to
    userspace. In the case the selectors point to a ring1 instead of __USER_DS
    the userspace code will crash on first memory access attempt (to be
    precise Xen on the emulated iret used to do sysexit will detect and set ds
    and es to zero which lead to GPF anyway).

    Now if an userspace process call kernel using sysenter and get rescheduled
    (for me it happen on a specific init calling wait4) could happen that the
    ring1 selector is set to ds and es.

    This is quite hard to detect cause after a while these selectors are fixed
    (__USER_DS seems sticky).

    Bisecting the code commit 7076aada1040de4ed79a5977dbabdb5e5ea5e249 appears
    to be the first one that have this issue.

    Signed-off-by: Frediano Ziglio
    Signed-off-by: Stefano Stabellini
    Reviewed-by: Andrew Cooper

    Frediano Ziglio
     
  • When the MM code is invalidating a range of pages, it calls the KVM
    kvm_mmu_notifier_invalidate_range_start() notifier function, which calls
    kvm_unmap_hva_range(), which arranges to flush all the TLBs for guest pages.
    However, the Linux PTEs for the range being flushed are still valid at
    that point. We are not supposed to establish any new references to pages
    in the range until the ...range_end() notifier gets called.
    The PPC-specific KVM code doesn't get any explicit notification of that;
    instead, we are supposed to use mmu_notifier_retry() to test whether we
    are or have been inside a range flush notifier pair while we have been
    referencing a page.

    This patch calls the mmu_notifier_retry() while mapping the guest
    page to ensure we are not referencing a page when in range invalidation.

    This call is inside a region locked with kvm->mmu_lock, which is the
    same lock that is called by the KVM MMU notifier functions, thus
    ensuring that no new notification can proceed while we are in the
    locked region.

    Signed-off-by: Bharat Bhushan
    Acked-by: Alexander Graf
    [Backported to 3.12 - Paolo]
    Reviewed-by: Bharat Bhushan
    Signed-off-by: Paolo Bonzini

    Bharat Bhushan
     
  • This fixes a typo in the code that saves the guest DSCR (Data Stream
    Control Register) into the kvm_vcpu_arch struct on guest exit. The
    effect of the typo was that the DSCR value was saved in the wrong place,
    so changes to the DSCR by the guest didn't persist across guest exit
    and entry, and some host kernel memory got corrupted.

    Cc: stable@vger.kernel.org [v3.1+]
    Signed-off-by: Paul Mackerras
    Acked-by: Alexander Graf
    Signed-off-by: Paolo Bonzini

    Paul Mackerras
     
  • 72f857950f6f19 broke shadow on EPT. This patch reverts it and fixes PAE
    on nEPT (which reverted commit fixed) in other way.

    Shadow on EPT is now broken because while L1 builds shadow page table
    for L2 (which is PAE while L2 is in real mode) it never loads L2's
    GUEST_PDPTR[0-3]. They do not need to be loaded because without nested
    virtualization HW does this during guest entry if EPT is disabled,
    but in our case L0 emulates L2's vmentry while EPT is enables, so we
    cannot rely on vmcs12->guest_pdptr[0-3] to contain up-to-date values
    and need to re-read PDPTEs from L2 memory. This is what kvm_set_cr3()
    is doing, but by clearing cache bits during L2 vmentry we drop values
    that kvm_set_cr3() read from memory.

    So why the same code does not work for PAE on nEPT? kvm_set_cr3()
    reads pdptes into vcpu->arch.walk_mmu->pdptrs[]. walk_mmu points to
    vcpu->arch.nested_mmu while nested guest is running, but ept_load_pdptrs()
    uses vcpu->arch.mmu which contain incorrect values. Fix that by using
    walk_mmu in ept_(load|save)_pdptrs.

    Signed-off-by: Gleb Natapov
    Reviewed-by: Paolo Bonzini
    Tested-by: Paolo Bonzini
    Signed-off-by: Paolo Bonzini

    Gleb Natapov
     

09 Oct, 2013

4 commits

  • File drivers/leds/leds-lp55xx-common.c refuse to change led_current sysfs
    attribute if value is higher than max_current specified in board file. By default
    global C variables are zero, so changing always failed. This patch adding missing
    max_current and setting it to max safe value 100 (10 mA).

    It is unclear which commit exactly caused this regression as the lp5523
    driver was broken and was hiding the platform data breakage. Now
    the driver is fixed so this should be fixed as well.

    Signed-off-by: Pali Rohár
    Signed-off-by: Joerg Reisenweber
    [tony@atomide.com: updated comments to describe regression]
    Signed-off-by: Tony Lindgren

    Pali Rohár
     
  • Since dra7 reuses the function 'omap5_realtime_timer_init' in
    arch/arm/mach-omap2/board-generic.c as timer init function, it has to be
    built for this SoC as well.

    Signed-off-by: Simon Barth
    Signed-off-by: Tony Lindgren

    Simon Barth
     
  • The wake-up interrupt bit is available on omap3/4/5 processors
    unlike what we claim. Without fixing it we cannot use it on
    omap3 and the system configured for wake-up events will just
    hang on wake-up.

    Cc: Grygorii Strashko
    Cc: Benoît Cousson
    Cc: devicetree@vger.kernel.org
    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • SoC family definitions at the moment are reactive to board needs
    as a result, beagle-xm would matchup with ti,omap3 which invokes
    omap3430_init_early instead of omap3630_init_early. Obviously, this is
    the wrong behavior.

    With clock node dts conversion, we get the following warnings before
    system hangs as a result and 3630 based platforms fails to boot
    (uart4 clocks are only present in OMAP3630 and not present in
    OMAP3430):

    ...
    omap_hwmod: uart4: cannot clk_get main_clk uart4_fck
    omap_hwmod: uart4: cannot _init_clocks

    WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2434
    _init+0x6c/0x80()
    omap_hwmod: uart4: couldn't init clocks
    ...

    WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2126
    _enable+0x254/0x280()
    omap_hwmod: timer12: enabled state can only be entered from
    initialized, idle, or disabled state
    ...

    WARNING: CPU: 0 PID: 46 at arch/arm/mach-omap2/omap_hwmod.c:2224
    _idle+0xd4/0xf8()
    omap_hwmod: timer12: idle state can only be entered from enabled state

    WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2126
    _enable+0x254/0x280()
    omap_hwmod: uart4: enabled state can only be entered from
    initialized, idle, or disabled state

    So, add specific compatiblity for 3630 to allow match for Beagle-XM
    platform.

    Signed-off-by: Nishanth Menon
    [tony@atomide.com: left out ti,omap343x, updated comments]
    Signed-off-by: Tony Lindgren

    Nishanth Menon