1. 03 Apr, 2020 2 commits
    • Dan Williams's avatar
      Merge branch 'for-5.7/numa' into libnvdimm-for-next · d3b88655
      Dan Williams authored
      - Promote numa_map_to_online_node() to a cross-kernel generic facility.
      
      - Save x86 numa information to allow for node-id lookups for reserved
        memory ranges, deploy that capability for the e820-pmem driver.
      
      - Introduce phys_to_target_node() to facilitate drivers that want to
        know resulting numa node if a given reserved address range was
        onlined.
      d3b88655
    • Dan Williams's avatar
      Merge branch 'for-5.6/libnvdimm-fixes' into libnvdimm-for-next · 91bf79bc
      Dan Williams authored
      Pick up some miscellaneous minor fixes, that missed v5.6-final,
      including a some smatch reports in the ioctl path and some unit test
      compilation fixups.
      91bf79bc
  2. 31 Mar, 2020 2 commits
  3. 17 Mar, 2020 4 commits
    • Dan Williams's avatar
      libnvdimm/region: Introduce an 'align' attribute · 2522afb8
      Dan Williams authored
      The align attribute applies an alignment constraint for namespace
      creation in a region. Whereas the 'align' attribute of a namespace
      applied alignment padding via an info block, the 'align' attribute
      applies alignment constraints to the free space allocation.
      
      The default for 'align' is the maximum known memremap_compat_align()
      across all archs (16MiB from PowerPC at time of writing) multiplied by
      the number of interleave ways if there is blk-aliasing. The minimum is
      PAGE_SIZE and allows for the creation of cross-arch incompatible
      namespaces, just as previous kernels allowed, but the expectation is
      cross-arch and mode-independent compatibility by default.
      
      The regression risk with this change is limited to cases that were
      dependent on the ability to create unaligned namespaces, *and* for some
      reason are unable to opt-out of aligned namespaces by writing to
      'regionX/align'. If such a scenario arises the default can be flipped
      from opt-out to opt-in of compat-aligned namespace creation, but that is
      a last resort. The kernel will otherwise continue to support existing
      defined misaligned namespaces.
      
      Unfortunately this change needs to touch several parts of the
      implementation at once:
      
      - region/available_size: expand busy extents to current align
      - region/max_available_extent: expand busy extents to current align
      - namespace/size: trim free space to current align
      
      ...to keep the free space accounting conforming to the dynamic align
      setting.
      Reported-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Reported-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Link: https://lore.kernel.org/r/158041478371.3889308.14542630147672668068.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      2522afb8
    • Dan Williams's avatar
      libnvdimm/region: Introduce NDD_LABELING · a0e37452
      Dan Williams authored
      The NDD_ALIASING flag is used to indicate where pmem capacity might
      alias with blk capacity and require labeling. It is also used to
      indicate whether the DIMM supports labeling. Separate this latter
      capability into its own flag so that the NDD_ALIASING flag is scoped to
      true aliased configurations.
      
      To my knowledge aliased configurations only exist in the ACPI spec,
      there are no known platforms that ship this support in production.
      
      This clarity allows namespace-capacity alignment constraints around
      interleave-ways to be relaxed.
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Oliver O'Halloran <oohall@gmail.com>
      Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Link: https://lore.kernel.org/r/158041477856.3889308.4212605617834097674.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      a0e37452
    • Dan Williams's avatar
      libnvdimm/namespace: Enforce memremap_compat_align() · 6acd7d5e
      Dan Williams authored
      The pmem driver on PowerPC crashes with the following signature when
      instantiating misaligned namespaces that map their capacity via
      memremap_pages().
      
          BUG: Unable to handle kernel data access at 0xc001000406000000
          Faulting instruction address: 0xc000000000090790
          NIP [c000000000090790] arch_add_memory+0xc0/0x130
          LR [c000000000090744] arch_add_memory+0x74/0x130
          Call Trace:
           arch_add_memory+0x74/0x130 (unreliable)
           memremap_pages+0x74c/0xa30
           devm_memremap_pages+0x3c/0xa0
           pmem_attach_disk+0x188/0x770
           nvdimm_bus_probe+0xd8/0x470
      
      With the assumption that only memremap_pages() has alignment
      constraints, enforce memremap_compat_align() for
      pmem_should_map_pages(), nd_pfn, and nd_dax cases. This includes
      preventing the creation of namespaces where the base address is
      misaligned and cases there infoblock padding parameters are invalid.
      Reported-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Fixes: a3619190 ("libnvdimm/pfn: stop padding pmem namespaces to section alignment")
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      6acd7d5e
    • Dan Williams's avatar
      libnvdimm/pfn: Prevent raw mode fallback if pfn-infoblock valid · b2ba7e91
      Dan Williams authored
      The EOPNOTSUPP return code from the pmem driver indicates that the
      namespace has a configuration that may be valid, but the current kernel
      does not support it. Expand this to all of the nd_pfn_validate() error
      conditions after the infoblock has been verified as self consistent.
      
      This prevents exposing the namespace to I/O when the infoblock needs to
      be corrected, or the system needs to be put into a different
      configuration (like changing the page size on PowerPC).
      
      Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      b2ba7e91
  4. 29 Feb, 2020 2 commits
  5. 21 Feb, 2020 1 commit
    • Dan Williams's avatar
      mm/memremap_pages: Introduce memremap_compat_align() · 9ffc1d19
      Dan Williams authored
      The "sub-section memory hotplug" facility allows memremap_pages() users
      like libnvdimm to compensate for hardware platforms like x86 that have a
      section size larger than their hardware memory mapping granularity.  The
      compensation that sub-section support affords is being tolerant of
      physical memory resources shifting by units smaller (64MiB on x86) than
      the memory-hotplug section size (128 MiB). Where the platform
      physical-memory mapping granularity is limited by the number and
      capability of address-decode-registers in the memory controller.
      
      While the sub-section support allows memremap_pages() to operate on
      sub-section (2MiB) granularity, the Power architecture may still
      require 16MiB alignment on "!radix_enabled()" platforms.
      
      In order for libnvdimm to be able to detect and manage this per-arch
      limitation, introduce memremap_compat_align() as a common minimum
      alignment across all driver-facing memory-mapping interfaces, and let
      Power override it to 16MiB in the "!radix_enabled()" case.
      
      The assumption / requirement for 16MiB to be a viable
      memremap_compat_align() value is that Power does not have platforms
      where its equivalent of address-decode-registers never hardware remaps a
      persistent memory resource on smaller than 16MiB boundaries. Note that I
      tried my best to not add a new Kconfig symbol, but header include
      entanglements defeated the #ifndef memremap_compat_align design pattern
      and the need to export it defeats the __weak design pattern for arch
      overrides.
      
      Based on an initial patch by Aneesh.
      
      Link: http://lore.kernel.org/r/CAPcyv4gBGNP95APYaBcsocEa50tQj9b5h__83vgngjq3ouGX_Q@mail.gmail.comReported-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Reported-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      9ffc1d19
  6. 19 Feb, 2020 1 commit
  7. 18 Feb, 2020 4 commits
    • Jan Kara's avatar
      tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT · c0e71d60
      Jan Kara authored
      When a kernel is configured without CONFIG_DEV_DAX_PMEM_COMPAT, the
      compilation of tools/testing/nvdimm fails with:
      
        Building modules, stage 2.
        MODPOST 11 modules
      ERROR: "dax_pmem_compat_test" [tools/testing/nvdimm/test/nfit_test.ko] undefined!
      
      Fix the problem by calling dax_pmem_compat_test() only if the kernel has
      the required functionality.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20200123154720.12097-1-jack@suse.czSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      c0e71d60
    • Lukas Bulwahn's avatar
      MAINTAINERS: clarify maintenance of nvdimm testing tool · b9bd8039
      Lukas Bulwahn authored
      The git history shows that the files under ./tools/testing/nvdimm are
      being developed and maintained by the LIBNVDIMM maintainers.
      
      This was identified with a small script that finds all files only
      belonging to "THE REST" according to the current MAINTAINERS file, and I
      acted upon its output.
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Link: https://lore.kernel.org/r/20200201170933.924-1-lukas.bulwahn@gmail.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      b9bd8039
    • Dan Williams's avatar
      libnvdimm/e820: Retrieve and populate correct 'target_node' info · 7b27a862
      Dan Williams authored
      Use the new phys_to_target_node() and numa_map_to_online_node() helpers
      to retrieve the correct id for the 'numa_node' ("local" / online
      initiator node) and 'target_node' (offline target memory node) sysfs
      attributes.
      
      Below is an example from a 4 NUMA node system where all the memory on
      node2 is pmem / reserved. It should be noted that with the arrival of
      the ACPI HMAT table and EFI Specific Purpose Memory the kernel will
      start to see more platforms with reserved / performance differentiated
      memory in its own NUMA node. Hence all the stakeholders on the Cc for
      what is ostensibly a libnvdimm local patch.
      
      === Before ===
      
      /* Notice no online memory on node2 at start */
      
      # numactl --hardware
      available: 3 nodes (0-1,3)
      node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
      node 0 size: 3958 MB
      node 0 free: 3708 MB
      node 1 cpus: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
      node 1 size: 4027 MB
      node 1 free: 3871 MB
      node 3 cpus:
      node 3 size: 3994 MB
      node 3 free: 3971 MB
      node distances:
      node   0   1   3
        0:  10  21  21
        1:  21  10  21
        3:  21  21  10
      
      /*
       * Put the pmem namespace into devdax mode so it can be assigned to the
       * kmem driver
       */
      
      # ndctl create-namespace -e namespace0.0 -m devdax -f
      {
        "dev":"namespace0.0",
        "mode":"devdax",
        "map":"dev",
        "size":"3.94 GiB (4.23 GB)",
        "uuid":"1650af9b-9ba3-4704-acd6-10178399d9a3",
        [..]
      }
      
      /* Online Persistent Memory as System RAM */
      
      # daxctl reconfigure-device --mode=system-ram dax0.0
      libdaxctl: memblock_in_dev: dax0.0: memory0: Unable to determine phys_index: Success
      libdaxctl: memblock_in_dev: dax0.0: memory0: Unable to determine phys_index: Success
      libdaxctl: memblock_in_dev: dax0.0: memory0: Unable to determine phys_index: Success
      libdaxctl: memblock_in_dev: dax0.0: memory0: Unable to determine phys_index: Success
      [
        {
          "chardev":"dax0.0",
          "size":4225761280,
          "target_node":0,
          "mode":"system-ram"
        }
      ]
      reconfigured 1 device
      
      /* Note that the memory is onlined by default to the wrong node, node0 */
      
      # numactl --hardware
      available: 3 nodes (0-1,3)
      node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
      node 0 size: 7926 MB
      node 0 free: 7655 MB
      node 1 cpus: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
      node 1 size: 4027 MB
      node 1 free: 3871 MB
      node 3 cpus:
      node 3 size: 3994 MB
      node 3 free: 3971 MB
      node distances:
      node   0   1   3
        0:  10  21  21
        1:  21  10  21
        3:  21  21  10
      
      === After ===
      
      /* Notice that the "phys_index" error messages are gone */
      
      # daxctl reconfigure-device --mode=system-ram dax0.0
      [
        {
          "chardev":"dax0.0",
          "size":4225761280,
          "target_node":2,
          "mode":"system-ram"
        }
      ]
      reconfigured 1 device
      
      /* Notice that node2 is now correctly populated */
      
      # numactl --hardware
      available: 4 nodes (0-3)
      node 0 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
      node 0 size: 3958 MB
      node 0 free: 3793 MB
      node 1 cpus: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
      node 1 size: 4027 MB
      node 1 free: 3851 MB
      node 2 cpus:
      node 2 size: 3968 MB
      node 2 free: 3968 MB
      node 3 cpus:
      node 3 size: 3994 MB
      node 3 free: 3908 MB
      node distances:
      node   0   1   2   3
        0:  10  21  21  21
        1:  21  10  21  21
        2:  21  21  10  21
        3:  21  21  21  10
      
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Link: https://lore.kernel.org/r/158188327614.894464.13122730362187722603.stgit@dwillia2-desk3.amr.corp.intel.com
      7b27a862
    • Dan Williams's avatar
      x86/NUMA: Provide a range-to-target_node lookup facility · 5d30f92e
      Dan Williams authored
      The DEV_DAX_KMEM facility is a generic mechanism to allow device-dax
      instances, fronting performance-differentiated-memory like pmem, to be
      added to the System RAM pool. The NUMA node for that hot-added memory is
      derived from the device-dax instance's 'target_node' attribute.
      
      Recall that the 'target_node' is the ACPI-PXM-to-node translation for
      memory when it comes online whereas the 'numa_node' attribute of the
      device represents the closest online cpu node.
      
      Presently useful target_node information from the ACPI SRAT is discarded
      with the expectation that "Reserved" memory will never be onlined. Now,
      DEV_DAX_KMEM violates that assumption, there is a need to retain the
      translation. Move, rather than discard, numa_memblk data to a secondary
      array that memory_add_physaddr_to_target_node() may consider at a later
      point in time.
      
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <x86@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/158188326978.894464.217282995221175417.stgit@dwillia2-desk3.amr.corp.intel.com
      5d30f92e
  8. 17 Feb, 2020 4 commits
  9. 16 Feb, 2020 10 commits
    • Linus Torvalds's avatar
      Linux 5.6-rc2 · 11a48a5a
      Linus Torvalds authored
      11a48a5a
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.6-1' of https://github.com/cminyard/linux-ipmi · ab02b61f
      Linus Torvalds authored
      Pull IPMI update from Corey Minyard:
       "Minor bug fixes for IPMI
      
        I know this is late; I've been travelling and, well, I've been
        distracted.
      
        This is just a few bug fixes and adding i2c support to the IPMB
        driver, which is something I wanted from the beginning for it"
      
      * tag 'for-linus-5.6-1' of https://github.com/cminyard/linux-ipmi:
        drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write
        ipmi:ssif: Handle a possible NULL pointer reference
        drivers: ipmi: Modify max length of IPMB packet
        drivers: ipmi: Support raw i2c packet in IPMB
      ab02b61f
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 44024adb
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "Bugfixes and improvements to selftests.
      
        On top of this, Mauro converted the KVM documentation to rst format,
        which was very welcome"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (44 commits)
        docs: virt: guest-halt-polling.txt convert to ReST
        docs: kvm: review-checklist.txt: rename to ReST
        docs: kvm: Convert timekeeping.txt to ReST format
        docs: kvm: Convert s390-diag.txt to ReST format
        docs: kvm: Convert ppc-pv.txt to ReST format
        docs: kvm: Convert nested-vmx.txt to ReST format
        docs: kvm: Convert mmu.txt to ReST format
        docs: kvm: Convert locking.txt to ReST format
        docs: kvm: Convert hypercalls.txt to ReST format
        docs: kvm: arm/psci.txt: convert to ReST
        docs: kvm: convert arm/hyp-abi.txt to ReST
        docs: kvm: Convert api.txt to ReST format
        docs: kvm: convert devices/xive.txt to ReST
        docs: kvm: convert devices/xics.txt to ReST
        docs: kvm: convert devices/vm.txt to ReST
        docs: kvm: convert devices/vfio.txt to ReST
        docs: kvm: convert devices/vcpu.txt to ReST
        docs: kvm: convert devices/s390_flic.txt to ReST
        docs: kvm: convert devices/mpic.txt to ReST
        docs: kvm: convert devices/arm-vgit.txt to ReST
        ...
      44024adb
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · b982df72
      Linus Torvalds authored
      Pull EDAC fixes from Borislav Petkov:
       "Two fixes for use-after-free and memory leaking in the EDAC core, by
        Robert Richter.
      
        Debug options like DEBUG_TEST_DRIVER_REMOVE, KASAN and DEBUG_KMEMLEAK
        unearthed issues with the lifespan of memory allocated by the EDAC
        memory controller descriptor due to misdesigned memory freeing, done
        partially by the EDAC core *and* the driver core, which is problematic
        to say the least.
      
        These two are minimal fixes to take care of stable - a proper rework
        is following which cleans up that mess properly"
      
      * tag 'edac_urgent_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/sysfs: Remove csrow objects on errors
        EDAC/mc: Fix use-after-free and memleaks during device removal
      b982df72
    • Linus Torvalds's avatar
      Merge tag 'block-5.6-2020-02-16' of git://git.kernel.dk/linux-block · e29c6a13
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Not a lot here, which is great, basically just three small bcache
        fixes from Coly, and four NVMe fixes via Keith"
      
      * tag 'block-5.6-2020-02-16' of git://git.kernel.dk/linux-block:
        nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info
        nvme/pci: move cqe check after device shutdown
        nvme: prevent warning triggered by nvme_stop_keep_alive
        nvme/tcp: fix bug on double requeue when send fails
        bcache: remove macro nr_to_fifo_front()
        bcache: Revert "bcache: shrink btree node cache after bch_btree_check()"
        bcache: ignore pending signals when creating gc and allocator thread
      e29c6a13
    • Linus Torvalds's avatar
      Merge tag 'for-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 713db356
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Two races fixed, memory leak fix, sysfs directory fixup and two new
        log messages:
      
         - two fixed race conditions: extent map merging and truncate vs
           fiemap
      
         - create the right sysfs directory with device information and move
           the individual device dirs under it
      
         - print messages when the tree-log is replayed at mount time or
           cannot be replayed on remount"
      
      * tag 'for-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: sysfs, move device id directories to UUID/devinfo
        btrfs: sysfs, add UUID/devinfo kobject
        Btrfs: fix race between shrinking truncate and fiemap
        btrfs: log message when rw remount is attempted with unclean tree-log
        btrfs: print message when tree-log replay starts
        Btrfs: fix race between using extent maps and merging them
        btrfs: ref-verify: fix memory leaks
      713db356
    • Linus Torvalds's avatar
      Merge tag '5.6-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 288b27a0
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Four small CIFS/SMB3 fixes. One (the EA overflow fix) for stable"
      
      * tag '5.6-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: make sure we do not overflow the max EA buffer size
        cifs: enable change notification for SMB2.1 dialect
        cifs: Fix mode output in debugging statements
        cifs: fix mount option display for sec=krb5i
      288b27a0
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 8a8b8096
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Miscellaneous ext4 bug fixes (all stable fodder)"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: improve explanation of a mount failure caused by a misconfigured kernel
        jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer
        jbd2: move the clearing of b_modified flag to the journal_unmap_buffer()
        ext4: add cond_resched() to ext4_protect_reserved_inode
        ext4: fix checksum errors with indexed dirs
        ext4: fix support for inode sizes > 1024 bytes
        ext4: simplify checking quota limits in ext4_statfs()
        ext4: don't assume that mmp_nodename/bdevname have NUL
      8a8b8096
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · db70e26e
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - a few drivers have been updated to use flexible-array syntax instead
         of GCC extension
      
       - ili210x touchscreen driver now supports the 2120 protocol flavor
      
       - a couple more of Synaptics devices have been switched over to RMI4
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: cyapa - replace zero-length array with flexible-array member
        Input: tca6416-keypad - replace zero-length array with flexible-array member
        Input: gpio_keys_polled - replace zero-length array with flexible-array member
        Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list
        Input: synaptics - enable SMBus on ThinkPad L470
        Input: synaptics - switch T470s to RMI4 by default
        Input: gpio_keys - replace zero-length array with flexible-array member
        Input: goldfish_events - replace zero-length array with flexible-array member
        Input: psmouse - switch to using i2c_new_scanned_device()
        Input: ili210x - add ili2120 support
        Input: ili210x - fix return value of is_visible function
      db70e26e
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 54654e14
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Not too much going on here, though there are about four fixes related
        to stuff merged during the last merge window.
      
        We also see the return of a syzkaller instance with access to RDMA
        devices, and a few bugs detected by that squished.
      
         - Fix three crashers and a memory memory leak for HFI1
      
         - Several bugs found by syzkaller
      
         - A bug fix for the recent QP counters feature on older mlx5 HW
      
         - Locking inversion in cxgb4
      
         - Unnecessary WARN_ON in siw
      
         - A umad crasher regression during unload, from a bug fix for
           something else
      
         - Bugs introduced in the merge window:
             - Missed list_del in uverbs file rework, core and mlx5 devx
             - Unexpected integer math truncation in the mlx5 VAR patches
             - Compilation bug fix for the VAR patches on 32 bit"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        IB/mlx5: Use div64_u64 for num_var_hw_entries calculation
        RDMA/core: Fix protection fault in get_pkey_idx_qp_list
        RDMA/rxe: Fix soft lockup problem due to using tasklets in softirq
        RDMA/mlx5: Prevent overflow in mmap offset calculations
        IB/umad: Fix kernel crash while unloading ib_umad
        RDMA/mlx5: Fix async events cleanup flows
        RDMA/core: Add missing list deletion on freeing event queue
        RDMA/siw: Remove unwanted WARN_ON in siw_cm_llp_data_ready()
        RDMA/iw_cxgb4: initiate CLOSE when entering TERM
        IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported
        RDMA/core: Fix invalid memory access in spec_filter_size
        IB/rdmavt: Reset all QPs when the device is shut down
        IB/hfi1: Close window for pq and request coliding
        IB/hfi1: Acquire lock to release TID entries when user file is closed
        RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create
      54654e14
  10. 15 Feb, 2020 10 commits
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · b719ae07
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A handful of fixes that have come in since the merge window:
      
         - Fix of PCI interrupt map on arm64 fast model (SW emulator)
      
         - Fixlet for sound on ST platforms and a small cleanup of deprecated
           DT properties
      
         - A stack buffer overflow fix for moxtet
      
         - Fuse driver build fix for Tegra194
      
         - A few config updates to turn on new drivers merged this cycle"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        bus: moxtet: fix potential stack buffer overflow
        soc/tegra: fuse: Fix build with Tegra194 configuration
        ARM: dts: sti: fixup sound frame-inversion for stihxxx-b2120.dtsi
        ARM: dts: sti: Remove deprecated snps PHY properties for stih410-b2260
        arm64: defconfig: Enable DRM_SUN6I_DSI
        arm64: defconfig: Enable CONFIG_SUN8I_THERMAL
        ARM: sunxi: Enable CONFIG_SUN8I_THERMAL
        arm64: defconfig: Set bcm2835-dma as built-in
        ARM: configs: Cleanup old Kconfig options
        ARM: npcm: Bring back GPIOLIB support
        arm64: dts: fast models: Fix FVP PCI interrupt-map property
      b719ae07
    • Linus Torvalds's avatar
      Merge tag 's390-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 3e71e121
      Linus Torvalds authored
      Pull s390 updates from Vasily Gorbik:
      
       - Enable paes-s390 cipher selftests in testmgr (acked-by Herbert Xu).
      
       - Fix protected key length update in PKEY_SEC2PROTK ioctl and increase
         card/queue requests counter to 64-bit in crypto code.
      
       - Fix clang warning in get_tod_clock.
      
       - Fix ultravisor info length extensions handling.
      
       - Fix style of SPDX License Identifier in vfio-ccw.
      
       - Avoid unnecessary GFP_ATOMIC and simplify ACK tracking in qdio.
      
      * tag 's390-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        crypto/testmgr: enable selftests for paes-s390 ciphers
        s390/time: Fix clk type in get_tod_clock
        s390/uv: Fix handling of length extensions
        s390/qdio: don't allocate *aob array with GFP_ATOMIC
        s390/qdio: simplify ACK tracking
        s390/zcrypt: fix card and queue total counter wrap
        s390/pkey: fix missing length of protected key on return
        vfio-ccw: Use the correct style for SPDX License Identifier
      3e71e121
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.6-rc2' of... · bd516133
      Linus Torvalds authored
      Merge tag 'hwmon-for-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "Fix compatible string typos in the xdpe12284 driver, and a wrong bit
        value in the ltc2978 driver"
      
      * tag 'hwmon-for-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (pmbus/xdpe12284) fix typo in compatible strings
        hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions.
      bd516133
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ef78e5b7
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Misc fixes all over the place:
      
         - Fix NUMA over-balancing between lightly loaded nodes. This is
           fallout of the big load-balancer rewrite.
      
         - Fix the NOHZ remote loadavg update logic, which fixes anomalies
           like reported 150 loadavg on mostly idle CPUs.
      
         - Fix XFS performance/scalability
      
         - Fix throttled groups unbound task-execution bug
      
         - Fix PSI procfs boundary condition
      
         - Fix the cpu.uclamp.{min,max} cgroup configuration write checks
      
         - Fix DocBook annotations
      
         - Fix RCU annotations
      
         - Fix overly CPU-intensive housekeeper CPU logic loop on large CPU
           counts"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Fix kernel-doc warning in attach_entity_load_avg()
        sched/core: Annotate curr pointer in rq with __rcu
        sched/psi: Fix OOB write when writing 0 bytes to PSI files
        sched/fair: Allow a per-CPU kthread waking a task to stack on the same CPU, to fix XFS performance regression
        sched/fair: Prevent unlimited runtime on throttled group
        sched/nohz: Optimize get_nohz_timer_target()
        sched/uclamp: Reject negative values in cpu_uclamp_write()
        sched/fair: Allow a small load imbalance between low utilisation SD_NUMA domains
        timers/nohz: Update NOHZ load in remote tick
        sched/core: Don't skip remote tick for idle CPUs
      ef78e5b7
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · da99f935
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Fixes and HW enablement patches:
      
         - Tooling fixes, most of which are tooling header synchronization
           with v5.6 changes
      
         - Fix kprobes fallout on ARM
      
         - Add Intel Elkhart Lake support and extend Tremont support, these
           are relatively simple and should only affect those models
      
         - Fix the AMD family 17h generic event table"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits)
        perf llvm: Fix script used to obtain kernel make directives to work with new kbuild
        tools headers kvm: Sync linux/kvm.h with the kernel sources
        tools headers kvm: Sync kvm headers with the kernel sources
        tools arch x86: Sync asm/cpufeatures.h with the kernel sources
        tools headers x86: Sync disabled-features.h
        tools include UAPI: Sync sound/asound.h copy
        tools headers UAPI: Sync asm-generic/mman-common.h with the kernel
        perf tools: Add arm64 version of get_cpuid()
        tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
        tools headers uapi: Sync linux/fscrypt.h with the kernel sources
        tools headers UAPI: Sync sched.h with the kernel
        perf trace: Resolve prctl's 'option' arg strings to numbers
        perf beauty prctl: Export the 'options' strarray
        tools headers UAPI: Sync prctl.h with the kernel sources
        tools headers UAPI: Sync copy of arm64's asm/unistd.h with the kernel sources
        perf maps: Move kmap::kmaps setup to maps__insert()
        perf maps: Fix map__clone() for struct kmap
        perf maps: Mark ksymbol DSOs with kernel type
        perf maps: Mark module DSOs with kernel type
        tools include UAPI: Sync x86's syscalls_64.tbl, generic unistd.h and fcntl.h to pick up openat2 and pidfd_getfd
        ...
      da99f935
    • Marek Behún's avatar
      bus: moxtet: fix potential stack buffer overflow · 3bf3c974
      Marek Behún authored
      The input_read function declares the size of the hex array relative to
      sizeof(buf), but buf is a pointer argument of the function. The hex
      array is meant to contain hexadecimal representation of the bin array.
      
      Link: https://lore.kernel.org/r/20200215142130.22743-1-marek.behun@nic.cz
      Fixes: 5bc7f990 ("bus: Add support for Moxtet bus")
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Reported-by: default avatarsohu0106 <sohu0106@126.com>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      3bf3c974
    • Theodore Ts'o's avatar
      ext4: improve explanation of a mount failure caused by a misconfigured kernel · d65d87a0
      Theodore Ts'o authored
      If CONFIG_QFMT_V2 is not enabled, but CONFIG_QUOTA is enabled, when a
      user tries to mount a file system with the quota or project quota
      enabled, the kernel will emit a very confusing messsage:
      
          EXT4-fs warning (device vdc): ext4_enable_quotas:5914: Failed to enable quota tracking (type=0, err=-3). Please run e2fsck to fix.
          EXT4-fs (vdc): mount failed
      
      We will now report an explanatory message indicating which kernel
      configuration options have to be enabled, to avoid customer/sysadmin
      confusion.
      
      Link: https://lore.kernel.org/r/20200215012738.565735-1-tytso@mit.edu
      Google-Bug-Id: 149093531
      Fixes: 7c319d32 ("ext4: make quota as first class supported feature")
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Cc: stable@kernel.org
      d65d87a0
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo-5.6-20200214' of... · dfb9b69e
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo-5.6-20200214' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
      BPF:
      
        Arnaldo Carvalho de Melo:
      
        - Fix script used to obtain kernel make directives to work with new kbuild
          used for building BPF programs.
      
      maps:
      
        Jiri Olsa:
      
        - Fixup kmap->kmaps backpointer in kernel maps.
      
      arm64:
      
        John Garry:
      
        - Add arm64 version of get_cpuid() to get proper, arm64 specific output from
          'perf list' and other tools.
      
      perf top:
      
        Kim Phillips:
      
        - Update kernel idle symbols so that output in AMD systems is in line with
          other systems.
      
      perf stat:
      
        Kim Phillips:
      
        - Don't report a null stalled cycles per insn metric.
      
      tools headers:
      
        Arnaldo Carvalho de Melo:
      
        - Sync tools/ headers with the kernel sources to get things like syscall
          numbers and new arguments so that 'perf trace' can decode and use them in
          tracepoint filters, e.g. prctl's new PR_{G,S}ET_IO_FLUSHER options.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      dfb9b69e
    • Gustavo A. R. Silva's avatar
      Input: cyapa - replace zero-length array with flexible-array member · 3dbae155
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Link: https://lore.kernel.org/r/20200214172132.GA28389@embeddedorSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      3dbae155
    • Gustavo A. R. Silva's avatar
      Input: tca6416-keypad - replace zero-length array with flexible-array member · 94bef5d5
      Gustavo A. R. Silva authored
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Link: https://lore.kernel.org/r/20200214172022.GA27490@embeddedorSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      94bef5d5