Skip to content
  1. Nov 28, 2020
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 3913a2bc
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM:
         - Fix alignment of the new HYP sections
         - Fix GICR_TYPER access from userspace
      
        S390:
         - do not reset the global diag318 data for per-cpu reset
         - do not mark memory as protected too early
         - fix for destroy page ultravisor call
      
        x86:
         - fix for SEV debugging
         - fix incorrect return code
         - fix for 'noapic' with PIC in userspace and LAPIC in kernel
         - fix for 5-level paging"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvm: x86/mmu: Fix get_mmio_spte() on CPUs supporting 5-level PT
        KVM: x86: Fix split-irqchip vs interrupt injection window request
        KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint
        MAINTAINERS: Update email address for Sean Christopherson
        MAINTAINERS: add uv.c also to KVM/s390
        s390/uv: handle destroy page legacy interface
        KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace
        KVM: SVM: fix error return code in svm_create_vcpu()
        KVM: SVM: Fix offset computation bug in __sev_dbg_decrypt().
        KVM: arm64: Correctly align nVHE percpu data
        KVM: s390: remove diag318 reset code
        KVM: s390: pv: Mark mm as protected after the set secure parameters and improve cleanup
      3913a2bc
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 95e1c7b1
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Some more powerpc fixes for 5.10:
      
         - regression fix for a boot failure on some 32-bit machines.
      
         - fix for host crashes in the KVM system reset handling.
      
         - fix for a possible oops in the KVM XIVE interrupt handling on
           Power9.
      
         - fix for host crashes triggerable via the KVM emulated MMIO handling
           when running HPT guests.
      
         - a couple of small build fixes.
      
        Thanks to Andreas Schwab, Cédric Le Goater, Christophe Leroy, Erhard
        Furtner, Greg Kurz, Greg Kurz, Németh Márton, Nicholas Piggin, Nick
        Desaulniers, Serge Belyshev, and Stephen Rothwell"
      
      * tag 'powerpc-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s: Fix allnoconfig build since uaccess flush
        powerpc/64s/exception: KVM Fix for host DSI being taken in HPT guest MMU context
        powerpc: Drop -me200 addition to build flags
        KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page
        powerpc/64s: Fix KVM system reset handling when CONFIG_PPC_PSERIES=y
        powerpc/32s: Use relocation offset when setting early hash table
      95e1c7b1
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · e4e94580
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "The main changes are relating to our handling of access/dirty bits,
        where our low-level page-table helpers could lead to stale young
        mappings and loss of the dirty bit in some cases (the latter has not
        been observed in practice, but could happen when clearing "soft-dirty"
        if we enabled that). These were posted as part of a larger series, but
        the rest of that is less urgent and needs a v2 which I'll get to
        shortly.
      
        In other news, we've now got a set of fixes to resolve the
        lockdep/tracing problems that have been plaguing us for a while, but
        they're still a bit "fresh" and I plan to send them to you next week
        after we've got some more confidence in them (although initial CI
        results look good).
      
        Summary:
      
         - Fix kerneldoc warnings generated by ACPI IORT code
      
         - Fix pte_accessible() so that access flag is ignored
      
         - Fix missing header #include
      
         - Fix loss of software dirty bit across pte_wrprotect() when HW DBM
           is enabled"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()
        arm64: pgtable: Fix pte_accessible()
        ACPI/IORT: Fix doc warnings in iort.c
        arm64/fpsimd: add <asm/insn.h> to <asm/kprobes.h> to fix fpsimd build
      e4e94580
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 6adf33a5
      Linus Torvalds authored
      Pull iommu fixes from Will Deacon:
       "Here's another round of IOMMU fixes for -rc6 consisting mainly of a
        bunch of independent driver fixes. Thomas agreed for me to take the
        x86 'tboot' fix here, as it fixes a regression introduced by a vt-d
        change.
      
         - Fix intel iommu driver when running on devices without VCCAP_REG
      
         - Fix swiotlb and "iommu=pt" interaction under TXT (tboot)
      
         - Fix missing return value check during device probe()
      
         - Fix probe ordering for Qualcomm SMMU implementation
      
         - Ensure page-sized mappings are used for AMD IOMMU buffers with SNP
           RMP"
      
      * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        iommu/vt-d: Don't read VCCAP register unless it exists
        x86/tboot: Don't disable swiotlb when iommu is forced on
        iommu: Check return of __iommu_attach_device()
        arm-smmu-qcom: Ensure the qcom_scm driver has finished probing
        iommu/amd: Enforce 4k mapping for certain IOMMU data structures
      6adf33a5
    • Linus Torvalds's avatar
      Merge tag 'printk-for-5.10-rc6-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux · 43d6ecd9
      Linus Torvalds authored
      Pull printk fixes from Petr Mladek:
      
       - do not lose trailing newline in pr_cont() calls
      
       - two trivial fixes for a dead store and a config description
      
      * tag 'printk-for-5.10-rc6-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
        printk: finalize records with trailing newlines
        printk: remove unneeded dead-store assignment
        init/Kconfig: Fix CPU number in LOG_CPU_MAX_BUF_SHIFT description
      43d6ecd9
    • Linus Torvalds's avatar
      Merge tag 'writeback_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 5b4049d8
      Linus Torvalds authored
      Pull writeback fix from Jan Kara:
       "A fix of possible missing string termination in writeback tracepoints"
      
      * tag 'writeback_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        trace: fix potenial dangerous pointer
      5b4049d8
    • Vitaly Kuznetsov's avatar
      kvm: x86/mmu: Fix get_mmio_spte() on CPUs supporting 5-level PT · 9a2a0d3c
      Vitaly Kuznetsov authored
      Commit 95fb5b02 ("kvm: x86/mmu: Support MMIO in the TDP MMU") caused
      the following WARNING on an Intel Ice Lake CPU:
      
       get_mmio_spte: detect reserved bits on spte, addr 0xb80a0, dump hierarchy:
       ------ spte 0xb80a0 level 5.
       ------ spte 0xfcd210107 level 4.
       ------ spte 0x1004c40107 level 3.
       ------ spte 0x1004c41107 level 2.
       ------ spte 0x1db00000000b83b6 level 1.
       WARNING: CPU: 109 PID: 10254 at arch/x86/kvm/mmu/mmu.c:3569 kvm_mmu_page_fault.cold.150+0x54/0x22f [kvm]
      ...
       Call Trace:
        ? kvm_io_bus_get_first_dev+0x55/0x110 [kvm]
        vcpu_enter_guest+0xaa1/0x16a0 [kvm]
        ? vmx_get_cs_db_l_bits+0x17/0x30 [kvm_intel]
        ? skip_emulated_instruction+0xaa/0x150 [kvm_intel]
        kvm_arch_vcpu_ioctl_run+0xca/0x520 [kvm]
      
      The guest triggering this crashes. Note, this happens with the traditional
      MMU and EPT enabled, not with the newly introduced TDP MMU. Turns out,
      there was a subtle change in the above mentioned commit. Previously,
      walk_shadow_page_get_mmio_spte() was setting 'root' to 'iterator.level'
      which is returned by shadow_walk_init() and this equals to
      'vcpu->arch.mmu->shadow_root_level'. Now, get_mmio_spte() sets it to
      'int root = vcpu->arch.mmu->root_level'.
      
      The difference between 'root_level' and 'shadow_root_level' on CPUs
      supporting 5-level page tables is that in some case we don't want to
      use 5-level, in particular when 'cpuid_maxphyaddr(vcpu) <= 48'
      kvm_mmu_get_tdp_level() returns '4'. In case upper layer is not used,
      the corresponding SPTE will fail '__is_rsvd_bits_set()' check.
      
      Revert to using 'shadow_root_level'.
      
      Fixes: 95fb5b02
      
       ("kvm: x86/mmu: Support MMIO in the TDP MMU")
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Message-Id: <20201126110206.2118959-1-vkuznets@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9a2a0d3c
  2. Nov 27, 2020
  3. Nov 26, 2020
  4. Nov 25, 2020
    • Lu Baolu's avatar
      x86/tboot: Don't disable swiotlb when iommu is forced on · e2be2a83
      Lu Baolu authored
      After commit 327d5b2f ("iommu/vt-d: Allow 32bit devices to uses DMA
      domain"), swiotlb could also be used for direct memory access if IOMMU
      is enabled but a device is configured to pass through the DMA translation.
      Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work
      if "iommu=pt" kernel parameter is used.
      
      Fixes: 327d5b2f
      
       ("iommu/vt-d: Allow 32bit devices to uses DMA domain")
      Reported-and-tested-by: default avatarAdrian Huang <ahuang12@lenovo.com>
      Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Link: https://lore.kernel.org/r/20201125014124.4070776-1-baolu.lu@linux.intel.com
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210237
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      e2be2a83
    • Hui Su's avatar
      trace: fix potenial dangerous pointer · fdeb17c7
      Hui Su authored
      The bdi_dev_name() returns a char [64], and
      the __entry->name is a char [32].
      
      It maybe dangerous to TP_printk("%s", __entry->name)
      after the strncpy().
      
      CC: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20201124165205.GA23937@rlk
      
      
      Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarHui Su <sh_def@163.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      fdeb17c7
    • Linus Torvalds's avatar
      Merge tag '5.10-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 127c501a
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Four smb3 fixes for stable: one fixes a memleak, the other three
        address a problem found with decryption offload that can cause a use
        after free"
      
      * tag '5.10-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        smb3: Handle error case during offload read path
        smb3: Avoid Mid pending list corruption
        smb3: Call cifs reconnect from demultiplex thread
        cifs: fix a memleak with modefromsid
      127c501a
    • Hugh Dickins's avatar
      mm: fix VM_BUG_ON(PageTail) and BUG_ON(PageWriteback) · 073861ed
      Hugh Dickins authored
      Twice now, when exercising ext4 looped on shmem huge pages, I have crashed
      on the PF_ONLY_HEAD check inside PageWaiters(): ext4_finish_bio() calling
      end_page_writeback() calling wake_up_page() on tail of a shmem huge page,
      no longer an ext4 page at all.
      
      The problem is that PageWriteback is not accompanied by a page reference
      (as the NOTE at the end of test_clear_page_writeback() acknowledges): as
      soon as TestClearPageWriteback has been done, that page could be removed
      from page cache, freed, and reused for something else by the time that
      wake_up_page() is reached.
      
      https://lore.kernel.org/linux-mm/20200827122019.GC14765@casper.infradead.org/
      Matthew Wilcox suggested avoiding or weakening the PageWaiters() tail
      check; but I'm paranoid about even looking at an unreferenced struct page,
      lest its memory might itself have already been reused or hotremoved (and
      wake_up_page_bit() may modify that memory with its ClearPageWaiters()).
      
      Then on crashing a second time, realized there's a stronger reason against
      that approach.  If my testing just occasionally crashes on that check,
      when the page is reused for part of a compound page, wouldn't it be much
      more common for the page to get reused as an order-0 page before reaching
      wake_up_page()?  And on rare occasions, might that reused page already be
      marked PageWriteback by its new user, and already be waited upon?  What
      would that look like?
      
      It would look like BUG_ON(PageWriteback) after wait_on_page_writeback()
      in write_cache_pages() (though I have never seen that crash myself).
      
      Matthew Wilcox explaining this to himself:
       "page is allocated, added to page cache, dirtied, writeback starts,
      
        --- thread A ---
        filesystem calls end_page_writeback()
              test_clear_page_writeback()
        --- context switch to thread B ---
        truncate_inode_pages_range() finds the page, it doesn't have writeback set,
        we delete it from the page cache.  Page gets reallocated, dirtied, writeback
        starts again.  Then we call write_cache_pages(), see
        PageWriteback() set, call wait_on_page_writeback()
        --- context switch back to thread A ---
        wake_up_page(page, PG_writeback);
        ... thread B is woken, but because the wakeup was for the old use of
        the page, PageWriteback is still set.
      
        Devious"
      
      And prior to 2a9127fc
      
       ("mm: rewrite wait_on_page_bit_common() logic")
      this would have been much less likely: before that, wake_page_function()'s
      non-exclusive case would stop walking and not wake if it found Writeback
      already set again; whereas now the non-exclusive case proceeds to wake.
      
      I have not thought of a fix that does not add a little overhead: the
      simplest fix is for end_page_writeback() to get_page() before calling
      test_clear_page_writeback(), then put_page() after wake_up_page().
      
      Was there a chance of missed wakeups before, since a page freed before
      reaching wake_up_page() would have PageWaiters cleared?  I think not,
      because each waiter does hold a reference on the page.  This bug comes
      when the old use of the page, the one we do TestClearPageWriteback on,
      had *no* waiters, so no additional page reference beyond the page cache
      (and whoever racily freed it).  The reuse of the page has a waiter
      holding a reference, and its own PageWriteback set; but the belated
      wake_up_page() has woken the reuse to hit that BUG_ON(PageWriteback).
      
      Reported-by: default avatar <syzbot+3622cea378100f45d59f@syzkaller.appspotmail.com>
      Reported-by: default avatarQian Cai <cai@lca.pw>
      Fixes: 2a9127fc
      
       ("mm: rewrite wait_on_page_bit_common() logic")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Cc: stable@vger.kernel.org # v5.8+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      073861ed
    • Linus Torvalds's avatar
      Merge tag 's390-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 80145ac2
      Linus Torvalds authored
      Pull s390 fix from Heiko Carstens:
       "Disable interrupts when restoring fpu and vector registers, otherwise
        KVM guests might see corrupted register contents"
      
      * tag 's390-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: fix fpu restore in entry.S
      80145ac2
    • Linus Torvalds's avatar
      Merge tag 'arc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · b1489422
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
       "A couple more stack unwinder related fixes:
      
         - More stack unwinding updates
      
         - Misc minor fixes"
      
      * tag 'arc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: stack unwinding: reorganize how initial register state setup
        ARC: stack unwinding: don't assume non-current task is sleeping
        ARC: mm: fix spelling mistakes
        ARC: bitops: Remove unecessary operation and value
      b1489422
  5. Nov 24, 2020
  6. Nov 23, 2020
    • Shameer Kolothum's avatar
      iommu: Check return of __iommu_attach_device() · 77c38c8c
      Shameer Kolothum authored
      Currently iommu_create_device_direct_mappings() is called
      without checking the return of __iommu_attach_device(). This
      may result in failures in iommu driver if dev attach returns
      error.
      
      Fixes: ce574c27
      
       ("iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()")
      Signed-off-by: default avatarShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
      Link: https://lore.kernel.org/r/20201119165846.34180-1-shameerali.kolothum.thodi@huawei.com
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      77c38c8c
    • John Stultz's avatar
      arm-smmu-qcom: Ensure the qcom_scm driver has finished probing · 72b55c96
      John Stultz authored
      
      
      Robin Murphy pointed out that if the arm-smmu driver probes before
      the qcom_scm driver, we may call qcom_scm_qsmmu500_wait_safe_toggle()
      before the __scm is initialized.
      
      Now, getting this to happen is a bit contrived, as in my efforts it
      required enabling asynchronous probing for both drivers, moving the
      firmware dts node to the end of the dtsi file, as well as forcing a
      long delay in the qcom_scm_probe function.
      
      With those tweaks we ran into the following crash:
      [    2.631040] arm-smmu 15000000.iommu:         Stage-1: 48-bit VA -> 48-bit IPA
      [    2.633372] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      ...
      [    2.633402] [0000000000000000] user address but active_mm is swapper
      [    2.633409] Internal error: Oops: 96000005 [#1] PREEMPT SMP
      [    2.633415] Modules linked in:
      [    2.633427] CPU: 5 PID: 117 Comm: kworker/u16:2 Tainted: G        W         5.10.0-rc1-mainline-00025-g272a618fc36-dirty #3971
      [    2.633430] Hardware name: Thundercomm Dragonboard 845c (DT)
      [    2.633448] Workqueue: events_unbound async_run_entry_fn
      [    2.633456] pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
      [    2.633465] pc : qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0
      [    2.633473] lr : qcom_smmu500_reset+0x58/0x78
      [    2.633476] sp : ffffffc0105a3b60
      ...
      [    2.633567] Call trace:
      [    2.633572]  qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0
      [    2.633576]  qcom_smmu500_reset+0x58/0x78
      [    2.633581]  arm_smmu_device_reset+0x194/0x270
      [    2.633585]  arm_smmu_device_probe+0xc94/0xeb8
      [    2.633592]  platform_drv_probe+0x58/0xa8
      [    2.633597]  really_probe+0xec/0x398
      [    2.633601]  driver_probe_device+0x5c/0xb8
      [    2.633606]  __driver_attach_async_helper+0x64/0x88
      [    2.633610]  async_run_entry_fn+0x4c/0x118
      [    2.633617]  process_one_work+0x20c/0x4b0
      [    2.633621]  worker_thread+0x48/0x460
      [    2.633628]  kthread+0x14c/0x158
      [    2.633634]  ret_from_fork+0x10/0x18
      [    2.633642] Code: a9034fa0 d0007f73 29107fa0 91342273 (f9400020)
      
      To avoid this, this patch adds a check on qcom_scm_is_available() in
      the qcom_smmu_impl_init() function, returning -EPROBE_DEFER if its
      not ready.
      
      This allows the driver to try to probe again later after qcom_scm has
      finished probing.
      
      Reported-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Andy Gross <agross@kernel.org>
      Cc: Maulik Shah <mkshah@codeaurora.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Saravana Kannan <saravanak@google.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Lina Iyer <ilina@codeaurora.org>
      Cc: iommu@lists.linux-foundation.org
      Cc: linux-arm-msm <linux-arm-msm@vger.kernel.org>
      Link: https://lore.kernel.org/r/20201112220520.48159-1-john.stultz@linaro.org
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      72b55c96
    • Suravee Suthikulpanit's avatar
      iommu/amd: Enforce 4k mapping for certain IOMMU data structures · 6d39bdee
      Suravee Suthikulpanit authored
      AMD IOMMU requires 4k-aligned pages for the event log, the PPR log,
      and the completion wait write-back regions. However, when allocating
      the pages, they could be part of large mapping (e.g. 2M) page.
      This causes #PF due to the SNP RMP hardware enforces the check based
      on the page level for these data structures.
      
      So, fix by calling set_memory_4k() on the allocated pages.
      
      Fixes: c69d89af
      
       ("iommu/amd: Use 4K page for completion wait write-back semaphore")
      Signed-off-by: default avatarSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Link: https://lore.kernel.org/r/20201105145832.3065-1-suravee.suthikulpanit@amd.com
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      6d39bdee
    • Rafael J. Wysocki's avatar
      Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm · 05b8955f
      Rafael J. Wysocki authored
      Pull SCMI cpufreq driver fix for 5.10-rc6 from Viresh Kumar:
      
      "This fixes a build issues with SCMI cpufreq driver in the
       !CONFIG_COMMON_CLK case."
      
      * 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
        cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK
      05b8955f
    • Shiju Jose's avatar
      ACPI/IORT: Fix doc warnings in iort.c · 774c4a3b
      Shiju Jose authored
      
      
      Fix following warnings caused by mismatch between
      function parameters and function comments.
      
      drivers/acpi/arm64/iort.c:55: warning: Function parameter or member 'iort_node' not described in 'iort_set_fwnode'
      drivers/acpi/arm64/iort.c:55: warning: Excess function parameter 'node' description in 'iort_set_fwnode'
      drivers/acpi/arm64/iort.c:682: warning: Function parameter or member 'id' not described in 'iort_get_device_domain'
      drivers/acpi/arm64/iort.c:682: warning: Function parameter or member 'bus_token' not described in 'iort_get_device_domain'
      drivers/acpi/arm64/iort.c:682: warning: Excess function parameter 'req_id' description in 'iort_get_device_domain'
      drivers/acpi/arm64/iort.c:1142: warning: Function parameter or member 'dma_size' not described in 'iort_dma_setup'
      drivers/acpi/arm64/iort.c:1142: warning: Excess function parameter 'size' description in 'iort_dma_setup'
      drivers/acpi/arm64/iort.c:1534: warning: Function parameter or member 'ops' not described in 'iort_add_platform_device'
      
      Signed-off-by: default avatarShiju Jose <shiju.jose@huawei.com>
      Acked-by: default avatarHanjun Guo <guohanjun@huawei.com>
      Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Link: https://lore.kernel.org/r/20201014093139.1580-1-shiju.jose@huawei.com
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      774c4a3b
    • Randy Dunlap's avatar
      arm64/fpsimd: add <asm/insn.h> to <asm/kprobes.h> to fix fpsimd build · 03659efe
      Randy Dunlap authored
      Adding <asm/exception.h> brought in <asm/kprobes.h> which uses
      <asm/probes.h>, which uses 'pstate_check_t' so the latter needs to
      #include <asm/insn.h> for this typedef.
      
      Fixes this build error:
      
        In file included from arch/arm64/include/asm/kprobes.h:24,
                          from arch/arm64/include/asm/exception.h:11,
                          from arch/arm64/kernel/fpsimd.c:35:
        arch/arm64/include/asm/probes.h:16:2: error: unknown type name 'pstate_check_t'
            16 |  pstate_check_t *pstate_cc;
      
      Fixes: c6b90d5c
      
       ("arm64/fpsimd: Fix missing-prototypes in fpsimd.c")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Tian Tao <tiantao6@hisilicon.com>
      Link: https://lore.kernel.org/r/20201123044510.9942-1-rdunlap@infradead.org
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      03659efe
    • Sven Schnelle's avatar
      s390: fix fpu restore in entry.S · 1179f170
      Sven Schnelle authored
      We need to disable interrupts in load_fpu_regs(). Otherwise an
      interrupt might come in after the registers are loaded, but before
      CIF_FPU is cleared in load_fpu_regs(). When the interrupt returns,
      CIF_FPU will be cleared and the registers will never be restored.
      
      The entry.S code usually saves the interrupt state in __SF_EMPTY on the
      stack when disabling/restoring interrupts. sie64a however saves the pointer
      to the sie control block in __SF_SIE_CONTROL, which references the same
      location.  This is non-obvious to the reader. To avoid thrashing the sie
      control block pointer in load_fpu_regs(), move the __SIE_* offsets eight
      bytes after __SF_EMPTY on the stack.
      
      Cc: <stable@vger.kernel.org> # 5.8
      Fixes: 0b0ed657
      
       ("s390: remove critical section cleanup from entry.S")
      Reported-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      1179f170
    • Stephen Rothwell's avatar
      powerpc/64s: Fix allnoconfig build since uaccess flush · b6b79dd5
      Stephen Rothwell authored
      Using DECLARE_STATIC_KEY_FALSE needs linux/jump_table.h.
      
      Otherwise the build fails with eg:
      
        arch/powerpc/include/asm/book3s/64/kup-radix.h:66:1: warning: data definition has no type or storage class
           66 | DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
      
      Fixes: 9a32a7e7
      
       ("powerpc/64s: flush L1D after user accesses")
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      [mpe: Massage change log]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20201123184016.693fe464@canb.auug.org.au
      b6b79dd5
    • Michael Ellerman's avatar
      Merge tag 'powerpc-cve-2020-4788' into fixes · 962f8e64
      Michael Ellerman authored
      From Daniel's cover letter:
      
      IBM Power9 processors can speculatively operate on data in the L1 cache
      before it has been completely validated, via a way-prediction mechanism. It
      is not possible for an attacker to determine the contents of impermissible
      memory using this method, since these systems implement a combination of
      hardware and software security measures to prevent scenarios where
      protected data could be leaked.
      
      However these measures don't address the scenario where an attacker induces
      the operating system to speculatively execute instructions using data that
      the attacker controls. This can be used for example to speculatively bypass
      "kernel user access prevention" techniques, as discovered by Anthony
      Steinhauser of Google's Safeside Project. This is not an attack by itself,
      but there is a possibility it could be used in conjunction with
      side-channels or other weaknesses in the privileged code to construct an
      attack.
      
      This issue can be mitigated by flushing the L1 cache between privilege
      boundaries of concern.
      
      This patch series flushes the L1 cache on kernel entry (patch 2) and after the
      kernel performs any user accesses (patch 3). It also adds a self-test and
      performs some related cleanups.
      962f8e64
    • Sudeep Holla's avatar
      cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK · f943849f
      Sudeep Holla authored
      Commit 8410e7f3 ("cpufreq: scmi: Fix OPP addition failure with a
      dummy clock provider") registers a dummy clock provider using
      devm_of_clk_add_hw_provider. These *_hw_provider functions are defined
      only when CONFIG_COMMON_CLK=y. One possible fix is to add the Kconfig
      dependency, but since we plan to move away from the clock dependency
      for scmi cpufreq, it is preferrable to avoid that.
      
      Let us just conditionally compile out the offending call to
      devm_of_clk_add_hw_provider. It also uses the variable 'dev' outside
      of the #ifdef block to avoid build warning.
      
      Fixes: 8410e7f3
      
       ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider")
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      f943849f
    • Linus Torvalds's avatar
      Linux 5.10-rc5 · 418baf2c
      Linus Torvalds authored
      418baf2c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · d5530d82
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
      
       - Various functionality / regression fixes for Logitech devices from
         Hans de Goede
      
       - Fix for (recently added) GPIO support in mcp2221 driver from Lars
         Povlsen
      
       - Power management handling fix/quirk in i2c-hid driver for certain
         BIOSes that have strange aproach to power-cycle from Hans de Goede
      
       - a few device ID additions and device-specific quirks
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: logitech-dj: Fix Dinovo Mini when paired with a MX5x00 receiver
        HID: logitech-dj: Fix an error in mse_bluetooth_descriptor
        HID: Add Logitech Dinovo Edge battery quirk
        HID: logitech-hidpp: Add HIDPP_CONSUMER_VENDOR_KEYS quirk for the Dinovo Edge
        HID: logitech-dj: Handle quad/bluetooth keyboards with a builtin trackpad
        HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices
        HID: mcp2221: Fix GPIO output handling
        HID: hid-sensor-hub: Fix issue with devices with no report ID
        HID: i2c-hid: Put ACPI enumerated devices in D3 on shutdown
        HID: add support for Sega Saturn
        HID: cypress: Support Varmilo Keyboards' media hotkeys
        HID: ite: Replace ABS_MISC 120/121 events with touchpad on/off keypresses
        HID: logitech-hidpp: Add PID for MX Anywhere 2
        HID: uclogic: Add ID for Trust Flex Design Tablet
      d5530d82
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f4b936f5
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "A couple of scheduler fixes:
      
         - Make the conditional update of the overutilized state work
           correctly by caching the relevant flags state before overwriting
           them and checking them afterwards.
      
         - Fix a data race in the wakeup path which caused loadavg on ARM64
           platforms to become a random number generator.
      
         - Fix the ordering of the iowaiter accounting operations so it can't
           be decremented before it is incremented.
      
         - Fix a bug in the deadline scheduler vs. priority inheritance when a
           non-deadline task A has inherited the parameters of a deadline task
           B and then blocks on a non-deadline task C.
      
           The second inheritance step used the static deadline parameters of
           task A, which are usually 0, instead of further propagating task
           B's parameters. The zero initialized parameters trigger a bug in
           the deadline scheduler"
      
      * tag 'sched-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/deadline: Fix priority inheritance with multiple scheduling classes
        sched: Fix rq->nr_iowait ordering
        sched: Fix data-race in wakeup
        sched/fair: Fix overutilized update in enqueue_task_fair()
      f4b936f5
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 48da3305
      Linus Torvalds authored
      Pull perf fix from Thomas Gleixner:
       "A single fix for the x86 perf sysfs interfaces which used kobject
        attributes instead of device attributes and therefore making clang's
        control flow integrity checker upset"
      
      * tag 'perf-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86: fix sysfs type mismatches
      48da3305
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 855cf1ee
      Linus Torvalds authored
      Pull locking fix from Thomas Gleixner:
       "A single fix for lockdep which makes the recursion protection cover
        graph lock/unlock"
      
      * tag 'locking-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lockdep: Put graph lock/unlock under lock_recursion protection
      855cf1ee