1. 28 Jan, 2023 1 commit
    • Dan Williams's avatar
      nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE · c91d7136
      Dan Williams authored
      Commit 6e9f05dc ("libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE")
      
      ...updated MAX_STRUCT_PAGE_SIZE to account for sizeof(struct page)
      potentially doubling in the case of CONFIG_KMSAN=y. Unfortunately this
      doubles the amount of capacity stolen from user addressable capacity for
      everyone, regardless of whether they are using the debug option. Revert
      that change, mandate that MAX_STRUCT_PAGE_SIZE never exceed 64, but
      allow for debug scenarios to proceed with creating debug sized page maps
      with a compile option to support debug scenarios.
      
      Note that this only applies to cases where the page map is permanent,
      i.e. stored in a reservation of the pmem itself ("--map=dev" in "ndctl
      create-namespace" terms). For the "--map=mem" case, since the allocation
      is ephemeral for the lifespan of the namespace, there are no explicit
      restriction. However, the implicit restriction, of having enough
      available "System RAM" to store the page map for the typically large
      pmem, still applies.
      
      Fixes: 6e9f05dc ("libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE")
      Cc: <stable@vger.kernel.org>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Marco Elver <elver@google.com>
      Reported-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Acked-by: default avatarYu Zhao <yuzhao@google.com>
      Link: https://lore.kernel.org/r/167467815773.463042.7022545814443036382.stgit@dwillia2-xfh.jf.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      c91d7136
  2. 25 Jan, 2023 2 commits
    • Vishal Verma's avatar
      ACPI: NFIT: fix a potential deadlock during NFIT teardown · fb6df436
      Vishal Verma authored
      Lockdep reports that acpi_nfit_shutdown() may deadlock against an
      opportune acpi_nfit_scrub(). acpi_nfit_scrub () is run from inside a
      'work' and therefore has already acquired workqueue-internal locks. It
      also acquiires acpi_desc->init_mutex. acpi_nfit_shutdown() first
      acquires init_mutex, and was subsequently attempting to cancel any
      pending workqueue items. This reversed locking order causes a potential
      deadlock:
      
          ======================================================
          WARNING: possible circular locking dependency detected
          6.2.0-rc3 #116 Tainted: G           O     N
          ------------------------------------------------------
          libndctl/1958 is trying to acquire lock:
          ffff888129b461c0 ((work_completion)(&(&acpi_desc->dwork)->work)){+.+.}-{0:0}, at: __flush_work+0x43/0x450
      
          but task is already holding lock:
          ffff888129b460e8 (&acpi_desc->init_mutex){+.+.}-{3:3}, at: acpi_nfit_shutdown+0x87/0xd0 [nfit]
      
          which lock already depends on the new lock.
      
          ...
      
          Possible unsafe locking scenario:
      
                CPU0                    CPU1
                ----                    ----
           lock(&acpi_desc->init_mutex);
                                        lock((work_completion)(&(&acpi_desc->dwork)->work));
                                        lock(&acpi_desc->init_mutex);
           lock((work_completion)(&(&acpi_desc->dwork)->work));
      
          *** DEADLOCK ***
      
      Since the workqueue manipulation is protected by its own internal locking,
      the cancellation of pending work doesn't need to be done under
      acpi_desc->init_mutex. Move cancel_delayed_work_sync() outside the
      init_mutex to fix the deadlock. Any work that starts after
      acpi_nfit_shutdown() drops the lock will see ARS_CANCEL, and the
      cancel_delayed_work_sync() will safely flush it out.
      Reported-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
      Link: https://lore.kernel.org/r/20230112-acpi_nfit_lockdep-v1-1-660be4dd10be@intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      fb6df436
    • Randy Dunlap's avatar
      dax: super.c: fix kernel-doc bad line warning · 1c88b9ba
      Randy Dunlap authored
      Convert an empty line to " *" to avoid a kernel-doc warning:
      
      drivers/dax/super.c:478: warning: bad line:
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: nvdimm@lists.linux.dev
      Link: https://lore.kernel.org/r/20230117070249.31934-1-rdunlap@infradead.orgSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      1c88b9ba
  3. 01 Jan, 2023 6 commits
  4. 31 Dec, 2022 2 commits
  5. 30 Dec, 2022 19 commits
  6. 29 Dec, 2022 3 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 2258c2dc
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Changes that were posted too late for 6.1, or after the release.
      
        x86:
      
         - several fixes to nested VMX execution controls
      
         - fixes and clarification to the documentation for Xen emulation
      
         - do not unnecessarily release a pmu event with zero period
      
         - MMU fixes
      
         - fix Coverity warning in kvm_hv_flush_tlb()
      
        selftests:
      
         - fixes for the ucall mechanism in selftests
      
         - other fixes mostly related to compilation with clang"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (41 commits)
        KVM: selftests: restore special vmmcall code layout needed by the harness
        Documentation: kvm: clarify SRCU locking order
        KVM: x86: fix deadlock for KVM_XEN_EVTCHN_RESET
        KVM: x86/xen: Documentation updates and clarifications
        KVM: x86/xen: Add KVM_XEN_INVALID_GPA and KVM_XEN_INVALID_GFN to uapi
        KVM: x86/xen: Simplify eventfd IOCTLs
        KVM: x86/xen: Fix SRCU/RCU usage in readers of evtchn_ports
        KVM: x86/xen: Use kvm_read_guest_virt() instead of open-coding it badly
        KVM: x86/xen: Fix memory leak in kvm_xen_write_hypercall_page()
        KVM: Delete extra block of "};" in the KVM API documentation
        kvm: x86/mmu: Remove duplicated "be split" in spte.h
        kvm: Remove the unused macro KVM_MMU_READ_{,UN}LOCK()
        MAINTAINERS: adjust entry after renaming the vmx hyperv files
        KVM: selftests: Mark correct page as mapped in virt_map()
        KVM: arm64: selftests: Don't identity map the ucall MMIO hole
        KVM: selftests: document the default implementation of vm_vaddr_populate_bitmap
        KVM: selftests: Use magic value to signal ucall_alloc() failure
        KVM: selftests: Disable "gnu-variable-sized-type-not-at-end" warning
        KVM: selftests: Include lib.mk before consuming $(CC)
        KVM: selftests: Explicitly disable builtins for mem*() overrides
        ...
      2258c2dc
    • Jens Axboe's avatar
      Merge tag 'nvme-6.2-2022-12-29' of git://git.infradead.org/nvme into block-6.2 · 1551ed5a
      Jens Axboe authored
      Pull NVMe fixes from Christoph:
      
      "nvme fixes for Linux 6.2
      
       - fix various problems in handling the Command Supported and Effects log
         (Christoph Hellwig)
       - don't allow unprivileged passthrough of commands that don't transfer
         data but modify logical block content (Christoph Hellwig)
       - add a features and quirks policy document (Christoph Hellwig)
       - fix some really nasty code that was correct but made smatch complain
         (Sagi Grimberg)"
      
      * tag 'nvme-6.2-2022-12-29' of git://git.infradead.org/nvme:
        nvme-auth: fix smatch warning complaints
        nvme: consult the CSE log page for unprivileged passthrough
        nvme: also return I/O command effects from nvme_command_effects
        nvmet: don't defer passthrough commands with trivial effects to the workqueue
        nvmet: set the LBCC bit for commands that modify data
        nvmet: use NVME_CMD_EFFECTS_CSUPP instead of open coding it
        nvme: fix the NVME_CMD_EFFECTS_CSE_MASK definition
        docs, nvme: add a feature and quirk policy document
      1551ed5a
    • Bhaskar Chowdhury's avatar
      kconfig: Add static text for search information in help menu · da8daff9
      Bhaskar Chowdhury authored
      Add few static text to explain how one can bring up the search dialog
      box by pressing the forward slash key anywhere on this interface.
      Signed-off-by: default avatarBhaskar Chowdhury <unixbhaskar@gmail.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      da8daff9
  7. 28 Dec, 2022 7 commits