Skip to content
Permalink
Mauro-Carvalho…
Switch branches/tags

Commits on Aug 18, 2021

  1. phy: HiSilicon: Add driver for Kirin 970 PCIe PHY

    The Kirin 970 PHY is somewhat similar to the Kirin 960, but it
    does a lot more. Add the needed bits for PCIe to start working on
    HiKey 970 boards.
    
    Co-developed-by: Manivannan Sadhasivam <mani@kernel.org>
    Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    mchehab authored and intel-lab-lkp committed Aug 18, 2021

Commits on Aug 17, 2021

  1. Merge tag 'trace-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/rostedt/linux-trace
    
    Pull tracing fix from Steven Rostedt:
     "Limit the shooting in the foot of tp_printk
    
      The "tp_printk" option redirects the trace event output to printk at
      boot up. This is useful when a machine crashes before boot where the
      trace events can not be retrieved by the in kernel ring buffer. But it
      can be "dangerous" because trace events can be located in high
      frequency locations such as interrupts and the scheduler, where a
      printk can slow it down that it live locks the machine (because by the
      time the printk finishes, the next event is triggered). Thus tp_printk
      must be used with care.
    
      It was discovered that the filter logic to trace events does not apply
      to the tp_printk events. This can cause a surprise and live lock when
      the user expects it to be filtered to limit the amount of events
      printed to the console when in fact it still prints everything"
    
    * tag 'trace-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
      tracing: Apply trace filters on all output channels
    torvalds committed Aug 17, 2021
  2. Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git…

    …/herbert/crypto-2.6
    
    Pull crypto fix from Herbert Xu:
     "This contains a fix for a potential boot failure due to a missing
      Kconfig dependency for people upgrading with the DRBG enabled"
    
    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
      crypto: drbg - select SHA512
    torvalds committed Aug 17, 2021

Commits on Aug 16, 2021

  1. Merge tag 'mtd/fixes-for-5.14-rc7' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/mtd/linux
    
    Pull MTD fixes from Miquel Raynal:
     "MTD core fixes:
       - Fix lock hierarchy in deregister_mtd_blktrans
       - Handle flashes without OTP gracefully
       - Break circular locks in register_mtd_blktrans
    
      MTD device fixes:
       - mchp48l640:
          - Fix memory leak on cmd
          - Silence some uninitialized variable warnings
       - blkdevs:
          - Initialize rq.limits.discard_granularity
    
      CFI fixes:
       - Fix crash when erasing/writing AMD cards
    
      Raw NAND fixes:
       - Fix of_get_nand_secure_regions():
          - Add a missing check
          - Avoid an unwanted probe failure when a DT property is missing"
    
    * tag 'mtd/fixes-for-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
      mtd: rawnand: Fix probe failure due to of_get_nand_secure_regions()
      mtd: fix lock hierarchy in deregister_mtd_blktrans
      mtd: devices: mchp48l640: Fix memory leak on cmd
      mtd: cfi_cmdset_0002: fix crash when erasing/writing AMD cards
      mtd: core: handle flashes without OTP gracefully
      mtd: mchp48l640: silence some uninitialized variable warnings
      mtd: break circular locks in register_mtd_blktrans
      mtd: rawnand: Add a check in of_get_nand_secure_regions()
      mtd: mtd_blkdevs: Initialize rq.limits.discard_granularity
    torvalds committed Aug 16, 2021
  2. Merge tag 'trace-v5.14-rc5-2' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/rostedt/linux-trace
    
    Pull tracing fixes from Steven Rostedt:
     "Fixes and clean ups to tracing:
    
       - Fix header alignment when PREEMPT_RT is enabled for osnoise tracer
    
       - Inject "stop" event to see where osnoise stopped the trace
    
       - Define DYNAMIC_FTRACE_WITH_ARGS as some code had an #ifdef for it
    
       - Fix erroneous message for bootconfig cmdline parameter
    
       - Fix crash caused by not found variable in histograms"
    
    * tag 'trace-v5.14-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
      tracing / histogram: Fix NULL pointer dereference on strcmp() on NULL event name
      init: Suppress wrong warning for bootconfig cmdline parameter
      tracing: define needed config DYNAMIC_FTRACE_WITH_ARGS
      trace/osnoise: Print a stop tracing message
      trace/timerlat: Add a header with PREEMPT_RT additional fields
      trace/osnoise: Add a header with PREEMPT_RT additional fields
    torvalds committed Aug 16, 2021
  3. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull KVM fixes from Paolo Bonzini:
     "Two nested virtualization fixes for AMD processors"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
      KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)
      KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
    torvalds committed Aug 16, 2021
  4. Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/mst/vhost
    
    Pull virtio fixes from Michael Tsirkin:
     "Fixes in virtio, vhost, and vdpa drivers"
    
    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
      vdpa/mlx5: Fix queue type selection logic
      vdpa/mlx5: Avoid destroying MR on empty iotlb
      tools/virtio: fix build
      virtio_ring: pull in spinlock header
      vringh: pull in spinlock header
      virtio-blk: Add validation for block size in config space
      vringh: Use wiov->used to check for read/write desc order
      virtio_vdpa: reject invalid vq indices
      vdpa: Add documentation for vdpa_alloc_device() macro
      vDPA/ifcvf: Fix return value check for vdpa_alloc_device()
      vp_vdpa: Fix return value check for vdpa_alloc_device()
      vdpa_sim: Fix return value check for vdpa_alloc_device()
      vhost: Fix the calculation in vhost_overflow()
      vhost-vdpa: Fix integer overflow in vhost_vdpa_process_iotlb_update()
      virtio_pci: Support surprise removal of virtio pci device
      virtio: Protect vqs list access
      virtio: Keep vring_del_virtqueue() mirror of VQ create
      virtio: Improve vq->broken access to avoid any compiler optimization
    torvalds committed Aug 16, 2021
  5. tracing: Apply trace filters on all output channels

    The event filters are not applied on all of the output, which results in
    the flood of printk when using tp_printk. Unfolding
    event_trigger_unlock_commit_regs() into trace_event_buffer_commit(), so
    the filters can be applied on every output.
    
    Link: https://lkml.kernel.org/r/20210814034538.8428-1-kernelfans@gmail.com
    
    Cc: stable@vger.kernel.org
    Fixes: 0daa230 ("tracing: Add tp_printk cmdline to have tracepoints go to printk()")
    Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    liupingfan authored and rostedt committed Aug 16, 2021
  6. KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)

    If L1 disables VMLOAD/VMSAVE intercepts, and doesn't enable
    Virtual VMLOAD/VMSAVE (currently not supported for the nested hypervisor),
    then VMLOAD/VMSAVE must operate on the L1 physical memory, which is only
    possible by making L0 intercept these instructions.
    
    Failure to do so allowed the nested guest to run VMLOAD/VMSAVE unintercepted,
    and thus read/write portions of the host physical memory.
    
    Fixes: 89c8a49 ("KVM: SVM: Enable Virtual VMLOAD VMSAVE feature")
    
    Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Maxim Levitsky authored and bonzini committed Aug 16, 2021
  7. KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-…

    …2021-3653)
    
    * Invert the mask of bits that we pick from L2 in
      nested_vmcb02_prepare_control
    
    * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
    
    This fixes a security issue that allowed a malicious L1 to run L2 with
    AVIC enabled, which allowed the L2 to exploit the uninitialized and enabled
    AVIC to read/write the host physical memory at some offsets.
    
    Fixes: 3d6368e ("KVM: SVM: Add VMRUN handler")
    Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Maxim Levitsky authored and bonzini committed Aug 16, 2021

Commits on Aug 15, 2021

  1. Linux 5.14-rc6

    torvalds committed Aug 15, 2021
  2. Merge tag 'powerpc-5.14-5' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/powerpc/linux
    
    Pull powerpc fixes from Michael Ellerman:
    
     - Fix crashes coming out of nap on 32-bit Book3s (eg. powerbooks).
    
     - Fix critical and debug interrupts on BookE, seen as crashes when
       using ptrace.
    
     - Fix an oops when running an SMP kernel on a UP system.
    
     - Update pseries LPAR security flavor after partition migration.
    
     - Fix an oops when using kprobes on BookE.
    
     - Fix oops on 32-bit pmac by not calling do_IRQ() from
       timer_interrupt().
    
     - Fix softlockups on CPU hotplug into a CPU-less node with xive (P9).
    
    Thanks to Cédric Le Goater, Christophe Leroy, Finn Thain, Geetika
    Moolchandani, Laurent Dufour, Laurent Vivier, Nicholas Piggin, Pu Lehui,
    Radu Rendec, Srikar Dronamraju, and Stan Johnson.
    
    * tag 'powerpc-5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
      powerpc/xive: Do not skip CPU-less nodes when creating the IPIs
      powerpc/interrupt: Do not call single_step_exception() from other exceptions
      powerpc/interrupt: Fix OOPS by not calling do_IRQ() from timer_interrupt()
      powerpc/kprobes: Fix kprobe Oops happens in booke
      powerpc/pseries: Fix update of LPAR security flavor after LPM
      powerpc/smp: Fix OOPS in topology_init()
      powerpc/32: Fix critical and debug interrupts on BOOKE
      powerpc/32s: Fix napping restore in data storage interrupt (DSI)
    torvalds committed Aug 15, 2021
  3. Merge tag 'irq-urgent-2021-08-15' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/tip/tip
    
    Pull irq fixes from Thomas Gleixner:
     "A set of fixes for PCI/MSI and x86 interrupt startup:
    
       - Mask all MSI-X entries when enabling MSI-X otherwise stale unmasked
         entries stay around e.g. when a crashkernel is booted.
    
       - Enforce masking of a MSI-X table entry when updating it, which
         mandatory according to speification
    
       - Ensure that writes to MSI[-X} tables are flushed.
    
       - Prevent invalid bits being set in the MSI mask register
    
       - Properly serialize modifications to the mask cache and the mask
         register for multi-MSI.
    
       - Cure the violation of the affinity setting rules on X86 during
         interrupt startup which can cause lost and stale interrupts. Move
         the initial affinity setting ahead of actualy enabling the
         interrupt.
    
       - Ensure that MSI interrupts are completely torn down before freeing
         them in the error handling case.
    
       - Prevent an array out of bounds access in the irq timings code"
    
    * tag 'irq-urgent-2021-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      driver core: Add missing kernel doc for device::msi_lock
      genirq/msi: Ensure deactivation on teardown
      genirq/timings: Prevent potential array overflow in __irq_timings_store()
      x86/msi: Force affinity setup before startup
      x86/ioapic: Force affinity setup before startup
      genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUP
      PCI/MSI: Protect msi_desc::masked for multi-MSI
      PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown()
      PCI/MSI: Correct misleading comments
      PCI/MSI: Do not set invalid bits in MSI mask
      PCI/MSI: Enforce MSI[X] entry updates to be visible
      PCI/MSI: Enforce that MSI-X table entry is masked for update
      PCI/MSI: Mask all unused MSI-X entries
      PCI/MSI: Enable and mask MSI-X early
    torvalds committed Aug 15, 2021
  4. Merge tag 'locking_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/…

    …scm/linux/kernel/git/tip/tip
    
    Pull locking fix from Borislav Petkov:
    
     - Fix a CONFIG symbol's spelling
    
    * tag 'locking_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      locking/rtmutex: Use the correct rtmutex debugging config option
    torvalds committed Aug 15, 2021
  5. Merge tag 'efi_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/tip/tip
    
    Pull EFI fixes from Borislav Petkov:
     "A batch of fixes for the arm64 stub image loader:
    
       - fix a logic bug that can make the random page allocator fail
         spuriously
    
       - force reallocation of the Image when it overlaps with firmware
         reserved memory regions
    
       - fix an oversight that defeated on optimization introduced earlier
         where images loaded at a suitable offset are never moved if booting
         without randomization
    
       - complain about images that were not loaded at the right offset by
         the firmware image loader"
    
    * tag 'efi_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      efi/libstub: arm64: Double check image alignment at entry
      efi/libstub: arm64: Warn when efi_random_alloc() fails
      efi/libstub: arm64: Relax 2M alignment again for relocatable kernels
      efi/libstub: arm64: Force Image reallocation if BSS was not reserved
      arm64: efi: kaslr: Fix occasional random alloc (and boot) failure
    torvalds committed Aug 15, 2021
  6. Merge tag 'x86_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/tip/tip
    
    Pull x86 fixes from Borislav Petkov:
     "Two fixes:
    
       - An objdump checker fix to ignore parenthesized strings in the
         objdump version
    
       - Fix resctrl default monitoring groups reporting when new subgroups
         get created"
    
    * tag 'x86_urgent_for_v5.14_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      x86/resctrl: Fix default monitoring groups reporting
      x86/tools: Fix objdump version check again
    torvalds committed Aug 15, 2021
  7. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull KVM fixes from Paolo Bonzini:
     "ARM:
    
       - Plug race between enabling MTE and creating vcpus
    
       - Fix off-by-one bug when checking whether an address range is RAM
    
      x86:
    
       - Fixes for the new MMU, especially a memory leak on hosts with <39
         physical address bits
    
       - Remove bogus EFER.NX checks on 32-bit non-PAE hosts
    
       - WAITPKG fix"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
      KVM: x86/mmu: Protect marking SPs unsync when using TDP MMU with spinlock
      KVM: x86/mmu: Don't step down in the TDP iterator when zapping all SPTEs
      KVM: x86/mmu: Don't leak non-leaf SPTEs when zapping all SPTEs
      KVM: nVMX: Use vmx_need_pf_intercept() when deciding if L0 wants a #PF
      kvm: vmx: Sync all matching EPTPs when injecting nested EPT fault
      KVM: x86: remove dead initialization
      KVM: x86: Allow guest to set EFER.NX=1 on non-PAE 32-bit kernels
      KVM: VMX: Use current VMCS to query WAITPKG support for MSR emulation
      KVM: arm64: Fix race when enabling KVM_ARM_CAP_MTE
      KVM: arm64: Fix off-by-one in range_is_memory
    torvalds committed Aug 15, 2021
  8. Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/jejb/scsi
    
    Pull SCSI fixes from James Bottomley:
     "Three minor fixes, all in drivers"
    
    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
      scsi: mpt3sas: Fix incorrectly assigned error return and check
      scsi: storvsc: Log TEST_UNIT_READY errors as warnings
      scsi: lpfc: Move initialization of phba->poll_list earlier to avoid crash
    torvalds committed Aug 15, 2021
  9. Merge tag 'libnvdimm-fixes-5.14-rc6' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/nvdimm/nvdimm
    
    Pull libnvdimm fixes from Dan Williams:
     "A couple of fixes for long standing bugs, a warning fixup, and some
      miscellaneous dax cleanups.
    
      The bugs were recently found due to new platforms looking to use the
      ACPI NFIT "virtual" device definition, and new error injection
      capabilities to trigger error responses to label area requests. Ira's
      cleanups have been long pending, I neglected to send them earlier, and
      see no harm in including them now. This has all appeared in -next with
      no reported issues.
    
      Summary:
    
       - Fix support for NFIT "virtual" ranges (BIOS-defined memory disks)
    
       - Fix recovery from failed label storage areas on NVDIMM devices
    
       - Miscellaneous cleanups from Ira's investigation of
         dax_direct_access paths preparing for stray-write protection"
    
    * tag 'libnvdimm-fixes-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
      tools/testing/nvdimm: Fix missing 'fallthrough' warning
      libnvdimm/region: Fix label activation vs errors
      ACPI: NFIT: Fix support for virtual SPA ranges
      dax: Ensure errno is returned from dax_direct_access
      fs/dax: Clarify nr_pages to dax_direct_access()
      fs/fuse: Remove unneeded kaddr parameter
    torvalds committed Aug 15, 2021
  10. Merge tag 'usb-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/gregkh/usb
    
    Pull USB fix from Greg KH:
     "A single revert of a commit that caused problems in 5.14-rc5 for
      5.14-rc6. It has been in linux-next almost all week, and has resolved
      the issues that were reported on lots of different systems that were
      not the platform that the change was originally tested on (gotta love
      SoC cores used in multiple devices from multiple vendors...)"
    
    * tag 'usb-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
      Revert "usb: dwc3: gadget: Use list_replace_init() before traversing lists"
    torvalds committed Aug 15, 2021
  11. Merge tag 'staging-5.14-rc6' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/gregkh/staging
    
    Pull IIO driver fixes from Greg KH:
     "Here are some small IIO driver fixes for reported problems for
      5.14-rc6 (no staging driver fixes at the moment).
    
      All of them resolve reported issues and have been in linux-next all
      week with no reported problems. Full details are in the shortlog"
    
    * tag 'staging-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
      iio: adc: Fix incorrect exit of for-loop
      iio: humidity: hdc100x: Add margin to the conversion time
      dt-bindings: iio: st: Remove wrong items length check
      iio: accel: fxls8962af: fix i2c dependency
      iio: adis: set GPIO reset pin direction
      iio: adc: ti-ads7950: Ensure CS is deasserted after reading channels
      iio: accel: fxls8962af: fix potential use of uninitialized symbol
    torvalds committed Aug 15, 2021
  12. Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/wsa/linux
    
    Pull i2c fixes from Wolfram Sang:
     "One driver bugfix, a documentation bugfix, and an "uninitialized data"
      leak fix for the core"
    
    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      Documentation: i2c: add i2c-sysfs into index
      i2c: dev: zero out array used for i2c reads from userspace
      i2c: iproc: fix race between client unreg and tasklet
    torvalds committed Aug 15, 2021

Commits on Aug 14, 2021

  1. Merge tag 'for-linus-5.14-rc6-tag' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/xen/tip
    
    Pull xen fixes from Juergen Gross:
     "A small cleanup patch and a fix of a rare race in the Xen evtchn
      driver"
    
    * tag 'for-linus-5.14-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
      xen/events: Fix race in set_evtchn_to_irq
      xen/events: remove redundant initialization of variable irq
    torvalds committed Aug 14, 2021
  2. Merge tag 'riscv-for-linus-5.14-rc6' of git://git.kernel.org/pub/scm/…

    …linux/kernel/git/riscv/linux
    
    Pull RISC-V fixes from Palmer Dabbelt:
    
     - avoid passing -mno-relax to compilers that don't support it
    
     - a comment fix
    
    * tag 'riscv-for-linus-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
      riscv: Fix comment regarding kernel mapping overlapping with IS_ERR_VALUE
      riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it
    torvalds committed Aug 14, 2021
  3. Merge tag 'configfs-5.14' of git://git.infradead.org/users/hch/configfs

    Pull configfs fix from Christoph Hellwig:
    
     - fix to revert to the historic write behavior (Bart Van Assche)
    
    * tag 'configfs-5.14' of git://git.infradead.org/users/hch/configfs:
      configfs: restore the kernel v5.13 text attribute write behavior
    torvalds committed Aug 14, 2021
  4. Merge branch 'akpm' (patches from Andrew)

    Merge misc fixes from Andrew Morton:
     "7 patches.
    
      Subsystems affected by this patch series: mm (kasan, mm/slub,
      mm/madvise, and memcg), and lib"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
      lib: use PFN_PHYS() in devmem_is_allowed()
      mm/memcg: fix incorrect flushing of lruvec data in obj_stock
      mm/madvise: report SIGBUS as -EFAULT for MADV_POPULATE_(READ|WRITE)
      mm: slub: fix slub_debug disabling for list of slabs
      slub: fix kmalloc_pagealloc_invalid_free unit test
      kasan, slub: reset tag when printing address
      kasan, kmemleak: reset tags when scanning block
    torvalds committed Aug 14, 2021
  5. Merge tag '5.14-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

    Pull cifs fixes from Steve French:
     "Four CIFS/SMB3 Fixes, all for stable, two relating to deferred close,
      and one for the 'modefromsid' mount option (when 'idsfromsid' not
      specified)"
    
    * tag '5.14-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
      cifs: Call close synchronously during unlink/rename/lease break.
      cifs: Handle race conditions during rename
      cifs: use the correct max-length for dentry_path_raw()
      cifs: create sd context must be a multiple of 8
    torvalds committed Aug 14, 2021
  6. Merge tag 'linux-kselftest-fixes-5.14-rc6' of git://git.kernel.org/pu…

    …b/scm/linux/kernel/git/shuah/linux-kselftest
    
    Pull Kselftest fix from Shuah Khan:
     "A single patch to sgx test to fix Q1 and Q2 calculation"
    
    * tag 'linux-kselftest-fixes-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
      selftests/sgx: Fix Q1 and Q2 calculation in sigstruct.c
    torvalds committed Aug 14, 2021
  7. lib: use PFN_PHYS() in devmem_is_allowed()

    The physical address may exceed 32 bits on 32-bit systems with more than
    32 bits of physcial address.  Use PFN_PHYS() in devmem_is_allowed(), or
    the physical address may overflow and be truncated.
    
    We found this bug when mapping a high addresses through devmem tool,
    when CONFIG_STRICT_DEVMEM is enabled on the ARM with ARM_LPAE and devmem
    is used to map a high address that is not in the iomem address range, an
    unexpected error indicating no permission is returned.
    
    This bug was initially introduced from v2.6.37, and the function was
    moved to lib in v5.11.
    
    Link: https://lkml.kernel.org/r/20210731025057.78825-1-wangliang101@huawei.com
    Fixes: 087aaff ("ARM: implement CONFIG_STRICT_DEVMEM by disabling access to RAM via /dev/mem")
    Fixes: 527701e ("lib: Add a generic version of devmem_is_allowed()")
    Signed-off-by: Liang Wang <wangliang101@huawei.com>
    Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
    Cc: Palmer Dabbelt <palmerdabbelt@google.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: Liang Wang <wangliang101@huawei.com>
    Cc: Xiaoming Ni <nixiaoming@huawei.com>
    Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
    Cc: <stable@vger.kernel.org>	[2.6.37+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Liang Wang authored and torvalds committed Aug 14, 2021
  8. mm/memcg: fix incorrect flushing of lruvec data in obj_stock

    When mod_objcg_state() is called with a pgdat that is different from
    that in the obj_stock, the old lruvec data cached in obj_stock are
    flushed out.  Unfortunately, they were flushed to the new pgdat and so
    the data go to the wrong node.  This will screw up the slab data
    reported in /sys/devices/system/node/node*/meminfo.
    
    Fix that by flushing the data to the cached pgdat instead.
    
    Link: https://lkml.kernel.org/r/20210802143834.30578-1-longman@redhat.com
    Fixes: 68ac5b3 ("mm/memcg: cache vmstat data in percpu memcg_stock_pcp")
    Signed-off-by: Waiman Long <longman@redhat.com>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Reviewed-by: Shakeel Butt <shakeelb@google.com>
    Acked-by: Roman Gushchin <guro@fb.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Pekka Enberg <penberg@kernel.org>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Muchun Song <songmuchun@bytedance.com>
    Cc: Alex Shi <alex.shi@linux.alibaba.com>
    Cc: Chris Down <chris@chrisdown.name>
    Cc: Yafang Shao <laoar.shao@gmail.com>
    Cc: Wei Yang <richard.weiyang@gmail.com>
    Cc: Masayoshi Mizuma <msys.mizuma@gmail.com>
    Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Waiman Long <longman@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Waiman Long authored and torvalds committed Aug 14, 2021
  9. mm/madvise: report SIGBUS as -EFAULT for MADV_POPULATE_(READ|WRITE)

    Doing some extended tests and polishing the man page update for
    MADV_POPULATE_(READ|WRITE), I realized that we end up converting also
    SIGBUS (via -EFAULT) to -EINVAL, making it look like yet another
    madvise() user error.
    
    We want to report only problematic mappings and permission problems that
    the user could have know as -EINVAL.
    
    Let's not convert -EFAULT arising due to SIGBUS (or SIGSEGV) to -EINVAL,
    but instead indicate -EFAULT to user space.  While we could also convert
    it to -ENOMEM, using -EFAULT looks more helpful when user space might
    want to troubleshoot what's going wrong: MADV_POPULATE_(READ|WRITE) is
    not part of an final Linux release and we can still adjust the behavior.
    
    Link: https://lkml.kernel.org/r/20210726154932.102880-1-david@redhat.com
    Fixes: 4ca9b38 ("mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables")
    Signed-off-by: David Hildenbrand <david@redhat.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Oscar Salvador <osalvador@suse.de>
    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Jann Horn <jannh@google.com>
    Cc: Jason Gunthorpe <jgg@ziepe.ca>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Rik van Riel <riel@surriel.com>
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Richard Henderson <rth@twiddle.net>
    Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
    Cc: Matt Turner <mattst88@gmail.com>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Chris Zankel <chris@zankel.net>
    Cc: Max Filippov <jcmvbkbc@gmail.com>
    Cc: Mike Kravetz <mike.kravetz@oracle.com>
    Cc: Peter Xu <peterx@redhat.com>
    Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
    Cc: Ram Pai <linuxram@us.ibm.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    davidhildenbrand authored and torvalds committed Aug 14, 2021
  10. mm: slub: fix slub_debug disabling for list of slabs

    Vijayanand Jitta reports:
    
      Consider the scenario where CONFIG_SLUB_DEBUG_ON is set and we would
      want to disable slub_debug for few slabs. Using boot parameter with
      slub_debug=-,slab_name syntax doesn't work as expected i.e; only
      disabling debugging for the specified list of slabs. Instead it
      disables debugging for all slabs, which is wrong.
    
    This patch fixes it by delaying the moment when the global slub_debug
    flags variable is updated.  In case a "slub_debug=-,slab_name" has been
    passed, the global flags remain as initialized (depending on
    CONFIG_SLUB_DEBUG_ON enabled or disabled) and are not simply reset to 0.
    
    Link: https://lkml.kernel.org/r/8a3d992a-473a-467b-28a0-4ad2ff60ab82@suse.cz
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Reported-by: Vijayanand Jitta <vjitta@codeaurora.org>
    Reviewed-by: Vijayanand Jitta <vjitta@codeaurora.org>
    Acked-by: David Rientjes <rientjes@google.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Pekka Enberg <penberg@kernel.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Vinayak Menon <vinmenon@codeaurora.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    tehcaster authored and torvalds committed Aug 14, 2021
  11. slub: fix kmalloc_pagealloc_invalid_free unit test

    The unit test kmalloc_pagealloc_invalid_free makes sure that for the
    higher order slub allocation which goes to page allocator, the free is
    called with the correct address i.e.  the virtual address of the head
    page.
    
    Commit f227f0f ("slub: fix unreclaimable slab stat for bulk free")
    unified the free code paths for page allocator based slub allocations
    but instead of using the address passed by the caller, it extracted the
    address from the page.  Thus making the unit test
    kmalloc_pagealloc_invalid_free moot.  So, fix this by using the address
    passed by the caller.
    
    Should we fix this? I think yes because dev expect kasan to catch these
    type of programming bugs.
    
    Link: https://lkml.kernel.org/r/20210802180819.1110165-1-shakeelb@google.com
    Fixes: f227f0f ("slub: fix unreclaimable slab stat for bulk free")
    Signed-off-by: Shakeel Butt <shakeelb@google.com>
    Reported-by: Nathan Chancellor <nathan@kernel.org>
    Tested-by: Nathan Chancellor <nathan@kernel.org>
    Acked-by: Roman Gushchin <guro@fb.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Muchun Song <songmuchun@bytedance.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Pekka Enberg <penberg@kernel.org>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    shakeelb authored and torvalds committed Aug 14, 2021
  12. kasan, slub: reset tag when printing address

    The address still includes the tags when it is printed.  With hardware
    tag-based kasan enabled, we will get a false positive KASAN issue when
    we access metadata.
    
    Reset the tag before we access the metadata.
    
    Link: https://lkml.kernel.org/r/20210804090957.12393-3-Kuan-Ying.Lee@mediatek.com
    Fixes: aa1ef4d ("kasan, mm: reset tags when accessing metadata")
    Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
    Reviewed-by: Marco Elver <elver@google.com>
    Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Chinwen Chang <chinwen.chang@mediatek.com>
    Cc: Nicholas Tang <nicholas.tang@mediatek.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Kuan-Ying Lee authored and torvalds committed Aug 14, 2021
  13. kasan, kmemleak: reset tags when scanning block

    Patch series "kasan, slub: reset tag when printing address", v3.
    
    With hardware tag-based kasan enabled, we reset the tag when we access
    metadata to avoid from false alarm.
    
    This patch (of 2):
    
    Kmemleak needs to scan kernel memory to check memory leak.  With hardware
    tag-based kasan enabled, when it scans on the invalid slab and
    dereference, the issue will occur as below.
    
    Hardware tag-based KASAN doesn't use compiler instrumentation, we can not
    use kasan_disable_current() to ignore tag check.
    
    Based on the below report, there are 11 0xf7 granules, which amounts to
    176 bytes, and the object is allocated from the kmalloc-256 cache.  So
    when kmemleak accesses the last 256-176 bytes, it causes faults, as those
    are marked with KASAN_KMALLOC_REDZONE == KASAN_TAG_INVALID == 0xfe.
    
    Thus, we reset tags before accessing metadata to avoid from false positives.
    
      BUG: KASAN: out-of-bounds in scan_block+0x58/0x170
      Read at addr f7ff0000c0074eb0 by task kmemleak/138
      Pointer tag: [f7], memory tag: [fe]
    
      CPU: 7 PID: 138 Comm: kmemleak Not tainted 5.14.0-rc2-00001-g8cae8cd89f05-dirty torvalds#134
      Hardware name: linux,dummy-virt (DT)
      Call trace:
       dump_backtrace+0x0/0x1b0
       show_stack+0x1c/0x30
       dump_stack_lvl+0x68/0x84
       print_address_description+0x7c/0x2b4
       kasan_report+0x138/0x38c
       __do_kernel_fault+0x190/0x1c4
       do_tag_check_fault+0x78/0x90
       do_mem_abort+0x44/0xb4
       el1_abort+0x40/0x60
       el1h_64_sync_handler+0xb4/0xd0
       el1h_64_sync+0x78/0x7c
       scan_block+0x58/0x170
       scan_gray_list+0xdc/0x1a0
       kmemleak_scan+0x2ac/0x560
       kmemleak_scan_thread+0xb0/0xe0
       kthread+0x154/0x160
       ret_from_fork+0x10/0x18
    
      Allocated by task 0:
       kasan_save_stack+0x2c/0x60
       __kasan_kmalloc+0xec/0x104
       __kmalloc+0x224/0x3c4
       __register_sysctl_paths+0x200/0x290
       register_sysctl_table+0x2c/0x40
       sysctl_init+0x20/0x34
       proc_sys_init+0x3c/0x48
       proc_root_init+0x80/0x9c
       start_kernel+0x648/0x6a4
       __primary_switched+0xc0/0xc8
    
      Freed by task 0:
       kasan_save_stack+0x2c/0x60
       kasan_set_track+0x2c/0x40
       kasan_set_free_info+0x44/0x54
       ____kasan_slab_free.constprop.0+0x150/0x1b0
       __kasan_slab_free+0x14/0x20
       slab_free_freelist_hook+0xa4/0x1fc
       kfree+0x1e8/0x30c
       put_fs_context+0x124/0x220
       vfs_kern_mount.part.0+0x60/0xd4
       kern_mount+0x24/0x4c
       bdev_cache_init+0x70/0x9c
       vfs_caches_init+0xdc/0xf4
       start_kernel+0x638/0x6a4
       __primary_switched+0xc0/0xc8
    
      The buggy address belongs to the object at ffff0000c0074e00
       which belongs to the cache kmalloc-256 of size 256
      The buggy address is located 176 bytes inside of
       256-byte region [ffff0000c0074e00, ffff0000c0074f00)
      The buggy address belongs to the page:
      page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100074
      head:(____ptrval____) order:2 compound_mapcount:0 compound_pincount:0
      flags: 0xbfffc0000010200(slab|head|node=0|zone=2|lastcpupid=0xffff|kasantag=0x0)
      raw: 0bfffc0000010200 0000000000000000 dead000000000122 f5ff0000c0002300
      raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000
      page dumped because: kasan: bad access detected
    
      Memory state around the buggy address:
       ffff0000c0074c00: f0 f0 f0 f0 f0 f0 f0 f0 f0 fe fe fe fe fe fe fe
       ffff0000c0074d00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
      >ffff0000c0074e00: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 fe fe fe fe fe
                                                          ^
       ffff0000c0074f00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
       ffff0000c0075000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      ==================================================================
      Disabling lock debugging due to kernel taint
      kmemleak: 181 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
    
    Link: https://lkml.kernel.org/r/20210804090957.12393-1-Kuan-Ying.Lee@mediatek.com
    Link: https://lkml.kernel.org/r/20210804090957.12393-2-Kuan-Ying.Lee@mediatek.com
    Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
    Cc: Marco Elver <elver@google.com>
    Cc: Nicholas Tang <nicholas.tang@mediatek.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Cc: Alexander Potapenko <glider@google.com>
    Cc: Chinwen Chang <chinwen.chang@mediatek.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Kuan-Ying Lee authored and torvalds committed Aug 14, 2021
Older