09 Feb, 2019

1 commit

  • Pull networking fixes from David Miller:
    "This pull request is dedicated to the upcoming snowpocalypse parts 2
    and 3 in the Pacific Northwest:

    1) Drop profiles are broken because some drivers use dev_kfree_skb*
    instead of dev_consume_skb*, from Yang Wei.

    2) Fix IWLWIFI kconfig deps, from Luca Coelho.

    3) Fix percpu maps updating in bpftool, from Paolo Abeni.

    4) Missing station release in batman-adv, from Felix Fietkau.

    5) Fix some networking compat ioctl bugs, from Johannes Berg.

    6) ucc_geth must reset the BQL queue state when stopping the device,
    from Mathias Thore.

    7) Several XDP bug fixes in virtio_net from Toshiaki Makita.

    8) TSO packets must be sent always on queue 0 in stmmac, from Jose
    Abreu.

    9) Fix socket refcounting bug in RDS, from Eric Dumazet.

    10) Handle sparse cpu allocations in bpf selftests, from Martynas
    Pumputis.

    11) Make sure mgmt frames have enough tailroom in mac80211, from Felix
    Feitkau.

    12) Use safe list walking in sctp_sendmsg() asoc list traversal, from
    Greg Kroah-Hartman.

    13) Make DCCP's ccid_hc_[rt]x_parse_options always check for NULL
    ccid, from Eric Dumazet.

    14) Need to reload WoL password into bcmsysport device after deep
    sleeps, from Florian Fainelli.

    15) Remove filter from mask before freeing in cls_flower, from Petr
    Machata.

    16) Missing release and use after free in error paths of s390 qeth
    code, from Julian Wiedmann.

    17) Fix lockdep false positive in dsa code, from Marc Zyngier.

    18) Fix counting of ATU violations in mv88e6xxx, from Andrew Lunn.

    19) Fix EQ firmware assert in qed driver, from Manish Chopra.

    20) Don't default Caivum PTP to Y in kconfig, from Bjorn Helgaas"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (116 commits)
    net: dsa: b53: Fix for failure when irq is not defined in dt
    sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach()
    geneve: should not call rt6_lookup() when ipv6 was disabled
    net: Don't default Cavium PTP driver to 'y'
    net: broadcom: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: via-velocity: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: tehuti: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: sun: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: fsl_ucc_hdlc: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: fec_mpc52xx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: smsc: epic100: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: dscc4: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: tulip: de2104x: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net: defxx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles
    net/mlx5e: Don't overwrite pedit action when multiple pedit used
    net/mlx5e: Update hw flows when encap source mac changed
    qed*: Advance drivers version to 8.37.0.20
    qed: Change verbosity for coalescing message.
    qede: Fix system crash on configuring channels.
    qed: Consider TX tcs while deriving the max num_queues for PF.
    ...

    Linus Torvalds
     

02 Feb, 2019

1 commit

  • There is a copy and paste bug so we set "config->test_driver" to NULL
    twice instead of setting "config->test_fs". Smatch complains that it
    leads to a double free:

    lib/test_kmod.c:840 __kmod_config_init() warn: 'config->test_fs' double freed

    Link: http://lkml.kernel.org/r/20190121140011.GA14283@kadam
    Fixes: d9c6a72d6fa2 ("kmod: add test driver to stress test the module loader")
    Signed-off-by: Dan Carpenter
    Acked-by: Luis Chamberlain
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

01 Feb, 2019

1 commit

  • The test_insert_dup() function from lib/test_rhashtable.c passes a
    pointer to a stack object to rhltable_init(). Allocate the hash table
    dynamically to avoid that the following is reported with object
    debugging enabled:

    ODEBUG: object (ptrval) is on stack (ptrval), but NOT annotated.
    WARNING: CPU: 0 PID: 1 at lib/debugobjects.c:368 __debug_object_init+0x312/0x480
    Modules linked in:
    EIP: __debug_object_init+0x312/0x480
    Call Trace:
    ? debug_object_init+0x1a/0x20
    ? __init_work+0x16/0x30
    ? rhashtable_init+0x1e1/0x460
    ? sched_clock_cpu+0x57/0xe0
    ? rhltable_init+0xb/0x20
    ? test_insert_dup+0x32/0x20f
    ? trace_hardirqs_on+0x38/0xf0
    ? ida_dump+0x10/0x10
    ? jhash+0x130/0x130
    ? my_hashfn+0x30/0x30
    ? test_rht_init+0x6aa/0xab4
    ? ida_dump+0x10/0x10
    ? test_rhltable+0xc5c/0xc5c
    ? do_one_initcall+0x67/0x28e
    ? trace_hardirqs_off+0x22/0xe0
    ? restore_all_kernel+0xf/0x70
    ? trace_hardirqs_on_thunk+0xc/0x10
    ? restore_all_kernel+0xf/0x70
    ? kernel_init_freeable+0x142/0x213
    ? rest_init+0x230/0x230
    ? kernel_init+0x10/0x110
    ? schedule_tail_wrapper+0x9/0xc
    ? ret_from_fork+0x19/0x24

    Cc: Thomas Graf
    Cc: Herbert Xu
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Bart Van Assche
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Bart Van Assche
     

22 Jan, 2019

1 commit

  • Pull XArray fixes from Matthew Wilcox:
    "Fix some oversights in the XArray porcelain API:

    - support for m68k's two-byte aligned pointers

    - reserving entries using xa_insert()

    - missing xa_insert_bh() and xa_insert_irq() functions

    - simplify using xa_for_each()

    - use lockdep correctly

    - a few other minor fixes and improvements"

    * tag 'xarray-5.0-rc3' of git://git.infradead.org/users/willy/linux-dax:
    XArray: Fix an arithmetic error in xa_is_err
    XArray tests: Check mark 2 gets squashed
    XArray: Fix typo in comment
    XArray: Honour reserved entries in xa_insert
    XArray: Permit storing 2-byte-aligned pointers
    XArray: Change xa_for_each iterator
    XArray: Turn xa_init_flags into a static inline
    XArray tests: Add RCU locking

    Linus Torvalds
     

21 Jan, 2019

1 commit

  • If an input number x for int_sqrt64() has the highest bit set, then
    fls64(x) is 64. (1UL << 64) is an overflow and breaks the algorithm.

    Subtracting 1 is a better guess for the initial value of m anyway and
    that's what also done in int_sqrt() implicitly [*].

    [*] Note how int_sqrt() uses __fls() with two underscores, which already
    returns the proper raw bit number.

    In contrast, int_sqrt64() used fls64(), and that returns bit numbers
    illogically starting at 1, because of error handling for the "no
    bits set" case. Will points out that he bug probably is due to a
    copy-and-paste error from the regular int_sqrt() case.

    Signed-off-by: Florian La Roche
    Acked-by: Will Deacon
    Signed-off-by: Linus Torvalds

    Florian La Roche
     

15 Jan, 2019

3 commits

  • Because we may call blk_mq_get_driver_tag() directly from
    blk_mq_dispatch_rq_list() without holding any lock, then HARDIRQ may
    come and the above DEADLOCK is triggered.

    Commit ab53dcfb3e7b ("sbitmap: Protect swap_lock from hardirq") tries to
    fix this issue by using 'spin_lock_bh', which isn't enough because we
    complete request from hardirq context direclty in case of multiqueue.

    Cc: Clark Williams
    Fixes: ab53dcfb3e7b ("sbitmap: Protect swap_lock from hardirq")
    Cc: Jens Axboe
    Cc: Ming Lei
    Cc: Guenter Roeck
    Cc: Steven Rostedt (VMware)
    Signed-off-by: Ming Lei
    Signed-off-by: Linus Torvalds

    Ming Lei
     
  • We do not currently check that the loop in xas_squash_marks() doesn't have
    an off-by-one error in it. It didn't, but a patch which introduced an
    off-by-one error wasn't caught by any existing test. Switch the roles
    of XA_MARK_1 and XA_MARK_2 to catch that bug.

    Reported-by: Cyrill Gorcunov
    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • The swap_lock used by sbitmap has a chain with locks taken from softirq,
    but the swap_lock is not protected from being preempted by softirqs.

    A chain exists of:

    sbq->ws[i].wait -> dispatch_wait_lock -> swap_lock

    Where the sbq->ws[i].wait lock can be taken from softirq context, which
    means all locks below it in the chain must also be protected from
    softirqs.

    Reported-by: Clark Williams
    Fixes: 58ab5e32e6fd ("sbitmap: silence bogus lockdep IRQ warning")
    Fixes: ea86ea2cdced ("sbitmap: amortize cost of clearing bits")
    Cc: Jens Axboe
    Cc: Ming Lei
    Cc: Guenter Roeck
    Signed-off-by: Steven Rostedt (VMware)
    Signed-off-by: Linus Torvalds

    Steven Rostedt (VMware)
     

07 Jan, 2019

6 commits

  • xa_insert() should treat reserved entries as occupied, not as available.
    Also, it should treat requests to insert a NULL pointer as a request
    to reserve the slot. Add xa_insert_bh() and xa_insert_irq() for
    completeness.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • On m68k, statically allocated pointers may only be two-byte aligned.
    This clashes with the XArray's method for tagging internal pointers.
    Permit storing these pointers in single slots (ie not in multislots).

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • There were three problems with this API:
    1. It took too many arguments; almost all users wanted to iterate over
    every element in the array rather than a subset.
    2. It required that 'index' be initialised before use, and there's no
    realistic way to make GCC catch that.
    3. 'index' and 'entry' were the opposite way round from every other
    member of the XArray APIs.

    So split it into three different APIs:

    xa_for_each(xa, index, entry)
    xa_for_each_start(xa, index, entry, start)
    xa_for_each_marked(xa, index, entry, filter)

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • A regular xa_init_flags() put all dynamically-initialised XArrays into
    the same locking class. That leads to lockdep believing that taking
    one XArray lock while holding another is a deadlock. It's possible to
    work around some of these situations with separate locking classes for
    irq/bh/regular XArrays, and SINGLE_DEPTH_NESTING, but that's ugly, and
    it doesn't work for all situations (where we have completely unrelated
    XArrays).

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • 0day picked up that I'd forgotten to add locking to this new test.

    Signed-off-by: Matthew Wilcox

    Matthew Wilcox
     
  • Pull more Kbuild updates from Masahiro Yamada:

    - improve boolinit.cocci and use_after_iter.cocci semantic patches

    - fix alignment for kallsyms

    - move 'asm goto' compiler test to Kconfig and clean up jump_label
    CONFIG option

    - generate asm-generic wrappers automatically if arch does not
    implement mandatory UAPI headers

    - remove redundant generic-y defines

    - misc cleanups

    * tag 'kbuild-v4.21-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: rename generated .*conf-cfg to *conf-cfg
    kbuild: remove unnecessary stubs for archheader and archscripts
    kbuild: use assignment instead of define ... endef for filechk_* rules
    arch: remove redundant UAPI generic-y defines
    kbuild: generate asm-generic wrappers if mandatory headers are missing
    arch: remove stale comments "UAPI Header export list"
    riscv: remove redundant kernel-space generic-y
    kbuild: change filechk to surround the given command with { }
    kbuild: remove redundant target cleaning on failure
    kbuild: clean up rule_dtc_dt_yaml
    kbuild: remove UIMAGE_IN and UIMAGE_OUT
    jump_label: move 'asm goto' support test to Kconfig
    kallsyms: lower alignment on ARM
    scripts: coccinelle: boolinit: drop warnings on named constants
    scripts: coccinelle: check for redeclaration
    kconfig: remove unused "file" field of yylval union
    nds32: remove redundant kernel-space generic-y
    nios2: remove unneeded HAS_DMA define

    Linus Torvalds
     

06 Jan, 2019

6 commits

  • Pull block updates and fixes from Jens Axboe:

    - Pulled in MD changes that Shaohua had queued up for 4.21.

    Unfortunately we lost Shaohua late 2018, I'm sending these in on his
    behalf.

    - In conjunction with the above, I added a CREDITS entry for Shaoua.

    - sunvdc queue restart fix (Ming)

    * tag 'for-linus-20190104' of git://git.kernel.dk/linux-block:
    Add CREDITS entry for Shaohua Li
    block: sunvdc: don't run hw queue synchronously from irq context
    md: fix raid10 hang issue caused by barrier
    raid10: refactor common wait code from regular read/write request
    md: remvoe redundant condition check
    lib/raid6: add option to skip algo benchmarking
    lib/raid6: sort algos in rough performance order
    lib/raid6: check for assembler SSSE3 support
    lib/raid6: avoid __attribute_const__ redefinition
    lib/raid6: add missing include for raid6test
    md: remove set but not used variable 'bi_rdev'

    Linus Torvalds
     
  • Since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special
    target"), the target file is automatically deleted on failure.

    The boilerplate code

    ... || { rm -f $@; false; }

    is unneeded.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Currently, CONFIG_JUMP_LABEL just means "I _want_ to use jump label".

    The jump label is controlled by HAVE_JUMP_LABEL, which is defined
    like this:

    #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL)
    # define HAVE_JUMP_LABEL
    #endif

    We can improve this by testing 'asm goto' support in Kconfig, then
    make JUMP_LABEL depend on CC_HAS_ASM_GOTO.

    Ugly #ifdef HAVE_JUMP_LABEL will go away, and CONFIG_JUMP_LABEL will
    match to the real kernel capability.

    Signed-off-by: Masahiro Yamada
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Sedat Dilek

    Masahiro Yamada
     
  • Fixes build break on most ARM/ARM64 defconfigs:

    lib/genalloc.c: In function 'gen_pool_add_virt':
    lib/genalloc.c:190:10: error: implicit declaration of function 'vzalloc_node'; did you mean 'kzalloc_node'?
    lib/genalloc.c:190:8: warning: assignment to 'struct gen_pool_chunk *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    lib/genalloc.c: In function 'gen_pool_destroy':
    lib/genalloc.c:254:3: error: implicit declaration of function 'vfree'; did you mean 'kfree'?

    Fixes: 6862d2fc8185 ('lib/genalloc.c: use vzalloc_node() to allocate the bitmap')
    Cc: Huang Shijie
    Cc: Andrew Morton
    Cc: Alexey Skidanov
    Signed-off-by: Olof Johansson
    Signed-off-by: Linus Torvalds

    Olof Johansson
     
  • Pull trivial vfs updates from Al Viro:
    "A few cleanups + Neil's namespace_unlock() optimization"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    exec: make prepare_bprm_creds static
    genheaders: %-s had been there since v6; %-*s - since v7
    VFS: use synchronize_rcu_expedited() in namespace_unlock()
    iov_iter: reduce code duplication

    Linus Torvalds
     
  • Merge more updates from Andrew Morton:

    - procfs updates

    - various misc bits

    - lib/ updates

    - epoll updates

    - autofs

    - fatfs

    - a few more MM bits

    * emailed patches from Andrew Morton : (58 commits)
    mm/page_io.c: fix polled swap page in
    checkpatch: add Co-developed-by to signature tags
    docs: fix Co-Developed-by docs
    drivers/base/platform.c: kmemleak ignore a known leak
    fs: don't open code lru_to_page()
    fs/: remove caller signal_pending branch predictions
    mm/: remove caller signal_pending branch predictions
    arch/arc/mm/fault.c: remove caller signal_pending_branch predictions
    kernel/sched/: remove caller signal_pending branch predictions
    kernel/locking/mutex.c: remove caller signal_pending branch predictions
    mm: select HAVE_MOVE_PMD on x86 for faster mremap
    mm: speed up mremap by 20x on large regions
    mm: treewide: remove unused address argument from pte_alloc functions
    initramfs: cleanup incomplete rootfs
    scripts/gdb: fix lx-version string output
    kernel/kcov.c: mark write_comp_data() as notrace
    kernel/sysctl: add panic_print into sysctl
    panic: add options to print system info when panic happens
    bfs: extra sanity checking and static inode bitmap
    exec: separate MM_ANONPAGES and RLIMIT_STACK accounting
    ...

    Linus Torvalds
     

05 Jan, 2019

4 commits

  • Some devices may have big memory on chip, such as over 1G. In some
    cases, the nbytes maybe bigger then 4M which is the bounday of the
    memory buddy system (4K default).

    So use vzalloc_node() to allocate the bitmap. Also use vfree to free
    it.

    Link: http://lkml.kernel.org/r/20181225015701.6289-1-sjhuang@iluvatar.ai
    Signed-off-by: Huang Shijie
    Reviewed-by: Andrew Morton
    Cc: Alexey Skidanov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     
  • Contrary to other tests, test_find_next_and_bit() test uses tab
    formatting in output and get_cycles() instead of ktime_get().
    get_cycles() is not supported by some arches, so ktime_get() fits better
    in generic code.

    Fix it and minor style issues, so the output looks like this:

    Start testing find_bit() with random-filled bitmap
    find_next_bit: 7142816 ns, 163282 iterations
    find_next_zero_bit: 8545712 ns, 164399 iterations
    find_last_bit: 6332032 ns, 163282 iterations
    find_first_bit: 20509424 ns, 16606 iterations
    find_next_and_bit: 4060016 ns, 73424 iterations

    Start testing find_bit() with sparse bitmap
    find_next_bit: 55984 ns, 656 iterations
    find_next_zero_bit: 19197536 ns, 327025 iterations
    find_last_bit: 65088 ns, 656 iterations
    find_first_bit: 5923712 ns, 656 iterations
    find_next_and_bit: 29088 ns, 1 iterations

    Link: http://lkml.kernel.org/r/20181123174803.10916-1-ynorov@caviumnetworks.com
    Signed-off-by: Yury Norov
    Reviewed-by: Andrew Morton
    Cc: "Norov, Yuri"
    Cc: Clement Courbet
    Cc: Geert Uytterhoeven
    Cc: Alexey Dobriyan
    Cc: Matthew Wilcox
    Cc: Rasmus Villemoes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yury Norov
     
  • gen_pool_alloc_algo() uses different allocation functions implementing
    different allocation algorithms. With gen_pool_first_fit_align()
    allocation function, the returned address should be aligned on the
    requested boundary.

    If chunk start address isn't aligned on the requested boundary, the
    returned address isn't aligned too. The only way to get properly
    aligned address is to initialize the pool with chunks aligned on the
    requested boundary. If want to have an ability to allocate buffers
    aligned on different boundaries (for example, 4K, 1MB, ...), the chunk
    start address should be aligned on the max possible alignment.

    This happens because gen_pool_first_fit_align() looks for properly
    aligned memory block without taking into account the chunk start address
    alignment.

    To fix this, we provide chunk start address to
    gen_pool_first_fit_align() and change its implementation such that it
    starts looking for properly aligned block with appropriate offset
    (exactly as is done in CMA).

    Link: https://lkml.kernel.org/lkml/a170cf65-6884-3592-1de9-4c235888cc8a@intel.com
    Link: http://lkml.kernel.org/r/1541690953-4623-1-git-send-email-alexey.skidanov@intel.com
    Signed-off-by: Alexey Skidanov
    Reviewed-by: Andrew Morton
    Cc: Logan Gunthorpe
    Cc: Daniel Mentz
    Cc: Mathieu Desnoyers
    Cc: Laura Abbott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Skidanov
     
  • Originally, the rule used to be that you'd have to do access_ok()
    separately, and then user_access_begin() before actually doing the
    direct (optimized) user access.

    But experience has shown that people then decide not to do access_ok()
    at all, and instead rely on it being implied by other operations or
    similar. Which makes it very hard to verify that the access has
    actually been range-checked.

    If you use the unsafe direct user accesses, hardware features (either
    SMAP - Supervisor Mode Access Protection - on x86, or PAN - Privileged
    Access Never - on ARM) do force you to use user_access_begin(). But
    nothing really forces the range check.

    By putting the range check into user_access_begin(), we actually force
    people to do the right thing (tm), and the range check vill be visible
    near the actual accesses. We have way too long a history of people
    trying to avoid them.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

04 Jan, 2019

1 commit

  • Nobody has actually used the type (VERIFY_READ vs VERIFY_WRITE) argument
    of the user address range verification function since we got rid of the
    old racy i386-only code to walk page tables by hand.

    It existed because the original 80386 would not honor the write protect
    bit when in kernel mode, so you had to do COW by hand before doing any
    user access. But we haven't supported that in a long time, and these
    days the 'type' argument is a purely historical artifact.

    A discussion about extending 'user_access_begin()' to do the range
    checking resulted this patch, because there is no way we're going to
    move the old VERIFY_xyz interface to that model. And it's best done at
    the end of the merge window when I've done most of my merges, so let's
    just get this done once and for all.

    This patch was mostly done with a sed-script, with manual fix-ups for
    the cases that weren't of the trivial 'access_ok(VERIFY_xyz' form.

    There were a couple of notable cases:

    - csky still had the old "verify_area()" name as an alias.

    - the iter_iov code had magical hardcoded knowledge of the actual
    values of VERIFY_{READ,WRITE} (not that they mattered, since nothing
    really used it)

    - microblaze used the type argument for a debug printout

    but other than those oddities this should be a total no-op patch.

    I tried to fix up all architectures, did fairly extensive grepping for
    access_ok() uses, and the changes are trivial, but I may have missed
    something. Any missed conversion should be trivially fixable, though.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

03 Jan, 2019

2 commits

  • Pull the pending 4.21 changes for md from Shaohua.

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
    md: fix raid10 hang issue caused by barrier
    raid10: refactor common wait code from regular read/write request
    md: remvoe redundant condition check
    lib/raid6: add option to skip algo benchmarking
    lib/raid6: sort algos in rough performance order
    lib/raid6: check for assembler SSSE3 support
    lib/raid6: avoid __attribute_const__ redefinition
    lib/raid6: add missing include for raid6test
    md: remove set but not used variable 'bi_rdev'

    Jens Axboe
     
  • Pull s390 updates from Martin Schwidefsky:

    - A larger update for the zcrypt / AP bus code:
    + Update two inline assemblies in the zcrypt driver to make gcc happy
    + Add a missing reply code for invalid special commands for zcrypt
    + Allow AP device reset to be triggered from user space
    + Split the AP scan function into smaller, more readable functions

    - Updates for vfio-ccw and vfio-ap
    + Add maintainers and reviewer for vfio-ccw
    + Include facility.h in vfio_ap_drv.c to avoid fragile include chain
    + Simplicy vfio-ccw state machine

    - Use the common code version of bust_spinlocks

    - Make use of the DEFINE_SHOW_ATTRIBUTE

    - Fix three incorrect file permissions in the DASD driver

    - Remove bit spin-lock from the PCI interrupt handler

    - Fix GFP_ATOMIC vs GFP_KERNEL in the PCI code

    * tag 's390-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/zcrypt: rework ap scan bus code
    s390/zcrypt: make sysfs reset attribute trigger queue reset
    s390/pci: fix sleeping in atomic during hotplug
    s390/pci: remove bit_lock usage in interrupt handler
    s390/drivers: fix proc/debugfs file permissions
    s390: convert to DEFINE_SHOW_ATTRIBUTE
    MAINTAINERS/vfio-ccw: add Farhan and Eric, make Halil Reviewer
    vfio: ccw: Merge BUSY and BOXED states
    s390: use common bust_spinlocks()
    s390/zcrypt: improve special ap message cmd handling
    s390/ap: rework assembler functions to use unions for in/out register variables
    s390: vfio-ap: include for test_facility()

    Linus Torvalds
     

02 Jan, 2019

1 commit

  • Pull RTC updates from Alexandre Belloni:
    "Subsystem:
    - new %ptR printk format
    - rename core files
    - allow registration of multiple nvmem devices

    New driver:
    - i.MX system controller RTC

    Driver updates:
    - abx80x: handle voltage ioctls, correct binding doc
    - m41t80: correct month in alarm reads
    - pcf85363: add pcf85263 support
    - pcf8523: properly handle battery low flag
    - s3c: limit alarm to one year in the future as ALMYEAR is broken
    - sun6i: rework clock output binding"

    * tag 'rtc-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (54 commits)
    rtc: rename core files
    rtc: nvmem: fix possible use after free
    rtc: add i.MX system controller RTC support
    dt-bindings: fsl: scu: add rtc binding
    rtc: pcf2123: Add Microcrystal rv2123
    rtc: class: reimplement devm_rtc_device_register
    rtc: enforce rtc_timer_init private_data type
    rtc: abx80x: Implement RTC_VL_READ,CLR ioctls
    rtc: pcf85363: Add support for NXP pcf85263 rtc
    dt-bindings: rtc: pcf85363: Document pcf85263 real-time clock
    rtc: pcf8523: don't return invalid date when battery is low
    dt-bindings: rtc: use a generic node name for ds1307
    PM: Switch to use %ptR
    m68k/mac: Switch to use %ptR
    Input: hp_sdc_rtc - Switch to use %ptR
    rtc: tegra: Switch to use %ptR
    rtc: s5m: Switch to use %ptR
    rtc: s3c: Switch to use %ptR
    rtc: rx8025: Switch to use %ptR
    rtc: rx6110: Switch to use %ptR
    ...

    Linus Torvalds
     

01 Jan, 2019

1 commit

  • Pull tracing updates from Steven Rostedt:

    - Rework of the kprobe/uprobe and synthetic events to consolidate all
    the dynamic event code. This will make changes in the future easier.

    - Partial rewrite of the function graph tracing infrastructure. This
    will allow for multiple users of hooking onto functions to get the
    callback (return) of the function. This is the ground work for having
    kprobes and function graph tracer using one code base.

    - Clean up of the histogram code that will facilitate adding more
    features to the histograms in the future.

    - Addition of str_has_prefix() and a few use cases. There currently is
    a similar function strstart() that is used in a few places, but only
    returns a bool and not a length. These instances will be removed in
    the future to use str_has_prefix() instead.

    - A few other various clean ups as well.

    * tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (57 commits)
    tracing: Use the return of str_has_prefix() to remove open coded numbers
    tracing: Have the historgram use the result of str_has_prefix() for len of prefix
    tracing: Use str_has_prefix() instead of using fixed sizes
    tracing: Use str_has_prefix() helper for histogram code
    string.h: Add str_has_prefix() helper function
    tracing: Make function ‘ftrace_exports’ static
    tracing: Simplify printf'ing in seq_print_sym
    tracing: Avoid -Wformat-nonliteral warning
    tracing: Merge seq_print_sym_short() and seq_print_sym_offset()
    tracing: Add hist trigger comments for variable-related fields
    tracing: Remove hist trigger synth_var_refs
    tracing: Use hist trigger's var_ref array to destroy var_refs
    tracing: Remove open-coding of hist trigger var_ref management
    tracing: Use var_refs[] for hist trigger reference checking
    tracing: Change strlen to sizeof for hist trigger static strings
    tracing: Remove unnecessary hist trigger struct field
    tracing: Fix ftrace_graph_get_ret_stack() to use task and not current
    seq_buf: Use size_t for len in seq_buf_puts()
    seq_buf: Make seq_buf_puts() null-terminate the buffer
    arm64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack
    ...

    Linus Torvalds
     

30 Dec, 2018

2 commits

  • Pull Kconfig updates from Masahiro Yamada:

    - support -y option for merge_config.sh to avoid downgrading =y to =m

    - remove S_OTHER symbol type, and touch include/config/*.h files correctly

    - fix file name and line number in lexer warnings

    - fix memory leak when EOF is encountered in quotation

    - resolve all shift/reduce conflicts of the parser

    - warn no new line at end of file

    - make 'source' statement more strict to take only string literal

    - rewrite the lexer and remove the keyword lookup table

    - convert to SPDX License Identifier

    - compile C files independently instead of including them from zconf.y

    - fix various warnings of gconfig

    - misc cleanups

    * tag 'kconfig-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (39 commits)
    kconfig: surround dbg_sym_flags with #ifdef DEBUG to fix gconf warning
    kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings
    kconfig: add static qualifiers to fix gconf warnings
    kconfig: split the lexer out of zconf.y
    kconfig: split some C files out of zconf.y
    kconfig: convert to SPDX License Identifier
    kconfig: remove keyword lookup table entirely
    kconfig: update current_pos in the second lexer
    kconfig: switch to ASSIGN_VAL state in the second lexer
    kconfig: stop associating kconf_id with yylval
    kconfig: refactor end token rules
    kconfig: stop supporting '.' and '/' in unquoted words
    treewide: surround Kconfig file paths with double quotes
    microblaze: surround string default in Kconfig with double quotes
    kconfig: use T_WORD instead of T_VARIABLE for variables
    kconfig: use specific tokens instead of T_ASSIGN for assignments
    kconfig: refactor scanning and parsing "option" properties
    kconfig: use distinct tokens for type and default properties
    kconfig: remove redundant token defines
    kconfig: rename depends_list to comment_option_list
    ...

    Linus Torvalds
     
  • gen_crc64table requires linux include files to be installed in
    /usr/include/linux. This is a new requrement so hosts that could
    previously build the kernel, now cannot.

    gen_crc64table makes this requirement by including , but
    nothing from that header is actaully used.

    So remove the #include, so that the linux headers no longer need to be
    installed.

    Fixes: feba04fd2cf8 ("lib: add crc64 calculation routines")
    Signed-off-by: NeilBrown
    Acked-by: Coly Li
    Signed-off-by: Linus Torvalds

    NeilBrown
     

29 Dec, 2018

9 commits

  • Pull driver core updates from Greg KH:
    "Here is the "big" set of driver core patches for 4.21-rc1.

    It's not really big, just a number of small changes for some reported
    issues, some documentation updates to hopefully make it harder for
    people to abuse the driver model, and some other minor cleanups.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'driver-core-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    mm, memory_hotplug: update a comment in unregister_memory()
    component: convert to DEFINE_SHOW_ATTRIBUTE
    sysfs: Disable lockdep for driver bind/unbind files
    driver core: Add missing dev->bus->need_parent_lock checks
    kobject: return error code if writing /sys/.../uevent fails
    driver core: Move async_synchronize_full call
    driver core: platform: Respect return code of platform_device_register_full()
    kref/kobject: Improve documentation
    drivers/base/memory.c: Use DEVICE_ATTR_RO and friends
    driver core: Replace simple_strto{l,ul} by kstrtou{l,ul}
    kernfs: Improve kernfs_notify() poll notification latency
    kobject: Fix warnings in lib/kobject_uevent.c
    kobject: drop unnecessary cast "%llu" for u64
    driver core: fix comments for device_block_probing()
    driver core: Replace simple_strtol by kstrtoint

    Linus Torvalds
     
  • Pull tty/serial driver updates from Greg KH:
    "Here is the large TTY/Serial driver set of patches for 4.21-rc1.

    A number of small serial driver changes along with some good tty core
    fixes for long-reported issues with locking. There is also a new
    console font added to the tree, for high-res screens, so that should
    be helpful for many.

    The last patch in the series is a revert of an older one in the tree,
    it came late but it resolves a reported issue that linux-next was
    having for some people.

    Full details are in the shortlog, and all of these, with the exception
    of the revert, have been in linux-next for a while with no reported
    issues"

    * tag 'tty-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (85 commits)
    Revert "serial: 8250: Default SERIAL_OF_PLATFORM to SERIAL_8250"
    serial: sccnxp: Allow to use non-standard baud rates
    serial: sccnxp: Adds a delay between sequential read/write cycles
    tty: serial: qcom_geni_serial: Fix UART hang
    tty: serial: qcom_geni_serial: Fix wrap around of TX buffer
    serial: max310x: Fix tx_empty() callback
    dt-bindings: serial: sh-sci: Document r8a774c0 bindings
    dt-bindings: serial: sh-sci: Document r8a774a1 bindings
    Fonts: New Terminus large console font
    dt-bindings: serial: lpuart: add imx8qxp compatible string
    serial: uartps: Fix interrupt mask issue to handle the RX interrupts properly
    serial: uartps: Fix error path when alloc failed
    serial: uartps: Check if the device is a console
    serial: uartps: Add the device_init_wakeup
    tty: serial: samsung: Increase maximum baudrate
    tty: serial: samsung: Properly set flags in autoCTS mode
    tty: Use of_node_name_{eq,prefix} for node name comparisons
    tty/serial: do not free trasnmit buffer page under port lock
    serial: 8250: Rate limit serial port rx interrupts during input overruns
    dt-bindings: serial: 8250: Add rate limit for serial port input overruns
    ...

    Linus Torvalds
     
  • Merge misc updates from Andrew Morton:

    - large KASAN update to use arm's "software tag-based mode"

    - a few misc things

    - sh updates

    - ocfs2 updates

    - just about all of MM

    * emailed patches from Andrew Morton : (167 commits)
    kernel/fork.c: mark 'stack_vm_area' with __maybe_unused
    memcg, oom: notify on oom killer invocation from the charge path
    mm, swap: fix swapoff with KSM pages
    include/linux/gfp.h: fix typo
    mm/hmm: fix memremap.h, move dev_page_fault_t callback to hmm
    hugetlbfs: Use i_mmap_rwsem to fix page fault/truncate race
    hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization
    memory_hotplug: add missing newlines to debugging output
    mm: remove __hugepage_set_anon_rmap()
    include/linux/vmstat.h: remove unused page state adjustment macro
    mm/page_alloc.c: allow error injection
    mm: migrate: drop unused argument of migrate_page_move_mapping()
    blkdev: avoid migration stalls for blkdev pages
    mm: migrate: provide buffer_migrate_page_norefs()
    mm: migrate: move migrate_page_lock_buffers()
    mm: migrate: lock buffers before migrate_page_move_mapping()
    mm: migration: factor out code to compute expected number of page references
    mm, page_alloc: enable pcpu_drain with zone capability
    kmemleak: add config to select auto scan
    mm/page_alloc.c: don't call kasan_free_pages() at deferred mem init
    ...

    Linus Torvalds
     
  • Pull DMA mapping updates from Christoph Hellwig:
    "A huge update this time, but a lot of that is just consolidating or
    removing code:

    - provide a common DMA_MAPPING_ERROR definition and avoid indirect
    calls for dma_map_* error checking

    - use direct calls for the DMA direct mapping case, avoiding huge
    retpoline overhead for high performance workloads

    - merge the swiotlb dma_map_ops into dma-direct

    - provide a generic remapping DMA consistent allocator for
    architectures that have devices that perform DMA that is not cache
    coherent. Based on the existing arm64 implementation and also used
    for csky now.

    - improve the dma-debug infrastructure, including dynamic allocation
    of entries (Robin Murphy)

    - default to providing chaining scatterlist everywhere, with opt-outs
    for the few architectures (alpha, parisc, most arm32 variants) that
    can't cope with it

    - misc sparc32 dma-related cleanups

    - remove the dma_mark_clean arch hook used by swiotlb on ia64 and
    replace it with the generic noncoherent infrastructure

    - fix the return type of dma_set_max_seg_size (Niklas Söderlund)

    - move the dummy dma ops for not DMA capable devices from arm64 to
    common code (Robin Murphy)

    - ensure dma_alloc_coherent returns zeroed memory to avoid kernel
    data leaks through userspace. We already did this for most common
    architectures, but this ensures we do it everywhere.
    dma_zalloc_coherent has been deprecated and can hopefully be
    removed after -rc1 with a coccinelle script"

    * tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping: (73 commits)
    dma-mapping: fix inverted logic in dma_supported
    dma-mapping: deprecate dma_zalloc_coherent
    dma-mapping: zero memory returned from dma_alloc_*
    sparc/iommu: fix ->map_sg return value
    sparc/io-unit: fix ->map_sg return value
    arm64: default to the direct mapping in get_arch_dma_ops
    PCI: Remove unused attr variable in pci_dma_configure
    ia64: only select ARCH_HAS_DMA_COHERENT_TO_PFN if swiotlb is enabled
    dma-mapping: bypass indirect calls for dma-direct
    vmd: use the proper dma_* APIs instead of direct methods calls
    dma-direct: merge swiotlb_dma_ops into the dma_direct code
    dma-direct: use dma_direct_map_page to implement dma_direct_map_sg
    dma-direct: improve addressability error reporting
    swiotlb: remove dma_mark_clean
    swiotlb: remove SWIOTLB_MAP_ERROR
    ACPI / scan: Refactor _CCA enforcement
    dma-mapping: factor out dummy DMA ops
    dma-mapping: always build the direct mapping code
    dma-mapping: move dma_cache_sync out of line
    dma-mapping: move various slow path functions out of line
    ...

    Linus Torvalds
     
  • Pull block updates from Jens Axboe:
    "This is the main pull request for block/storage for 4.21.

    Larger than usual, it was a busy round with lots of goodies queued up.
    Most notable is the removal of the old IO stack, which has been a long
    time coming. No new features for a while, everything coming in this
    week has all been fixes for things that were previously merged.

    This contains:

    - Use atomic counters instead of semaphores for mtip32xx (Arnd)

    - Cleanup of the mtip32xx request setup (Christoph)

    - Fix for circular locking dependency in loop (Jan, Tetsuo)

    - bcache (Coly, Guoju, Shenghui)
    * Optimizations for writeback caching
    * Various fixes and improvements

    - nvme (Chaitanya, Christoph, Sagi, Jay, me, Keith)
    * host and target support for NVMe over TCP
    * Error log page support
    * Support for separate read/write/poll queues
    * Much improved polling
    * discard OOM fallback
    * Tracepoint improvements

    - lightnvm (Hans, Hua, Igor, Matias, Javier)
    * Igor added packed metadata to pblk. Now drives without metadata
    per LBA can be used as well.
    * Fix from Geert on uninitialized value on chunk metadata reads.
    * Fixes from Hans and Javier to pblk recovery and write path.
    * Fix from Hua Su to fix a race condition in the pblk recovery
    code.
    * Scan optimization added to pblk recovery from Zhoujie.
    * Small geometry cleanup from me.

    - Conversion of the last few drivers that used the legacy path to
    blk-mq (me)

    - Removal of legacy IO path in SCSI (me, Christoph)

    - Removal of legacy IO stack and schedulers (me)

    - Support for much better polling, now without interrupts at all.
    blk-mq adds support for multiple queue maps, which enables us to
    have a map per type. This in turn enables nvme to have separate
    completion queues for polling, which can then be interrupt-less.
    Also means we're ready for async polled IO, which is hopefully
    coming in the next release.

    - Killing of (now) unused block exports (Christoph)

    - Unification of the blk-rq-qos and blk-wbt wait handling (Josef)

    - Support for zoned testing with null_blk (Masato)

    - sx8 conversion to per-host tag sets (Christoph)

    - IO priority improvements (Damien)

    - mq-deadline zoned fix (Damien)

    - Ref count blkcg series (Dennis)

    - Lots of blk-mq improvements and speedups (me)

    - sbitmap scalability improvements (me)

    - Make core inflight IO accounting per-cpu (Mikulas)

    - Export timeout setting in sysfs (Weiping)

    - Cleanup the direct issue path (Jianchao)

    - Export blk-wbt internals in block debugfs for easier debugging
    (Ming)

    - Lots of other fixes and improvements"

    * tag 'for-4.21/block-20181221' of git://git.kernel.dk/linux-block: (364 commits)
    kyber: use sbitmap add_wait_queue/list_del wait helpers
    sbitmap: add helpers for add/del wait queue handling
    block: save irq state in blkg_lookup_create()
    dm: don't reuse bio for flushes
    nvme-pci: trace SQ status on completions
    nvme-rdma: implement polling queue map
    nvme-fabrics: allow user to pass in nr_poll_queues
    nvme-fabrics: allow nvmf_connect_io_queue to poll
    nvme-core: optionally poll sync commands
    block: make request_to_qc_t public
    nvme-tcp: fix spelling mistake "attepmpt" -> "attempt"
    nvme-tcp: fix endianess annotations
    nvmet-tcp: fix endianess annotations
    nvme-pci: refactor nvme_poll_irqdisable to make sparse happy
    nvme-pci: only set nr_maps to 2 if poll queues are supported
    nvmet: use a macro for default error location
    nvmet: fix comparison of a u16 with -1
    blk-mq: enable IO poll if .nr_queues of type poll > 0
    blk-mq: change blk_mq_queue_busy() to blk_mq_queue_inflight()
    blk-mq: skip zero-queue maps in blk_mq_map_swqueue
    ...

    Linus Torvalds
     
  • Kmemleak scan can be cpu intensive and can stall user tasks at times. To
    prevent this, add config DEBUG_KMEMLEAK_AUTO_SCAN to enable/disable auto
    scan on boot up. Also protect first_run with DEBUG_KMEMLEAK_AUTO_SCAN as
    this is meant for only first automatic scan.

    Link: http://lkml.kernel.org/r/1540231723-7087-1-git-send-email-prpatel@nvidia.com
    Signed-off-by: Sri Krishna chowdary
    Signed-off-by: Sachin Nikam
    Signed-off-by: Prateek
    Reviewed-by: Catalin Marinas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sri Krishna chowdary
     
  • Whilst no architectures actually enable support for huge p4d mappings in
    the vmap area, the code that is implemented should be using
    break-before-make, as we do for pud and pmd huge entries.

    Link: http://lkml.kernel.org/r/1544120495-17438-6-git-send-email-will.deacon@arm.com
    Signed-off-by: Will Deacon
    Reviewed-by: Toshi Kani
    Cc: Chintan Pandya
    Cc: Toshi Kani
    Cc: Thomas Gleixner
    Cc: Michal Hocko
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Sean Christopherson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • The current ioremap() code uses a phys_addr variable at each level of page
    table, which is confusingly offset by subtracting the base virtual address
    being mapped so that adding the current virtual address back on when
    iterating through the page table entries gives back the corresponding
    physical address.

    This is fairly confusing and results in all users of phys_addr having to
    add the current virtual address back on. Instead, this patch just updates
    phys_addr when iterating over the page table entries, ensuring that it's
    always up-to-date and doesn't require explicit offsetting.

    Link: http://lkml.kernel.org/r/1544120495-17438-5-git-send-email-will.deacon@arm.com
    Signed-off-by: Will Deacon
    Tested-by: Sean Christopherson
    Reviewed-by: Sean Christopherson
    Cc: Chintan Pandya
    Cc: Toshi Kani
    Cc: Thomas Gleixner
    Cc: Michal Hocko
    Cc: Sean Christopherson
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • The recently merged API for ensuring break-before-make on page-table
    entries when installing huge mappings in the vmalloc/ioremap region is
    fairly counter-intuitive, resulting in the arch freeing functions (e.g.
    pmd_free_pte_page()) being called even on entries that aren't present.
    This resulted in a minor bug in the arm64 implementation, giving rise to
    spurious VM_WARN messages.

    This patch moves the pXd_present() checks out into the core code,
    refactoring the callsites at the same time so that we avoid the complex
    conjunctions when determining whether or not we can put down a huge
    mapping.

    Link: http://lkml.kernel.org/r/1544120495-17438-2-git-send-email-will.deacon@arm.com
    Signed-off-by: Will Deacon
    Reviewed-by: Toshi Kani
    Suggested-by: Linus Torvalds
    Cc: Chintan Pandya
    Cc: Toshi Kani
    Cc: Thomas Gleixner
    Cc: Michal Hocko
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Sean Christopherson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon