1. 09 2月, 2020 1 次提交
  2. 07 2月, 2020 3 次提交
    • P
      io_uring: fix deferred req iovec leak · 1e95081c
      Pavel Begunkov 提交于
      After defer, a request will be prepared, that includes allocating iovec
      if needed, and then submitted through io_wq_submit_work() but not custom
      handler (e.g. io_rw_async()/io_sendrecv_async()). However, it'll leak
      iovec, as it's in io-wq and the code goes as follows:
      
      io_read() {
      	if (!io_wq_current_is_worker())
      		kfree(iovec);
      }
      
      Put all deallocation logic in io_{read,write,send,recv}(), which will
      leave the memory, if going async with -EAGAIN.
      
      It also fixes a leak after failed io_alloc_async_ctx() in
      io_{recv,send}_msg().
      
      Cc: stable@vger.kernel.org # 5.5
      Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      1e95081c
    • R
      io_uring: fix 1-bit bitfields to be unsigned · e1d85334
      Randy Dunlap 提交于
      Make bitfields of size 1 bit be unsigned (since there is no room
      for the sign bit).
      This clears up the sparse warnings:
      
        CHECK   ../fs/io_uring.c
      ../fs/io_uring.c:207:50: error: dubious one-bit signed bitfield
      ../fs/io_uring.c:208:55: error: dubious one-bit signed bitfield
      ../fs/io_uring.c:209:63: error: dubious one-bit signed bitfield
      ../fs/io_uring.c:210:54: error: dubious one-bit signed bitfield
      ../fs/io_uring.c:211:57: error: dubious one-bit signed bitfield
      
      Found by sight and then verified with sparse.
      
      Fixes: 69b3e546 ("io_uring: change io_ring_ctx bool fields into bit fields")
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: io-uring@vger.kernel.org
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      e1d85334
    • P
      io_uring: get rid of delayed mm check · 1cb1edb2
      Pavel Begunkov 提交于
      Fail fast if can't grab mm, so past that requests always have an mm
      when required. This allows us to remove req->user altogether.
      Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      1cb1edb2
  3. 06 2月, 2020 23 次提交
    • L
      Merge tag 'ceph-for-5.6-rc1' of https://github.com/ceph/ceph-client · 4c46bef2
      Linus Torvalds 提交于
      Pull ceph fixes from Ilya Dryomov:
      
       - a set of patches that fixes various corner cases in mount and umount
         code (Xiubo Li). This has to do with choosing an MDS, distinguishing
         between laggy and down MDSes and parsing the server path.
      
       - inode initialization fixes (Jeff Layton). The one included here
         mostly concerns things like open_by_handle() and there is another one
         that will come through Al.
      
       - copy_file_range() now uses the new copy-from2 op (Luis Henriques).
         The existing copy-from op turned out to be infeasible for generic
         filesystem use; we disable the copy offload if OSDs don't support
         copy-from2.
      
       - a patch to link "rbd" and "block" devices together in sysfs (Hannes
         Reinecke)
      
      ... and a smattering of cleanups from Xiubo, Jeff and Chengguang.
      
      * tag 'ceph-for-5.6-rc1' of https://github.com/ceph/ceph-client: (25 commits)
        rbd: set the 'device' link in sysfs
        ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c
        ceph: print name of xattr in __ceph_{get,set}xattr() douts
        ceph: print r_direct_hash in hex in __choose_mds() dout
        ceph: use copy-from2 op in copy_file_range
        ceph: close holes in structs ceph_mds_session and ceph_mds_request
        rbd: work around -Wuninitialized warning
        ceph: allocate the correct amount of extra bytes for the session features
        ceph: rename get_session and switch to use ceph_get_mds_session
        ceph: remove the extra slashes in the server path
        ceph: add possible_max_rank and make the code more readable
        ceph: print dentry offset in hex and fix xattr_version type
        ceph: only touch the caps which have the subset mask requested
        ceph: don't clear I_NEW until inode metadata is fully populated
        ceph: retry the same mds later after the new session is opened
        ceph: check availability of mds cluster on mount after wait timeout
        ceph: keep the session state until it is released
        ceph: add __send_request helper
        ceph: ensure we have a new cap before continuing in fill_inode
        ceph: drop unused ttl_from parameter from fill_inode
        ...
      4c46bef2
    • L
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 5b211154
      Linus Torvalds 提交于
      Pull m68knommu updates from Greg Ungerer:
       "A couple of changes:
      
         - remove old CONFIG options from the m68knommu defconfig files
      
         - fix a warning in the m68k non-MMU get_user() macro"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68knommu: fix memcpy() out of bounds warning in get_user()
        m68k: configs: Cleanup old Kconfig IO scheduler options
      5b211154
    • L
      Merge tag 'Smack-for-5.6' of git://github.com/cschaufler/smack-next · 85e55296
      Linus Torvalds 提交于
      Pull smack fix from Casey Schaufler:
       "One fix for an obscure error found using an old version of ping(1)
        that did not use IPv6 sockets in the documented way"
      
      * tag 'Smack-for-5.6' of git://github.com/cschaufler/smack-next:
        broken ping to ipv6 linklocal addresses on debian buster
      85e55296
    • L
      Merge tag 'xfs-5.6-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 99be3f60
      Linus Torvalds 提交于
      Pull moar xfs updates from Darrick Wong:
       "This contains the buffer error code refactoring I mentioned last week,
        now that it has had extra time to complete the full xfs fuzz testing
        suite to make sure there aren't any obvious new bugs"
      
      * tag 'xfs-5.6-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix xfs_buf_ioerror_alert location reporting
        xfs: remove unnecessary null pointer checks from _read_agf callers
        xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers
        xfs: remove the xfs_btree_get_buf[ls] functions
        xfs: make xfs_trans_get_buf return an error code
        xfs: make xfs_trans_get_buf_map return an error code
        xfs: make xfs_buf_read return an error code
        xfs: make xfs_buf_get_uncached return an error code
        xfs: make xfs_buf_get return an error code
        xfs: make xfs_buf_read_map return an error code
        xfs: make xfs_buf_get_map return an error code
        xfs: make xfs_buf_alloc return an error code
      99be3f60
    • L
      Merge tag 'trace-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · e310396b
      Linus Torvalds 提交于
      Pull tracing updates from Steven Rostedt:
      
       - Added new "bootconfig".
      
         This looks for a file appended to initrd to add boot config options,
         and has been discussed thoroughly at Linux Plumbers.
      
         Very useful for adding kprobes at bootup.
      
         Only enabled if "bootconfig" is on the real kernel command line.
      
       - Created dynamic event creation.
      
         Merges common code between creating synthetic events and kprobe
         events.
      
       - Rename perf "ring_buffer" structure to "perf_buffer"
      
       - Rename ftrace "ring_buffer" structure to "trace_buffer"
      
         Had to rename existing "trace_buffer" to "array_buffer"
      
       - Allow trace_printk() to work withing (some) tracing code.
      
       - Sort of tracing configs to be a little better organized
      
       - Fixed bug where ftrace_graph hash was not being protected properly
      
       - Various other small fixes and clean ups
      
      * tag 'trace-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (88 commits)
        bootconfig: Show the number of nodes on boot message
        tools/bootconfig: Show the number of bootconfig nodes
        bootconfig: Add more parse error messages
        bootconfig: Use bootconfig instead of boot config
        ftrace: Protect ftrace_graph_hash with ftrace_sync
        ftrace: Add comment to why rcu_dereference_sched() is open coded
        tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu
        tracing: Annotate ftrace_graph_hash pointer with __rcu
        bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline
        tracing: Use seq_buf for building dynevent_cmd string
        tracing: Remove useless code in dynevent_arg_pair_add()
        tracing: Remove check_arg() callbacks from dynevent args
        tracing: Consolidate some synth_event_trace code
        tracing: Fix now invalid var_ref_vals assumption in trace action
        tracing: Change trace_boot to use synth_event interface
        tracing: Move tracing selftests to bottom of menu
        tracing: Move mmio tracer config up with the other tracers
        tracing: Move tracing test module configs together
        tracing: Move all function tracing configs together
        tracing: Documentation for in-kernel synthetic event API
        ...
      e310396b
    • L
      Merge tag 'io_uring-5.6-2020-02-05' of git://git.kernel.dk/linux-block · c1ef57a3
      Linus Torvalds 提交于
      Pull io_uring updates from Jens Axboe:
       "Some later fixes for io_uring:
      
         - Small cleanup series from Pavel
      
         - Belt and suspenders build time check of sqe size and layout
           (Stefan)
      
         - Addition of ->show_fdinfo() on request of Jann Horn, to aid in
           understanding mapped personalities
      
         - eventfd recursion/deadlock fix, for both io_uring and aio
      
         - Fixup for send/recv handling
      
         - Fixup for double deferral of read/write request
      
         - Fix for potential double completion event for close request
      
         - Adjust fadvise advice async/inline behavior
      
         - Fix for shutdown hang with SQPOLL thread
      
         - Fix for potential use-after-free of fixed file table"
      
      * tag 'io_uring-5.6-2020-02-05' of git://git.kernel.dk/linux-block:
        io_uring: cleanup fixed file data table references
        io_uring: spin for sq thread to idle on shutdown
        aio: prevent potential eventfd recursion on poll
        io_uring: put the flag changing code in the same spot
        io_uring: iterate req cache backwards
        io_uring: punt even fadvise() WILLNEED to async context
        io_uring: fix sporadic double CQE entry for close
        io_uring: remove extra ->file check
        io_uring: don't map read/write iovec potentially twice
        io_uring: use the proper helpers for io_send/recv
        io_uring: prevent potential eventfd recursion on poll
        eventfd: track eventfd_signal() recursion depth
        io_uring: add BUILD_BUG_ON() to assert the layout of struct io_uring_sqe
        io_uring: add ->show_fdinfo() for the io_uring file descriptor
      c1ef57a3
    • L
      Merge tag 'block-5.6-2020-02-05' of git://git.kernel.dk/linux-block · ed535f2c
      Linus Torvalds 提交于
      Pull more block updates from Jens Axboe:
       "Some later arrivals, but all fixes at this point:
      
         - bcache fix series (Coly)
      
         - Series of BFQ fixes (Paolo)
      
         - NVMe pull request from Keith with a few minor NVMe fixes
      
         - Various little tweaks"
      
      * tag 'block-5.6-2020-02-05' of git://git.kernel.dk/linux-block: (23 commits)
        nvmet: update AEN list and array at one place
        nvmet: Fix controller use after free
        nvmet: Fix error print message at nvmet_install_queue function
        brd: check and limit max_part par
        nvme-pci: remove nvmeq->tags
        nvmet: fix dsm failure when payload does not match sgl descriptor
        nvmet: Pass lockdep expression to RCU lists
        block, bfq: clarify the goal of bfq_split_bfqq()
        block, bfq: get a ref to a group when adding it to a service tree
        block, bfq: remove ifdefs from around gets/puts of bfq groups
        block, bfq: extend incomplete name of field on_st
        block, bfq: get extra ref to prevent a queue from being freed during a group move
        block, bfq: do not insert oom queue into position tree
        block, bfq: do not plug I/O for bfq_queues with no proc refs
        bcache: check return value of prio_read()
        bcache: fix incorrect data type usage in btree_flush_write()
        bcache: add readahead cache policy options via sysfs interface
        bcache: explicity type cast in bset_bkey_last()
        bcache: fix memory corruption in bch_cache_accounting_clear()
        xen/blkfront: limit allocated memory size to actual use case
        ...
      ed535f2c
    • L
      Merge tag 'libata-5.6-2020-02-05' of git://git.kernel.dk/linux-block · 03840663
      Linus Torvalds 提交于
      Pull libata updates from Jens Axboe:
      
       - Add a Sandisk CF card to supported pata_pcmcia list (Christian)
      
       - Move pata_arasan_cf away from legacy API (Peter)
      
       - Ensure ahci DMA/ints are shut down on shutdown (Prabhakar)
      
      * tag 'libata-5.6-2020-02-05' of git://git.kernel.dk/linux-block:
        ata: pata_arasan_cf: Use dma_request_chan() instead dma_request_slave_channel()
        ata: ahci: Add shutdown to freeze hardware resources of ahci
        pata_pcmia: add SanDisk High (>8G) CF card to supported list
      03840663
    • M
    • M
      tools/bootconfig: Show the number of bootconfig nodes · 0f0d0a77
      Masami Hiramatsu 提交于
      Show the number of bootconfig nodes when applying new bootconfig to
      initrd.
      
      Since there are limitations of bootconfig not only in its filesize,
      but also the number of nodes, the number should be shown when applying
      so that user can get the feeling of scale of current bootconfig.
      
      Link: http://lkml.kernel.org/r/158091061337.27924.10886706631693823982.stgit@devnote2Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      0f0d0a77
    • M
      bootconfig: Add more parse error messages · 597c0e3b
      Masami Hiramatsu 提交于
      Add more error messages for following cases.
       - Exceeding max number of nodes
       - Config tree data is empty (e.g. comment only)
       - Config data is empty or exceeding max size
       - bootconfig is already initialized
      
      Link: http://lkml.kernel.org/r/158091060401.27924.9024818742827122764.stgit@devnote2Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      597c0e3b
    • M
      bootconfig: Use bootconfig instead of boot config · e241d14a
      Masami Hiramatsu 提交于
      Use "bootconfig" (1 word) instead of "boot config" (2 words)
      in the boot message.
      
      Link: http://lkml.kernel.org/r/158091059459.27924.14414336187441539879.stgit@devnote2Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      e241d14a
    • S
      ftrace: Protect ftrace_graph_hash with ftrace_sync · 54a16ff6
      Steven Rostedt (VMware) 提交于
      As function_graph tracer can run when RCU is not "watching", it can not be
      protected by synchronize_rcu() it requires running a task on each CPU before
      it can be freed. Calling schedule_on_each_cpu(ftrace_sync) needs to be used.
      
      Link: https://lore.kernel.org/r/20200205131110.GT2935@paulmck-ThinkPad-P72
      
      Cc: stable@vger.kernel.org
      Fixes: b9b0c831 ("ftrace: Convert graph filter to use hash tables")
      Reported-by: N"Paul E. McKenney" <paulmck@kernel.org>
      Reviewed-by: NJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      54a16ff6
    • C
      broken ping to ipv6 linklocal addresses on debian buster · 87fbfffc
      Casey Schaufler 提交于
      I am seeing ping failures to IPv6 linklocal addresses with Debian
      buster. Easiest example to reproduce is:
      
      $ ping -c1 -w1 ff02::1%eth1
      connect: Invalid argument
      
      $ ping -c1 -w1 ff02::1%eth1
      PING ff02::01%eth1(ff02::1%eth1) 56 data bytes
      64 bytes from fe80::e0:f9ff:fe0c:37%eth1: icmp_seq=1 ttl=64 time=0.059 ms
      
      git bisect traced the failure to
      commit b9ef5513 ("smack: Check address length before reading address family")
      
      Arguably ping is being stupid since the buster version is not setting
      the address family properly (ping on stretch for example does):
      
      $ strace -e connect ping6 -c1 -w1 ff02::1%eth1
      connect(5, {sa_family=AF_UNSPEC,
      sa_data="\4\1\0\0\0\0\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\1\3\0\0\0"}, 28)
      = -1 EINVAL (Invalid argument)
      
      but the command works fine on kernels prior to this commit, so this is
      breakage which goes against the Linux paradigm of "don't break userspace"
      
      Cc: stable@vger.kernel.org
      Reported-by: NDavid Ahern <dsahern@gmail.com>
      Suggested-by: NTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Signed-off-by: NCasey Schaufler <casey@schaufler-ca.com>
      
       security/smack/smack_lsm.c | 41 +++++++++++++++++++----------------------
       1 file changed, 19 insertions(+), 22 deletions(-)
      87fbfffc
    • S
      ftrace: Add comment to why rcu_dereference_sched() is open coded · 16052dd5
      Steven Rostedt (VMware) 提交于
      Because the function graph tracer can execute in sections where RCU is not
      "watching", the rcu_dereference_sched() for the has needs to be open coded.
      This is fine because the RCU "flavor" of the ftrace hash is protected by
      its own RCU handling (it does its own little synchronization on every CPU
      and does not rely on RCU sched).
      Acked-by: NJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      16052dd5
    • A
      tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu · fd0e6852
      Amol Grover 提交于
      Fix following instances of sparse error
      kernel/trace/ftrace.c:5667:29: error: incompatible types in comparison
      kernel/trace/ftrace.c:5813:21: error: incompatible types in comparison
      kernel/trace/ftrace.c:5868:36: error: incompatible types in comparison
      kernel/trace/ftrace.c:5870:25: error: incompatible types in comparison
      
      Use rcu_dereference_protected to dereference the newly annotated pointer.
      
      Link: http://lkml.kernel.org/r/20200205055701.30195-1-frextrite@gmail.comSigned-off-by: NAmol Grover <frextrite@gmail.com>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      fd0e6852
    • A
      tracing: Annotate ftrace_graph_hash pointer with __rcu · 24a9729f
      Amol Grover 提交于
      Fix following instances of sparse error
      kernel/trace/ftrace.c:5664:29: error: incompatible types in comparison
      kernel/trace/ftrace.c:5785:21: error: incompatible types in comparison
      kernel/trace/ftrace.c:5864:36: error: incompatible types in comparison
      kernel/trace/ftrace.c:5866:25: error: incompatible types in comparison
      
      Use rcu_dereference_protected to access the __rcu annotated pointer.
      
      Link: http://lkml.kernel.org/r/20200201072703.17330-1-frextrite@gmail.comReviewed-by: NJoel Fernandes (Google) <joel@joelfernandes.org>
      Signed-off-by: NAmol Grover <frextrite@gmail.com>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      24a9729f
    • L
      Merge tag 'pwm/for-5.6-rc1' of... · 4c7d00cc
      Linus Torvalds 提交于
      Merge tag 'pwm/for-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "Mostly cleanups and minor improvements with some new chip support for
        some drivers"
      
      * tag 'pwm/for-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (37 commits)
        pwm: Remove set but not set variable 'pwm'
        pwm: sun4i: Initialize variables before use
        pwm: stm32: Remove automatic output enable
        pwm: sun4i: Narrow scope of local variable
        pwm: bcm2835: Allow building for ARCH_BRCMSTB
        pwm: imx27: Eliminate error message for defer probe
        pwm: sun4i: Fix inconsistent IS_ERR and PTR_ERR
        pwm: sun4i: Move pwm_calculate() out of spin_lock()
        pwm: omap-dmtimer: Allow compiling with COMPILE_TEST
        pwm: omap-dmtimer: put_device() after of_find_device_by_node()
        pwm: omap-dmtimer: Simplify error handling
        pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional
        pwm: Implement tracing for .get_state() and .apply_state()
        pwm: rcar: Document inability to set duty_cycle = 0
        pwm: rcar: Drop useless call to pwm_get_state()
        pwm: Fix minor Kconfig whitespace issues
        pwm: atmel: Implement .get_state()
        pwm: atmel: Use register accessors for channels
        pwm: atmel: Document known weaknesses of both hardware and software
        pwm: atmel: Replace loop in prescale calculation by ad-hoc calculation
        ...
      4c7d00cc
    • L
      Merge tag 'dmaengine-fix-5.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma · 18ea671b
      Linus Torvalds 提交于
      Pull dmaengine fixes from Vinod Koul:
       "Fixes for:
      
         - Documentation build error fix
      
         - Fix dma_request_chan() error return
      
         - Remove unneeded conversion in idxd driver
      
         - Fix pointer check for dma_async_device_channel_register()
      
         - Fix slave-channel symlink cleanup"
      
      * tag 'dmaengine-fix-5.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: Cleanups for the slave <-> channel symlink support
        dmaengine: fix null ptr check for __dma_async_device_channel_register()
        dmaengine: idxd: fix boolconv.cocci warnings
        dmaengine: Fix return value for dma_request_chan() in case of failure
        dmaengine: doc: Properly indent metadata title
      18ea671b
    • L
      Merge tag 'iommu-updates-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 4fc2ea6a
      Linus Torvalds 提交于
      Pull iommu updates from Joerg Roedel:
      
       - Allow compiling the ARM-SMMU drivers as modules.
      
       - Fixes and cleanups for the ARM-SMMU drivers and io-pgtable code
         collected by Will Deacon. The merge-commit (6855d1ba) has all the
         details.
      
       - Cleanup of the iommu_put_resv_regions() call-backs in various
         drivers.
      
       - AMD IOMMU driver cleanups.
      
       - Update for the x2APIC support in the AMD IOMMU driver.
      
       - Preparation patches for Intel VT-d nested mode support.
      
       - RMRR and identity domain handling fixes for the Intel VT-d driver.
      
       - More small fixes and cleanups.
      
      * tag 'iommu-updates-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (87 commits)
        iommu/amd: Remove the unnecessary assignment
        iommu/vt-d: Remove unnecessary WARN_ON_ONCE()
        iommu/vt-d: Unnecessary to handle default identity domain
        iommu/vt-d: Allow devices with RMRRs to use identity domain
        iommu/vt-d: Add RMRR base and end addresses sanity check
        iommu/vt-d: Mark firmware tainted if RMRR fails sanity check
        iommu/amd: Remove unused struct member
        iommu/amd: Replace two consecutive readl calls with one readq
        iommu/vt-d: Don't reject Host Bridge due to scope mismatch
        PCI/ATS: Add PASID stubs
        iommu/arm-smmu-v3: Return -EBUSY when trying to re-add a device
        iommu/arm-smmu-v3: Improve add_device() error handling
        iommu/arm-smmu-v3: Use WRITE_ONCE() when changing validity of an STE
        iommu/arm-smmu-v3: Add second level of context descriptor table
        iommu/arm-smmu-v3: Prepare for handling arm_smmu_write_ctx_desc() failure
        iommu/arm-smmu-v3: Propagate ssid_bits
        iommu/arm-smmu-v3: Add support for Substream IDs
        iommu/arm-smmu-v3: Add context descriptor tables allocators
        iommu/arm-smmu-v3: Prepare arm_smmu_s1_cfg for SSID support
        ACPI/IORT: Parse SSID property of named component node
        ...
      4fc2ea6a
    • L
      Merge tag 'for-linus-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · d271ab29
      Linus Torvalds 提交于
      Pull xen updates from Juergen Gross:
      
       - fix a bug introduced in 5.5 in the Xen gntdev driver
      
       - fix the Xen balloon driver when running on ancient Xen versions
      
       - allow Xen stubdoms to control interrupt enable flags of
         passed-through PCI cards
      
       - release resources in Xen backends under memory pressure
      
      * tag 'for-linus-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/blkback: Consistently insert one empty line between functions
        xen/blkback: Remove unnecessary static variable name prefixes
        xen/blkback: Squeeze page pools if a memory pressure is detected
        xenbus/backend: Protect xenbus callback with lock
        xenbus/backend: Add memory pressure handler callback
        xen/gntdev: Do not use mm notifiers with autotranslating guests
        xen/balloon: Support xend-based toolstack take two
        xen-pciback: optionally allow interrupt enable flag writes
      d271ab29
    • L
      Merge tag 'devicetree-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 2634744b
      Linus Torvalds 提交于
      Pull devicetree fixes from Rob Herring:
      
       - Fix incorrect $id paths in schemas
      
       - Two fixes for Intel LGM SoC binding schemas
      
      * tag 'devicetree-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: Fix paths in schema $id fields
        dt-bindings: PCI: intel: Fix dt_binding_check compilation failure
        dt-bindings: phy: Fix errors in intel,lgm-emmc-phy example
      2634744b
    • L
      Merge tag 's390-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · cfb4b571
      Linus Torvalds 提交于
      Pull more s390 updates from Vasily Gorbik:
       "The second round of s390 fixes and features for 5.6:
      
         - Add KPROBES_ON_FTRACE support
      
         - Add EP11 AES secure keys support
      
         - PAES rework and prerequisites for paes-s390 ciphers selftests
      
         - Fix page table upgrade for hugetlbfs"
      
      * tag 's390-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/pkey/zcrypt: Support EP11 AES secure keys
        s390/zcrypt: extend EP11 card and queue sysfs attributes
        s390/zcrypt: add new low level ep11 functions support file
        s390/zcrypt: ep11 structs rework, export zcrypt_send_ep11_cprb
        s390/zcrypt: enable card/domain autoselect on ep11 cprbs
        s390/crypto: enable clear key values for paes ciphers
        s390/pkey: Add support for key blob with clear key value
        s390/crypto: Rework on paes implementation
        s390: support KPROBES_ON_FTRACE
        s390/mm: fix dynamic pagetable upgrade for hugetlbfs
      cfb4b571
  4. 05 2月, 2020 13 次提交
    • S
      bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline · 7495e092
      Steven Rostedt (VMware) 提交于
      As the bootconfig is appended to the initrd it is not as easy to modify as
      the kernel command line. If there's some issue with the kernel, and the
      developer wants to boot a pristine kernel, it should not be needed to modify
      the initrd to remove the bootconfig for a single boot.
      
      As bootconfig is silently added (if the admin does not know where to look
      they may not know it's being loaded). It should be explicitly added to the
      kernel cmdline. The loading of the bootconfig is only done if "bootconfig"
      is on the kernel command line. This will let admins know that the kernel
      command line is extended.
      
      Note, after adding printk()s for when the size is too great or the checksum
      is wrong, exposed that the current method always looked for the boot config,
      and if this size and checksum matched, it would parse it (as if either is
      wrong a printk has been added to show this). It's better to only check this
      if the boot config is asked to be looked for.
      
      Link: https://lore.kernel.org/r/CAHk-=wjfjO+h6bQzrTf=YCZA53Y3EDyAs3Z4gEsT7icA3u_Psw@mail.gmail.comAcked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      7495e092
    • R
      dt-bindings: Fix paths in schema $id fields · 04dbd865
      Rob Herring 提交于
      The $id path checks were inadequately checking the path part of the $id
      value. With the check fixed, there's a number of errors that need to be
      fixed. Most of the errors are including 'bindings/' in the path which
      should not be as that is considered the root.
      
      Cc: Andy Gross <agross@kernel.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Cc: "Nuno Sá" <nuno.sa@analog.com>
      Cc: Jean Delvare <jdelvare@suse.com>
      Cc: Stefan Popa <stefan.popa@analog.com>
      Cc: Jonathan Cameron <jic23@kernel.org>
      Cc: Hartmut Knaack <knaack.h@gmx.de>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
      Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
      Cc: Kent Gustavsson <kent@minoris.se>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: linux-clk@vger.kernel.org
      Cc: linux-iio@vger.kernel.org
      Cc: linux-input@vger.kernel.org
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: NStephen Boyd <sboyd@kernel.org>
      Signed-off-by: NRob Herring <robh@kernel.org>
      04dbd865
    • L
      Merge branch 'parisc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 6992ca0d
      Linus Torvalds 提交于
      Pull parisc updates from Helge Deller:
       "A page table initialization cleanup from Mike Rapoport and regenerated
        defconfig files from Helge Deller"
      
      * 'parisc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Regenerate parisc defconfigs
        parisc: map_pages(): cleanup page table initialization
      6992ca0d
    • L
      Merge tag 'jfs-5.6' of git://github.com/kleikamp/linux-shaggy · 51a198e8
      Linus Torvalds 提交于
      Pull jfs update from David Kleikamp:
       "Trivial cleanup for jfs"
      
      * tag 'jfs-5.6' of git://github.com/kleikamp/linux-shaggy:
        jfs: remove unused MAXL2PAGES
      51a198e8
    • L
      Merge branch 'work.recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 72f582ff
      Linus Torvalds 提交于
      Pull vfs recursive removal updates from Al Viro:
       "We have quite a few places where synthetic filesystems do an
        equivalent of 'rm -rf', with varying amounts of code duplication,
        wrong locking, etc. That really ought to be a library helper.
      
        Only debugfs (and very similar tracefs) are converted here - I have
        more conversions, but they'd never been in -next, so they'll have to
        wait"
      
      * 'work.recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        simple_recursive_removal(): kernel-side rm -rf for ramfs-style filesystems
      72f582ff
    • L
      Merge branch 'imm.timestamp' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · bddea11b
      Linus Torvalds 提交于
      Pull vfs timestamp updates from Al Viro:
       "More 64bit timestamp work"
      
      * 'imm.timestamp' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        kernfs: don't bother with timestamp truncation
        fs: Do not overload update_time
        fs: Delete timespec64_trunc()
        fs: ubifs: Eliminate timespec64_trunc() usage
        fs: ceph: Delete timespec64_trunc() usage
        fs: cifs: Delete usage of timespec64_trunc
        fs: fat: Eliminate timespec64_trunc() usage
        utimes: Clamp the timestamps in notify_change()
      bddea11b
    • J
      io_uring: cleanup fixed file data table references · 2faf852d
      Jens Axboe 提交于
      syzbot reports a use-after-free in io_ring_file_ref_switch() when it
      tries to switch back to percpu mode. When we put the final reference to
      the table by calling percpu_ref_kill_and_confirm(), we don't want the
      zero reference to queue async work for flushing the potentially queued
      up items. We currently do a few flush_work(), but they merely paper
      around the issue, since the work item may not have been queued yet
      depending on the when the percpu-ref callback gets run.
      
      Coming into the file unregister, we know we have the ring quiesced.
      io_ring_file_ref_switch() can check for whether or not the ref is dying
      or not, and not queue anything async at that point. Once the ref has
      been confirmed killed, flush any potential items manually.
      
      Reported-by: syzbot+7caeaea49c2c8a591e3d@syzkaller.appspotmail.com
      Fixes: 05f3fb3c ("io_uring: avoid ring quiesce for fixed file set unregister and update")
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      2faf852d
    • J
      io_uring: spin for sq thread to idle on shutdown · df069d80
      Jens Axboe 提交于
      As part of io_uring shutdown, we cancel work that is pending and won't
      necessarily complete on its own. That includes requests like poll
      commands and timeouts.
      
      If we're using SQPOLL for kernel side submission and we shutdown the
      ring immediately after queueing such work, we can race with the sqthread
      doing the submission. This means we may miss cancelling some work, which
      results in the io_uring shutdown hanging forever.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      df069d80
    • D
      dt-bindings: PCI: intel: Fix dt_binding_check compilation failure · 34129bb8
      Dilip Kota 提交于
      Remove <dt-bindings/clock/intel,lgm-clk.h> dependency as
      it is not present in the mainline tree. Use numeric value
      instead of LGM_GCLK_PCIE10 macro.
      Signed-off-by: NDilip Kota <eswara.kota@linux.intel.com>
      [robh: Also drop interrupt-parent from example]
      Signed-off-by: NRob Herring <robh@kernel.org>
      34129bb8
    • R
      dt-bindings: phy: Fix errors in intel,lgm-emmc-phy example · 4ae87b17
      Rob Herring 提交于
      DT labels can't have '-' in them causing a compile failure in the example.
      Fixing that leads to more warnings:
      
      Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dts:23.13-33: Warning (reg_format): /example-0/chiptop@e0200000/emmc-phy@a8:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
      Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
      Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
      Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
      Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dts:21.33-26.13: Warning (avoid_default_addr_size): /example-0/chiptop@e0200000/emmc-phy@a8: Relying on default #address-cells value
      Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dts:21.33-26.13: Warning (avoid_default_addr_size): /example-0/chiptop@e0200000/emmc-phy@a8: Relying on default #size-cells value
      
      Fixes: 5bc99910 ("dt-bindings: phy: intel-emmc-phy: Add YAML schema for LGM eMMC PHY")
      Cc: Ramuthevar Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
      Cc: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      4ae87b17
    • J
      Merge branch 'nvme-5.6' of git://git.infradead.org/nvme into block-5.6 · b74e58cd
      Jens Axboe 提交于
      Pull NVMe fixes from Keith.
      
      * 'nvme-5.6' of git://git.infradead.org/nvme:
        nvmet: update AEN list and array at one place
        nvmet: Fix controller use after free
        nvmet: Fix error print message at nvmet_install_queue function
        nvme-pci: remove nvmeq->tags
        nvmet: fix dsm failure when payload does not match sgl descriptor
        nvmet: Pass lockdep expression to RCU lists
      b74e58cd
    • D
      nvmet: update AEN list and array at one place · 0f5be6a4
      Daniel Wagner 提交于
      All async events are enqueued via nvmet_add_async_event() which
      updates the ctrl->async_event_cmds[] array and additionally an struct
      nvmet_async_event is added to the ctrl->async_events list.
      
      Under normal operations the nvmet_async_event_work() updates again
      the ctrl->async_event_cmds and removes the corresponding struct
      nvmet_async_event from the list again. Though nvmet_sq_destroy() could
      be called which calls nvmet_async_events_free() which only updates the
      ctrl->async_event_cmds[] array.
      
      Add new functions nvmet_async_events_process() and
      nvmet_async_events_free() to process async events, update an array and
      the list.
      
      When we destroy submission queue after clearing the aen present on
      the ctrl->async list we also loop over ctrl->async_event_cmds[] for
      any requests posted by the host for which we don't have the AEN in
      the ctrl->async_events list by calling nvmet_async_event_process()
      and nvmet_async_events_free().
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDaniel Wagner <dwagner@suse.de>
      [chaitanya.kulkarni@wdc.com
       * Loop over and clear out outstanding requests
       * Update changelog
      ]
      Signed-off-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: NKeith Busch <kbusch@kernel.org>
      0f5be6a4
    • I
      nvmet: Fix controller use after free · 1a3f540d
      Israel Rukshin 提交于
      After nvmet_install_queue() sets sq->ctrl calling to nvmet_sq_destroy()
      reduces the controller refcount. In case nvmet_install_queue() fails,
      calling to nvmet_ctrl_put() is done twice (at nvmet_sq_destroy and
      nvmet_execute_io_connect/nvmet_execute_admin_connect) instead of once for
      the queue which leads to use after free of the controller. Fix this by set
      NULL at sq->ctrl in case of a failure at nvmet_install_queue().
      
      The bug leads to the following Call Trace:
      
      [65857.994862] refcount_t: underflow; use-after-free.
      [65858.108304] Workqueue: events nvmet_rdma_release_queue_work [nvmet_rdma]
      [65858.115557] RIP: 0010:refcount_warn_saturate+0xe5/0xf0
      [65858.208141] Call Trace:
      [65858.211203]  nvmet_sq_destroy+0xe1/0xf0 [nvmet]
      [65858.216383]  nvmet_rdma_release_queue_work+0x37/0xf0 [nvmet_rdma]
      [65858.223117]  process_one_work+0x167/0x370
      [65858.227776]  worker_thread+0x49/0x3e0
      [65858.232089]  kthread+0xf5/0x130
      [65858.235895]  ? max_active_store+0x80/0x80
      [65858.240504]  ? kthread_bind+0x10/0x10
      [65858.244832]  ret_from_fork+0x1f/0x30
      [65858.249074] ---[ end trace f82d59250b54beb7 ]---
      
      Fixes: bb1cc747 ("nvmet: implement valid sqhd values in completions")
      Fixes: 1672ddb8 ("nvmet: Add install_queue callout")
      Signed-off-by: NIsrael Rukshin <israelr@mellanox.com>
      Reviewed-by: NMax Gurtovoy <maxg@mellanox.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKeith Busch <kbusch@kernel.org>
      1a3f540d