17 Jan, 2015

2 commits

  • Pull arm64 fixes from Will Deacon:
    - Wire up compat_sys_execveat for compat (AArch32) tasks
    - Revert 421520ba9829, as this breaks our side of the boot protocol

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: partially revert "ARM: 8167/1: extend the reserved memory for initrd to be page aligned"
    arm64: compat: wire up compat_sys_execveat

    Linus Torvalds
     
  • …it/rostedt/linux-trace

    Pull ftrace fixes from Steven Rostedt:
    "This holds a few fixes to the ftrace infrastructure as well as the
    mixture of function graph tracing and kprobes.

    When jprobes and function graph tracing is enabled at the same time it
    will crash the system:

    # modprobe jprobe_example
    # echo function_graph > /sys/kernel/debug/tracing/current_tracer

    After the first fork (jprobe_example probes it), the system will
    crash.

    This is due to the way jprobes copies the stack frame and does not do
    a normal function return. This messes up with the function graph
    tracing accounting which hijacks the return address from the stack and
    replaces it with a hook function. It saves the return addresses in a
    separate stack to put back the correct return address when done. But
    because the jprobe functions do not do a normal return, their stack
    addresses are not put back until the function they probe is called,
    which means that the probed function will get the return address of
    the jprobe handler instead of its own.

    The simple fix here was to disable function graph tracing while the
    jprobe handler is being called.

    While debugging this I found two minor bugs with the function graph
    tracing.

    The first was about the function graph tracer sharing its function
    hash with the function tracer (they both get filtered by the same
    input). The changing of the set_ftrace_filter would not sync the
    function recording records after a change if the function tracer was
    disabled but the function graph tracer was enabled. This was due to
    the update only checking one of the ops instead of the shared ops to
    see if they were enabled and should perform the sync. This caused the
    ftrace accounting to break and a ftrace_bug() would be triggered,
    disabling ftrace until a reboot.

    The second was that the check to update records only checked one of
    the filter hashes. It needs to test both the "filter" and "notrace"
    hashes. The "filter" hash determines what functions to trace where as
    the "notrace" hash determines what functions not to trace (trace all
    but these). Both hashes need to be passed to the update code to find
    out what change is being done during the update. This also broke the
    ftrace record accounting and triggered a ftrace_bug().

    This patch set also include two more fixes that were reported
    separately from the kprobe issue.

    One was that init_ftrace_syscalls() was called twice at boot up. This
    is not a major bug, but that call performed a rather large kmalloc
    (NR_syscalls * sizeof(*syscalls_metadata)). The second call made the
    first one a memory leak, and wastes memory.

    The other fix is a regression caused by an update in the v3.19 merge
    window. The moving to enable events early, moved the enabling before
    PID 1 was created. The syscall events require setting the
    TIF_SYSCALL_TRACEPOINT for all tasks. But for_each_process_thread()
    does not include the swapper task (PID 0), and ended up being a nop.

    A suggested fix was to add the init_task() to have its flag set, but I
    didn't really want to mess with PID 0 for this minor bug. Instead I
    disable and re-enable events again at early_initcall() where it use to
    be enabled. This also handles any other event that might have its own
    reg function that could break at early boot up"

    * tag 'trace-fixes-v3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Fix enabling of syscall events on the command line
    tracing: Remove extra call to init_ftrace_syscalls()
    ftrace/jprobes/x86: Fix conflict between jprobes and function graph tracing
    ftrace: Check both notrace and filter for old hash
    ftrace: Fix updating of filters for shared global_ops filters

    Linus Torvalds
     

16 Jan, 2015

3 commits


15 Jan, 2015

4 commits

  • If the function graph tracer traces a jprobe callback, the system will
    crash. This can easily be demonstrated by compiling the jprobe
    sample module that is in the kernel tree, loading it and running the
    function graph tracer.

    # modprobe jprobe_example.ko
    # echo function_graph > /sys/kernel/debug/tracing/current_tracer
    # ls

    The first two commands end up in a nice crash after the first fork.
    (do_fork has a jprobe attached to it, so "ls" just triggers that fork)

    The problem is caused by the jprobe_return() that all jprobe callbacks
    must end with. The way jprobes works is that the function a jprobe
    is attached to has a breakpoint placed at the start of it (or it uses
    ftrace if fentry is supported). The breakpoint handler (or ftrace callback)
    will copy the stack frame and change the ip address to return to the
    jprobe handler instead of the function. The jprobe handler must end
    with jprobe_return() which swaps the stack and does an int3 (breakpoint).
    This breakpoint handler will then put back the saved stack frame,
    simulate the instruction at the beginning of the function it added
    a breakpoint to, and then continue on.

    For function tracing to work, it hijakes the return address from the
    stack frame, and replaces it with a hook function that will trace
    the end of the call. This hook function will restore the return
    address of the function call.

    If the function tracer traces the jprobe handler, the hook function
    for that handler will not be called, and its saved return address
    will be used for the next function. This will result in a kernel crash.

    To solve this, pause function tracing before the jprobe handler is called
    and unpause it before it returns back to the function it probed.

    Some other updates:

    Used a variable "saved_sp" to hold kcb->jprobe_saved_sp. This makes the
    code look a bit cleaner and easier to understand (various tries to fix
    this bug required this change).

    Note, if fentry is being used, jprobes will change the ip address before
    the function graph tracer runs and it will not be able to trace the
    function that the jprobe is probing.

    Link: http://lkml.kernel.org/r/20150114154329.552437962@goodmis.org

    Cc: stable@vger.kernel.org # 2.6.30+
    Acked-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Pull networking fixes from David Miller:

    1) Don't use uninitialized data in IPVS, from Dan Carpenter.

    2) conntrack race fixes from Pablo Neira Ayuso.

    3) Fix TX hangs with i40e, from Jesse Brandeburg.

    4) Fix budget return from poll calls in dnet and alx, from Eric
    Dumazet.

    5) Fix bugus "if (unlikely(x) < 0)" test in AF_PACKET, from Christoph
    Jaeger.

    6) Fix bug introduced by conversion to list_head in TIPC retransmit
    code, from Jon Paul Maloy.

    7) Don't use GFP_NOIO under spinlock in USB kaweth driver, from Alexey
    Khoroshilov.

    8) Fix bridge build with INET disabled, from Arnd Bergmann.

    9) Fix netlink array overrun for PROBE attributes in openvswitch, from
    Thomas Graf.

    10) Don't hold spinlock across synchronize_irq() in tg3 driver, from
    Prashant Sreedharan.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits)
    tg3: Release tp->lock before invoking synchronize_irq()
    tg3: tg3_reset_task() needs to use rtnl_lock to synchronize
    tg3: tg3_timer() should grab tp->lock before checking for tp->irq_sync
    team: avoid possible underflow of count_pending value for notify_peers and mcast_rejoin
    openvswitch: packet messages need their own probe attribtue
    i40e: adds FCoE configure option
    cxgb4vf: Fix queue allocation for 40G adapter
    netdevice: Add missing parentheses in macro
    bridge: only provide proxy ARP when CONFIG_INET is enabled
    neighbour: fix base_reachable_time(_ms) not effective immediatly when changed
    net: fec: fix MDIO bus assignement for dual fec SoC's
    xen-netfront: use different locks for Rx and Tx stats
    drivers: net: cpsw: fix multicast flush in dual emac mode
    cxgb4vf: Initialize mdio_addr before using it
    net: Corrected the comment describing the ndo operations to reflect the actual prototype for couple of operations
    usb/kaweth: use GFP_ATOMIC under spin_lock in usb_start_wait_urb()
    MAINTAINERS: add me as ibmveth maintainer
    tipc: fix bug in broadcast retransmit code
    update ip-sysctl.txt documentation (v2)
    net/at91_ether: prepare and unprepare clock
    ...

    Linus Torvalds
     
  • Pull kvm fixes from Paolo Bonzini:
    "Two bugfixes for arm64. I will have another pull request next week,
    but otherwise things are calm"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    arm64: KVM: Fix HCR setting for 32bit guests
    arm64: KVM: Fix TLB invalidation by IPA/VMID

    Linus Torvalds
     
  • Pull s390 fixes from Martin Schwidefsky:
    "Two small performance tweaks, the plumbing for the execveat system
    call and a couple of bug fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/uprobes: fix user space PER events
    s390/bpf: Fix JMP_JGE_X (A > X) and JMP_JGT_X (A >= X)
    s390/bpf: Fix ALU_NEG (A = -A)
    s390/mm: avoid using pmd_to_page for !USE_SPLIT_PMD_PTLOCKS
    s390/timex: fix get_tod_clock_ext() inline assembly
    s390: wire up execveat syscall
    s390/kernel: use stnsm 255 instead of stosm 0
    s390/vtime: Get rid of redundant WARN_ON
    s390/zcrypt: kernel oops at insmod of the z90crypt device driver

    Linus Torvalds
     

14 Jan, 2015

2 commits

  • On i.MX28, the MDIO bus is shared between the two FEC instances.
    The driver makes sure that the second FEC uses the MDIO bus of the
    first FEC. This is done conditionally if FEC_QUIRK_ENET_MAC is set.
    However, in newer designs, such as Vybrid or i.MX6SX, each FEC MAC
    has its own MDIO bus. Simply removing the quirk FEC_QUIRK_ENET_MAC
    is not an option since other logic, triggered by this quirk, is
    still needed.

    Furthermore, there are board designs which use the same MDIO bus
    for both PHY's even though the second bus would be available on the
    SoC side. Such layout are popular since it saves pins on SoC side.
    Due to the above quirk, those boards currently do work fine. The
    boards in the mainline tree with such a layout are:
    - Freescale Vybrid Tower with TWR-SER2 (vf610-twr.dts)
    - Freescale i.MX6 SoloX SDB Board (imx6sx-sdb.dts)

    This patch adds a new quirk FEC_QUIRK_SINGLE_MDIO for i.MX28, which
    makes sure that the MDIO bus of the first FEC is used in any case.

    However, the boards above do have a SoC with a MDIO bus for each FEC
    instance. But the PHY's are not connected in a 1:1 configuration. A
    proper device tree description is needed to allow the driver to
    figure out where to find its PHY. This patch fixes that shortcoming
    by adding a MDIO bus child node to the first FEC instance, along
    with the two PHY's on that bus, and making use of the phy-handle
    property to add a reference to the PHY's.

    Acked-by: Sascha Hauer
    Signed-off-by: Stefan Agner
    Signed-off-by: David S. Miller

    Stefan Agner
     
  • Pull xen bug fixes from David Vrabel:
    "Several critical linear p2m fixes that prevented some hosts from
    booting"

    * tag 'stable/for-linus-3.19-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    x86/xen: properly retrieve NMI reason
    xen: check for zero sized area when invalidating memory
    xen: use correct type for physical addresses
    xen: correct race in alloc_p2m_pmd()
    xen: correct error for building p2m list on 32 bits
    x86/xen: avoid freeing static 'name' when kasprintf() fails
    x86/xen: add extra memory for remapped frames during setup
    x86/xen: don't count how many PFNs are identity mapped
    x86/xen: Free bootmem in free_p2m_page() during early boot
    x86/xen: Remove unnecessary BUG_ON(preemptible()) in xen_setup_timer()

    Linus Torvalds
     

13 Jan, 2015

2 commits

  • Using the native code here can't work properly, as the hypervisor would
    normally have cleared the two reason bits by the time Dom0 gets to see
    the NMI (if passed to it at all). There's a shared info field for this,
    and there's an existing hook to use - just fit the two together. This
    is particularly relevant so that NMIs intended to be handled by APEI /
    GHES actually make it to the respective handler.

    Note that the hook can (and should) be used irrespective of whether
    being in Dom0, as accessing port 0x61 in a DomU would be even worse,
    while the shared info field would just hold zero all the time. Note
    further that hardware NMI handling for PVH doesn't currently work
    anyway due to missing code in the hypervisor (but it is expected to
    work the native rather than the PV way).

    Signed-off-by: Jan Beulich
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: David Vrabel

    Jan Beulich
     
  • With 841ee230253f ("ARM: wire up execveat syscall"), arch/arm/ has grown
    support for the execveat system call.

    This patch wires up the compat variant for arm64.

    Signed-off-by: Will Deacon

    Will Deacon
     

12 Jan, 2015

12 commits

  • Commit b856a59141b1 (arm/arm64: KVM: Reset the HCR on each vcpu
    when resetting the vcpu) moved the init of the HCR register to
    happen later in the init of a vcpu, but left out the fixup
    done in kvm_reset_vcpu when preparing for a 32bit guest.

    As a result, the 32bit guest is run as a 64bit guest, but the
    rest of the kernel still manages it as a 32bit. Fun follows.

    Moving the fixup to vcpu_reset_hcr solves the problem for good.

    Signed-off-by: Marc Zyngier
    Signed-off-by: Christoffer Dall
    Signed-off-by: Paolo Bonzini

    Marc Zyngier
     
  • It took about two years for someone to notice that the IPA passed
    to TLBI IPAS2E1IS must be shifted by 12 bits. Clearly our reviewing
    is not as good as it should be...

    Paper bag time for me.

    Reported-by: Mario Smarduch
    Tested-by: Mario Smarduch
    Signed-off-by: Marc Zyngier
    Signed-off-by: Christoffer Dall
    Signed-off-by: Paolo Bonzini

    Marc Zyngier
     
  • With the introduction of the linear mapped p2m list setting memory
    areas to "invalid" had to be delayed. When doing the invalidation
    make sure no zero sized areas are processed.

    Signed-off-by: Juegren Gross
    Signed-off-by: David Vrabel

    Juergen Gross
     
  • When converting a pfn to a physical address be sure to use 64 bit
    wide types or convert the physical address to a pfn if possible.

    Signed-off-by: Juergen Gross
    Tested-by: Boris Ostrovsky
    Signed-off-by: David Vrabel

    Juergen Gross
     
  • When allocating a new pmd for the linear mapped p2m list a check is
    done for not introducing another pmd when this just happened on
    another cpu. In this case the old pte pointer was returned which
    points to the p2m_missing or p2m_identity page. The correct value
    would be the pointer to the found new page.

    Signed-off-by: Juergen Gross
    Signed-off-by: David Vrabel

    Juergen Gross
     
  • In xen_rebuild_p2m_list() for large areas of invalid or identity
    mapped memory the pmd entries on 32 bit systems are initialized
    wrong. Correct this error.

    Suggested-by: Boris Ostrovsky
    Signed-off-by: Juergen Gross
    Signed-off-by: David Vrabel

    Juergen Gross
     
  • If uprobes are single stepped for example with gdb, the behavior should
    now be correct. Before this patch, when gdb was single stepping a uprobe,
    the result was a SIGILL.
    When PER is active for any storage alteration and a uprobe is hit, a storage
    alteration event is indicated. These over indications are filterd out by gdb,
    if no change has happened within the observed area.

    Signed-off-by: Jan Willeke
    Signed-off-by: Martin Schwidefsky

    Jan Willeke
     
  • In commit a3e5b356b3ab "powerpc: Don't use local named register variable
    in current_thread_info" Anton changed the way we did current_thread_info()
    to accommodate LLVM, and it was not meant to have any effect elsewhere.

    Unfortunately it has exposed a gcc bug, where r1 gets copied into
    another register and then gcc uses that register to restore the toc
    after a function call, even when that register is volatile and has been
    clobbered by the function call.

    We could revert Anton's patch, but it's not clear the original code is
    safe either, we may just have been lucky.

    The cleanest solution is to just use the existing CURRENT_THREAD_INFO()
    asm macro, and call it using inline asm.

    Segher points out we don't need volatile on the asm, if the result of
    the shift is unused it's fine for the compiler to elide it.

    Fixes: a3e5b356b3ab ("powerpc: Don't use local named register variable in current_thread_info")
    Reported-by: Alexander Graf
    Signed-off-by: Michael Ellerman

    Michael Ellerman
     
  • Patch c49f63530bb6 ("powernv: Add OPAL tracepoints") has a spurious
    store to the stack:

    ld r12,opal_tracepoint_refcount@toc(r2); \
    std r12,32(r1); \

    The store was originally used to save the current tracepoint status
    so the entry and the exit tracepoints were always balanced. In the
    end I just created a separate path when tracepoints are enabled.

    The offset on the stack used for this store is not valid for ABIv2
    and it causes strange issues. I noticed it because OPAL console input
    was broken.

    Fixes: c49f63530bb6 ("powernv: Add OPAL tracepoints")
    Cc: # v3.17+
    Signed-off-by: Anton Blanchard
    Signed-off-by: Michael Ellerman

    Anton Blanchard
     
  • Pull ARM fixes from Russell King:
    "Three small fixes from over the Christmas period, and wiring up the
    new execveat syscall for ARM"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8275/1: mm: fix PMD_SECT_RDONLY undeclared compile error
    ARM: 8253/1: mm: use phys_addr_t type in map_lowmem() for kernel mem region
    ARM: 8249/1: mm: dump: don't skip regions
    ARM: wire up execveat syscall

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "Misc fixes: two vdso fixes, two kbuild fixes and a boot failure fix
    with certain odd memory mappings"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, vdso: Use asm volatile in __getcpu
    x86/build: Clean auto-generated processor feature files
    x86: Fix mkcapflags.sh bash-ism
    x86: Fix step size adjustment during initial memory mapping
    x86_64, vdso: Fix the vdso address randomization algorithm

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Mostly tooling fixes, but also some kernel side fixes: uncore PMU
    driver fix, user regs sampling fix and an instruction decoder fix that
    unbreaks PEBS precise sampling"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/uncore/hsw-ep: Handle systems with only two SBOXes
    perf/x86_64: Improve user regs sampling
    perf: Move task_pt_regs sampling into arch code
    x86: Fix off-by-one in instruction decoder
    perf hists browser: Fix segfault when showing callchain
    perf callchain: Free callchains when hist entries are deleted
    perf hists: Fix children sort key behavior
    perf diff: Fix to sort by baseline field by default
    perf list: Fix --raw-dump option
    perf probe: Fix crash in dwarf_getcfi_elf
    perf probe: Fix to fall back to find probe point in symbols
    perf callchain: Append callchains only when requested
    perf ui/tui: Print backtrace symbols when segfault occurs
    perf report: Show progress bar for output resorting

    Linus Torvalds
     

11 Jan, 2015

1 commit

  • Check success of execveat(3, '../execveat', 0)... [OK]
    Check success of execveat(5, 'execveat', 0)... [OK]
    Check success of execveat(6, 'execveat', 0)... [OK]
    Check success of execveat(-100, '/root/selftest-exec/exec/execveat', 0)... [OK]
    Check success of execveat(99, '/root/selftest-exec/exec/execveat', 0)... [OK]
    Check success of execveat(8, '', 4096)... [OK]
    Check success of execveat(17, '', 4096)... [OK]
    Check success of execveat(9, '', 4096)... [OK]
    Check success of execveat(14, '', 4096)... [OK]
    Check success of execveat(14, '', 4096)... [OK]
    Check success of execveat(15, '', 4096)... [OK]
    Check failure of execveat(8, '', 0) with ENOENT... [OK]
    Check failure of execveat(8, '(null)', 4096) with EFAULT... [OK]
    Check success of execveat(5, 'execveat.symlink', 0)... [OK]
    Check success of execveat(6, 'execveat.symlink', 0)... [OK]
    Check success of execveat(-100, '/root/selftest-exec/...xec/execveat.symlink', 0)... [OK]
    Check success of execveat(10, '', 4096)... [OK]
    Check success of execveat(10, '', 4352)... [OK]
    Check failure of execveat(5, 'execveat.symlink', 256) with ELOOP... [OK]
    Check failure of execveat(6, 'execveat.symlink', 256) with ELOOP... [OK]
    Check failure of execveat(-100, '/root/selftest-exec/exec/execveat.symlink', 256) with ELOOP... [OK]
    Check success of execveat(3, '../script', 0)... [OK]
    Check success of execveat(5, 'script', 0)... [OK]
    Check success of execveat(6, 'script', 0)... [OK]
    Check success of execveat(-100, '/root/selftest-exec/exec/script', 0)... [OK]
    Check success of execveat(13, '', 4096)... [OK]
    Check success of execveat(13, '', 4352)... [OK]
    Check failure of execveat(18, '', 4096) with ENOENT... [OK]
    Check failure of execveat(7, 'script', 0) with ENOENT... [OK]
    Check success of execveat(16, '', 4096)... [OK]
    Check success of execveat(16, '', 4096)... [OK]
    Check success of execveat(4, '../script', 0)... [OK]
    Check success of execveat(4, 'script', 0)... [OK]
    Check success of execveat(4, '../script', 0)... [OK]
    Check failure of execveat(4, 'script', 0) with ENOENT... [OK]
    Check failure of execveat(5, 'execveat', 65535) with EINVAL... [OK]
    Check failure of execveat(5, 'no-such-file', 0) with ENOENT... [OK]
    Check failure of execveat(6, 'no-such-file', 0) with ENOENT... [OK]
    Check failure of execveat(-100, 'no-such-file', 0) with ENOENT... [OK]
    Check failure of execveat(5, '', 4096) with EACCES... [OK]
    Check failure of execveat(5, 'Makefile', 0) with EACCES... [OK]
    Check failure of execveat(11, '', 4096) with EACCES... [OK]
    Check failure of execveat(12, '', 4096) with EACCES... [OK]
    Check failure of execveat(99, '', 4096) with EBADF... [OK]
    Check failure of execveat(99, 'execveat', 0) with EBADF... [OK]
    Check failure of execveat(8, 'execveat', 0) with ENOTDIR... [OK]
    Invoke copy of 'execveat' via filename of length 4093:
    Check success of execveat(19, '', 4096)... [OK]
    Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
    Invoke copy of 'script' via filename of length 4093:
    Check success of execveat(20, '', 4096)... [OK]
    Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]

    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

10 Jan, 2015

3 commits

  • Pull arm64 fixes from Will Deacon:
    "Here is a handful of minor arm64 fixes discovered and fixed over the
    Christmas break. The main part is adding some missing #includes that
    we seem to be getting transitively but have started causing problems
    in -next.

    - Fix early mapping fixmap corruption by EFI runtime services
    - Fix __NR_compat_syscalls off-by-one
    - Add missing sanity checks for some 32-bit registers
    - Add some missing #includes which we get transitively
    - Remove unused prepare_to_copy() macro"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64/efi: add missing call to early_ioremap_reset()
    arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
    arm64: fix missing asm/alternative.h include in kernel/module.c
    arm64: fix missing linux/bug.h include in asm/arch_timer.h
    arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
    arm64: sanity checks: add missing AArch32 registers
    arm64: Remove unused prepare_to_copy()
    arm64: Correct __NR_compat_syscalls for bpf

    Linus Torvalds
     
  • Merge misc fixes from Andrew Morton:
    "12 fixes"

    * emailed patches from Andrew Morton :
    mm, vmscan: prevent kswapd livelock due to pfmemalloc-throttled process being killed
    memcg: fix destination cgroup leak on task charges migration
    mm: memcontrol: switch soft limit default back to infinity
    mm/debug_pagealloc: remove obsolete Kconfig options
    vfs: renumber FMODE_NONOTIFY and add to uniqueness check
    arch/blackfin/mach-bf533/boards/stamp.c: add linux/delay.h
    ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
    MAINTAINERS: update rydberg's addresses
    mm: protect set_page_dirty() from ongoing truncation
    mm: prevent endless growth of anon_vma hierarchy
    exit: fix race between wait_consider_task() and wait_task_zombie()
    ocfs2: remove bogus check in dlm_process_recovery_data

    Linus Torvalds
     
  • In v3.19-rc3 tree when CONFIG_ARM_LPAE and CONFIG_DEBUG_RODATA are enabled
    image failed to compile with the following error:

    arch/arm/mm/init.c:661:14: error: ‘PMD_SECT_RDONLY’ undeclared here (not in a function)

    It seems that '80d6b0c ARM: mm: allow text and rodata sections to be read-only'
    and 'ded9477 ARM: 8109/1: mm: Modify pte_write and pmd_write logic for LPAE'
    commits crossed. 80d6b0c uses PMD_SECT_RDONLY macro but ded9477 renames it
    and uses software bits L_PMD_SECT_RDONLY instead.

    Fix is to use L_PMD_SECT_RDONLY instead PMD_SECT_RDONLY as ded9477 does in
    another places.

    Signed-off-by: Victor Kamensky
    Acked-by: Will Deacon
    Signed-off-by: Russell King

    Victor Kamensky
     

09 Jan, 2015

9 commits

  • There was another report of a boot failure with a #GP fault in the
    uncore SBOX initialization. The earlier work around was not enough
    for this system.

    The boot was failing while trying to initialize the third SBOX.

    This patch detects parts with only two SBOXes and limits the number
    of SBOX units to two there.

    Stable material, as it affects boot problems on 3.18.

    Tested-by: Andreas Oehler
    Signed-off-by: Andi Kleen
    Signed-off-by: Peter Zijlstra (Intel)
    Cc:
    Cc: Arnaldo Carvalho de Melo
    Cc: Stephane Eranian
    Cc: Yan, Zheng
    Link: http://lkml.kernel.org/r/1420583675-9163-1-git-send-email-andi@firstfloor.org
    Signed-off-by: Ingo Molnar

    Andi Kleen
     
  • Perf reports user regs for kernel-mode samples so that samples can
    be backtraced through user code. The old code was very broken in
    syscall context, resulting in useless backtraces.

    The new code, in contrast, is still dangerously racy, but it should
    at least work most of the time.

    Tested-by: Jiri Olsa
    Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Stephane Eranian
    Cc: Andrew Morton
    Cc: chenggang.qcg@taobao.com
    Cc: Wu Fengguang
    Cc: Namhyung Kim
    Cc: Mike Galbraith
    Cc: Arjan van de Ven
    Cc: David Ahern
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/243560c26ff0f739978e2459e203f6515367634d.1420396372.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • On x86_64, at least, task_pt_regs may be only partially initialized
    in many contexts, so x86_64 should not use it without extra care
    from interrupt context, let alone NMI context.

    This will allow x86_64 to override the logic and will supply some
    scratch space to use to make a cleaner copy of user regs.

    Tested-by: Jiri Olsa
    Signed-off-by: Andy Lutomirski
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Stephane Eranian
    Cc: chenggang.qcg@taobao.com
    Cc: Wu Fengguang
    Cc: Namhyung Kim
    Cc: Mike Galbraith
    Cc: Arjan van de Ven
    Cc: David Ahern
    Cc: Arnaldo Carvalho de Melo
    Cc: Catalin Marinas
    Cc: Jean Pihet
    Cc: Linus Torvalds
    Cc: Mark Salter
    Cc: Russell King
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/e431cd4c18c2e1c44c774f10758527fb2d1025c4.1420396372.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • Stephane reported that the PEBS fixup was broken by the recent commit to
    the instruction decoder. The thing had an off-by-one which resulted in
    not being able to decode the last instruction and always bail.

    Reported-by: Stephane Eranian
    Fixes: 6ba48ff46f76 ("x86: Remove arbitrary instruction size limit in instruction decoder")
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: stable@vger.kernel.org # 3.18
    Cc:
    Cc: Jiri Olsa
    Cc: Liang Kan
    Cc: Arnaldo Carvalho de Melo
    Cc: Dave Hansen
    Cc: Jim Keniston
    Cc: Linus Torvalds
    Cc: Masami Hiramatsu
    Link: http://lkml.kernel.org/r/20141216104614.GV3337@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Currently the signed COMPARE (cr) instruction is used to compare "A"
    with "X". This is not correct because "A" and "X" are both unsigned.
    To fix this use the unsigned COMPARE LOGICAL (clr) instruction instead.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • Currently the LOAD NEGATIVE (lnr) instruction is used for ALU_NEG. This
    instruction always loads the negative value. Therefore, if A is already
    negative, it remains unchanged. To fix this use LOAD COMPLEMENT (lcr)
    instead.

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • build error

    arch/blackfin/mach-bf533/boards/stamp.c:834:2: error: implicit declaration of function 'mdelay'

    Signed-off-by: Oleg Nesterov
    Reported-by: Wu Fengguang
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Pull power management and ACPI fixes from Rafael Wysocki:
    "These are an ACPI device power management initialization fix (-stable
    material), two commits renaming stuff in the ACPI processor driver to
    make it more suitable for ARM64 processors and a new ACPI backlight
    blacklist entry.

    Specifics:

    - Fix ACPI power management intialization for device objects
    corresponding to devices that are not present at the init time (the
    _STA control method returns 0 for them) and therefore should not be
    regarded as power manageable (Rafael J Wysocki).

    - Rename a structure field and two functions used by the ACPI
    processor driver to make them less tied to architectures that use
    APICs (both x86 and ia64) and more suitable for ARM64 processors
    (Hanjun Guo).

    - Add a disable_native_backlight quirk for Dell XPS15 L521X designed
    in an unusual way preventing native backlight from working on that
    machine (Hans de Goede)"

    * tag 'pm+acpi-3.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / video: Add disable_native_backlight quirk for Dell XPS15 L521X
    ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()
    ACPI / processor: Convert apic_id to phys_id to make it arch agnostic
    ACPI / PM: Fix PM initialization for devices that are not present

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes a build problem with sha-mb with old toolchains and an
    implementation bug in the ctr(aes)/by8 branch of aesni-intel that's
    enabled when AVX is available"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: sha-mb - Add avx2_supported check.
    crypto: aesni - fix "by8" variant for 128 bit keys

    Linus Torvalds
     

08 Jan, 2015

2 commits

  • In case kasprintf() fails in xen_setup_timer() we assign name to the
    static string "". We, however, don't check
    that fact before issuing kfree() in xen_teardown_timer(), kernel is
    supposed to crash with 'kernel BUG at mm/slub.c:3341!'

    Solve the issue by making name a fixed length string inside struct
    xen_clock_event_device. 16 bytes should be enough.

    Suggested-by: Laszlo Ersek
    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: David Vrabel

    Vitaly Kuznetsov
     
  • If the non-RAM regions in the e820 memory map are larger than the size
    of the initial balloon, a BUG was triggered as the frames are remaped
    beyond the limit of the linear p2m. The frames are remapped into the
    initial balloon area (xen_extra_mem) but not enough of this is
    available.

    Ensure enough extra memory regions are added for these remapped
    frames.

    Signed-off-by: David Vrabel
    Reviewed-by: Juergen Gross

    David Vrabel