13 Apr, 2014

1 commit

  • Pull audit updates from Eric Paris.

    * git://git.infradead.org/users/eparis/audit: (28 commits)
    AUDIT: make audit_is_compat depend on CONFIG_AUDIT_COMPAT_GENERIC
    audit: renumber AUDIT_FEATURE_CHANGE into the 1300 range
    audit: do not cast audit_rule_data pointers pointlesly
    AUDIT: Allow login in non-init namespaces
    audit: define audit_is_compat in kernel internal header
    kernel: Use RCU_INIT_POINTER(x, NULL) in audit.c
    sched: declare pid_alive as inline
    audit: use uapi/linux/audit.h for AUDIT_ARCH declarations
    syscall_get_arch: remove useless function arguments
    audit: remove stray newline from audit_log_execve_info() audit_panic() call
    audit: remove stray newlines from audit_log_lost messages
    audit: include subject in login records
    audit: remove superfluous new- prefix in AUDIT_LOGIN messages
    audit: allow user processes to log from another PID namespace
    audit: anchor all pid references in the initial pid namespace
    audit: convert PPIDs to the inital PID namespace.
    pid: get pid_t ppid of task in init_pid_ns
    audit: rename the misleading audit_get_context() to audit_take_context()
    audit: Add generic compat syscall support
    audit: Add CONFIG_HAVE_ARCH_AUDITSYSCALL
    ...

    Linus Torvalds
     

08 Apr, 2014

1 commit


03 Apr, 2014

1 commit

  • Pull networking updates from David Miller:
    "Here is my initial pull request for the networking subsystem during
    this merge window:

    1) Support for ESN in AH (RFC 4302) from Fan Du.

    2) Add full kernel doc for ethtool command structures, from Ben
    Hutchings.

    3) Add BCM7xxx PHY driver, from Florian Fainelli.

    4) Export computed TCP rate information in netlink socket dumps, from
    Eric Dumazet.

    5) Allow IPSEC SA to be dumped partially using a filter, from Nicolas
    Dichtel.

    6) Convert many drivers to pci_enable_msix_range(), from Alexander
    Gordeev.

    7) Record SKB timestamps more efficiently, from Eric Dumazet.

    8) Switch to microsecond resolution for TCP round trip times, also
    from Eric Dumazet.

    9) Clean up and fix 6lowpan fragmentation handling by making use of
    the existing inet_frag api for it's implementation.

    10) Add TX grant mapping to xen-netback driver, from Zoltan Kiss.

    11) Auto size SKB lengths when composing netlink messages based upon
    past message sizes used, from Eric Dumazet.

    12) qdisc dumps can take a long time, add a cond_resched(), From Eric
    Dumazet.

    13) Sanitize netpoll core and drivers wrt. SKB handling semantics.
    Get rid of never-used-in-tree netpoll RX handling. From Eric W
    Biederman.

    14) Support inter-address-family and namespace changing in VTI tunnel
    driver(s). From Steffen Klassert.

    15) Add Altera TSE driver, from Vince Bridgers.

    16) Optimizing csum_replace2() so that it doesn't adjust the checksum
    by checksumming the entire header, from Eric Dumazet.

    17) Expand BPF internal implementation for faster interpreting, more
    direct translations into JIT'd code, and much cleaner uses of BPF
    filtering in non-socket ocntexts. From Daniel Borkmann and Alexei
    Starovoitov"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1976 commits)
    netpoll: Use skb_irq_freeable to make zap_completion_queue safe.
    net: Add a test to see if a skb is freeable in irq context
    qlcnic: Fix build failure due to undefined reference to `vxlan_get_rx_port'
    net: ptp: move PTP classifier in its own file
    net: sxgbe: make "core_ops" static
    net: sxgbe: fix logical vs bitwise operation
    net: sxgbe: sxgbe_mdio_register() frees the bus
    Call efx_set_channels() before efx->type->dimension_resources()
    xen-netback: disable rogue vif in kthread context
    net/mlx4: Set proper build dependancy with vxlan
    be2net: fix build dependency on VxLAN
    mac802154: make csma/cca parameters per-wpan
    mac802154: allow only one WPAN to be up at any given time
    net: filter: minor: fix kdoc in __sk_run_filter
    netlink: don't compare the nul-termination in nla_strcmp
    can: c_can: Avoid led toggling for every packet.
    can: c_can: Simplify TX interrupt cleanup
    can: c_can: Store dlc private
    can: c_can: Reduce register access
    can: c_can: Make the code readable
    ...

    Linus Torvalds
     

25 Mar, 2014

1 commit


20 Mar, 2014

1 commit

  • Currently AUDITSYSCALL has a long list of architecture depencency:
    depends on AUDIT && (X86 || PARISC || PPC || S390 || IA64 || UML ||
    SPARC64 || SUPERH || (ARM && AEABI && !OABI_COMPAT) || ALPHA)
    The purpose of this patch is to replace it with HAVE_ARCH_AUDITSYSCALL
    for simplicity.

    Signed-off-by: AKASHI Takahiro
    Acked-by: Will Deacon (arm)
    Acked-by: Richard Guy Briggs (audit)
    Acked-by: Matt Turner (alpha)
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Eric Paris

    AKASHI Takahiro
     

10 Feb, 2014

2 commits

  • This patch allows each architecture to add its specific assembly optimized
    arch_mcs_spin_lock_contended and arch_mcs_spinlock_uncontended for
    MCS lock and unlock functions.

    Signed-off-by: Tim Chen
    Cc: Scott J Norton
    Cc: Raghavendra K T
    Cc: AswinChandramouleeswaran
    Cc: George Spelvin
    Cc: Rik vanRiel
    Cc: Andrea Arcangeli
    Cc: MichelLespinasse
    Cc: Peter Hurley
    Cc: Andi Kleen
    Cc: Alex Shi
    Cc: Dave Hansen
    Cc: Tim Chen
    Cc: Arnd Bergmann
    Cc: "Figo.zhang"
    Cc: "Paul E.McKenney"
    Cc: "H. Peter Anvin"
    Cc: Davidlohr Bueso
    Cc: Waiman Long
    Cc: Ingo Molnar
    Cc: Will Deacon
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Matthew R Wilcox
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1390347382.3138.67.camel@schen9-DESK
    Signed-off-by: Ingo Molnar

    Tim Chen
     
  • We perform a clean up of the Kbuid files in each architecture.
    We order the files in each Kbuild in alphabetical order
    by running the below script.

    for i in arch/*/include/asm/Kbuild
    do
    cat $i | gawk '/^generic-y/ {
    i = 3;
    do {
    for (; i ${i}.sorted;
    mv ${i}.sorted $i;
    done

    Signed-off-by: Tim Chen
    Cc: Arnd Bergmann
    Cc: Matthew R Wilcox
    Cc: AswinChandramouleeswaran
    Cc: Dave Hansen
    Cc: "Paul E.McKenney"
    Cc: Scott J Norton
    Cc: Will Deacon
    Cc: "Figo.zhang"
    Cc: Linus Torvalds
    Cc: Rik van Riel
    Cc: Waiman Long
    Cc: Peter Hurley
    Cc: Andrea Arcangeli
    Cc: Tim Chen
    Cc: Alex Shi
    Cc: Raghavendra K T
    Cc: Andi Kleen
    Cc: George Spelvin
    Cc: MichelLespinasse
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Davidlohr Bueso
    Cc: Andrew Morton
    Signed-off-by: Peter Zijlstra
    [ Fixed build bug. ]
    Signed-off-by: Ingo Molnar

    Tim Chen
     

27 Jan, 2014

1 commit


26 Jan, 2014

3 commits

  • ...to get smp_store_release().

    Reported-by: Randy Dunlap
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • temp_stack and mm_count have no users and can be killed.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • Pull networking updates from David Miller:

    1) BPF debugger and asm tool by Daniel Borkmann.

    2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann.

    3) Correct reciprocal_divide and update users, from Hannes Frederic
    Sowa and Daniel Borkmann.

    4) Currently we only have a "set" operation for the hw timestamp socket
    ioctl, add a "get" operation to match. From Ben Hutchings.

    5) Add better trace events for debugging driver datapath problems, also
    from Ben Hutchings.

    6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we
    have a small send and a previous packet is already in the qdisc or
    device queue, defer until TX completion or we get more data.

    7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko.

    8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel
    Borkmann.

    9) Share IP header compression code between Bluetooth and IEEE802154
    layers, from Jukka Rissanen.

    10) Fix ipv6 router reachability probing, from Jiri Benc.

    11) Allow packets to be captured on macvtap devices, from Vlad Yasevich.

    12) Support tunneling in GRO layer, from Jerry Chu.

    13) Allow bonding to be configured fully using netlink, from Scott
    Feldman.

    14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can
    already get the TCI. From Atzm Watanabe.

    15) New "Heavy Hitter" qdisc, from Terry Lam.

    16) Significantly improve the IPSEC support in pktgen, from Fan Du.

    17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom
    Herbert.

    18) Add Proportional Integral Enhanced packet scheduler, from Vijay
    Subramanian.

    19) Allow openvswitch to mmap'd netlink, from Thomas Graf.

    20) Key TCP metrics blobs also by source address, not just destination
    address. From Christoph Paasch.

    21) Support 10G in generic phylib. From Andy Fleming.

    22) Try to short-circuit GRO flow compares using device provided RX
    hash, if provided. From Tom Herbert.

    The wireless and netfilter folks have been busy little bees too.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits)
    net/cxgb4: Fix referencing freed adapter
    ipv6: reallocate addrconf router for ipv6 address when lo device up
    fib_frontend: fix possible NULL pointer dereference
    rtnetlink: remove IFLA_BOND_SLAVE definition
    rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info
    qlcnic: update version to 5.3.55
    qlcnic: Enhance logic to calculate msix vectors.
    qlcnic: Refactor interrupt coalescing code for all adapters.
    qlcnic: Update poll controller code path
    qlcnic: Interrupt code cleanup
    qlcnic: Enhance Tx timeout debugging.
    qlcnic: Use bool for rx_mac_learn.
    bonding: fix u64 division
    rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC
    sfc: Use the correct maximum TX DMA ring size for SFC9100
    Add Shradha Shah as the sfc driver maintainer.
    net/vxlan: Share RX skb de-marking and checksum checks with ovs
    tulip: cleanup by using ARRAY_SIZE()
    ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
    net/cxgb4: Don't retrieve stats during recovery
    ...

    Linus Torvalds
     

24 Jan, 2014

1 commit


18 Dec, 2013

1 commit


01 Dec, 2013

2 commits


20 Nov, 2013

2 commits

  • Pull UML changes from Richard Weinberger:
    "This pile contains a nice defconfig cleanup, a rewritten stack
    unwinder and various cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
    um: Remove unused declarations from
    um: remove used STDIO_CONSOLE Kconfig param
    um/vdso: add .gitignore for a couple of targets
    arch/um: make it work with defconfig and x86_64
    um: Make kstack_depth_to_print conform to arch/x86
    um: Get rid of thread_struct->saved_task
    um: Make stack trace reliable against kernel mode faults
    um: Rewrite show_stack()

    Linus Torvalds
     
  • Pull irq cleanups from Ingo Molnar:
    "This is a multi-arch cleanup series from Thomas Gleixner, which we
    kept to near the end of the merge window, to not interfere with
    architecture updates.

    This series (motivated by the -rt kernel) unifies more aspects of IRQ
    handling and generalizes PREEMPT_ACTIVE"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    preempt: Make PREEMPT_ACTIVE generic
    sparc: Use preempt_schedule_irq
    ia64: Use preempt_schedule_irq
    m32r: Use preempt_schedule_irq
    hardirq: Make hardirq bits generic
    m68k: Simplify low level interrupt handling code
    genirq: Prevent spurious detection for unconditionally polled interrupts

    Linus Torvalds
     

17 Nov, 2013

7 commits

  • _end is used, but it's already provided by , so use that.

    Signed-off-by: Geert Uytterhoeven
    Cc: Richard Weinberger
    Cc: user-mode-linux-devel@lists.sourceforge.net
    Signed-off-by: Richard Weinberger

    Geert Uytterhoeven
     
  • This removes the STDIO_CONSOLE Kconfig parameter which
    is defined but no longer used anywhere in the makefiles and source code.

    Signed-off-by: Michael Opdenacker
    Signed-off-by: Richard Weinberger

    Michael Opdenacker
     
  • arch/um/defconfig only lists one default configuration, and that applies
    only to the i386 architecture. Replace it with two minimal
    configuration files generated using `make savedefconfig`:

    i386_defconfig and x86_64_defconfig

    The build scripts now require two updates:

    1. um's Kconfig (arch/x86/um/Kconfig) should specify an ARCH_DEFCONFIG
    section explicitly pointing to these scripts if the required
    variables are set. Take care to remove the DEFCONFIG_LIST section
    defined in the included file arch/um/Kconfig.common.

    2. um's Makefile (arch/um/Makefile) should set KBUILD_DEFCONFIG properly
    for the top-level Makefile to pick up. Copy the logic in
    arch/x86/Makefile to properly pick the defconfig file depending on
    the actual architecture; except we're working with $SUBARCH here,
    instead of $ARCH.

    Now, you can do:

    $ ARCH=um make defconfig
    $ ARCH=um make

    and successfully build User-Mode Linux on an x86_64 box in default
    configuration.

    Cc: Richard Weinberger
    Cc: Jeff Dike
    Signed-off-by: Ramkumar Ramachandra
    Signed-off-by: Richard Weinberger

    Ramkumar Ramachandra
     
  • Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • As we have a sane show_stack() now, we can drop
    the ->saved_task hack.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • As UML uses an alternative signal stack we cannot use
    the current stack pointer for stack dumping if UML itself
    dies by SIGSEGV. To bypass this issue we save regs taken
    from mcontext in our segv handler into thread_struct and
    use these regs to obtain the stack pointer in show_stack().

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • Currently on UML stack traces are not very reliable and both
    x86 and x86_64 have their on implementations.
    This patch unifies both and adds support to outline unreliable
    functions calls.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     

15 Nov, 2013

1 commit


14 Nov, 2013

1 commit


01 Nov, 2013

1 commit

  • Resolve cherry-picking conflicts:

    Conflicts:
    mm/huge_memory.c
    mm/memory.c
    mm/mprotect.c

    See this upstream merge commit for more details:

    52469b4fcd4f Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

31 Oct, 2013

1 commit

  • We don't cap the size of buffer from the user so we could write past the
    end of the array here. Only root can write to this file.

    Reported-by: Nico Golde
    Reported-by: Fabian Yamaguchi
    Signed-off-by: Dan Carpenter
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

25 Sep, 2013

1 commit

  • In order to prepare to per-arch implementations of preempt_count move
    the required bits into an asm-generic header and use this for all
    archs.

    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-h5j0c1r3e3fk015m30h8f1zx@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

13 Sep, 2013

3 commits

  • After the last architecture switched to generic hard irqs the config
    options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
    for !CONFIG_GENERIC_HARDIRQS can be removed.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Unlike global OOM handling, memory cgroup code will invoke the OOM killer
    in any OOM situation because it has no way of telling faults occuring in
    kernel context - which could be handled more gracefully - from
    user-triggered faults.

    Pass a flag that identifies faults originating in user space from the
    architecture-specific fault handlers to generic code so that memcg OOM
    handling can be improved.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Kernel faults are expected to handle OOM conditions gracefully (gup,
    uaccess etc.), so they should never invoke the OOM killer. Reserve this
    for faults triggered in user context when it is the only option.

    Most architectures already do this, fix up the remaining few.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Acked-by: KOSAKI Motohiro
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

07 Sep, 2013

6 commits

  • These handlers are not optional and need in our case
    dummy implementions to avoid NULL pointer bugs within
    the irq core code.

    Reported-and-tested-by: Toralf Foester
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • If UML is not run by a shell it can happen that UML
    will kill unrelated proceses upon a fatal exit because
    it issues a kill(0, ...).
    To prevent such oddities we create a new session in main().

    Reported-and-tested-by: Richard W.M. Jones
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • Richard reported that some UML processes survive if the UML
    main process receives a SIGTERM.
    This issue was caused by a wrongly placed signal(SIGTERM, SIG_DFL)
    in init_new_thread_signals().
    It disabled the UML exit handler accidently for some processes.
    The correct solution is to disable the fatal handler for all
    UML helper threads/processes.
    Such that last_ditch_exit() does not get called multiple times
    and all processes can exit due to SIGTERM.

    Reported-and-tested-by: Richard W.M. Jones
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • Just a clean-up patch to remove the open coded
    variants and to ensure that all requests are submitted the
    same way.

    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • UML's block device driver does not support write barriers,
    to support this this patch adds REQ_FLUSH suppport.
    Every time the block layer sends a REQ_FLUSH we fsync() now
    our backing file to guarantee data consistency.

    Reported-and-tested-by: Richard W.M. Jones
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • UML needs it's own probe_kernel_read() to handle kernel
    mode faults correctly.
    The implementation uses mincore() on the host side to detect
    whether a page is owned by the UML kernel process.

    This fixes also a possible crash when sysrq-t is used.
    Starting with 3.10 sysrq-t calls probe_kernel_read() to
    read details from the kernel workers. As kernel worker are
    completely async pointers may turn NULL while reading them.

    Cc:
    Cc:
    Cc: # 3.10.x
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     

16 Aug, 2013

1 commit

  • Ben Tebulin reported:

    "Since v3.7.2 on two independent machines a very specific Git
    repository fails in 9/10 cases on git-fsck due to an SHA1/memory
    failures. This only occurs on a very specific repository and can be
    reproduced stably on two independent laptops. Git mailing list ran
    out of ideas and for me this looks like some very exotic kernel issue"

    and bisected the failure to the backport of commit 53a59fc67f97 ("mm:
    limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT").

    That commit itself is not actually buggy, but what it does is to make it
    much more likely to hit the partial TLB invalidation case, since it
    introduces a new case in tlb_next_batch() that previously only ever
    happened when running out of memory.

    The real bug is that the TLB gather virtual memory range setup is subtly
    buggered. It was introduced in commit 597e1c3580b7 ("mm/mmu_gather:
    enable tlb flush range in generic mmu_gather"), and the range handling
    was already fixed at least once in commit e6c495a96ce0 ("mm: fix the TLB
    range flushed when __tlb_remove_page() runs out of slots"), but that fix
    was not complete.

    The problem with the TLB gather virtual address range is that it isn't
    set up by the initial tlb_gather_mmu() initialization (which didn't get
    the TLB range information), but it is set up ad-hoc later by the
    functions that actually flush the TLB. And so any such case that forgot
    to update the TLB range entries would potentially miss TLB invalidates.

    Rather than try to figure out exactly which particular ad-hoc range
    setup was missing (I personally suspect it's the hugetlb case in
    zap_huge_pmd(), which didn't have the same logic as zap_pte_range()
    did), this patch just gets rid of the problem at the source: make the
    TLB range information available to tlb_gather_mmu(), and initialize it
    when initializing all the other tlb gather fields.

    This makes the patch larger, but conceptually much simpler. And the end
    result is much more understandable; even if you want to play games with
    partial ranges when invalidating the TLB contents in chunks, now the
    range information is always there, and anybody who doesn't want to
    bother with it won't introduce subtle bugs.

    Ben verified that this fixes his problem.

    Reported-bisected-and-tested-by: Ben Tebulin
    Build-testing-by: Stephen Rothwell
    Build-testing-by: Richard Weinberger
    Reviewed-by: Michal Hocko
    Acked-by: Peter Zijlstra
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

19 Jul, 2013

1 commit

  • Currently we use both struct siginfo and siginfo_t.
    Let's use struct siginfo internally to avoid ongoing
    compiler warning. We are allowed to do so because
    struct siginfo and siginfo_t are equivalent.

    Signed-off-by: Richard Weinberger

    Richard Weinberger