1. 12 Oct, 2020 16 commits
    • Linus Torvalds's avatar
      Merge tag 'x86_core_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1e6d1d96
      Linus Torvalds authored
      Pull x86 fix from Borislav Petkov:
       "A single fix making the error message when the opcode bytes at rIP
        cannot be accessed during an oops, more precise"
      
      * tag 'x86_core_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/dumpstack: Fix misleading instruction pointer error message
      1e6d1d96
    • Linus Torvalds's avatar
      Merge tag 'x86_cache_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 64743e65
      Linus Torvalds authored
      Pull x86 cache resource control updates from Borislav Petkov:
      
       - Misc cleanups to the resctrl code in preparation for the ARM side
         (James Morse)
      
       - Add support for controlling per-thread memory bandwidth throttling
         delay values on hw which supports it (Fenghua Yu)
      
      * tag 'x86_cache_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/resctrl: Enable user to view thread or core throttling mode
        x86/resctrl: Enumerate per-thread MBA controls
        cacheinfo: Move resctrl's get_cache_id() to the cacheinfo header file
        x86/resctrl: Add struct rdt_cache::arch_has_{sparse, empty}_bitmaps
        x86/resctrl: Merge AMD/Intel parse_bw() calls
        x86/resctrl: Add struct rdt_membw::arch_needs_linear to explain AMD/Intel MBA difference
        x86/resctrl: Use is_closid_match() in more places
        x86/resctrl: Include pid.h
        x86/resctrl: Use container_of() in delayed_work handlers
        x86/resctrl: Fix stale comment
        x86/resctrl: Remove struct rdt_membw::max_delay
        x86/resctrl: Remove unused struct mbm_state::chunks_bw
      64743e65
    • Linus Torvalds's avatar
      Merge tag 'x86_cleanups_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f94ab231
      Linus Torvalds authored
      Pull x86 cleanups from Borislav Petkov:
       "Misc minor cleanups"
      
      * tag 'x86_cleanups_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/entry: Fix typo in comments for syscall_enter_from_user_mode()
        x86/resctrl: Fix spelling in user-visible warning messages
        x86/entry/64: Do not include inst.h in calling.h
        x86/mpparse: Remove duplicate io_apic.h include
      f94ab231
    • Linus Torvalds's avatar
      Merge tag 'x86_fpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a0d445f7
      Linus Torvalds authored
      Pull x86 fpu updates from Borislav Petkov:
      
       - Allow clearcpuid= to accept multiple bits (Arvind Sankar)
      
       - Move clearcpuid= parameter handling earlier in the boot, away from
         the FPU init code and to a generic location (Mike Hommey)
      
      * tag 'x86_fpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu: Handle FPU-related and clearcpuid command line arguments earlier
        x86/fpu: Allow multiple bits in clearcpuid= parameter
      a0d445f7
    • Linus Torvalds's avatar
      Merge tag 'x86_fsgsbase_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 87194efe
      Linus Torvalds authored
      Pull x86 fsgsbase updates from Borislav Petkov:
       "Misc minor cleanups and corrections to the fsgsbase code and
        respective selftests"
      
      * tag 'x86_fsgsbase_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        selftests/x86/fsgsbase: Test PTRACE_PEEKUSER for GSBASE with invalid LDT GS
        selftests/x86/fsgsbase: Reap a forgotten child
        x86/fsgsbase: Replace static_cpu_has() with boot_cpu_has()
        x86/entry/64: Correct the comment over SAVE_AND_SET_GSBASE
      87194efe
    • Linus Torvalds's avatar
      Merge tag 'x86_misc_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9e536c81
      Linus Torvalds authored
      Pull misc x86 fixes fromm Borislav Petkov:
      
       - Ratelimit the message about writes to unrecognized MSRs so that they
         don't spam the console log (Chris Down)
      
       - Document how the /proc/cpuinfo machinery works for future reference
         (Kyung Min Park, Ricardo Neri and Dave Hansen)
      
       - Correct the current NMI's duration calculation (Libing Zhou)
      
      * tag 'x86_misc_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/nmi: Fix nmi_handle() duration miscalculation
        Documentation/x86: Add documentation for /proc/cpuinfo feature flags
        x86/msr: Make source of unrecognised MSR writes unambiguous
        x86/msr: Prevent userspace MSR access from dominating the console
      9e536c81
    • Linus Torvalds's avatar
      Merge tag 'x86_pasid_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ac74075e
      Linus Torvalds authored
      Pull x86 PASID updates from Borislav Petkov:
       "Initial support for sharing virtual addresses between the CPU and
        devices which doesn't need pinning of pages for DMA anymore.
      
        Add support for the command submission to devices using new x86
        instructions like ENQCMD{,S} and MOVDIR64B. In addition, add support
        for process address space identifiers (PASIDs) which are referenced by
        those command submission instructions along with the handling of the
        PASID state on context switch as another extended state.
      
        Work by Fenghua Yu, Ashok Raj, Yu-cheng Yu and Dave Jiang"
      
      * tag 'x86_pasid_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/asm: Add an enqcmds() wrapper for the ENQCMDS instruction
        x86/asm: Carve out a generic movdir64b() helper for general usage
        x86/mmu: Allocate/free a PASID
        x86/cpufeatures: Mark ENQCMD as disabled when configured out
        mm: Add a pasid member to struct mm_struct
        x86/msr-index: Define an IA32_PASID MSR
        x86/fpu/xstate: Add supervisor PASID state for ENQCMD
        x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions
        Documentation/x86: Add documentation for SVA (Shared Virtual Addressing)
        iommu/vt-d: Change flags type to unsigned int in binding mm
        drm, iommu: Change type of pasid to u32
      ac74075e
    • Linus Torvalds's avatar
      Merge tag 'x86_platform_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8b6591fd
      Linus Torvalds authored
      Pull x86 platform updates from Borislav Petkov:
      
       - Cleanup different aspects of the UV code and start adding support for
         the new UV5 class of systems (Mike Travis)
      
       - Use a flexible array for a dynamically sized struct uv_rtc_timer_head
         (Gustavo A. R. Silva)
      
      * tag 'x86_platform_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/platform/uv: Update Copyrights to conform to HPE standards
        x86/platform/uv: Update for UV5 NMI MMR changes
        x86/platform/uv: Update UV5 TSC checking
        x86/platform/uv: Update node present counting
        x86/platform/uv: Update UV5 MMR references in UV GRU
        x86/platform/uv: Adjust GAM MMR references affected by UV5 updates
        x86/platform/uv: Update MMIOH references based on new UV5 MMRs
        x86/platform/uv: Add and decode Arch Type in UVsystab
        x86/platform/uv: Add UV5 direct references
        x86/platform/uv: Update UV MMRs for UV5
        drivers/misc/sgi-xp: Adjust references in UV kernel modules
        x86/platform/uv: Remove SCIR MMR references for UV systems
        x86/platform/uv: Remove UV BAU TLB Shootdown Handler
        x86/uv/time: Use a flexible array in struct uv_rtc_timer_head
      8b6591fd
    • Linus Torvalds's avatar
      Merge tag 'x86_cpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 92a0610b
      Linus Torvalds authored
      Pull x86 cpu updates from Borislav Petkov:
      
       - Add support for hardware-enforced cache coherency on AMD which
         obviates the need to flush cachelines before changing the PTE
         encryption bit (Krish Sadhukhan)
      
       - Add Centaur initialization support for families >= 7 (Tony W Wang-oc)
      
       - Add a feature flag for, and expose TSX suspend load tracking feature
         to KVM (Cathy Zhang)
      
       - Emulate SLDT and STR so that windows programs don't crash on UMIP
         machines (Brendan Shanks and Ricardo Neri)
      
       - Use the new SERIALIZE insn on Intel hardware which supports it
         (Ricardo Neri)
      
       - Misc cleanups and fixes
      
      * tag 'x86_cpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        KVM: SVM: Don't flush cache if hardware enforces cache coherency across encryption domains
        x86/mm/pat: Don't flush cache if hardware enforces cache coherency across encryption domnains
        x86/cpu: Add hardware-enforced cache coherency as a CPUID feature
        x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support
        x86/cpu/centaur: Replace two-condition switch-case with an if statement
        x86/kvm: Expose TSX Suspend Load Tracking feature
        x86/cpufeatures: Enumerate TSX suspend load address tracking instructions
        x86/umip: Add emulation/spoofing for SLDT and STR instructions
        x86/cpu: Fix typos and improve the comments in sync_core()
        x86/cpu: Use XGETBV and XSETBV mnemonics in fpu/internal.h
        x86/cpu: Use SERIALIZE in sync_core() when available
      92a0610b
    • Linus Torvalds's avatar
      Merge tag 'ras_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ca1b6692
      Linus Torvalds authored
      Pull RAS updates from Borislav Petkov:
      
       - Extend the recovery from MCE in kernel space also to processes which
         encounter an MCE in kernel space but while copying from user memory
         by sending them a SIGBUS on return to user space and umapping the
         faulty memory, by Tony Luck and Youquan Song.
      
       - memcpy_mcsafe() rework by splitting the functionality into
         copy_mc_to_user() and copy_mc_to_kernel(). This, as a result, enables
         support for new hardware which can recover from a machine check
         encountered during a fast string copy and makes that the default and
         lets the older hardware which does not support that advance recovery,
         opt in to use the old, fragile, slow variant, by Dan Williams.
      
       - New AMD hw enablement, by Yazen Ghannam and Akshay Gupta.
      
       - Do not use MSR-tracing accessors in #MC context and flag any fault
         while accessing MCA architectural MSRs as an architectural violation
         with the hope that such hw/fw misdesigns are caught early during the
         hw eval phase and they don't make it into production.
      
       - Misc fixes, improvements and cleanups, as always.
      
      * tag 'ras_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Allow for copy_mc_fragile symbol checksum to be generated
        x86/mce: Decode a kernel instruction to determine if it is copying from user
        x86/mce: Recover from poison found while copying from user space
        x86/mce: Avoid tail copy when machine check terminated a copy from user
        x86/mce: Add _ASM_EXTABLE_CPY for copy user access
        x86/mce: Provide method to find out the type of an exception handler
        x86/mce: Pass pointer to saved pt_regs to severity calculation routines
        x86/copy_mc: Introduce copy_mc_enhanced_fast_string()
        x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()
        x86/mce: Drop AMD-specific "DEFERRED" case from Intel severity rule list
        x86/mce: Add Skylake quirk for patrol scrub reported errors
        RAS/CEC: Convert to DEFINE_SHOW_ATTRIBUTE()
        x86/mce: Annotate mce_rd/wrmsrl() with noinstr
        x86/mce/dev-mcelog: Do not update kflags on AMD systems
        x86/mce: Stop mce_reign() from re-computing severity for every CPU
        x86/mce: Make mce_rdmsrl() panic on an inaccessible MSR
        x86/mce: Increase maximum number of banks to 64
        x86/mce: Delay clearing IA32_MCG_STATUS to the end of do_machine_check()
        x86/MCE/AMD, EDAC/mce_amd: Remove struct smca_hwid.xec_bitmap
        RAS/CEC: Fix cec_init() prototype
      ca1b6692
    • Linus Torvalds's avatar
      Merge tag 'edac_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · a9a4b7d9
      Linus Torvalds authored
      Pull EDAC updates from Borislav Petkov:
      
       - Add Amazon's Annapurna Labs memory controller EDAC driver (Talel
         Shenhar)
      
       - New AMD CPUs support (Yazen Ghannam)
      
       - The usual misc fixes and cleanups all over the subsystem
      
      * tag 'edac_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/amd64: Set proper family type for Family 19h Models 20h-2Fh
        EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location
        EDAC/aspeed: Use module_platform_driver() to simplify
        EDAC, sb_edac: Simplify switch statement
        EDAC/ti: Fix handling of platform_get_irq() error
        EDAC/aspeed: Fix handling of platform_get_irq() error
        EDAC/i5100: Fix error handling order in i5100_init_one()
        EDAC/highbank: Handover Calxeda Highbank maintenance to Andre Przywara
        EDAC/socfpga: Transfer SoCFPGA EDAC maintainership
        EDAC/thunderx: Make symbol lmc_dfs_ents static
        EDAC/al-mc-edac: Add Amazon's Annapurna Labs Memory Controller driver
        dt-bindings: EDAC: Add Amazon's Annapurna Labs Memory Controller binding
        EDAC/mce_amd: Add new error descriptions for existing types
        EDAC: Replace HTTP links with HTTPS ones
      a9a4b7d9
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · af9db1d6
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
      
        - Conversion of the Mac IDE driver to a platform driver
      
        - Minor cleanups and fixes
      
      * tag 'm68k-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        ide/macide: Convert Mac IDE driver to platform driver
        m68k: Replace HTTP links with HTTPS ones
        m68k: mm: Remove superfluous memblock_alloc*() casts
        m68k: mm: Use PAGE_ALIGNED() helper
        m68k: Sort selects in main Kconfig
        m68k: amiga: Clean up Amiga hardware configuration
        m68k: Revive _TIF_* masks
        m68k: Correct some typos in comments
        m68k: Use get_kernel_nofault() in show_registers()
        zorro: Fix address space collision message with RAM expansion boards
        m68k: amiga: Fix Denise detection on OCS
      af9db1d6
    • Linus Torvalds's avatar
      Merge tag 'microblaze-v5.10' of git://git.monstr.eu/linux-2.6-microblaze · 024fb667
      Linus Torvalds authored
      Pull Microblaze build warning fix from Michal Simek.
      
      * tag 'microblaze-v5.10' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: fix kbuild redundant file warning
      024fb667
    • Linus Torvalds's avatar
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 6734e20e
      Linus Torvalds authored
      Pull arm64 updates from Will Deacon:
       "There's quite a lot of code here, but much of it is due to the
        addition of a new PMU driver as well as some arm64-specific selftests
        which is an area where we've traditionally been lagging a bit.
      
        In terms of exciting features, this includes support for the Memory
        Tagging Extension which narrowly missed 5.9, hopefully allowing
        userspace to run with use-after-free detection in production on CPUs
        that support it. Work is ongoing to integrate the feature with KASAN
        for 5.11.
      
        Another change that I'm excited about (assuming they get the hardware
        right) is preparing the ASID allocator for sharing the CPU page-table
        with the SMMU. Those changes will also come in via Joerg with the
        IOMMU pull.
      
        We do stray outside of our usual directories in a few places, mostly
        due to core changes required by MTE. Although much of this has been
        Acked, there were a couple of places where we unfortunately didn't get
        any review feedback.
      
        Other than that, we ran into a handful of minor conflicts in -next,
        but nothing that should post any issues.
      
        Summary:
      
         - Userspace support for the Memory Tagging Extension introduced by
           Armv8.5. Kernel support (via KASAN) is likely to follow in 5.11.
      
         - Selftests for MTE, Pointer Authentication and FPSIMD/SVE context
           switching.
      
         - Fix and subsequent rewrite of our Spectre mitigations, including
           the addition of support for PR_SPEC_DISABLE_NOEXEC.
      
         - Support for the Armv8.3 Pointer Authentication enhancements.
      
         - Support for ASID pinning, which is required when sharing
           page-tables with the SMMU.
      
         - MM updates, including treating flush_tlb_fix_spurious_fault() as a
           no-op.
      
         - Perf/PMU driver updates, including addition of the ARM CMN PMU
           driver and also support to handle CPU PMU IRQs as NMIs.
      
         - Allow prefetchable PCI BARs to be exposed to userspace using normal
           non-cacheable mappings.
      
         - Implementation of ARCH_STACKWALK for unwinding.
      
         - Improve reporting of unexpected kernel traps due to BPF JIT
           failure.
      
         - Improve robustness of user-visible HWCAP strings and their
           corresponding numerical constants.
      
         - Removal of TEXT_OFFSET.
      
         - Removal of some unused functions, parameters and prototypes.
      
         - Removal of MPIDR-based topology detection in favour of firmware
           description.
      
         - Cleanups to handling of SVE and FPSIMD register state in
           preparation for potential future optimisation of handling across
           syscalls.
      
         - Cleanups to the SDEI driver in preparation for support in KVM.
      
         - Miscellaneous cleanups and refactoring work"
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (148 commits)
        Revert "arm64: initialize per-cpu offsets earlier"
        arm64: random: Remove no longer needed prototypes
        arm64: initialize per-cpu offsets earlier
        kselftest/arm64: Check mte tagged user address in kernel
        kselftest/arm64: Verify KSM page merge for MTE pages
        kselftest/arm64: Verify all different mmap MTE options
        kselftest/arm64: Check forked child mte memory accessibility
        kselftest/arm64: Verify mte tag inclusion via prctl
        kselftest/arm64: Add utilities and a test to validate mte memory
        perf: arm-cmn: Fix conversion specifiers for node type
        perf: arm-cmn: Fix unsigned comparison to less than zero
        arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD
        arm64: mm: Make flush_tlb_fix_spurious_fault() a no-op
        arm64: Add support for PR_SPEC_DISABLE_NOEXEC prctl() option
        arm64: Pull in task_stack_page() to Spectre-v4 mitigation code
        KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled
        arm64: Get rid of arm64_ssbd_state
        KVM: arm64: Convert ARCH_WORKAROUND_2 to arm64_get_spectre_v4_state()
        KVM: arm64: Get rid of kvm_arm_have_ssbd()
        KVM: arm64: Simplify handling of ARCH_WORKAROUND_2
        ...
      6734e20e
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd · d04a248f
      Linus Torvalds authored
      Pull tpm updates from Jarkko Sakkinen:
       "Support for a new TPM device and fixes and Git URL change (infraded ->
        korg)"
      
      * tag 'tpmdd-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        MAINTAINERS: TPM DEVICE DRIVER: Update GIT
        tpm_tis: Add a check for invalid status
        tpm: use %*ph to print small buffer
        dt-bindings: Add SynQucer TPM MMIO as a trivial device
        tpm: tis: add support for MMIO TPM on SynQuacer
      d04a248f
    • Borislav Petkov's avatar
      1dc32628
  2. 11 Oct, 2020 10 commits
  3. 10 Oct, 2020 6 commits
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · da690031
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Some more driver bugfixes for I2C. Including a revert - the updated
        series for it will come during the next merge window"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: owl: Clear NACK and BUS error bits
        Revert "i2c: imx: Fix reset of I2SR_IAL flag"
        i2c: meson: fixup rate calculation with filter delay
        i2c: meson: keep peripheral clock enabled
        i2c: meson: fix clock setting overwrite
        i2c: imx: Fix reset of I2SR_IAL flag
      da690031
    • Vladimir Zapolskiy's avatar
      cifs: Fix incomplete memory allocation on setxattr path · 64b7f674
      Vladimir Zapolskiy authored
      On setxattr() syscall path due to an apprent typo the size of a dynamically
      allocated memory chunk for storing struct smb2_file_full_ea_info object is
      computed incorrectly, to be more precise the first addend is the size of
      a pointer instead of the wanted object size. Coincidentally it makes no
      difference on 64-bit platforms, however on 32-bit targets the following
      memcpy() writes 4 bytes of data outside of the dynamically allocated memory.
      
        =============================================================================
        BUG kmalloc-16 (Not tainted): Redzone overwritten
        -----------------------------------------------------------------------------
      
        Disabling lock debugging due to kernel taint
        INFO: 0x79e69a6f-0x9e5cdecf @offset=368. First byte 0x73 instead of 0xcc
        INFO: Slab 0xd36d2454 objects=85 used=51 fp=0xf7d0fc7a flags=0x35000201
        INFO: Object 0x6f171df3 @offset=352 fp=0x00000000
      
        Redzone 5d4ff02d: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc  ................
        Object 6f171df3: 00 00 00 00 00 05 06 00 73 6e 72 75 62 00 66 69  ........snrub.fi
        Redzone 79e69a6f: 73 68 32 0a                                      sh2.
        Padding 56254d82: 5a 5a 5a 5a 5a 5a 5a 5a                          ZZZZZZZZ
        CPU: 0 PID: 8196 Comm: attr Tainted: G    B             5.9.0-rc8+ #3
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1 04/01/2014
        Call Trace:
         dump_stack+0x54/0x6e
         print_trailer+0x12c/0x134
         check_bytes_and_report.cold+0x3e/0x69
         check_object+0x18c/0x250
         free_debug_processing+0xfe/0x230
         __slab_free+0x1c0/0x300
         kfree+0x1d3/0x220
         smb2_set_ea+0x27d/0x540
         cifs_xattr_set+0x57f/0x620
         __vfs_setxattr+0x4e/0x60
         __vfs_setxattr_noperm+0x4e/0x100
         __vfs_setxattr_locked+0xae/0xd0
         vfs_setxattr+0x4e/0xe0
         setxattr+0x12c/0x1a0
         path_setxattr+0xa4/0xc0
         __ia32_sys_lsetxattr+0x1d/0x20
         __do_fast_syscall_32+0x40/0x70
         do_fast_syscall_32+0x29/0x60
         do_SYSENTER_32+0x15/0x20
         entry_SYSENTER_32+0x9f/0xf2
      
      Fixes: 5517554e ("cifs: Add support for writing attributes on SMB2+")
      Signed-off-by: default avatarVladimir Zapolskiy <vladimir@tuxera.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      64b7f674
    • Hugh Dickins's avatar
      mm/khugepaged: fix filemap page_to_pgoff(page) != offset · 033b5d77
      Hugh Dickins authored
      There have been elusive reports of filemap_fault() hitting its
      VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page) on kernels built
      with CONFIG_READ_ONLY_THP_FOR_FS=y.
      
      Suren has hit it on a kernel with CONFIG_READ_ONLY_THP_FOR_FS=y and
      CONFIG_NUMA is not set: and he has analyzed it down to how khugepaged
      without NUMA reuses the same huge page after collapse_file() failed
      (whereas NUMA targets its allocation to the respective node each time).
      And most of us were usually testing with CONFIG_NUMA=y kernels.
      
      collapse_file(old start)
        new_page = khugepaged_alloc_page(hpage)
        __SetPageLocked(new_page)
        new_page->index = start // hpage->index=old offset
        new_page->mapping = mapping
        xas_store(&xas, new_page)
      
                                filemap_fault
                                  page = find_get_page(mapping, offset)
                                  // if offset falls inside hpage then
                                  // compound_head(page) == hpage
                                  lock_page_maybe_drop_mmap()
                                    __lock_page(page)
      
        // collapse fails
        xas_store(&xas, old page)
        new_page->mapping = NULL
        unlock_page(new_page)
      
      collapse_file(new start)
        new_page = khugepaged_alloc_page(hpage)
        __SetPageLocked(new_page)
        new_page->index = start // hpage->index=new offset
        new_page->mapping = mapping // mapping becomes valid again
      
                                  // since compound_head(page) == hpage
                                  // page_to_pgoff(page) got changed
                                  VM_BUG_ON_PAGE(page_to_pgoff(page) != offset)
      
      An initial patch replaced __SetPageLocked() by lock_page(), which did
      fix the race which Suren illustrates above.  But testing showed that it's
      not good enough: if the racing task's __lock_page() gets delayed long
      after its find_get_page(), then it may follow collapse_file(new start)'s
      successful final unlock_page(), and crash on the same VM_BUG_ON_PAGE.
      
      It could be fixed by relaxing filemap_fault()'s VM_BUG_ON_PAGE to a
      check and retry (as is done for mapping), with similar relaxations in
      find_lock_entry() and pagecache_get_page(): but it's not obvious what
      else might get caught out; and khugepaged non-NUMA appears to be unique
      in exposing a page to page cache, then revoking, without going through
      a full cycle of freeing before reuse.
      
      Instead, non-NUMA khugepaged_prealloc_page() release the old page
      if anyone else has a reference to it (1% of cases when I tested).
      
      Although never reported on huge tmpfs, I believe its find_lock_entry()
      has been at similar risk; but huge tmpfs does not rely on khugepaged
      for its normal working nearly so much as READ_ONLY_THP_FOR_FS does.
      Reported-by: default avatarDenis Lisov <dennis.lissov@gmail.com>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206569
      Link: https://lore.kernel.org/linux-mm/?q=20200219144635.3b7417145de19b65f258c943%40linux-foundation.orgReported-by: default avatarQian Cai <cai@lca.pw>
      Link: https://lore.kernel.org/linux-xfs/?q=20200616013309.GB815%40lca.pwReported-and-analyzed-by: default avatarSuren Baghdasaryan <surenb@google.com>
      Fixes: 87c460a0 ("mm/khugepaged: collapse_shmem() without freezing new_page")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: stable@vger.kernel.org # v4.9+
      Reviewed-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      033b5d77
    • Cristian Ciocaltea's avatar
      i2c: owl: Clear NACK and BUS error bits · f5b3f433
      Cristian Ciocaltea authored
      When the NACK and BUS error bits are set by the hardware, the driver is
      responsible for clearing them by writing "1" into the corresponding
      status registers.
      
      Hence perform the necessary operations in owl_i2c_interrupt().
      
      Fixes: d211e62a ("i2c: Add Actions Semiconductor Owl family S900 I2C driver")
      Reported-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
      Signed-off-by: default avatarCristian Ciocaltea <cristian.ciocaltea@gmail.com>
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      f5b3f433
    • Wolfram Sang's avatar
      Revert "i2c: imx: Fix reset of I2SR_IAL flag" · 5a02e7c4
      Wolfram Sang authored
      This reverts commit fa4d3055. An updated
      version was sent. So, revert this version and give the new version more
      time for testing.
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      5a02e7c4
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 6f2f486d
      Linus Torvalds authored
      Pull spi fix from Mark Brown:
       "One last minute fix for v5.9 which has been causing crashes in test
        systems with the fsl-dspi driver when they hit deferred probe (and
        which I probably let cook in next a bit longer than is ideal).
      
        And an update to MAINTAINERS reflecting Serge's extensive and
        detailed recent work on the DesignWare driver"
      
      * tag 'spi-fix-v5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        MAINTAINERS: Add maintainer of DW APB SSI driver
        spi: fsl-dspi: fix NULL pointer dereference
      6f2f486d
  4. 09 Oct, 2020 8 commits