1. 28 Dec, 2020 1 commit
  2. 22 Dec, 2020 1 commit
  3. 21 Dec, 2020 2 commits
  4. 04 Dec, 2020 12 commits
    • Jeffle Xu's avatar
      dm crypt: export sysfs of kcryptd workqueue · a2b8b2d9
      Jeffle Xu authored
      It should be helpful to export sysfs of "kcryptd" workqueue in some
      cases, such as setting specific CPU affinity of the workqueue.
      
      Besides, also tweak the name format a little. The slash inside a
      directory name will be translate into exclamation mark, such as
      /sys/devices/virtual/workqueue/'kcryptd!253:0'.
      Signed-off-by: default avatarJeffle Xu <jefflexu@linux.alibaba.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      a2b8b2d9
    • Qinglang Miao's avatar
      dm ioctl: fix error return code in target_message · 4d7659bf
      Qinglang Miao authored
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: 2ca4c92f ("dm ioctl: prevent empty message")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      4d7659bf
    • Rikard Falkeborn's avatar
      dm crypt: Constify static crypt_iv_operations · e8dc79d1
      Rikard Falkeborn authored
      The only usage of these structs is to assign their address to the
      iv_gen_ops field in the crypt config struct, which is a pointer to
      const. Make them const like the rest of the static crypt_iv_operations
      structs. This allows the compiler to put them in read-only memory.
      Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      e8dc79d1
    • Jeffle Xu's avatar
      dm: add support for REQ_NOWAIT to various targets · 410fe220
      Jeffle Xu authored
      commit 021a2446 ("block: add QUEUE_FLAG_NOWAIT") added a new queue
      flag QUEUE_FLAG_NOWAIT to advertise if the bdev supports handling of
      REQ_NOWAIT or not. DM core supports stacking QUEUE_FLAG_NOWAIT since
      commit 6abc4946 ("dm: add support for REQ_NOWAIT and enable it for
      linear target"), in which only dm-linear enabled it.
      
      Update others DM targets, which just do simple remapping, to enable
      support for REQ_NOWAIT.
      Signed-off-by: default avatarJeffle Xu <jefflexu@linux.alibaba.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      410fe220
    • Mike Snitzer's avatar
      dm: rename multipath path selector source files to have "dm-ps" prefix · 298fb372
      Mike Snitzer authored
      Additional prefix helps clarify that these source files implement path
      selectors.
      
      Required updating Makefile to still build modules _without_ the
      "dm-ps" prefix to preserve dm-multipath's ability to autoload path
      selector modules. While at it, cleaned up some DM whitespace in
      Makefile.
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      298fb372
    • Mike Christie's avatar
      dm mpath: add IO affinity path selector · e4d2e82b
      Mike Christie authored
      This patch adds a path selector that selects paths based on a CPU to
      path mapping the user passes in and what CPU we are executing on. The
      primary user for this PS is where the app is optimized to use specific
      CPUs so other PSs undo the apps handy work, and the storage and it's
      transport are not a bottlneck.
      
      For these io-affinity PS setups a path's transport/interconnect
      perf is not going to flucuate a lot and there is no major differences
      between paths, so QL/HST smarts do not help and RR always messes up
      what the app is trying to do.
      
      On a system with 16 cores, where you have a job per CPU:
      
      fio --filename=/dev/dm-0 --direct=1 --rw=randrw --bs=4k \
      --ioengine=libaio --iodepth=128 --numjobs=16
      
      and a dm-multipath device setup where each CPU is mapped to one path:
      
      // When in mq mode I had to set dm_mq_nr_hw_queues=$NUM_PATHS.
      // Bio mode also showed similar results.
      0 16777216 multipath 0 0 1 1 io-affinity 0 16 1 8:16 1 8:32 2 8:64 4
      8:48 8 8:80 10 8:96 20 8:112 40 8:128 80 8:144 100 8:160 200 8:176
      400 8:192 800 8:208 1000 8:224 2000 8:240 4000 65:0 8000
      
      we can see a IOPs increase of 25%.
      
      The percent increase depends on the device and interconnect. For a
      slower/medium speed path/device that can do around 180K IOPs a path
      if you ran that fio command to it directly we saw a 25% increase like
      above. Slower path'd devices that could do around 90K per path showed
      maybe around a 2 - 5% increase. If you use something like null_blk or
      scsi_debug which can multi-million IOPs and hack it up so each device
      they export shows up as a path then you see 50%+ increases.
      Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      e4d2e82b
    • Mickaël Salaün's avatar
      dm verity: Add support for signature verification with 2nd keyring · 4da8f8c8
      Mickaël Salaün authored
      Add a new configuration DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING
      to enable dm-verity signatures to be verified against the secondary
      trusted keyring.  Instead of relying on the builtin trusted keyring
      (with hard-coded certificates), the second trusted keyring can include
      certificate authorities from the builtin trusted keyring and child
      certificates loaded at run time.  Using the secondary trusted keyring
      enables to use dm-verity disks (e.g. loop devices) signed by keys which
      did not exist at kernel build time, leveraging the certificate chain of
      trust model.  In practice, this makes it possible to update certificates
      without kernel update and reboot, aligning with module and kernel
      (kexec) signature verification which already use the secondary trusted
      keyring.
      Signed-off-by: default avatarMickaël Salaün <mic@linux.microsoft.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      4da8f8c8
    • Jeffle Xu's avatar
      dm: remove unnecessary current->bio_list check when submitting split bio · 985eabdc
      Jeffle Xu authored
      The depth-first splitting is introduced in commit 18a25da8 ("dm:
      ensure bio submission follows a depth-first tree walk"), which is used
      to fix the potential deadlock in case of the misordering handling of
      bios caused by bio_list. There're two paths submitting split bios,
      dm_wq_work() from worker thread and submit_bio() from application. Back
      upon that time, dm_wq_work() thread calls __split_and_process_bio()
      directly and thus will not trigger this issue since bio_list doesn't
      exist here. So this issue will only be triggered from application
      calling submit_bio(), and the fix has to check if current->bio_list is
      non-NULL to distinguish this case.
      
      However since commit 0c2915b8 ("dm: fix missing imposition of
      queue_limits from dm_wq_work() thread"), dm_wq_work() thread calls
      submit_bio_noacct() and thus also uses bio_list. Since then all entries
      into __split_and_process_bio() are under protection of bio_list, and
      thus the checking of current->bio_list when determinning if the
      depth-first principle should be used, seems kind of nonsense. After all
      the checking always succeeds now.
      
      Fixes: 0c2915b8 ("dm: fix missing imposition of queue_limits from dm_wq_work() thread")
      Signed-off-by: default avatarJeffle Xu <jefflexu@linux.alibaba.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      985eabdc
    • Mike Snitzer's avatar
      block: fix incorrect branching in blk_max_size_offset() · 65f33b35
      Mike Snitzer authored
      If non-zero 'chunk_sectors' is passed in to blk_max_size_offset() that
      override will be incorrectly ignored.
      
      Old blk_max_size_offset() branching, prior to commit 3ee16db3,
      must be used only if passed 'chunk_sectors' override is zero.
      
      Fixes: 3ee16db3 ("dm: fix IO splitting")
      Cc: stable@vger.kernel.org # 5.9
      Reported-by: default avatarJohn Dorminy <jdorminy@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      65f33b35
    • Mike Snitzer's avatar
      dm: remove invalid sparse __acquires and __releases annotations · bde3808b
      Mike Snitzer authored
      Fixes sparse warnings:
      drivers/md/dm.c:508:12: warning: context imbalance in 'dm_prepare_ioctl' - wrong count at exit
      drivers/md/dm.c:543:13: warning: context imbalance in 'dm_unprepare_ioctl' - wrong count at exit
      
      Fixes: 971888c4 ("dm: hold DM table for duration of ioctl rather than use blkdev_get")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      bde3808b
    • Mike Snitzer's avatar
      dm: fix double RCU unlock in dm_dax_zero_page_range() error path · f05c4403
      Mike Snitzer authored
      Remove redundant dm_put_live_table() in dm_dax_zero_page_range() error
      path to fix sparse warning:
      drivers/md/dm.c:1208:9: warning: context imbalance in 'dm_dax_zero_page_range' - unexpected unlock
      
      Fixes: cdf6cdcd ("dm,dax: Add dax zero_page_range operation")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      f05c4403
    • Mike Snitzer's avatar
      dm: fix IO splitting · 3ee16db3
      Mike Snitzer authored
      Commit 882ec4e6 ("dm table: stack 'chunk_sectors' limit to account
      for target-specific splitting") caused a couple regressions:
      1) Using lcm_not_zero() when stacking chunk_sectors was a bug because
         chunk_sectors must reflect the most limited of all devices in the
         IO stack.
      2) DM targets that set max_io_len but that do _not_ provide an
         .iterate_devices method no longer had there IO split properly.
      
      And commit 5091cdec ("dm: change max_io_len() to use
      blk_max_size_offset()") also caused a regression where DM no longer
      supported varied (per target) IO splitting. The implication being the
      potential for severely reduced performance for IO stacks that use a DM
      target like dm-cache to hide performance limitations of a slower
      device (e.g. one that requires 4K IO splitting).
      
      Coming full circle: Fix all these issues by discontinuing stacking
      chunk_sectors up using ti->max_io_len in dm_calculate_queue_limits(),
      add optional chunk_sectors override argument to blk_max_size_offset()
      and update DM's max_io_len() to pass ti->max_io_len to its
      blk_max_size_offset() call.
      
      Passing in an optional chunk_sectors override to blk_max_size_offset()
      allows for code reuse of block's centralized calculation for max IO
      size based on provided offset and split boundary.
      
      Fixes: 882ec4e6 ("dm table: stack 'chunk_sectors' limit to account for target-specific splitting")
      Fixes: 5091cdec ("dm: change max_io_len() to use blk_max_size_offset()")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarJohn Dorminy <jdorminy@redhat.com>
      Reported-by: default avatarBruce Johnston <bjohnsto@redhat.com>
      Reported-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
      Reviewed-by: default avatarJohn Dorminy <jdorminy@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Reviewed-by: default avatarJens Axboe <axboe@kernel.dk>
      3ee16db3
  5. 01 Dec, 2020 4 commits
  6. 17 Nov, 2020 3 commits
  7. 16 Nov, 2020 1 commit
  8. 15 Nov, 2020 11 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-11-16' of git://anongit.freedesktop.org/drm/drm · a6af8718
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Nouveau fixes:
      
         - atomic modesetting regression fix
      
         - ttm pre-nv50 fix
      
         - connector NULL ptr deref fix"
      
      * tag 'drm-fixes-2020-11-16' of git://anongit.freedesktop.org/drm/drm:
        drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere
        drm/nouveau/ttm: avoid using nouveau_drm.ttm.type_vram prior to nv50
        drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth
      a6af8718
    • Dave Airlie's avatar
      Merge branch 'linux-5.10' of git://github.com/skeggsb/linux into drm-fixes · 8f598d15
      Dave Airlie authored
      - atomic modesetting regression fix
      - ttm pre-nv50 fix
      - connector NULL ptr deref fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Ben Skeggs <skeggsb@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5D9p78MNN0OxVeRZxN8LDqcadJEGUEFCgWJQ6+_rjPuw@mail.gmail.com
      8f598d15
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 9cfd9c45
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char/misc/whatever driver fixes for 5.10-rc4.
      
        Nothing huge, lots of small fixes for reported issues:
      
         - habanalabs driver fixes
      
         - speakup driver fixes
      
         - uio driver fixes
      
         - virtio driver fix
      
         - other tiny driver fixes
      
        Full details are in the shortlog.
      
        All of these have been in linux-next for a full week with no reported
        issues"
      
      * tag 'char-misc-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        uio: Fix use-after-free in uio_unregister_device()
        firmware: xilinx: fix out-of-bounds access
        nitro_enclaves: Fixup type and simplify logic of the poll mask setup
        speakup ttyio: Do not schedule() in ttyio_in_nowait
        speakup: Fix clearing selection in safe context
        speakup: Fix var_id_t values and thus keymap
        virtio: virtio_console: fix DMA memory allocation for rproc serial
        habanalabs/gaudi: mask WDT error in QMAN
        habanalabs/gaudi: move coresight mmu config
        habanalabs: fix kernel pointer type
        mei: protect mei_cl_mtu from null dereference
      9cfd9c45
    • Linus Torvalds's avatar
      Merge tag 'usb-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 281b3ec3
      Linus Torvalds authored
      Pull USB and Thunderbolt fixes from Greg KH:
       "Here are some small Thunderbolt and USB driver fixes for 5.10-rc4 to
        solve some reported issues.
      
        Nothing huge in here, just small things:
      
         - thunderbolt memory leaks fixed and new device ids added
      
         - revert of problem patch for the musb driver
      
         - new quirks added for USB devices
      
         - typec power supply fixes to resolve much reported problems about
           charging notifications not working anymore
      
        All except the cdc-acm driver quirk addition have been in linux-next
        with no reported issues (the quirk patch was applied on Friday, and is
        self-contained)"
      
      * tag 'usb-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode
        MAINTAINERS: add usb raw gadget entry
        usb: typec: ucsi: Report power supply changes
        xhci: hisilicon: fix refercence leak in xhci_histb_probe
        Revert "usb: musb: convert to devm_platform_ioremap_resource_byname"
        thunderbolt: Add support for Intel Tiger Lake-H
        thunderbolt: Only configure USB4 wake for lane 0 adapters
        thunderbolt: Add uaccess dependency to debugfs interface
        thunderbolt: Fix memory leak if ida_simple_get() fails in enumerate_services()
        thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()
      281b3ec3
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 0062442e
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Fixes for ARM and x86, the latter especially for old processors
        without two-dimensional paging (EPT/NPT)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvm: mmu: fix is_tdp_mmu_check when the TDP MMU is not in use
        KVM: SVM: Update cr3_lm_rsvd_bits for AMD SEV guests
        KVM: x86: Introduce cr3_lm_rsvd_bits in kvm_vcpu_arch
        KVM: x86: clflushopt should be treated as a no-op by emulation
        KVM: arm64: Handle SCXTNUM_ELx traps
        KVM: arm64: Unify trap handlers injecting an UNDEF
        KVM: arm64: Allow setting of ID_AA64PFR0_EL1.CSV2 from userspace
      0062442e
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 326fd6db
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A small set of fixes for x86:
      
         - Cure the fallout from the MSI irqdomain overhaul which missed that
           the Intel IOMMU does not register virtual function devices and
           therefore never reaches the point where the MSI interrupt domain is
           assigned. This made the VF devices use the non-remapped MSI domain
           which is trapped by the IOMMU/remap unit
      
         - Remove an extra space in the SGI_UV architecture type procfs output
           for UV5
      
         - Remove a unused function which was missed when removing the UV BAU
           TLB shootdown handler"
      
      * tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        iommu/vt-d: Cure VF irqdomain hickup
        x86/platform/uv: Fix copied UV5 output archtype
        x86/platform/uv: Drop last traces of uv_flush_tlb_others
      326fd6db
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 64b609d6
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A set of fixes for perf:
      
          - A set of commits which reduce the stack usage of various perf
            event handling functions which allocated large data structs on
            stack causing stack overflows in the worst case
      
          - Use the proper mechanism for detecting soft interrupts in the
            recursion protection
      
          - Make the resursion protection simpler and more robust
      
          - Simplify the scheduling of event groups to make the code more
            robust and prepare for fixing the issues vs. scheduling of
            exclusive event groups
      
          - Prevent event multiplexing and rotation for exclusive event groups
      
          - Correct the perf event attribute exclusive semantics to take
            pinned events, e.g. the PMU watchdog, into account
      
          - Make the anythread filtering conditional for Intel's generic PMU
            counters as it is not longer guaranteed to be supported on newer
            CPUs. Check the corresponding CPUID leaf to make sure
      
          - Fixup a duplicate initialization in an array which was probably
            caused by the usual 'copy & paste - forgot to edit' mishap"
      
      * tag 'perf-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel/uncore: Fix Add BW copypasta
        perf/x86/intel: Make anythread filter support conditional
        perf: Tweak perf_event_attr::exclusive semantics
        perf: Fix event multiplexing for exclusive groups
        perf: Simplify group_sched_in()
        perf: Simplify group_sched_out()
        perf/x86: Make dummy_iregs static
        perf/arch: Remove perf_sample_data::regs_user_copy
        perf: Optimize get_recursion_context()
        perf: Fix get_recursion_context()
        perf/x86: Reduce stack usage for x86_pmu::drain_pebs()
        perf: Reduce stack usage of perf_output_begin()
      64b609d6
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d0a37fd5
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "A set of scheduler fixes:
      
         - Address a load balancer regression by making the load balancer use
           the same logic as the wakeup path to spread tasks in the LLC domain
      
         - Prefer the CPU on which a task run last over the local CPU in the
           fast wakeup path for asymmetric CPU capacity systems to align with
           the symmetric case. This ensures more locality and prevents massive
           migration overhead on those asymetric systems
      
         - Fix a memory corruption bug in the scheduler debug code caused by
           handing a modified buffer pointer to kfree()"
      
      * tag 'sched-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/debug: Fix memory corruption caused by multiple small reads of flags
        sched/fair: Prefer prev cpu in asymmetric wakeup path
        sched/fair: Ensure tasks spreading in LLC during LB
      d0a37fd5
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 259c2fbe
      Linus Torvalds authored
      Pull locking fixes from Thomas Gleixner:
       "Two fixes for the locking subsystem:
      
         - Prevent an unconditional interrupt enable in a futex helper
           function which can be called from contexts which expect interrupts
           to stay disabled across the call
      
         - Don't modify lockdep chain keys in the validation process as that
           causes chain inconsistency"
      
      * tag 'locking-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lockdep: Avoid to modify chain keys in validate_chain()
        futex: Don't enable IRQs unconditionally in put_pi_state()
      259c2fbe
    • Linus Torvalds's avatar
      Merge branch 'for-5.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu · a50cf159
      Linus Torvalds authored
      Pull percpu fix and cleanup from Dennis Zhou:
       "A fix for a Wshadow warning in the asm-generic percpu macros came in
        and then I tacked on the removal of flexible array initializers in the
        percpu allocator"
      
      * 'for-5.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
        percpu: convert flexible array initializers to use struct_size()
        asm-generic: percpu: avoid Wshadow warning
      a50cf159
    • Paolo Bonzini's avatar
      kvm: mmu: fix is_tdp_mmu_check when the TDP MMU is not in use · c887c9b9
      Paolo Bonzini authored
      In some cases where shadow paging is in use, the root page will
      be either mmu->pae_root or vcpu->arch.mmu->lm_root.  Then it will
      not have an associated struct kvm_mmu_page, because it is allocated
      with alloc_page instead of kvm_mmu_alloc_page.
      
      Just return false quickly from is_tdp_mmu_root if the TDP MMU is
      not in use, which also includes the case where shadow paging is
      enabled.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c887c9b9
  9. 14 Nov, 2020 5 commits