15 Jul, 2013

1 commit

  • Pull more vfs stuff from Al Viro:
    "O_TMPFILE ABI changes, Oleg's fput() series, misc cleanups, including
    making simple_lookup() usable for filesystems with non-NULL s_d_op,
    which allows us to get rid of quite a bit of ugliness"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    sunrpc: now we can just set ->s_d_op
    cgroup: we can use simple_lookup() now
    efivarfs: we can use simple_lookup() now
    make simple_lookup() usable for filesystems that set ->s_d_op
    configfs: don't open-code d_alloc_name()
    __rpc_lookup_create_exclusive: pass string instead of qstr
    rpc_create_*_dir: don't bother with qstr
    llist: llist_add() can use llist_add_batch()
    llist: fix/simplify llist_add() and llist_add_batch()
    fput: turn "list_head delayed_fput_list" into llist_head
    fs/file_table.c:fput(): add comment
    Safer ABI for O_TMPFILE

    Linus Torvalds
     

14 Jul, 2013

2 commits

  • Pull core locking updates from Thomas Gleixner:
    "Header cleanup as requested by Linus"

    (This is the "don't include support for ww_mutex in a header file that
    everybody wants, when almost nobody wants the ww part" change)

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    mutex: Move ww_mutex definitions to ww_mutex.h

    Linus Torvalds
     
  • Pull MIPS updates from Ralf Baechle:
    "MIPS updates:

    - All the things that didn't make 3.10.
    - Removes the Windriver PPMC platform. Nobody will miss it.
    - Remove a workaround from kernel/irq/irqdomain.c which was there
    exclusivly for MIPS. Patch by Grant Likely.
    - More small improvments for the SEAD 3 platform
    - Improvments on the BMIPS / SMP support for the BCM63xx series.
    - Various cleanups of dead leftovers.
    - Platform support for the Cavium Octeon-based EdgeRouter Lite.

    Two large KVM patchsets didn't make it for this pull request because
    their respective authors are vacationing"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (124 commits)
    MIPS: Kconfig: Add missing MODULES dependency to VPE_LOADER
    MIPS: BCM63xx: CLK: Add dummy clk_{set,round}_rate() functions
    MIPS: SEAD3: Disable L2 cache on SEAD-3.
    MIPS: BCM63xx: Enable second core SMP on BCM6328 if available
    MIPS: BCM63xx: Add SMP support to prom.c
    MIPS: define write{b,w,l,q}_relaxed
    MIPS: Expose missing pci_io{map,unmap} declarations
    MIPS: Malta: Update GCMP detection.
    Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET"
    MIPS: APSP: Remove
    SSB: Kconfig: Amend SSB_EMBEDDED dependencies
    MIPS: microMIPS: Fix improper definition of ISA exception bit.
    MIPS: Don't try to decode microMIPS branch instructions where they cannot exist.
    MIPS: Declare emulate_load_store_microMIPS as a static function.
    MIPS: Fix typos and cleanup comment
    MIPS: Cleanup indentation and whitespace
    MIPS: BMIPS: support booting from physical CPU other than 0
    MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS
    MIPS: GIC: Fix gic_set_affinity infinite loop
    MIPS: Don't save/restore OCTEON wide multiplier state on syscalls.
    ...

    Linus Torvalds
     

13 Jul, 2013

1 commit

  • 1. This is mostly theoretical, but llist_add*() need ACCESS_ONCE().

    Otherwise it is not guaranteed that the first cmpxchg() uses the
    same value for old_entry and new_last->next.

    2. These helpers cache the result of cmpxchg() and read the initial
    value of head->first before the main loop. I do not think this
    makes sense. In the likely case cmpxchg() succeeds, otherwise
    it doesn't hurt to reload head->first.

    I think it would be better to simplify the code and simply read
    ->first before cmpxchg().

    Signed-off-by: Oleg Nesterov
    Cc: Al Viro
    Cc: Andrey Vagin
    Cc: "Eric W. Biederman"
    Cc: David Howells
    Cc: Huang Ying
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Oleg Nesterov
     

12 Jul, 2013

1 commit

  • Move the definitions for wound/wait mutexes out to a separate
    header, ww_mutex.h. This reduces clutter in mutex.h, and
    increases readability.

    Suggested-by: Linus Torvalds
    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Acked-by: Rik van Riel
    Acked-by: Maarten Lankhorst
    Cc: Dave Airlie
    Link: http://lkml.kernel.org/r/51D675DC.3000907@canonical.com
    [ Tidied up the code a bit. ]
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     

10 Jul, 2013

8 commits

  • Pull networking updates from David Miller:
    "This is a re-do of the net-next pull request for the current merge
    window. The only difference from the one I made the other day is that
    this has Eliezer's interface renames and the timeout handling changes
    made based upon your feedback, as well as a few bug fixes that have
    trickeled in.

    Highlights:

    1) Low latency device polling, eliminating the cost of interrupt
    handling and context switches. Allows direct polling of a network
    device from socket operations, such as recvmsg() and poll().

    Currently ixgbe, mlx4, and bnx2x support this feature.

    Full high level description, performance numbers, and design in
    commit 0a4db187a999 ("Merge branch 'll_poll'")

    From Eliezer Tamir.

    2) With the routing cache removed, ip_check_mc_rcu() gets exercised
    more than ever before in the case where we have lots of multicast
    addresses. Use a hash table instead of a simple linked list, from
    Eric Dumazet.

    3) Add driver for Atheros CQA98xx 802.11ac wireless devices, from
    Bartosz Markowski, Janusz Dziedzic, Kalle Valo, Marek Kwaczynski,
    Marek Puzyniak, Michal Kazior, and Sujith Manoharan.

    4) Support reporting the TUN device persist flag to userspace, from
    Pavel Emelyanov.

    5) Allow controlling network device VF link state using netlink, from
    Rony Efraim.

    6) Support GRE tunneling in openvswitch, from Pravin B Shelar.

    7) Adjust SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF for modern times, from
    Daniel Borkmann and Eric Dumazet.

    8) Allow controlling of TCP quickack behavior on a per-route basis,
    from Cong Wang.

    9) Several bug fixes and improvements to vxlan from Stephen
    Hemminger, Pravin B Shelar, and Mike Rapoport. In particular,
    support receiving on multiple UDP ports.

    10) Major cleanups, particular in the area of debugging and cookie
    lifetime handline, to the SCTP protocol code. From Daniel
    Borkmann.

    11) Allow packets to cross network namespaces when traversing tunnel
    devices. From Nicolas Dichtel.

    12) Allow monitoring netlink traffic via AF_PACKET sockets, in a
    manner akin to how we monitor real network traffic via ptype_all.
    From Daniel Borkmann.

    13) Several bug fixes and improvements for the new alx device driver,
    from Johannes Berg.

    14) Fix scalability issues in the netem packet scheduler's time queue,
    by using an rbtree. From Eric Dumazet.

    15) Several bug fixes in TCP loss recovery handling, from Yuchung
    Cheng.

    16) Add support for GSO segmentation of MPLS packets, from Simon
    Horman.

    17) Make network notifiers have a real data type for the opaque
    pointer that's passed into them. Use this to properly handle
    network device flag changes in arp_netdev_event(). From Jiri
    Pirko and Timo Teräs.

    18) Convert several drivers over to module_pci_driver(), from Peter
    Huewe.

    19) tcp_fixup_rcvbuf() can loop 500 times over loopback, just use a
    O(1) calculation instead. From Eric Dumazet.

    20) Support setting of explicit tunnel peer addresses in ipv6, just
    like ipv4. From Nicolas Dichtel.

    21) Protect x86 BPF JIT against spraying attacks, from Eric Dumazet.

    22) Prevent a single high rate flow from overruning an individual cpu
    during RX packet processing via selective flow shedding. From
    Willem de Bruijn.

    23) Don't use spinlocks in TCP md5 signing fast paths, from Eric
    Dumazet.

    24) Don't just drop GSO packets which are above the TBF scheduler's
    burst limit, chop them up so they are in-bounds instead. Also
    from Eric Dumazet.

    25) VLAN offloads are missed when configured on top of a bridge, fix
    from Vlad Yasevich.

    26) Support IPV6 in ping sockets. From Lorenzo Colitti.

    27) Receive flow steering targets should be updated at poll() time
    too, from David Majnemer.

    28) Fix several corner case regressions in PMTU/redirect handling due
    to the routing cache removal, from Timo Teräs.

    29) We have to be mindful of ipv4 mapped ipv6 sockets in
    upd_v6_push_pending_frames(). From Hannes Frederic Sowa.

    30) Fix L2TP sequence number handling bugs, from James Chapman."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1214 commits)
    drivers/net: caif: fix wrong rtnl_is_locked() usage
    drivers/net: enic: release rtnl_lock on error-path
    vhost-net: fix use-after-free in vhost_net_flush
    net: mv643xx_eth: do not use port number as platform device id
    net: sctp: confirm route during forward progress
    virtio_net: fix race in RX VQ processing
    virtio: support unlocked queue poll
    net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit
    Documentation: Fix references to defunct linux-net@vger.kernel.org
    net/fs: change busy poll time accounting
    net: rename low latency sockets functions to busy poll
    bridge: fix some kernel warning in multicast timer
    sfc: Fix memory leak when discarding scattered packets
    sit: fix tunnel update via netlink
    dt:net:stmmac: Add dt specific phy reset callback support.
    dt:net:stmmac: Add support to dwmac version 3.610 and 3.710
    dt:net:stmmac: Allocate platform data only if its NULL.
    net:stmmac: fix memleak in the open method
    ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available
    net: ipv6: fix wrong ping_v6_sendmsg return value
    ...

    Linus Torvalds
     
  • I was reviewing code which I suspected might allocate a zero size SG
    table. That will cause memory corruption. Also we can't return before
    doing the memset or we could end up using uninitialized memory in the
    cleanup path.

    Signed-off-by: Dan Carpenter
    Cc: Akinobu Mita
    Cc: Imre Deak
    Cc: Tejun Heo
    Cc: Daniel Vetter
    Cc: Maxim Levitsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • The only difference between sg_pcopy_{from,to}_buffer() and
    sg_copy_{from,to}_buffer() is an additional argument that specifies the
    number of bytes to skip the SG list before copying.

    Signed-off-by: Akinobu Mita
    Cc: "David S. Miller"
    Cc: "James E.J. Bottomley"
    Cc: Douglas Gilbert
    Cc: Herbert Xu
    Cc: Horia Geanta
    Cc: Imre Deak
    Acked-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This patchset introduces sg_pcopy_from_buffer() and sg_pcopy_to_buffer(),
    which copy data between a linear buffer and an SG list.

    The only difference between sg_pcopy_{from,to}_buffer() and
    sg_copy_{from,to}_buffer() is an additional argument that specifies the
    number of bytes to skip the SG list before copying.

    The main reason for introducing these functions is to fix a problem in
    scsi_debug module. And there is a local function in crypto/talitos
    module, which can be replaced by sg_pcopy_to_buffer().

    This patch:

    sg_miter_get_next_page() is used to proceed page iterator to the next page
    if necessary, and will be used to implement the variants of
    sg_copy_{from,to}_buffer() later.

    Signed-off-by: Akinobu Mita
    Acked-by: Tejun Heo
    Cc: Tejun Heo
    Cc: Imre Deak
    Cc: Herbert Xu
    Cc: "David S. Miller"
    Cc: "James E.J. Bottomley"
    Cc: Douglas Gilbert
    Cc: Horia Geanta
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This patchset is for supporting LZ4 compression and the crypto API using
    it.

    As shown below, the size of data is a little bit bigger but compressing
    speed is faster under the enabled unaligned memory access. We can use
    lz4 de/compression through crypto API as well. Also, It will be useful
    for another potential user of lz4 compression.

    lz4 Compression Benchmark:
    Compiler: ARM gcc 4.6.4
    ARMv7, 1 GHz based board
    Kernel: linux 3.4
    Uncompressed data Size: 101 MB
    Compressed Size compression Speed
    LZO 72.1MB 32.1MB/s, 33.0MB/s(UA)
    LZ4 75.1MB 30.4MB/s, 35.9MB/s(UA)
    LZ4HC 59.8MB 2.4MB/s, 2.5MB/s(UA)
    - UA: Unaligned memory Access support
    - Latest patch set for LZO applied

    This patch:

    Add support for LZ4 compression in the Linux Kernel. LZ4 Compression APIs
    for kernel are based on LZ4 implementation by Yann Collet and were changed
    for kernel coding style.

    LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
    LZ4 source repository : http://code.google.com/p/lz4/
    svn revision : r90

    Two APIs are added:

    lz4_compress() support basic lz4 compression whereas lz4hc_compress()
    support high compression or CPU performance get lower but compression
    ratio get higher. Also, we require the pre-allocated working memory with
    the defined size and destination buffer must be allocated with the size of
    lz4_compressbound.

    [akpm@linux-foundation.org: make lz4_compresshcctx() static]
    Signed-off-by: Chanho Min
    Cc: "Darrick J. Wong"
    Cc: Bob Pearson
    Cc: Richard Weinberger
    Cc: Herbert Xu
    Cc: Yann Collet
    Cc: Kyungsik Lee
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chanho Min
     
  • Add support for extracting LZ4-compressed kernel images, as well as
    LZ4-compressed ramdisk images in the kernel boot process.

    Signed-off-by: Kyungsik Lee
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Russell King
    Cc: Borislav Petkov
    Cc: Florian Fainelli
    Cc: Yann Collet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyungsik Lee
     
  • Add support for LZ4 decompression in the Linux Kernel. LZ4 Decompression
    APIs for kernel are based on LZ4 implementation by Yann Collet.

    Benchmark Results(PATCH v3)
    Compiler: Linaro ARM gcc 4.6.2

    1. ARMv7, 1.5GHz based board
    Kernel: linux 3.4
    Uncompressed Kernel Size: 14MB
    Compressed Size Decompression Speed
    LZO 6.7MB 20.1MB/s, 25.2MB/s(UA)
    LZ4 7.3MB 29.1MB/s, 45.6MB/s(UA)

    2. ARMv7, 1.7GHz based board
    Kernel: linux 3.7
    Uncompressed Kernel Size: 14MB
    Compressed Size Decompression Speed
    LZO 6.0MB 34.1MB/s, 52.2MB/s(UA)
    LZ4 6.5MB 86.7MB/s
    - UA: Unaligned memory Access support
    - Latest patch set for LZO applied

    This patch set is for adding support for LZ4-compressed Kernel. LZ4 is a
    very fast lossless compression algorithm and it also features an extremely
    fast decoder [1].

    But we have five of decompressors already and one question which does
    arise, however, is that of where do we stop adding new ones? This issue
    had been discussed and came to the conclusion [2].

    Russell King said that we should have:

    - one decompressor which is the fastest
    - one decompressor for the highest compression ratio
    - one popular decompressor (eg conventional gzip)

    If we have a replacement one for one of these, then it should do exactly
    that: replace it.

    The benchmark shows that an 8% increase in image size vs a 66% increase
    in decompression speed compared to LZO(which has been known as the
    fastest decompressor in the Kernel). Therefore the "fast but may not be
    small" compression title has clearly been taken by LZ4 [3].

    [1] http://code.google.com/p/lz4/
    [2] http://thread.gmane.org/gmane.linux.kbuild.devel/9157
    [3] http://thread.gmane.org/gmane.linux.kbuild.devel/9347

    LZ4 homepage: http://fastcompression.blogspot.com/p/lz4.html
    LZ4 source repository: http://code.google.com/p/lz4/

    Signed-off-by: Kyungsik Lee
    Signed-off-by: Yann Collet
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Russell King
    Cc: Borislav Petkov
    Cc: Florian Fainelli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyungsik Lee
     
  • Some architectures need __c[lt]z[sd]i2() for __builtin_c[lt]z[ll] and
    that causes a build failure. They can be implemented using the
    fls()/__ffs() and overridden by linking arch-specific versions may not
    be implemented yet.

    This is required by "lib: add lz4 compressor module".

    Reference: https://lkml.org/lkml/2013/4/18/603

    Signed-off-by: Chanho Min
    Reported-by: Geert Uytterhoeven
    Cc: "Darrick J. Wong"
    Cc: Bob Pearson
    Cc: Richard Weinberger
    Cc: Herbert Xu
    Cc: Yann Collet
    Cc: Kyungsik Lee
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chanho Min
     

06 Jul, 2013

1 commit

  • Pull crypto update from Herbert Xu:
    - Do not idle omap device between crypto operations in one session.
    - Added sha224/sha384 shims for SSSE3.
    - More optimisations for camellia-aesni-avx2.
    - Removed defunct blowfish/twofish AVX2 implementations.
    - Added unaligned buffer self-tests.
    - Added PCLMULQDQ optimisation for CRCT10DIF.
    - Added support for Freescale's DCP co-processor
    - Misc fixes.

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (44 commits)
    crypto: testmgr - test hash implementations with unaligned buffers
    crypto: testmgr - test AEADs with unaligned buffers
    crypto: testmgr - test skciphers with unaligned buffers
    crypto: testmgr - check that entries in alg_test_descs are in correct order
    Revert "crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher"
    Revert "crypto: blowfish - add AVX2/x86_64 implementation of blowfish cipher"
    crypto: camellia-aesni-avx2 - tune assembly code for more performance
    hwrng: bcm2835 - fix MODULE_LICENSE tag
    hwrng: nomadik - use clk_prepare_enable()
    crypto: picoxcell - replace strict_strtoul() with kstrtoul()
    crypto: dcp - Staticize local symbols
    crypto: dcp - Use NULL instead of 0
    crypto: dcp - Use devm_* APIs
    crypto: dcp - Remove redundant platform_set_drvdata()
    hwrng: use platform_{get,set}_drvdata()
    crypto: omap-aes - Don't idle/start AES device between Encrypt operations
    crypto: crct10dif - Use PTR_RET
    crypto: ux500 - Cocci spatch "resource_size.spatch"
    crypto: sha256_ssse3 - add sha224 support
    crypto: sha512_ssse3 - add sha384 support
    ...

    Linus Torvalds
     

05 Jul, 2013

9 commits

  • Pull trivial tree updates from Jiri Kosina:
    "The usual stuff from trivial tree"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    treewide: relase -> release
    Documentation/cgroups/memory.txt: fix stat file documentation
    sysctl/net.txt: delete reference to obsolete 2.4.x kernel
    spinlock_api_smp.h: fix preprocessor comments
    treewide: Fix typo in printk
    doc: device tree: clarify stuff in usage-model.txt.
    open firmware: "/aliasas" -> "/aliases"
    md: bcache: Fixed a typo with the word 'arithmetic'
    irq/generic-chip: fix a few kernel-doc entries
    frv: Convert use of typedef ctl_table to struct ctl_table
    sgi: xpc: Convert use of typedef ctl_table to struct ctl_table
    doc: clk: Fix incorrect wording
    Documentation/arm/IXP4xx fix a typo
    Documentation/networking/ieee802154 fix a typo
    Documentation/DocBook/media/v4l fix a typo
    Documentation/video4linux/si476x.txt fix a typo
    Documentation/virtual/kvm/api.txt fix a typo
    Documentation/early-userspace/README fix a typo
    Documentation/video4linux/soc-camera.txt fix a typo
    lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment
    ...

    Linus Torvalds
     
  • Merge Kconfig menu diet patches from Dave Hansen:
    "I think the "Kernel Hacking" menu has gotten a bit out of hand. It is
    over 120 lines long on my system with everything enabled and options
    are scattered around it haphazardly.

    http://sr71.net/~dave/linux/kconfig-horror.png

    Let's try to introduce some sanity. This set takes that 120 lines
    down to 55 and makes it vastly easier to find some things. It's a
    start.

    This set stands on its own, but there is plenty of room for follow-up
    patches. The arch-specific debug options still end up getting stuck
    in the top-level "kernel hacking" menu. OPTIMIZE_INLINING, for
    instance, could obviously go in to the "compiler options" menu, but
    the fact that it is defined in arch/ in a separate Kconfig file keeps
    it on its own for the moment.

    The Signed-off-by's in here look funky. I changed employers while
    working on this set, so I have signoffs from both email addresses"

    * emailed patches from Dave Hansen :
    hang and lockup detection menu
    kconfig: consolidate printk options
    group locking debugging options
    consolidate compilation option configs
    consolidate runtime testing configs
    order memory debugging Kconfig options
    consolidate per-arch stack overflow debugging options

    Linus Torvalds
     
  • The hard/softlockup and hung-task entries take up 6 lines
    of screen real-estate when enabled. I bet folks don't
    mess with these _that_ often, so move them in a group
    down a level.

    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Same deal, take the printk-related things and hide them in a menu.
    This takes another 4 items out of the top-level menu.

    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184208.D9E5804D@kernel.stglabs.ibm.com

    There are quite a few of these, and we want to make sure that
    there is one-stop-shopping for lock debugging.

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original Post:

    http://lkml.kernel.org/r/20121214184207.6E00DDEC@kernel.stglabs.ibm.com

    Again, trying to come up with some common themes of the stuff in
    the kernel hacking menu... There are quite a few options to
    tweak compilation in some way, or perform extra compile-time
    checks. Give them their own menu.

    The diff here looks a bit funny... makes it look like I'm
    moving debugfs even though I'm actually moving the options on
    either side of it.

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184206.FC11422F@kernel.stglabs.ibm.com

    These runtime tests are great, except that there are a lot of them,
    and they are very rarely needed. Give them their own menu so that
    only the folks who need them will have to go looking for them.

    Note that there are some other runtime tests that are not in here,
    like for RCU or locking. This menu should only be used for tests
    that do not have a more appropriate home.

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184203.37E6C724@kernel.stglabs.ibm.com

    There are a *LOT* of memory debugging options. They are just scattered
    all over the "Kernel Hacking" menu. Sure, "memory debugging" is a very
    vague term and it's going to be hard to make absolute rules about what
    goes in here, but this has to be better than what we had before.

    This does, however, leave out the architecture-specific memory
    debugging options (like x86's DEBUG_SET_MODULE_RONX). There would need
    to be some substantial changes to move those in here. Kconfig can not
    easily mix arch-specific and generic options together: it really
    requires a file per-architecture, and I think having an
    arch/foo/Kconfig.debug-memory might be taking things a bit too far

    Signed-off-by: Dave Hansen
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184202.F54094D9@kernel.stglabs.ibm.com

    Several architectures have similar stack debugging config options.
    They all pretty much do the same thing, some with slightly
    differing help text.

    This patch changes the architectures to instead enable a Kconfig
    boolean, and then use that boolean in the generic Kconfig.debug
    to present the actual menu option. This removes a bunch of
    duplication and adds consistency across arches.

    Signed-off-by: Dave Hansen
    Reviewed-by: H. Peter Anvin
    Reviewed-by: James Hogan
    Acked-by: Chris Metcalf [for tile]
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen
     

04 Jul, 2013

5 commits

  • Merge first patch-bomb from Andrew Morton:
    - various misc bits
    - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
    distracted. There has been quite a bit of activity.
    - About half the MM queue
    - Some backlight bits
    - Various lib/ updates
    - checkpatch updates
    - zillions more little rtc patches
    - ptrace
    - signals
    - exec
    - procfs
    - rapidio
    - nbd
    - aoe
    - pps
    - memstick
    - tools/testing/selftests updates

    * emailed patches from Andrew Morton : (445 commits)
    tools/testing/selftests: don't assume the x bit is set on scripts
    selftests: add .gitignore for kcmp
    selftests: fix clean target in kcmp Makefile
    selftests: add .gitignore for vm
    selftests: add hugetlbfstest
    self-test: fix make clean
    selftests: exit 1 on failure
    kernel/resource.c: remove the unneeded assignment in function __find_resource
    aio: fix wrong comment in aio_complete()
    drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
    drivers/memstick/host/r592.c: convert to module_pci_driver
    drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
    pps-gpio: add device-tree binding and support
    drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
    drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
    drivers/parport/share.c: use kzalloc
    Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
    aoe: update internal version number to v83
    aoe: update copyright date
    aoe: perform I/O completions in parallel
    ...

    Linus Torvalds
     
  • We print a dump stack after idr_remove warning. This is useful to find
    the faulty piece of code. Let's do the same for ida_remove, as it would
    be equally useful there.

    [akpm@linux-foundation.org: convert the open-coded printk+dump_stack into WARN()]
    Signed-off-by: Jean Delvare
    Cc: Tejun Heo
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • __this_cpu_write doesn't need to be protected by spinlock, AS we are doing
    per cpu write with preempt disabled. And another reason to remove
    __this_cpu_write outside of spinlock: __percpu_counter_sum is not an
    accurate counter.

    Signed-off-by: Fan Du
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fan Du
     
  • Add functionality to serialize the output from dump_stack() to avoid
    mangling of the output when dump_stack is called simultaneously from
    multiple cpus.

    [akpm@linux-foundation.org: fix comment indenting, avoid inclusion of files - use where possiblem fix uniprocessor build (__dump_stack undefined), remove unneeded ifdef around smp.h inclusion]
    Signed-off-by: Alex Thorlton
    Reported-by: Russ Anderson
    Reviewed-by: Robin Holt
    Cc: Vineet Gupta
    Cc: David S. Miller
    Cc: Richard Kuo
    Cc: Jesper Nilsson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alex Thorlton
     
  • Pull "exotic" arch fixes from Geert Uytterhoeven:
    "This is a collection of several exotic architecture fixes, and a few
    other fixes for issues that were detected while doing the former"

    * 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (35 commits)
    lib: Move fonts from drivers/video/console/ to lib/fonts/
    console/font: Refactor font support code selection logic
    Revert "staging/solo6x10: depend on CONFIG_FONTS"
    input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
    score: Wire up asm-generic/xor.h
    score: Remove unneeded
    openrisc: Wire up asm-generic/xor.h
    h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"
    h8300: Mark H83002 and H83048 CPU support broken
    h8300: Switch h8300 to drivers/Kconfig
    h8300: Limit timer channel ranges in Kconfig
    h8300: Wire up asm-generic/xor.h
    h8300: Fill the system call table using a CALL() macro
    h8300: Fix
    h8300: Hardcode symbol prefixes in asm sources
    h8300: add missing definition for read_barries_depends()
    frv: head.S - Remove commented-out initialization code
    cris: Wire up asm-generic/vga.h
    parport: disable PC-style parallel port support on cris
    console: Disable VGA text console support on cris
    ...

    Linus Torvalds
     

03 Jul, 2013

4 commits

  • Pull per-cpu changes from Tejun Heo:
    "This pull request contains Kent's per-cpu reference counter. It has
    gone through several iterations since the last time and the dynamic
    allocation is gone.

    The usual usage is relatively straight-forward although async kill
    confirm interface, which is not used int most cases, is somewhat icky.
    There also are some interface concerns - e.g. I'm not sure about
    passing in @relesae callback during init as that becomes funny when we
    later implement synchronous kill_and_drain - but nothing too serious
    and it's quite useable now.

    cgroup_subsys_state refcnting has already been converted and we should
    convert module refcnt (Kent?)"

    * 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu-refcount: use RCU-sched insted of normal RCU
    percpu-refcount: implement percpu_tryget() along with percpu_ref_kill_and_confirm()
    percpu-refcount: implement percpu_ref_cancel_init()
    percpu-refcount: add __must_check to percpu_ref_init() and don't use ACCESS_ONCE() in percpu_ref_kill_rcu()
    percpu-refcount: cosmetic updates
    percpu-refcount: consistently use plain (non-sched) RCU
    percpu-refcount: Don't use silly cmpxchg()
    percpu: implement generic percpu refcounting

    Linus Torvalds
     
  • Pull WW mutex support from Ingo Molnar:
    "This tree adds support for wound/wait style locks, which the graphics
    guys would like to make use of in the TTM graphics subsystem.

    Wound/wait mutexes are used when other multiple lock acquisitions of a
    similar type can be done in an arbitrary order. The deadlock handling
    used here is called wait/wound in the RDBMS literature: The older
    tasks waits until it can acquire the contended lock. The younger
    tasks needs to back off and drop all the locks it is currently
    holding, ie the younger task is wounded.

    See this LWN.net description of W/W mutexes:

    https://lwn.net/Articles/548909/

    The comments there outline specific usecases for this facility (which
    have already been implemented for the DRM tree).

    Also see Documentation/ww-mutex-design.txt for more details"

    * 'core-mutexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    locking-selftests: Handle unexpected failures more strictly
    mutex: Add more w/w tests to test EDEADLK path handling
    mutex: Add more tests to lib/locking-selftest.c
    mutex: Add w/w tests to lib/locking-selftest.c
    mutex: Add w/w mutex slowpath debugging
    mutex: Add support for wound/wait style locks
    arch: Make __mutex_fastpath_lock_retval return whether fastpath succeeded or not

    Linus Torvalds
     
  • …ernel/git/arm/arm-soc

    Pull ARM SoC non-cricitical bug fixes from Arnd Bergmann:
    "These are various bug fixes that were not considered important enough
    for merging into 3.10.

    The majority of the ARM fixes are for the OMAP and at91 platforms, and
    there is another set of bug fixes for device drivers that resolve
    'randconfig' build errors and that the subsystem maintainers either
    did not pick up or preferred to get merged through the arm-soc tree."

    * tag 'fixes-non-critical-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
    ARM: at91/PMC: use at91_usb_rate() for UTMI PLL
    ARM: at91/PMC: fix at91sam9n12 USB FS init
    ARM: at91/PMC: at91sam9n12 family has a PLLB
    ARM: at91/PMC: sama5d3 family doesn't have a PLLB
    ARM: tegra: fix section mismatch in tegra_pmc_parse_dt
    ARM: mxs: don't select HAVE_PWM
    ARM: mxs: stub out mxs_pm_init for !CONFIG_PM
    cpuidle: calxeda: select ARM_CPU_SUSPEND
    ARM: mvebu: fix length of ethernet registers in mv78260 dtsi
    ARM: at91: cpuidle: Fix target_residency
    ARM: at91: fix at91_extern_irq usage for non-dt boards
    ARM: sirf: use CONFIG_SIRF rather than CONFIG_PRIMA2 where necessary
    clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change
    X.509: do not emit any informational output
    mtd: omap2: allow bulding as a module
    [SCSI] nsp32: use mdelay instead of large udelay constants
    hwrng: bcm2835: fix MODULE_LICENSE tag
    ARM: at91: Change the internal SRAM memory type MT_MEMORY_NONCACHED
    ARM: at91: Fix link breakage when !CONFIG_PHYLIB
    MAINTAINERS: Add exynos filename match to ARM/S5P EXYNOS ARM ARCHITECTURES
    ...

    Linus Torvalds
     
  • Pull driver core updates from Greg KH:
    "Here's the big driver core merge for 3.11-rc1

    Lots of little things, and larger firmware subsystem updates, all
    described in the shortlog. Nice thing here is that we finally get rid
    of CONFIG_HOTPLUG, after 10+ years, thanks to Stephen Rohtwell (it had
    been always on for a number of kernel releases, now it's just
    removed)"

    * tag 'driver-core-3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (27 commits)
    driver core: device.h: fix doc compilation warnings
    firmware loader: fix another compile warning with PM_SLEEP unset
    build some drivers only when compile-testing
    firmware loader: fix compile warning with PM_SLEEP set
    kobject: sanitize argument for format string
    sysfs_notify is only possible on file attributes
    firmware loader: simplify holding module for request_firmware
    firmware loader: don't export cache_firmware and uncache_firmware
    drivers/base: Use attribute groups to create sysfs memory files
    firmware loader: fix compile warning
    firmware loader: fix build failure with !CONFIG_FW_LOADER_USER_HELPER
    Documentation: Updated broken link in HOWTO
    Finally eradicate CONFIG_HOTPLUG
    driver core: firmware loader: kill FW_ACTION_NOHOTPLUG requests before suspend
    driver core: firmware loader: don't cache FW_ACTION_NOHOTPLUG firmware
    Documentation: Tidy up some drivers/base/core.c kerneldoc content.
    platform_device: use a macro instead of platform_driver_register
    firmware: move EXPORT_SYMBOL annotations
    firmware: Avoid deadlock of usermodehelper lock at shutdown
    dell_rbu: Select CONFIG_FW_LOADER_USER_HELPER explicitly
    ...

    Linus Torvalds
     

02 Jul, 2013

1 commit

  • In order to avoid making code that deals with printing both, IPv4 and
    IPv6 addresses, unnecessary complicated as for example ...

    if (sa.sa_family == AF_INET6)
    printk("... %pI6 ...", ..sin6_addr);
    else
    printk("... %pI4 ...", ..sin_addr.s_addr);

    ... it would be better to introduce a format specifier that can deal
    with those kind of situations internally; just as we have a "struct
    sockaddr" for generic mapping into "struct sockaddr_in" or "struct
    sockaddr_in6" as e.g. done in "union sctp_addr". Then, we could
    reduce the above statement into something like:

    printk("... %pIS ..", &sockaddr);

    In case our pointer is NULL, pointer() then deals with that already at
    an earlier point in time internally. While we're at it, support for both
    %piS/%pIS, where 'S' stands for sockaddr, comes (almost) for free.

    Additionally to that, postfix specifiers 'p', 'f' and 's' are supported
    as suggested and initially implemented in 2009 by Joe Perches [1].
    Handling of those additional specifiers orientate on the initial RFC that
    was proposed. Also we support IPv6 compressed format specified by 'c' and
    various other IPv4 extensions as stated in the documentation part.

    Likely, there are many other areas than just SCTP in the kernel to make
    use of this extension as well.

    [1] http://patchwork.ozlabs.org/patch/31480/

    Signed-off-by: Daniel Borkmann
    CC: Joe Perches
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

28 Jun, 2013

1 commit

  • Several drivers need font support independent of CONFIG_VT, cfr. commit
    9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
    support code selection logic").
    Hence move the fonts and their support logic from drivers/video/console/ to
    its own library directory lib/fonts/.
    This also allows to limit processing of drivers/video/console/Makefile to
    CONFIG_VT=y again.

    [Kevin Hilman : Update arch/arm/boot/compressed/Makefile]
    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

26 Jun, 2013

6 commits

  • When CONFIG_PROVE_LOCKING is not enabled, more tests are
    expected to pass unexpectedly, but there no tests that should
    start to fail that pass with CONFIG_PROVE_LOCKING enabled.

    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113151.4001.77963.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113141.4001.54331.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • None of the ww_mutex codepaths should be taken in the 'normal'
    mutex calls. The easiest way to verify this is by using the
    normal mutex calls, and making sure o.ctx is unmodified.

    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113130.4001.45423.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • This stresses the lockdep code in some ways specifically useful
    to ww_mutexes. It adds checks for most of the common locking
    errors.

    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: robclark@gmail.com
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113124.4001.23186.stgit@patser
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst
     
  • Injects EDEADLK conditions at pseudo-random interval, with
    exponential backoff up to UINT_MAX (to ensure that every lock
    operation still completes in a reasonable time).

    This way we can test the wound slowpath even for ww mutex users
    where contention is never expected, and the ww deadlock
    avoidance algorithm is only needed for correctness against
    malicious userspace. An example would be protecting kernel
    modesetting properties, which thanks to single-threaded X isn't
    really expected to contend, ever.

    I've looked into using the CONFIG_FAULT_INJECTION
    infrastructure, but decided against it for two reasons:

    - EDEADLK handling is mandatory for ww mutex users and should
    never affect the outcome of a syscall. This is in contrast to -ENOMEM
    injection. So fine configurability isn't required.

    - The fault injection framework only allows to set a simple
    probability for failure. Now the probability that a ww mutex acquire
    stage with N locks will never complete (due to too many injected
    EDEADLK backoffs) is zero. But the expected number of ww_mutex_lock
    operations for the completely uncontended case would be O(exp(N)).
    The per-acuiqire ctx exponential backoff solution choosen here only
    results in O(log N) overhead due to injection and so O(log N * N)
    lock operations. This way we can fail with high probability (and so
    have good test coverage even for fancy backoff and lock acquisition
    paths) without running into patalogical cases.

    Note that EDEADLK will only ever be injected when we managed to
    acquire the lock. This prevents any behaviour changes for users
    which rely on the EALREADY semantics.

    Signed-off-by: Daniel Vetter
    Signed-off-by: Maarten Lankhorst
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20130620113117.4001.21681.stgit@patser
    Signed-off-by: Ingo Molnar

    Daniel Vetter
     
  • Wound/wait mutexes are used when other multiple lock
    acquisitions of a similar type can be done in an arbitrary
    order. The deadlock handling used here is called wait/wound in
    the RDBMS literature: The older tasks waits until it can acquire
    the contended lock. The younger tasks needs to back off and drop
    all the locks it is currently holding, i.e. the younger task is
    wounded.

    For full documentation please read Documentation/ww-mutex-design.txt.

    References: https://lwn.net/Articles/548909/
    Signed-off-by: Maarten Lankhorst
    Acked-by: Daniel Vetter
    Acked-by: Rob Clark
    Acked-by: Peter Zijlstra
    Cc: dri-devel@lists.freedesktop.org
    Cc: linaro-mm-sig@lists.linaro.org
    Cc: rostedt@goodmis.org
    Cc: daniel@ffwll.ch
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/51C8038C.9000106@canonical.com
    Signed-off-by: Ingo Molnar

    Maarten Lankhorst