16 Apr, 2015

3 commits

  • Pull exec domain removal from Richard Weinberger:
    "This series removes execution domain support from Linux.

    The idea behind exec domains was to support different ABIs. The
    feature was never complete nor stable. Let's rip it out and make the
    kernel signal handling code less complicated"

    * 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (27 commits)
    arm64: Removed unused variable
    sparc: Fix execution domain removal
    Remove rest of exec domains.
    arch: Remove exec_domain from remaining archs
    arc: Remove signal translation and exec_domain
    xtensa: Remove signal translation and exec_domain
    xtensa: Autogenerate offsets in struct thread_info
    x86: Remove signal translation and exec_domain
    unicore32: Remove signal translation and exec_domain
    um: Remove signal translation and exec_domain
    tile: Remove signal translation and exec_domain
    sparc: Remove signal translation and exec_domain
    sh: Remove signal translation and exec_domain
    s390: Remove signal translation and exec_domain
    mn10300: Remove signal translation and exec_domain
    microblaze: Remove signal translation and exec_domain
    m68k: Remove signal translation and exec_domain
    m32r: Remove signal translation and exec_domain
    m32r: Autogenerate offsets in struct thread_info
    frv: Remove signal translation and exec_domain
    ...

    Linus Torvalds
     
  • Pull UML updates from Richard Weinberger:
    - hostfs saw a face lifting
    - old/broken stuff was removed (SMP, HIGHMEM, SKAS3/4)
    - random cleanups and bug fixes

    * tag 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (26 commits)
    um: Print minimum physical memory requirement
    um: Move uml_postsetup in the init_thread stack
    um: add a kmsg_dumper
    x86, UML: fix integer overflow in ELF_ET_DYN_BASE
    um: hostfs: Reduce number of syscalls in readdir
    um: Remove broken highmem support
    um: Remove broken SMP support
    um: Remove SKAS3/4 support
    um: Remove ppc cruft
    um: Remove ia64 cruft
    um: Remove dead code from stacktrace
    hostfs: No need to box and later unbox the file mode
    hostfs: Use page_offset()
    hostfs: Set page flags in hostfs_readpage() correctly
    hostfs: Remove superfluous initializations in hostfs_open()
    hostfs: hostfs_open: Reset open flags upon each retry
    hostfs: Remove superfluous test in hostfs_open()
    hostfs: Report append flag in ->show_options()
    hostfs: Use __getname() in follow_link
    hostfs: Remove open coded strcpy()
    ...

    Linus Torvalds
     
  • Pull kbuild updates from Michal Marek:
    "Here is the first round of kbuild changes for v4.1-rc1:

    - kallsyms fix for ARM and cleanup

    - make dep(end) removed (developers have no sense of nostalgia these
    days...)

    - include Makefiles by relative path

    - stop useless rebuilds of asm-offsets.h and bounds.h"

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    Kbuild: kallsyms: drop special handling of pre-3.0 GCC symbols
    Kbuild: kallsyms: ignore veneers emitted by the ARM linker
    kbuild: ia64: use $(src)/Makefile.gate rather than particular path
    kbuild: include $(src)/Makefile rather than $(obj)/Makefile
    kbuild: use relative path more to include Makefile
    kbuild: use relative path to include Makefile
    kbuild: do not add $(bounds-file) and $(offsets-file) to targets
    kbuild: remove warning about "make depend"
    kbuild: Don't reset timestamps in include/generated if not needed

    Linus Torvalds
     

15 Apr, 2015

1 commit

  • We would want to use number of page table level to define mm_struct.
    Let's expose it as CONFIG_PGTABLE_LEVELS.

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Richard Weinberger
    Cc: Jeff Dike
    Tested-by: Guenter Roeck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

14 Apr, 2015

9 commits

  • Print a more sensible message about the minimum physical memory
    requirement.

    Signed-off-by: Thomas Meyer
    Signed-off-by: Richard Weinberger

    Thomas Meyer
     
  • atomic_notifier_chain_register() and uml_postsetup() do call kernel code
    that rely on the "current" kernel macro and a valid task_struct resp.
    thread_info struct. Give those functions a valid stack by moving
    uml_postsetup() in the init_thread stack. This moves enables a panic()
    call in this early code to generate a valid stacktrace, instead of
    crashing.
    E.g. when an UML kernel is started with an initrd but too few physical
    memory the panic() call get's actually processed.

    Signed-off-by: Thomas Meyer
    Signed-off-by: Richard Weinberger

    Thomas Meyer
     
  • Add a kmsg_dumper, that dumps the kmsg buffer to stdout, when no console
    is available. This an enables the printing of early panic() calls
    triggered in uml_postsetup().
    When a panic() call happens so early in the UML kernel no
    earlyprintk/console is available yet, but with a kmsg_dumper in place
    the kernel message buffer will be outputted to the user, to give a
    better hint, of what the failure was.

    Signed-off-by: Thomas Meyer
    Signed-off-by: Richard Weinberger

    Thomas Meyer
     
  • Highmem was always buggy and experimental on UML(i386).
    In times where 64 bit computers are default we can
    remove that experimental code.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • At times where UML used the TT mode to operate it had
    kind of SMP support. It never got finished nor was
    stable.
    Let's rip out that cruft and stop confusing developers
    which do tree-wide SMP cleanups.

    If someone wants SMP support UML it has do be done from scratch.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • Before we had SKAS0 UML had two modes of operation
    TT (tracing thread) and SKAS3/4 (separated kernel address space).
    TT was known to be insecure and got removed a long time ago.
    SKAS3/4 required a few (3 or 4) patches on the host side which never went
    mainline. The last host patch is 10 years old.

    With SKAS0 mode (separated kernel address space using 0 host patches),
    default since 2005, SKAS3/4 is obsolete and can be removed.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • That code is a relict from the early days of UML.
    ppc support was never completed nor worked.
    Let's rip it out.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • That code is a relict from the early days of UML.
    ia64 support was never completed nor worked.
    Let's rip it out.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • Remove left over code from commit 970e51feaddb
    (um: Add support for CONFIG_STACKTRACE)

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     

13 Apr, 2015

1 commit


02 Apr, 2015

1 commit

  • Prior to this commit, it was impossible to use relative path to
    include Makefiles from the top level Makefile because the option
    "--include-dir=$(srctree)" becomes effective when Make enters into
    sub Makefiles.

    To use relative path in any places, this commit moves the option
    above the "sub-make" target.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Michal Marek

    Masahiro Yamada
     

13 Feb, 2015

1 commit

  • If an attacker can cause a controlled kernel stack overflow, overwriting
    the restart block is a very juicy exploit target. This is because the
    restart_block is held in the same memory allocation as the kernel stack.

    Moving the restart block to struct task_struct prevents this exploit by
    making the restart_block harder to locate.

    Note that there are other fields in thread_info that are also easy
    targets, at least on some architectures.

    It's also a decent simplification, since the restart code is more or less
    identical on all architectures.

    [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
    Signed-off-by: Andy Lutomirski
    Cc: Thomas Gleixner
    Cc: Al Viro
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: David Miller
    Acked-by: Richard Weinberger
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Steven Miao
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Richard Kuo
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Michael Ellerman (powerpc)
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Oleg Nesterov
    Cc: Guenter Roeck
    Signed-off-by: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

12 Feb, 2015

1 commit

  • LKP has triggered a compiler warning after my recent patch "mm: account
    pmd page tables to the process":

    mm/mmap.c: In function 'exit_mmap':
    >> mm/mmap.c:2857:2: warning: right shift count >= width of type [enabled by default]

    The code:

    > 2857 WARN_ON(mm_nr_pmds(mm) >
    2858 round_up(FIRST_USER_ADDRESS, PUD_SIZE) >> PUD_SHIFT);

    In this, on tile, we have FIRST_USER_ADDRESS defined as 0. round_up() has
    the same type -- int. PUD_SHIFT.

    I think the best way to fix it is to define FIRST_USER_ADDRESS as unsigned
    long. On every arch for consistency.

    Signed-off-by: Kirill A. Shutemov
    Reported-by: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

11 Feb, 2015

1 commit


30 Jan, 2015

1 commit

  • The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
    "you should SIGSEGV" error, because the SIGSEGV case was generally
    handled by the caller - usually the architecture fault handler.

    That results in lots of duplication - all the architecture fault
    handlers end up doing very similar "look up vma, check permissions, do
    retries etc" - but it generally works. However, there are cases where
    the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.

    In particular, when accessing the stack guard page, libsigsegv expects a
    SIGSEGV. And it usually got one, because the stack growth is handled by
    that duplicated architecture fault handler.

    However, when the generic VM layer started propagating the error return
    from the stack expansion in commit fee7e49d4514 ("mm: propagate error
    from stack expansion even for guard page"), that now exposed the
    existing VM_FAULT_SIGBUS result to user space. And user space really
    expected SIGSEGV, not SIGBUS.

    To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
    duplicate architecture fault handlers about it. They all already have
    the code to handle SIGSEGV, so it's about just tying that new return
    value to the existing code, but it's all a bit annoying.

    This is the mindless minimal patch to do this. A more extensive patch
    would be to try to gather up the mostly shared fault handling logic into
    one generic helper routine, and long-term we really should do that
    cleanup.

    Just from this patch, you can generally see that most architectures just
    copied (directly or indirectly) the old x86 way of doing things, but in
    the meantime that original x86 model has been improved to hold the VM
    semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
    "newer" things, so it would be a good idea to bring all those
    improvements to the generic case and teach other architectures about
    them too.

    Reported-and-tested-by: Takashi Iwai
    Tested-by: Jan Engelhardt
    Acked-by: Heiko Carstens # "s390 still compiles and boots"
    Cc: linux-arch@vger.kernel.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

04 Jan, 2015

1 commit

  • futex_atomic_cmpxchg_inatomic() does not work on UML because
    it triggers a copy_from_user() in kernel context.
    On UML copy_from_user() can only be used if the kernel was called
    by a real user space process such that UML can use ptrace()
    to fetch the value.

    Reported-by: Miklos Szeredi
    Suggested-by: Geert Uytterhoeven
    Signed-off-by: Richard Weinberger
    Tested-by: Daniel Walter

    Richard Weinberger
     

15 Dec, 2014

1 commit

  • Pull tty/serial driver updates from Greg KH:
    "Here's the big tty/serial driver update for 3.19-rc1.

    There are a number of TTY core changes/fixes in here from Peter Hurley
    that have all been teted in linux-next for a long time now. There are
    also the normal serial driver updates as well, full details in the
    changelog below"

    * tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (219 commits)
    serial: pxa: hold port.lock when reporting modem line changes
    tty-hvsi_lib: Deletion of an unnecessary check before the function call "tty_kref_put"
    tty: Deletion of unnecessary checks before two function calls
    n_tty: Fix read_buf race condition, increment read_head after pushing data
    serial: of-serial: add PM suspend/resume support
    Revert "serial: of-serial: add PM suspend/resume support"
    Revert "serial: of-serial: fix up PM ops on no_console_suspend and port type"
    serial: 8250: don't attempt a trylock if in sysrq
    serial: core: Add big-endian iotype
    serial: samsung: use port->fifosize instead of hardcoded values
    serial: samsung: prefer to use fifosize from driver data
    serial: samsung: fix style problems
    serial: samsung: wait for transfer completion before clock disable
    serial: icom: fix error return code
    serial: tegra: clean up tty-flag assignments
    serial: Fix io address assign flow with Fintek PCI-to-UART Product
    serial: mxs-auart: fix tx_empty against shift register
    serial: mxs-auart: fix gpio change detection on interrupt
    serial: mxs-auart: Fix mxs_auart_set_ldisc()
    serial: 8250_dw: Use 64-bit access for OCTEON.
    ...

    Linus Torvalds
     

12 Dec, 2014

1 commit

  • Pull networking updates from David Miller:

    1) New offloading infrastructure and example 'rocker' driver for
    offloading of switching and routing to hardware.

    This work was done by a large group of dedicated individuals, not
    limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend,
    Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu

    2) Start making the networking operate on IOV iterators instead of
    modifying iov objects in-situ during transfers. Thanks to Al Viro
    and Herbert Xu.

    3) A set of new netlink interfaces for the TIPC stack, from Richard
    Alpe.

    4) Remove unnecessary looping during ipv6 routing lookups, from Martin
    KaFai Lau.

    5) Add PAUSE frame generation support to gianfar driver, from Matei
    Pavaluca.

    6) Allow for larger reordering levels in TCP, which are easily
    achievable in the real world right now, from Eric Dumazet.

    7) Add a variable of napi_schedule that doesn't need to disable cpu
    interrupts, from Eric Dumazet.

    8) Use a doubly linked list to optimize neigh_parms_release(), from
    Nicolas Dichtel.

    9) Various enhancements to the kernel BPF verifier, and allow eBPF
    programs to actually be attached to sockets. From Alexei
    Starovoitov.

    10) Support TSO/LSO in sunvnet driver, from David L Stevens.

    11) Allow controlling ECN usage via routing metrics, from Florian
    Westphal.

    12) Remote checksum offload, from Tom Herbert.

    13) Add split-header receive, BQL, and xmit_more support to amd-xgbe
    driver, from Thomas Lendacky.

    14) Add MPLS support to openvswitch, from Simon Horman.

    15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen
    Klassert.

    16) Do gro flushes on a per-device basis using a timer, from Eric
    Dumazet. This tries to resolve the conflicting goals between the
    desired handling of bulk vs. RPC-like traffic.

    17) Allow userspace to ask for the CPU upon what a packet was
    received/steered, via SO_INCOMING_CPU. From Eric Dumazet.

    18) Limit GSO packets to half the current congestion window, from Eric
    Dumazet.

    19) Add a generic helper so that all drivers set their RSS keys in a
    consistent way, from Eric Dumazet.

    20) Add xmit_more support to enic driver, from Govindarajulu
    Varadarajan.

    21) Add VLAN packet scheduler action, from Jiri Pirko.

    22) Support configurable RSS hash functions via ethtool, from Eyal
    Perry.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits)
    Fix race condition between vxlan_sock_add and vxlan_sock_release
    net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header
    net/mlx4: Add support for A0 steering
    net/mlx4: Refactor QUERY_PORT
    net/mlx4_core: Add explicit error message when rule doesn't meet configuration
    net/mlx4: Add A0 hybrid steering
    net/mlx4: Add mlx4_bitmap zone allocator
    net/mlx4: Add a check if there are too many reserved QPs
    net/mlx4: Change QP allocation scheme
    net/mlx4_core: Use tasklet for user-space CQ completion events
    net/mlx4_core: Mask out host side virtualization features for guests
    net/mlx4_en: Set csum level for encapsulated packets
    be2net: Export tunnel offloads only when a VxLAN tunnel is created
    gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
    cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
    net: fec: only enable mdio interrupt before phy device link up
    net: fec: clear all interrupt events to support i.MX6SX
    net: fec: reset fep link status in suspend function
    net: sock: fix access via invalid file descriptor
    net: introduce helper macro for_each_cmsghdr
    ...

    Linus Torvalds
     

11 Dec, 2014

1 commit

  • As there are now no remaining users of arch_fast_hash(), lets kill
    it entirely.

    This basically reverts commit 71ae8aac3e19 ("lib: introduce arch
    optimized hash library") and follow-up work, that is f.e., commit
    237217546d44 ("lib: hash: follow-up fixups for arch hash"),
    commit e3fec2f74f7f ("lib: Add missing arch generic-y entries for
    asm-generic/hash.h") and last but not least commit 6a02652df511
    ("perf tools: Fix include for non x86 architectures").

    Cc: Francesco Fusco
    Cc: Thomas Graf
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

19 Nov, 2014

1 commit

  • The x86 MPX patch set calls arch_unmap() and arch_bprm_mm_init()
    from fs/exec.c, so we need at least a stub for them in all
    architectures. They are only called under an #ifdef for
    CONFIG_MMU=y, so we can at least restict this to architectures
    with MMU support.

    blackfin/c6x have no MMU support, so do not call arch_unmap().
    They also do not include mm_hooks.h or mmu_context.h at all and
    do not need to be touched.

    s390, um and unicore32 do not use asm-generic/mm_hooks.h, so got
    their own arch_unmap() versions. (I also moved um's
    arch_dup_mmap() to be closer to the other mm_hooks.h functions).

    xtensa only includes mm_hooks when MMU=y, which should be fine
    since arch_unmap() is called only from MMU=y code.

    For the rest, we use the stub copies of these functions in
    asm-generic/mm_hook.h.

    I cross compiled defconfigs for cris (to check NOMMU) and s390
    to make sure that this works. I also checked a 64-bit build
    of UML and all my normal x86 builds including PARAVIRT on and
    off.

    Signed-off-by: Dave Hansen
    Cc: Dave Hansen
    Cc: linux-arch@vger.kernel.org
    Cc: x86@kernel.org
    Link: http://lkml.kernel.org/r/20141118182350.8B4AA2C2@viggo.jf.intel.com
    Signed-off-by: Thomas Gleixner

    Dave Hansen
     

06 Nov, 2014

1 commit

  • Although the tty core maintains a pid reference for the foreground
    process group, if the foreground process group is changed that
    pid reference is dropped. Thus, the pid reference used for signalling
    could become stale.

    Safely obtain a pid reference to the foreground process group and
    release the reference after signalling is complete.

    cc: Jeff Dike
    Acked-by: Richard Weinberger
    Signed-off-by: Peter Hurley
    Reviewed-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Peter Hurley
     

20 Oct, 2014

1 commit

  • Pull audit updates from Eric Paris:
    "So this change across a whole bunch of arches really solves one basic
    problem. We want to audit when seccomp is killing a process. seccomp
    hooks in before the audit syscall entry code. audit_syscall_entry
    took as an argument the arch of the given syscall. Since the arch is
    part of what makes a syscall number meaningful it's an important part
    of the record, but it isn't available when seccomp shoots the
    syscall...

    For most arch's we have a better way to get the arch (syscall_get_arch)
    So the solution was two fold: Implement syscall_get_arch() everywhere
    there is audit which didn't have it. Use syscall_get_arch() in the
    seccomp audit code. Having syscall_get_arch() everywhere meant it was
    a useless flag on the stack and we could get rid of it for the typical
    syscall entry.

    The other changes inside the audit system aren't grand, fixed some
    records that had invalid spaces. Better locking around the task comm
    field. Removing some dead functions and structs. Make some things
    static. Really minor stuff"

    * git://git.infradead.org/users/eparis/audit: (31 commits)
    audit: rename audit_log_remove_rule to disambiguate for trees
    audit: cull redundancy in audit_rule_change
    audit: WARN if audit_rule_change called illegally
    audit: put rule existence check in canonical order
    next: openrisc: Fix build
    audit: get comm using lock to avoid race in string printing
    audit: remove open_arg() function that is never used
    audit: correct AUDIT_GET_FEATURE return message type
    audit: set nlmsg_len for multicast messages.
    audit: use union for audit_field values since they are mutually exclusive
    audit: invalid op= values for rules
    audit: use atomic_t to simplify audit_serial()
    kernel/audit.c: use ARRAY_SIZE instead of sizeof/sizeof[0]
    audit: reduce scope of audit_log_fcaps
    audit: reduce scope of audit_net_id
    audit: arm64: Remove the audit arch argument to audit_syscall_entry
    arm64: audit: Add audit hook in syscall_trace_enter/exit()
    audit: x86: drop arch from __audit_syscall_entry() interface
    sparc: implement is_32bit_task
    sparc: properly conditionalize use of TIF_32BIT
    ...

    Linus Torvalds
     

14 Oct, 2014

4 commits

  • Pull UML update from Richard Weinberger:
    "Besides of fixes this contains also support for CONFIG_STACKTRACE by
    Daniel Walter"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
    um: net: Eliminate NULL test after alloc_bootmem
    um: Add support for CONFIG_STACKTRACE
    um: ubd: Fix for processes stuck in D state forever
    um: delete unnecessary bootmem struct page array
    um: remove csum_partial_copy_generic_i386 to clean up exception table

    Linus Torvalds
     
  • alloc_bootmem and related functions never return NULL. Thus a NULL
    test or memset after calls to these functions is unnecessary.

    The following Coccinelle semantic patch was used for making the change:

    @@
    expression E;
    statement S;
    @@

    E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
    ... when != E
    - if (E == NULL) S

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Signed-off-by: Richard Weinberger

    Himangi Saraogi
     
  • Add stacktrace support for User Mode Linux

    Signed-off-by: Daniel Walter
    Signed-off-by: Richard Weinberger

    Daniel Walter
     
  • Starting with Linux 3.12 processes get stuck in D state forever in
    UserModeLinux under sync heavy workloads. This bug was introduced by
    commit 805f11a0d5 (um: ubd: Add REQ_FLUSH suppport).
    Fix bug by adding a check if FLUSH request was successfully submitted to
    the I/O thread and keeping the FLUSH request on the request queue on
    submission failures.

    Fixes: 805f11a0d5 (um: ubd: Add REQ_FLUSH suppport)
    Signed-off-by: Thorsten Knabe
    Cc: stable@kernel.org # >= 3.12
    Signed-off-by: Richard Weinberger

    Thorsten Knabe
     

13 Oct, 2014

2 commits

  • 1) uml kernel bootmem managed through bootmem_data->node_bootmem_map,
    not the struct page array, so the array is unnecessary.

    2) the bootmem struct page array has been pointed by a *local* pointer,
    struct page *map, in init_maps function. The array can be accessed only
    in init_maps's scope. As a result, uml kernel wastes about 1% of total
    memory.

    Signed-off-by: Honggang Li
    Signed-off-by: Richard Weinberger

    Honggang Li
     
  • Pull scheduler updates from Ingo Molnar:
    "The main changes in this cycle were:

    - Optimized support for Intel "Cluster-on-Die" (CoD) topologies (Dave
    Hansen)

    - Various sched/idle refinements for better idle handling (Nicolas
    Pitre, Daniel Lezcano, Chuansheng Liu, Vincent Guittot)

    - sched/numa updates and optimizations (Rik van Riel)

    - sysbench speedup (Vincent Guittot)

    - capacity calculation cleanups/refactoring (Vincent Guittot)

    - Various cleanups to thread group iteration (Oleg Nesterov)

    - Double-rq-lock removal optimization and various refactorings
    (Kirill Tkhai)

    - various sched/deadline fixes

    ... and lots of other changes"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (72 commits)
    sched/dl: Use dl_bw_of() under rcu_read_lock_sched()
    sched/fair: Delete resched_cpu() from idle_balance()
    sched, time: Fix build error with 64 bit cputime_t on 32 bit systems
    sched: Improve sysbench performance by fixing spurious active migration
    sched/x86: Fix up typo in topology detection
    x86, sched: Add new topology for multi-NUMA-node CPUs
    sched/rt: Use resched_curr() in task_tick_rt()
    sched: Use rq->rd in sched_setaffinity() under RCU read lock
    sched: cleanup: Rename 'out_unlock' to 'out_free_new_mask'
    sched: Use dl_bw_of() under RCU read lock
    sched/fair: Remove duplicate code from can_migrate_task()
    sched, mips, ia64: Remove __ARCH_WANT_UNLOCKED_CTXSW
    sched: print_rq(): Don't use tasklist_lock
    sched: normalize_rt_tasks(): Don't use _irqsave for tasklist_lock, use task_rq_lock()
    sched: Fix the task-group check in tg_has_rt_tasks()
    sched/fair: Leverage the idle state info when choosing the "idlest" cpu
    sched: Let the scheduler see CPU idle states
    sched/deadline: Fix inter- exclusive cpusets migrations
    sched/deadline: Clear dl_entity params when setscheduling to different class
    sched/numa: Kill the wrong/dead TASK_DEAD check in task_numa_fault()
    ...

    Linus Torvalds
     

24 Sep, 2014

1 commit

  • We have a function where the arch can be queried, syscall_get_arch().
    So rather than have every single piece of arch specific code use and/or
    duplicate syscall_get_arch(), just have the audit code use the
    syscall_get_arch() code.

    Based-on-patch-by: Richard Briggs
    Signed-off-by: Eric Paris
    Cc: linux-alpha@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-ia64@vger.kernel.org
    Cc: microblaze-uclinux@itee.uq.edu.au
    Cc: linux-mips@linux-mips.org
    Cc: linux@lists.openrisc.net
    Cc: linux-parisc@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: sparclinux@vger.kernel.org
    Cc: user-mode-linux-devel@lists.sourceforge.net
    Cc: linux-xtensa@linux-xtensa.org
    Cc: x86@kernel.org

    Eric Paris
     

19 Sep, 2014

1 commit

  • schedule(), io_schedule() and schedule_timeout() always return
    with TASK_RUNNING state set, so one more setting is unnecessary.

    (All places in patch are visible good, only exception is
    kiblnd_scheduler() from:

    drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c

    Its schedule() is one line above standard 3 lines of unified diff)

    No places where set_current_state() is used for mb().

    Signed-off-by: Kirill Tkhai
    Signed-off-by: Peter Zijlstra (Intel)
    Link: http://lkml.kernel.org/r/1410529254.3569.23.camel@tkhai
    Cc: Alasdair Kergon
    Cc: Anil Belur
    Cc: Arnd Bergmann
    Cc: Dave Kleikamp
    Cc: David Airlie
    Cc: David Howells
    Cc: Dmitry Eremin
    Cc: Frank Blaschka
    Cc: Greg Kroah-Hartman
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Isaac Huang
    Cc: James E.J. Bottomley
    Cc: James E.J. Bottomley
    Cc: J. Bruce Fields
    Cc: Jeff Dike
    Cc: Jesper Nilsson
    Cc: Jiri Slaby
    Cc: Laura Abbott
    Cc: Liang Zhen
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Masaru Nomura
    Cc: Michael Opdenacker
    Cc: Mikael Starvik
    Cc: Mike Snitzer
    Cc: Neil Brown
    Cc: Oleg Drokin
    Cc: Peng Tao
    Cc: Richard Weinberger
    Cc: Robert Love
    Cc: Steven Rostedt
    Cc: Trond Myklebust
    Cc: Ursula Braun
    Cc: Zi Shen Lim
    Cc: devel@driverdev.osuosl.org
    Cc: dm-devel@redhat.com
    Cc: dri-devel@lists.freedesktop.org
    Cc: fcoe-devel@open-fcoe.org
    Cc: jfs-discussion@lists.sourceforge.net
    Cc: linux390@de.ibm.com
    Cc: linux-afs@lists.infradead.org
    Cc: linux-cris-kernel@axis.com
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-nfs@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linux-raid@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-scsi@vger.kernel.org
    Cc: qla2xxx-upstream@qlogic.com
    Cc: user-mode-linux-devel@lists.sourceforge.net
    Cc: user-mode-linux-user@lists.sourceforge.net
    Signed-off-by: Ingo Molnar

    Kirill Tkhai
     

14 Sep, 2014

1 commit

  • The nohz full code needs irq work to trigger its own interrupt so that
    the subsystem can work even when the tick is stopped.

    Lets introduce arch_irq_work_has_interrupt() that archs can override to
    tell about their support for this ability.

    Signed-off-by: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Signed-off-by: Frederic Weisbecker

    Peter Zijlstra
     

10 Aug, 2014

1 commit

  • Pull arch signal handling cleanup from Richard Weinberger:
    "This patch series moves all remaining archs to the get_signal(),
    signal_setup_done() and sigsp() functions.

    Currently these archs use open coded variants of the said functions.
    Further, unused parameters get removed from get_signal_to_deliver(),
    tracehook_signal_handler() and signal_delivered().

    At the end of the day we save around 500 lines of code."

    * 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (43 commits)
    powerpc: Use sigsp()
    openrisc: Use sigsp()
    mn10300: Use sigsp()
    mips: Use sigsp()
    microblaze: Use sigsp()
    metag: Use sigsp()
    m68k: Use sigsp()
    m32r: Use sigsp()
    hexagon: Use sigsp()
    frv: Use sigsp()
    cris: Use sigsp()
    c6x: Use sigsp()
    blackfin: Use sigsp()
    avr32: Use sigsp()
    arm64: Use sigsp()
    arc: Use sigsp()
    sas_ss_flags: Remove nested ternary if
    Rip out get_signal_to_deliver()
    Clean up signal_delivered()
    tracehook_signal_handler: Remove sig, info, ka and regs
    ...

    Linus Torvalds
     

09 Aug, 2014

2 commits

  • The core mm code will provide a default gate area based on
    FIXADDR_USER_START and FIXADDR_USER_END if
    !defined(__HAVE_ARCH_GATE_AREA) && defined(AT_SYSINFO_EHDR).

    This default is only useful for ia64. arm64, ppc, s390, sh, tile, 64-bit
    UML, and x86_32 have their own code just to disable it. arm, 32-bit UML,
    and x86_64 have gate areas, but they have their own implementations.

    This gets rid of the default and moves the code into ia64.

    This should save some code on architectures without a gate area: it's now
    possible to inline the gate_area functions in the default case.

    Signed-off-by: Andy Lutomirski
    Acked-by: Nathan Lynch
    Acked-by: H. Peter Anvin
    Acked-by: Benjamin Herrenschmidt [in principle]
    Acked-by: Richard Weinberger [for um]
    Acked-by: Will Deacon [for arm64]
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chris Metcalf
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Nathan Lynch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     
  • Rather than have architectures #define ARCH_HAS_SG_CHAIN in an
    architecture specific scatterlist.h, make it a proper Kconfig option and
    use that instead. At same time, remove the header files are are now
    mostly useless and just include asm-generic/scatterlist.h.

    [sfr@canb.auug.org.au: powerpc files now need asm/dma.h]
    Signed-off-by: Laura Abbott
    Acked-by: Thomas Gleixner [x86]
    Acked-by: Benjamin Herrenschmidt [powerpc]
    Acked-by: Heiko Carstens
    Cc: Russell King
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: "James E.J. Bottomley"
    Cc: Martin Schwidefsky
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Laura Abbott
     

06 Aug, 2014

1 commit


20 Jul, 2014

1 commit