1. 20 3月, 2020 4 次提交
    • L
      Merge tag 'mmc-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 6c90b86a
      Linus Torvalds 提交于
      Pull MMC fixes from Ulf Hansson:
      
       - rtsx_pci: Fix support for some various speed modes
      
       - sdhci-of-at91: Fix support for GPIO card detect on SAMA5D2
      
       - sdhci-cadence: Fix support for DDR52 speed mode for eMMC on UniPhier
      
       - sdhci-acpi: Fix broken WP support on Acer Aspire Switch 10
      
       - sdhci-acpi: Workaround FW bug for suspend on Lenovo Miix 320
      
      * tag 'mmc-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: rtsx_pci: Fix support for speed-modes that relies on tuning
        mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2
        mmc: sdhci-cadence: set SDHCI_QUIRK2_PRESET_VALUE_BROKEN for UniPhier
        mmc: sdhci-acpi: Disable write protect detection on Acer Aspire Switch 10 (SW5-012)
        mmc: sdhci-acpi: Switch signal voltage back to 3.3V on suspend on external microSD on Lenovo Miix 320
      6c90b86a
    • L
      Merge tag '5.6-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · cd607737
      Linus Torvalds 提交于
      Pull cifs fixes from Steve French:
       "Three small smb3 fixes, two for stable"
      
      * tag '5.6-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: fiemap: do not return EINVAL if get nothing
        CIFS: Increment num_remote_opens stats counter even in case of smb2_query_dir_first
        cifs: potential unintitliazed error code in cifs_getattr()
      cd607737
    • L
      Merge tag 'kbuild-fixes-v5.6-3' of... · 207f75c4
      Linus Torvalds 提交于
      Merge tag 'kbuild-fixes-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - fix __uint128_t capability test in Kconfig when GCC that defaults to
         32-bit is used to build the 64-bit kernel
      
       - suppress new noisy Clang warnings -Wpointer-to-enum-cast
      
       - move the namespace field in Module.symvers for the backward
         compatibility reason for the depmod tool
      
       - use available compression for initramdisk when INTRAMFS_SOURCE is
         defined, which was the original behavior
      
       - fix modpost to handle correct large section numbers when it refers to
         modversion CRCs and module namespaces
      
       - fix comments and documents
      
      * tag 'kbuild-fixes-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        scripts/kallsyms: fix wrong kallsyms_relative_base
        modpost: Get proper section index by get_secindex() instead of st_shndx
        initramfs: restore default compression behavior
        modpost: move the namespace field in Module.symvers last
        kbuild: Disable -Wpointer-to-enum-cast
        kbuild: doc: fix references to other documents
        int128: fix __uint128_t compiler test in Kconfig
        kconfig: introduce m32-flag and m64-flag
        kbuild: Fix inconsistent comment
      207f75c4
    • C
      rtc: max8907: add missing select REGMAP_IRQ · 5d892919
      Corentin Labbe 提交于
      I have hit the following build error:
      
        armv7a-hardfloat-linux-gnueabi-ld: drivers/rtc/rtc-max8907.o: in function `max8907_rtc_probe':
        rtc-max8907.c:(.text+0x400): undefined reference to `regmap_irq_get_virq'
      
      max8907 should select REGMAP_IRQ
      
      Fixes: 94c01ab6 ("rtc: add MAX8907 RTC driver")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NCorentin Labbe <clabbe@baylibre.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5d892919
  2. 19 3月, 2020 5 次提交
    • M
      scripts/kallsyms: fix wrong kallsyms_relative_base · 7883a143
      Mikhail Petrov 提交于
      There is the code in the read_symbol function in 'scripts/kallsyms.c':
      
      	if (is_ignored_symbol(name, type))
      		return NULL;
      
      	/* Ignore most absolute/undefined (?) symbols. */
      	if (strcmp(name, "_text") == 0)
      		_text = addr;
      
      But the is_ignored_symbol function returns true for name="_text" and
      type='A'. So the next condition is not executed and the _text variable
      is always zero.
      
      It makes the wrong kallsyms_relative_base symbol as a result of the code
      (CONFIG_KALLSYMS_BASE_RELATIVE is defined):
      
      	if (base_relative) {
      		output_label("kallsyms_relative_base");
      		output_address(relative_base);
      		printf("\n");
      	}
      
      Because the output_address function uses the _text variable.
      
      So the kallsyms_lookup function and all related functions in the kernel
      do not work properly. For example, the stack trace in oops:
      
       Call Trace:
       [aa095e58] [809feab8] kobj_ns_ops_tbl+0x7ff09ac8/0x7ff1c1c4 (unreliable)
       [aa095e98] [80002b64] kobj_ns_ops_tbl+0x7f50db74/0x80000010
       [aa095ef8] [809c3d24] kobj_ns_ops_tbl+0x7feced34/0x7ff1c1c4
       [aa095f28] [80002ed0] kobj_ns_ops_tbl+0x7f50dee0/0x80000010
       [aa095f38] [8000f238] kobj_ns_ops_tbl+0x7f51a248/0x80000010
      
      The right stack trace:
      
       Call Trace:
       [aa095e58] [809feab8] module_vdu_video_init+0x2fc/0x3bc (unreliable)
       [aa095e98] [80002b64] do_one_initcall+0x40/0x1f0
       [aa095ef8] [809c3d24] kernel_init_freeable+0x164/0x1d8
       [aa095f28] [80002ed0] kernel_init+0x14/0x124
       [aa095f38] [8000f238] ret_from_kernel_thread+0x14/0x1c
      
      [masahiroy@kernel.org:
      
      This issue happens on binutils <= 2.22
      The following commit fixed it:
      https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d2667025dd30611514810c28bee9709e4623012a
      
      The symbol type of _text is 'T' on binutils >= 2.23
      The minimal supported binutils version for the kernel build is 2.21
      ]
      Signed-off-by: NMikhail Petrov <Mikhail.Petrov@mir.dev>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      7883a143
    • L
      locks: reinstate locks_delete_block optimization · dcf23ac3
      Linus Torvalds 提交于
      There is measurable performance impact in some synthetic tests due to
      commit 6d390e4b (locks: fix a potential use-after-free problem when
      wakeup a waiter). Fix the race condition instead by clearing the
      fl_blocker pointer after the wake_up, using explicit acquire/release
      semantics.
      
      This does mean that we can no longer use the clearing of fl_blocker as
      the wait condition, so switch the waiters over to checking whether the
      fl_blocked_member list_head is empty.
      Reviewed-by: Nyangerkun <yangerkun@huawei.com>
      Reviewed-by: NNeilBrown <neilb@suse.de>
      Fixes: 6d390e4b (locks: fix a potential use-after-free problem when wakeup a waiter)
      Signed-off-by: NJeff Layton <jlayton@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dcf23ac3
    • X
      modpost: Get proper section index by get_secindex() instead of st_shndx · 4b8a5cfb
      Xiao Yang 提交于
      (uint16_t) st_shndx is limited to 65535(i.e. SHN_XINDEX) so sym_get_data() gets
      wrong section index by st_shndx if requested symbol contains extended section
      index that is more than 65535.  In this case, we need to get proper section index
      by .symtab_shndx section.
      
      Module.symvers generated by building kernel with "-ffunction-sections -fdata-sections"
      shows the issue.
      
      Fixes: 56067812 ("kbuild: modversions: add infrastructure for emitting relative CRCs")
      Fixes: e84f9fbb ("modpost: refactor namespace_from_kstrtabns() to not hard-code section name")
      Signed-off-by: NXiao Yang <yangx.jy@cn.fujitsu.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      4b8a5cfb
    • L
      mm: slub: be more careful about the double cmpxchg of freelist · 5076190d
      Linus Torvalds 提交于
      This is just a cleanup addition to Jann's fix to properly update the
      transaction ID for the slub slowpath in commit fd4d9c7d ("mm: slub:
      add missing TID bump..").
      
      The transaction ID is what protects us against any concurrent accesses,
      but we should really also make sure to make the 'freelist' comparison
      itself always use the same freelist value that we then used as the new
      next free pointer.
      
      Jann points out that if we do all of this carefully, we could skip the
      transaction ID update for all the paths that only remove entries from
      the lists, and only update the TID when adding entries (to avoid the ABA
      issue with cmpxchg and list handling re-adding a previously seen value).
      
      But this patch just does the "make sure to cmpxchg the same value we
      used" rather than then try to be clever.
      Acked-by: NJann Horn <jannh@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5076190d
    • J
      mm: slub: add missing TID bump in kmem_cache_alloc_bulk() · fd4d9c7d
      Jann Horn 提交于
      When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
      freelist of length M, and N > M > 0, it will first remove the M elements
      from the percpu freelist, then call ___slab_alloc() to allocate the next
      element and repopulate the percpu freelist. ___slab_alloc() can re-enable
      IRQs via allocate_slab(), so the TID must be bumped before ___slab_alloc()
      to properly commit the freelist head change.
      
      Fix it by unconditionally bumping c->tid when entering the slowpath.
      
      Cc: stable@vger.kernel.org
      Fixes: ebe909e0 ("slub: improve bulk alloc strategy")
      Signed-off-by: NJann Horn <jannh@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd4d9c7d
  3. 18 3月, 2020 5 次提交
  4. 17 3月, 2020 8 次提交
  5. 16 3月, 2020 10 次提交
    • C
      HID: google: add moonball USB id · 58322a15
      Chen-Tsung Hsieh 提交于
      Add 1 additional hammer-like device.
      Signed-off-by: NChen-Tsung Hsieh <chentsung@chromium.org>
      Reviewed-by: NNicolas Boichat <drinkcat@chromium.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      58322a15
    • L
      Linux 5.6-rc6 · fb33c651
      Linus Torvalds 提交于
      fb33c651
    • L
      Merge tag 'irq-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a42a7bb6
      Linus Torvalds 提交于
      Pull irq fix from Thomas Gleixner:
       "A single commit to handle an erratum in Cavium ThunderX to prevent
        access to GIC registers which are broken in the implementation"
      
      * tag 'irq-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic-v3: Workaround Cavium erratum 38539 when reading GICD_TYPER2
      a42a7bb6
    • L
      Merge tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 34d5a4b3
      Linus Torvalds 提交于
      Pull futex fix from Thomas Gleixner:
       "Fix for yet another subtle futex issue.
      
        The futex code used ihold() to prevent inodes from vanishing, but
        ihold() does not guarantee inode persistence. Replace the inode
        pointer with a per boot, machine wide, unique inode identifier.
      
        The second commit fixes the breakage of the hash mechanism which
        causes a 100% performance regression"
      
      * tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Unbreak futex hashing
        futex: Fix inode life-time issue
      34d5a4b3
    • L
      Merge tag 'x86-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ec181b7f
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for x86:
      
         - Map EFI runtime service data as encrypted when SEV is enabled.
      
           Otherwise e.g. SMBIOS data cannot be properly decoded by dmidecode.
      
         - Remove the warning in the vector management code which triggered
           when a managed interrupt affinity changed outside of a CPU hotplug
           operation.
      
           The warning was correct until the recent core code change that
           introduced a CPU isolation feature which needs to migrate managed
           interrupts away from online CPUs under certain conditions to
           achieve the isolation"
      
      * tag 'x86-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vector: Remove warning on managed interrupt migration
        x86/ioremap: Map EFI runtime services data as encrypted for SEV
      ec181b7f
    • L
      Merge tag 'perf-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e99bc917
      Linus Torvalds 提交于
      Pull perf fixes from Thomas Gleixner:
       "A pile of perf fixes:
      
        Kernel side:
      
         - AMD uncore driver: Replace the open coded sanity check with the
           core variant, which provides the correct error code and also leaves
           a hint in dmesg
      
        Tooling:
      
         - Fix the stdio input handling with glibc versions >= 2.28
      
         - Unbreak the futex-wake benchmark which was reduced to 0 test
           threads due to the conversion to cpumaps
      
         - Initialize sigaction structs before invoking sys_sigactio()
      
         - Plug the mapfile memory leak in perf jevents
      
         - Fix off by one relative directory includes
      
         - Fix an undefined string comparison in perf diff"
      
      * tag 'perf-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
        tools: Fix off-by 1 relative directory includes
        perf jevents: Fix leak of mapfile memory
        perf bench: Clear struct sigaction before sigaction() syscall
        perf bench futex-wake: Restore thread count default to online CPU count
        perf top: Fix stdio interface input handling with glibc 2.28+
        perf diff: Fix undefined string comparision spotted by clang's -Wstring-compare
        perf symbols: Don't try to find a vmlinux file when looking for kernel modules
        perf bench: Share some global variables to fix build with gcc 10
        perf parse-events: Use asprintf() instead of strncpy() to read tracepoint files
        perf env: Do not return pointers to local variables
        perf tests bp_account: Make global variable static
      e99bc917
    • L
      Merge tag 'timers-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ffe6da91
      Linus Torvalds 提交于
      Pull timer fix from Thomas Gleixner:
       "A single fix adding the missing time namespace adjustment in
        sys/sysinfo which caused sys/sysinfo to be inconsistent with
        /proc/uptime when read from a task inside a time namespace"
      
      * tag 'timers-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sys/sysinfo: Respect boottime inside time namespace
      ffe6da91
    • L
      Merge tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 52ac3777
      Linus Torvalds 提交于
      Pull RAS fixes from Thomas Gleixner:
       "Two RAS related fixes:
      
         - Shut down the per CPU thermal throttling poll work properly when a
           CPU goes offline.
      
           The missing shutdown caused the poll work to be migrated to a
           unbound worker which triggered warnings about the usage of
           smp_processor_id() in preemptible context
      
         - Fix the PPIN feature initialization which missed to enable the
           functionality when PPIN_CTL was enabled but the MSR locked against
           updates"
      
      * tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Fix logic and comments around MSR_PPIN_CTL
        x86/mce/therm_throt: Undo thermal polling properly on CPU offline
      52ac3777
    • L
      Merge tag 'efi-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b67775e1
      Linus Torvalds 提交于
      Pull EFI fixes from Thomas Gleixner:
       "Two EFI fixes:
      
         - Prevent a race and buffer overflow in the sysfs efivars interface
           which causes kernel memory corruption.
      
         - Add the missing NULL pointer checks in efivar_store_raw()"
      
      * tag 'efi-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi: Add a sanity check to efivar_store_raw()
        efi: Fix a race and a buffer overflow while reading efivars via sysfs
      b67775e1
    • L
      Merge tag 'iommu-fixes-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · de28a65c
      Linus Torvalds 提交于
      Pull IOMMU fixes from Joerg Roedel:
      
       - Intel VT-d fixes:
          - RCU list handling fixes
          - Replace WARN_TAINT with pr_warn + add_taint for reporting firmware
            issues
          - DebugFS fixes
          - Fix for hugepage handling in iova_to_phys implementation
          - Fix for handling VMD devices, which have a domain number which
            doesn't fit into 16 bits
          - Warning message fix
      
       - MSI allocation fix for iommu-dma code
      
       - Sign-extension fix for io page-table code
      
       - Fix for AMD-Vi to properly update the is-running bit when AVIC is
         used
      
      * tag 'iommu-fixes-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Populate debugfs if IOMMUs are detected
        iommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE
        iommu/vt-d: Ignore devices with out-of-spec domain number
        iommu/vt-d: Fix the wrong printing in RHSA parsing
        iommu/vt-d: Fix debugfs register reads
        iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint
        iommu/vt-d: dmar_parse_one_rmrr: replace WARN_TAINT with pr_warn + add_taint
        iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
        iommu/vt-d: Silence RCU-list debugging warnings
        iommu/vt-d: Fix RCU-list bugs in intel_iommu_init()
        iommu/dma: Fix MSI reservation allocation
        iommu/io-pgtable-arm: Fix IOVA validation for 32-bit
        iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page
        iommu/vt-d: Fix RCU list debugging warnings
      de28a65c
  6. 15 3月, 2020 5 次提交
  7. 14 3月, 2020 3 次提交
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 69a4d0ba
      Linus Torvalds 提交于
      Pull clk fixes from Stephen Boyd:
       "A small collection of fixes. I'll make another sweep soon to look for
        more fixes for this -rc series.
      
         - Mark device node const in of_clk_get_parent APIs to ease landing
           changes in users later
      
         - Fix flag for Qualcomm SC7180 video clocks where we thought it would
           never turn off but actually hardware takes care of it
      
         - Remove disp_cc_mdss_rscc_ahb_clk on Qualcomm SC7180 SoCs because
           this clk is always on anyway
      
         - Correct some bad dt-binding numbers for i.MX8MN SoCs"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: imx8mn: Fix incorrect clock defines
        clk: qcom: dispcc: Remove support of disp_cc_mdss_rscc_ahb_clk
        clk: qcom: videocc: Update the clock flag for video_cc_vcodec0_core_clk
        of: clk: Make of_clk_get_parent_{count,name}() parameter const
      69a4d0ba
    • P
      Merge branch 'kvm-null-pointer-fix' into kvm-master · 018cabb6
      Paolo Bonzini 提交于
      018cabb6
    • V
      KVM: nVMX: avoid NULL pointer dereference with incorrect EVMCS GPAs · 95fa1010
      Vitaly Kuznetsov 提交于
      When an EVMCS enabled L1 guest on KVM will tries doing enlightened VMEnter
      with EVMCS GPA = 0 the host crashes because the
      
      evmcs_gpa != vmx->nested.hv_evmcs_vmptr
      
      condition in nested_vmx_handle_enlightened_vmptrld() will evaluate to
      false (as nested.hv_evmcs_vmptr is zeroed after init). The crash will
      happen on vmx->nested.hv_evmcs pointer dereference.
      
      Another problematic EVMCS ptr value is '-1' but it only causes host crash
      after nested_release_evmcs() invocation. The problem is exactly the same as
      with '0', we mistakenly think that the EVMCS pointer hasn't changed and
      thus nested.hv_evmcs_vmptr is valid.
      
      Resolve the issue by adding an additional !vmx->nested.hv_evmcs
      check to nested_vmx_handle_enlightened_vmptrld(), this way we will
      always be trying kvm_vcpu_map() when nested.hv_evmcs is NULL
      and this is supposed to catch all invalid EVMCS GPAs.
      
      Also, initialize hv_evmcs_vmptr to '0' in nested_release_evmcs()
      to be consistent with initialization where we don't currently
      set hv_evmcs_vmptr to '-1'.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      95fa1010