1. 08 Apr, 2022 8 commits
  2. 07 Apr, 2022 3 commits
    • Linus Torvalds's avatar
      Merge tag 'hyperv-fixes-signed-20220407' of... · 42e7a03d
      Linus Torvalds authored
      Merge tag 'hyperv-fixes-signed-20220407' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv fixes from Wei Liu:
      
       - Correctly propagate coherence information for VMbus devices (Michael
         Kelley)
      
       - Disable balloon and memory hot-add on ARM64 temporarily (Boqun Feng)
      
       - Use barrier to prevent reording when reading ring buffer (Michael
         Kelley)
      
       - Use virt_store_mb in favour of smp_store_mb (Andrea Parri)
      
       - Fix VMbus device object initialization (Andrea Parri)
      
       - Deactivate sysctl_record_panic_msg on isolated guest (Andrea Parri)
      
       - Fix a crash when unloading VMbus module (Guilherme G. Piccoli)
      
      * tag 'hyperv-fixes-signed-20220407' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb()
        Drivers: hv: balloon: Disable balloon and hot-add accordingly
        Drivers: hv: balloon: Support status report for larger page sizes
        Drivers: hv: vmbus: Prevent load re-ordering when reading ring buffer
        PCI: hv: Propagate coherence from VMbus device to PCI device
        Drivers: hv: vmbus: Propagate VMbus coherence to each VMbus device
        Drivers: hv: vmbus: Fix potential crash on module unload
        Drivers: hv: vmbus: Fix initialization of device object in vmbus_device_register()
        Drivers: hv: vmbus: Deactivate sysctl_record_panic_msg by default in isolated guests
      42e7a03d
    • Linus Torvalds's avatar
      Merge tag 'random-5.18-rc2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random · 3638bd90
      Linus Torvalds authored
      Pull random number generator fixes from Jason Donenfeld:
      
       - Another fixup to the fast_init/crng_init split, this time in how much
         entropy is being credited, from Jan Varho.
      
       - As discussed, we now opportunistically call try_to_generate_entropy()
         in /dev/urandom reads, as a replacement for the reverted commit. I
         opted to not do the more invasive wait_for_random_bytes() change at
         least for now, preferring to do something smaller and more obvious
         for the time being, but maybe that can be revisited as things evolve
         later.
      
       - Userspace can use FUSE or userfaultfd or simply move a process to
         idle priority in order to make a read from the random device never
         complete, which breaks forward secrecy, fixed by overwriting
         sensitive bytes early on in the function.
      
       - Jann Horn noticed that /dev/urandom reads were only checking for
         pending signals if need_resched() was true, a bug going back to the
         genesis commit, now fixed by always checking for signal_pending() and
         calling cond_resched(). This explains various noticeable signal
         delivery delays I've seen in programs over the years that do long
         reads from /dev/urandom.
      
       - In order to be more like other devices (e.g. /dev/zero) and to
         mitigate the impact of fixing the above bug, which has been around
         forever (users have never really needed to check the return value of
         read() for medium-sized reads and so perhaps many didn't), we now
         move signal checking to the bottom part of the loop, and do so every
         PAGE_SIZE-bytes.
      
      * tag 'random-5.18-rc2-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
        random: check for signals every PAGE_SIZE chunk of /dev/[u]random
        random: check for signal_pending() outside of need_resched() check
        random: do not allow user to keep crng key around on stack
        random: opportunistically initialize on /dev/urandom reads
        random: do not split fast init input in add_hwgenerator_randomness()
      3638bd90
    • Linus Torvalds's avatar
      Merge tag 'ata-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 640b5037
      Linus Torvalds authored
      Pull ata fixes from Damien Le Moal:
      
       - Fix a compilation warning due to an uninitialized variable in
         ata_sff_lost_interrupt(), from me.
      
       - Fix invalid internal command tag handling in the sata_dwc_460ex
         driver, from Christian.
      
       - Disable READ LOG DMA EXT with Samsung 840 EVO SSDs as this command
         causes the drives to hang, from Christian.
      
       - Change the config option CONFIG_SATA_LPM_POLICY back to its original
         name CONFIG_SATA_LPM_MOBILE_POLICY to avoid potential problems with
         users losing their configuration (as discussed during the merge
         window), from Mario.
      
      * tag 'ata-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        ata: ahci: Rename CONFIG_SATA_LPM_POLICY configuration item back
        ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs
        ata: sata_dwc_460ex: Fix crash due to OOB write
        ata: libata-sff: Fix compilation warning in ata_sff_lost_interrupt()
      640b5037
  3. 06 Apr, 2022 7 commits
    • Jason A. Donenfeld's avatar
      random: check for signals every PAGE_SIZE chunk of /dev/[u]random · e3c1c4fd
      Jason A. Donenfeld authored
      In 1448769c ("random: check for signal_pending() outside of
      need_resched() check"), Jann pointed out that we previously were only
      checking the TIF_NOTIFY_SIGNAL and TIF_SIGPENDING flags if the process
      had TIF_NEED_RESCHED set, which meant in practice, super long reads to
      /dev/[u]random would delay signal handling by a long time. I tried this
      using the below program, and indeed I wasn't able to interrupt a
      /dev/urandom read until after several megabytes had been read. The bug
      he fixed has always been there, and so code that reads from /dev/urandom
      without checking the return value of read() has mostly worked for a long
      time, for most sizes, not just for <= 256.
      
      Maybe it makes sense to keep that code working. The reason it was so
      small prior, ignoring the fact that it didn't work anyway, was likely
      because /dev/random used to block, and that could happen for pretty
      large lengths of time while entropy was gathered. But now, it's just a
      chacha20 call, which is extremely fast and is just operating on pure
      data, without having to wait for some external event. In that sense,
      /dev/[u]random is a lot more like /dev/zero.
      
      Taking a page out of /dev/zero's read_zero() function, it always returns
      at least one chunk, and then checks for signals after each chunk. Chunk
      sizes there are of length PAGE_SIZE. Let's just copy the same thing for
      /dev/[u]random, and check for signals and cond_resched() for every
      PAGE_SIZE amount of data. This makes the behavior more consistent with
      expectations, and should mitigate the impact of Jann's fix for the
      age-old signal check bug.
      
      ---- test program ----
      
        #include <unistd.h>
        #include <signal.h>
        #include <stdio.h>
        #include <sys/random.h>
      
        static unsigned char x[~0U];
      
        static void handle(int) { }
      
        int main(int argc, char *argv[])
        {
          pid_t pid = getpid(), child;
          signal(SIGUSR1, handle);
          if (!(child = fork())) {
            for (;;)
              kill(pid, SIGUSR1);
          }
          pause();
          printf("interrupted after reading %zd bytes\n", getrandom(x, sizeof(x), 0));
          kill(child, SIGTERM);
          return 0;
        }
      
      Cc: Jann Horn <jannh@google.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      e3c1c4fd
    • Andrea Parri (Microsoft)'s avatar
      Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb() · eaa03d34
      Andrea Parri (Microsoft) authored
      Following the recommendation in Documentation/memory-barriers.txt for
      virtual machine guests.
      
      Fixes: 8b6a877c ("Drivers: hv: vmbus: Replace the per-CPU channel lists with a global array of channels")
      Signed-off-by: default avatarAndrea Parri (Microsoft) <parri.andrea@gmail.com>
      Link: https://lore.kernel.org/r/20220328154457.100872-1-parri.andrea@gmail.comSigned-off-by: default avatarWei Liu <wei.liu@kernel.org>
      eaa03d34
    • Boqun Feng's avatar
      Drivers: hv: balloon: Disable balloon and hot-add accordingly · be580279
      Boqun Feng authored
      Currently there are known potential issues for balloon and hot-add on
      ARM64:
      
      *	Unballoon requests from Hyper-V should only unballoon ranges
      	that are guest page size aligned, otherwise guests cannot handle
      	because it's impossible to partially free a page. This is a
      	problem when guest page size > 4096 bytes.
      
      *	Memory hot-add requests from Hyper-V should provide the NUMA
      	node id of the added ranges or ARM64 should have a functional
      	memory_add_physaddr_to_nid(), otherwise the node id is missing
      	for add_memory().
      
      These issues require discussions on design and implementation. In the
      meanwhile, post_status() is working and essential to guest monitoring.
      Therefore instead of disabling the entire hv_balloon driver, the
      ballooning (when page size > 4096 bytes) and hot-add are disabled
      accordingly for now. Once the issues are fixed, they can be re-enable in
      these cases.
      Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Link: https://lore.kernel.org/r/20220325023212.1570049-3-boqun.feng@gmail.comSigned-off-by: default avatarWei Liu <wei.liu@kernel.org>
      be580279
    • Boqun Feng's avatar
      Drivers: hv: balloon: Support status report for larger page sizes · b3d6dd09
      Boqun Feng authored
      DM_STATUS_REPORT expects the numbers of pages in the unit of 4k pages
      (HV_HYP_PAGE) instead of guest pages, so to make it work when guest page
      sizes are larger than 4k, convert the numbers of guest pages into the
      numbers of HV_HYP_PAGEs.
      
      Note that the numbers of guest pages are still used for tracing because
      tracing is internal to the guest kernel.
      Reported-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
      Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Link: https://lore.kernel.org/r/20220325023212.1570049-2-boqun.feng@gmail.comSigned-off-by: default avatarWei Liu <wei.liu@kernel.org>
      b3d6dd09
    • Jann Horn's avatar
      random: check for signal_pending() outside of need_resched() check · 1448769c
      Jann Horn authored
      signal_pending() checks TIF_NOTIFY_SIGNAL and TIF_SIGPENDING, which
      signal that the task should bail out of the syscall when possible. This
      is a separate concept from need_resched(), which checks
      TIF_NEED_RESCHED, signaling that the task should preempt.
      
      In particular, with the current code, the signal_pending() bailout
      probably won't work reliably.
      
      Change this to look like other functions that read lots of data, such as
      read_zero().
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      1448769c
    • Jason A. Donenfeld's avatar
      random: do not allow user to keep crng key around on stack · aba120cc
      Jason A. Donenfeld authored
      The fast key erasure RNG design relies on the key that's used to be used
      and then discarded. We do this, making judicious use of
      memzero_explicit().  However, reads to /dev/urandom and calls to
      getrandom() involve a copy_to_user(), and userspace can use FUSE or
      userfaultfd, or make a massive call, dynamically remap memory addresses
      as it goes, and set the process priority to idle, in order to keep a
      kernel stack alive indefinitely. By probing
      /proc/sys/kernel/random/entropy_avail to learn when the crng key is
      refreshed, a malicious userspace could mount this attack every 5 minutes
      thereafter, breaking the crng's forward secrecy.
      
      In order to fix this, we just overwrite the stack's key with the first
      32 bytes of the "free" fast key erasure output. If we're returning <= 32
      bytes to the user, then we can still return those bytes directly, so
      that short reads don't become slower. And for long reads, the difference
      is hopefully lost in the amortization, so it doesn't change much, with
      that amortization helping variously for medium reads.
      
      We don't need to do this for get_random_bytes() and the various
      kernel-space callers, and later, if we ever switch to always batching,
      this won't be necessary either, so there's no need to change the API of
      these functions.
      
      Cc: Theodore Ts'o <tytso@mit.edu>
      Reviewed-by: default avatarJann Horn <jannh@google.com>
      Fixes: c92e040d ("random: add backtracking protection to the CRNG")
      Fixes: 186873c5 ("random: use simpler fast key erasure flow on per-cpu keys")
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      aba120cc
    • Mario Limonciello's avatar
      ata: ahci: Rename CONFIG_SATA_LPM_POLICY configuration item back · 55b01415
      Mario Limonciello authored
      CONFIG_SATA_LPM_MOBILE_POLICY was renamed to CONFIG_SATA_LPM_POLICY in
      commit 4dd4d3de ("ata: ahci: Rename CONFIG_SATA_LPM_MOBILE_POLICY
      configuration item").
      
      This can potentially cause problems as users would invisibly lose
      configuration policy defaults when they built the new kernel. To
      avoid such problems, switch back to the old name (even if it's wrong).
      Suggested-by: default avatarChristoph Hellwig <hch@infradead.org>
      Suggested-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      55b01415
  4. 05 Apr, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 3e732ebf
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "Fixes and cleanups:
      
         - A couple of mlx5 fixes related to cvq
      
         - A couple of reverts dropping useless code (code that used it got
           reverted earlier)"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vdpa: mlx5: synchronize driver status with CVQ
        vdpa: mlx5: prevent cvq work from hogging CPU
        Revert "virtio_config: introduce a new .enable_cbs method"
        Revert "virtio: use virtio_device_ready() in virtio_device_restore()"
      3e732ebf
    • Pawan Gupta's avatar
      x86/speculation: Restore speculation related MSRs during S3 resume · e2a1256b
      Pawan Gupta authored
      After resuming from suspend-to-RAM, the MSRs that control CPU's
      speculative execution behavior are not being restored on the boot CPU.
      
      These MSRs are used to mitigate speculative execution vulnerabilities.
      Not restoring them correctly may leave the CPU vulnerable.  Secondary
      CPU's MSRs are correctly being restored at S3 resume by
      identify_secondary_cpu().
      
      During S3 resume, restore these MSRs for boot CPU when restoring its
      processor state.
      
      Fixes: 77243971 ("x86/bugs/intel: Set proper CPU features and setup RDS")
      Reported-by: default avatarNeelima Krishnan <neelima.krishnan@intel.com>
      Signed-off-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Tested-by: default avatarNeelima Krishnan <neelima.krishnan@intel.com>
      Acked-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e2a1256b
    • Pawan Gupta's avatar
      x86/pm: Save the MSR validity status at context setup · 73924ec4
      Pawan Gupta authored
      The mechanism to save/restore MSRs during S3 suspend/resume checks for
      the MSR validity during suspend, and only restores the MSR if its a
      valid MSR.  This is not optimal, as an invalid MSR will unnecessarily
      throw an exception for every suspend cycle.  The more invalid MSRs,
      higher the impact will be.
      
      Check and save the MSR validity at setup.  This ensures that only valid
      MSRs that are guaranteed to not throw an exception will be attempted
      during suspend.
      
      Fixes: 7a9c2dd0 ("x86/pm: Introduce quirk framework to save/restore extra MSR registers around suspend/resume")
      Suggested-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Signed-off-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Reviewed-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Acked-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      73924ec4
    • Linus Torvalds's avatar
      Merge tag 'for-5.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · ce4c854e
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - prevent deleting subvolume with active swapfile
      
       - fix qgroup reserve limit calculation overflow
      
       - remove device count in superblock and its item in one transaction so
         they cant't get out of sync
      
       - skip defragmenting an isolated sector, this could cause some extra IO
      
       - unify handling of mtime/permissions in hole punch with fallocate
      
       - zoned mode fixes:
           - remove assert checking for only single mode, we have the
             DUP mode implemented
           - fix potential lockdep warning while traversing devices
             when checking for zone activation
      
      * tag 'for-5.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: prevent subvol with swapfile from being deleted
        btrfs: do not warn for free space inode in cow_file_range
        btrfs: avoid defragging extents whose next extents are not targets
        btrfs: fix fallocate to use file_modified to update permissions consistently
        btrfs: remove device item and update super block in the same transaction
        btrfs: fix qgroup reserve overflow the qgroup limit
        btrfs: zoned: remove left over ASSERT checking for single profile
        btrfs: zoned: traverse devices under chunk_mutex in btrfs_can_activate_zone
      ce4c854e
    • Jason A. Donenfeld's avatar
      random: opportunistically initialize on /dev/urandom reads · 48bff105
      Jason A. Donenfeld authored
      In 6f98a4bf ("random: block in /dev/urandom"), we tried to make a
      successful try_to_generate_entropy() call *required* if the RNG was not
      already initialized. Unfortunately, weird architectures and old
      userspaces combined in TCG test harnesses, making that change still not
      realistic, so it was reverted in 0313bc27 ("Revert "random: block in
      /dev/urandom"").
      
      However, rather than making a successful try_to_generate_entropy() call
      *required*, we can instead make it *best-effort*.
      
      If try_to_generate_entropy() fails, it fails, and nothing changes from
      the current behavior. If it succeeds, then /dev/urandom becomes safe to
      use for free. This way, we don't risk the regression potential that led
      to us reverting the required-try_to_generate_entropy() call before.
      
      Practically speaking, this means that at least on x86, /dev/urandom
      becomes safe. Probably other architectures with working cycle counters
      will also become safe. And architectures with slow or broken cycle
      counters at least won't be affected at all by this change.
      
      So it may not be the glorious "all things are unified!" change we were
      hoping for initially, but practically speaking, it makes a positive
      impact.
      
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      48bff105
  5. 04 Apr, 2022 4 commits
    • Jan Varho's avatar
      random: do not split fast init input in add_hwgenerator_randomness() · 527a9867
      Jan Varho authored
      add_hwgenerator_randomness() tries to only use the required amount of input
      for fast init, but credits all the entropy, rather than a fraction of
      it. Since it's hard to determine how much entropy is left over out of a
      non-unformly random sample, either give it all to fast init or credit
      it, but don't attempt to do both. In the process, we can clean up the
      injection code to no longer need to return a value.
      Signed-off-by: default avatarJan Varho <jan.varho@gmail.com>
      [Jason: expanded commit message]
      Fixes: 73c7733f ("random: do not throw away excess input to crng_fast_load")
      Cc: stable@vger.kernel.org # 5.17+, requires af704c85Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      527a9867
    • Christian Lamparter's avatar
      ata: libata-core: Disable READ LOG DMA EXT for Samsung 840 EVOs · 53997522
      Christian Lamparter authored
      Samsung' 840 EVO with the latest firmware (EXT0DB6Q) locks up with
      the a message: "READ LOG DMA EXT failed, trying PIO" during boot.
      
      Initially this was discovered because it caused a crash
      with the sata_dwc_460ex controller on a WD MyBook Live DUO.
      
      The reporter "Tice Rex" which has the unique opportunity that he
      has two Samsung 840 EVO SSD! One with the older firmware "EXT0BB0Q"
      which booted fine and didn't expose "READ LOG DMA EXT". But the
      newer/latest firmware "EXT0DB6Q" caused the headaches.
      
      BugLink: https://github.com/openwrt/openwrt/issues/9505Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      53997522
    • Christian Lamparter's avatar
      ata: sata_dwc_460ex: Fix crash due to OOB write · 7aa8104a
      Christian Lamparter authored
      the driver uses libata's "tag" values from in various arrays.
      Since the mentioned patch bumped the ATA_TAG_INTERNAL to 32,
      the value of the SATA_DWC_QCMD_MAX needs to account for that.
      
      Otherwise ATA_TAG_INTERNAL usage cause similar crashes like
      this as reported by Tice Rex on the OpenWrt Forum and
      reproduced (with symbols) here:
      
      | BUG: Kernel NULL pointer dereference at 0x00000000
      | Faulting instruction address: 0xc03ed4b8
      | Oops: Kernel access of bad area, sig: 11 [#1]
      | BE PAGE_SIZE=4K PowerPC 44x Platform
      | CPU: 0 PID: 362 Comm: scsi_eh_1 Not tainted 5.4.163 #0
      | NIP:  c03ed4b8 LR: c03d27e8 CTR: c03ed36c
      | REGS: cfa59950 TRAP: 0300   Not tainted  (5.4.163)
      | MSR:  00021000 <CE,ME>  CR: 42000222  XER: 00000000
      | DEAR: 00000000 ESR: 00000000
      | GPR00: c03d27e8 cfa59a08 cfa55fe0 00000000 0fa46bc0 [...]
      | [..]
      | NIP [c03ed4b8] sata_dwc_qc_issue+0x14c/0x254
      | LR [c03d27e8] ata_qc_issue+0x1c8/0x2dc
      | Call Trace:
      | [cfa59a08] [c003f4e0] __cancel_work_timer+0x124/0x194 (unreliable)
      | [cfa59a78] [c03d27e8] ata_qc_issue+0x1c8/0x2dc
      | [cfa59a98] [c03d2b3c] ata_exec_internal_sg+0x240/0x524
      | [cfa59b08] [c03d2e98] ata_exec_internal+0x78/0xe0
      | [cfa59b58] [c03d30fc] ata_read_log_page.part.38+0x1dc/0x204
      | [cfa59bc8] [c03d324c] ata_identify_page_supported+0x68/0x130
      | [...]
      
      This is because sata_dwc_dma_xfer_complete() NULLs the
      dma_pending's next neighbour "chan" (a *dma_chan struct) in
      this '32' case right here (line ~735):
      > hsdevp->dma_pending[tag] = SATA_DWC_DMA_PENDING_NONE;
      
      Then the next time, a dma gets issued; dma_dwc_xfer_setup() passes
      the NULL'd hsdevp->chan to the dmaengine_slave_config() which then
      causes the crash.
      
      With this patch, SATA_DWC_QCMD_MAX is now set to ATA_MAX_QUEUE + 1.
      This avoids the OOB. But please note, there was a worthwhile discussion
      on what ATA_TAG_INTERNAL and ATA_MAX_QUEUE is. And why there should not
      be a "fake" 33 command-long queue size.
      
      Ideally, the dw driver should account for the ATA_TAG_INTERNAL.
      In Damien Le Moal's words: "... having looked at the driver, it
      is a bigger change than just faking a 33rd "tag" that is in fact
      not a command tag at all."
      
      Fixes: 28361c40 ("libata: add extra internal command")
      Cc: stable@kernel.org # 4.18+
      BugLink: https://github.com/openwrt/openwrt/issues/9505Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      7aa8104a
    • Damien Le Moal's avatar
      ata: libata-sff: Fix compilation warning in ata_sff_lost_interrupt() · 76ed2f61
      Damien Le Moal authored
      When returning false, ata_sff_altstatus() does not return any status
      value, resulting in a compilation warning in ata_sff_lost_interrupt()
      ("uninitialized symbol 'status'"). Fix this by initializing the local
      variable "status" to 0.
      
      Fixes: 03c0e84f ("ata: libata-sff: refactor ata_sff_altstatus()")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      76ed2f61
  6. 03 Apr, 2022 8 commits
  7. 02 Apr, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.18-2022-04-02' of... · be2d3ece
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.18-2022-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Avoid SEGV if core.cpus isn't set in 'perf stat'.
      
       - Stop depending on .git files for building PERF-VERSION-FILE, used in
         'perf --version', fixing some perf tools build scenarios.
      
       - Convert tracepoint.py example to python3.
      
       - Update UAPI header copies from the kernel sources: socket,
         mman-common, msr-index, KVM, i915 and cpufeatures.
      
       - Update copy of libbpf's hashmap.c.
      
       - Directly return instead of using local ret variable in
         evlist__create_syswide_maps(), found by coccinelle.
      
      * tag 'perf-tools-for-v5.18-2022-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf python: Convert tracepoint.py example to python3
        perf evlist: Directly return instead of using local ret variable
        perf cpumap: More cpu map reuse by merge.
        perf cpumap: Add is_subset function
        perf evlist: Rename cpus to user_requested_cpus
        perf tools: Stop depending on .git files for building PERF-VERSION-FILE
        tools headers cpufeatures: Sync with the kernel sources
        tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
        tools headers UAPI: Sync linux/kvm.h with the kernel sources
        tools kvm headers arm64: Update KVM headers from the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        tools headers UAPI: Sync asm-generic/mman-common.h with the kernel
        perf beauty: Update copy of linux/socket.h with the kernel sources
        perf tools: Update copy of libbpf's hashmap.c
        perf stat: Avoid SEGV if core.cpus isn't set
      be2d3ece
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.18' of... · d897b680
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix empty $(PYTHON) expansion.
      
       - Fix UML, which got broken by the attempt to suppress Clang warnings.
      
       - Fix warning message in modpost.
      
      * tag 'kbuild-fixes-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        modpost: restore the warning message for missing symbol versions
        Revert "um: clang: Strip out -mno-global-merge from USER_CFLAGS"
        kbuild: Remove '-mno-global-merge'
        kbuild: fix empty ${PYTHON} in scripts/link-vmlinux.sh
        kconfig: remove stale comment about removed kconfig_print_symbol()
      d897b680
    • Linus Torvalds's avatar
      Merge tag 'mips_5.18_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 0b0fa57a
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - build fix for gpio
      
       - fix crc32 build problems
      
       - check for failed memory allocations
      
      * tag 'mips_5.18_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: crypto: Fix CRC32 code
        MIPS: rb532: move GPIOD definition into C-files
        MIPS: lantiq: check the return value of kzalloc()
        mips: sgi-ip22: add a check for the return of kzalloc()
      0b0fa57a
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 38904911
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
      
       - Only do MSR filtering for MSRs accessed by rdmsr/wrmsr
      
       - Documentation improvements
      
       - Prevent module exit until all VMs are freed
      
       - PMU Virtualization fixes
      
       - Fix for kvm_irq_delivery_to_apic_fast() NULL-pointer dereferences
      
       - Other miscellaneous bugfixes
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (42 commits)
        KVM: x86: fix sending PV IPI
        KVM: x86/mmu: do compare-and-exchange of gPTE via the user address
        KVM: x86: Remove redundant vm_entry_controls_clearbit() call
        KVM: x86: cleanup enter_rmode()
        KVM: x86: SVM: fix tsc scaling when the host doesn't support it
        kvm: x86: SVM: remove unused defines
        KVM: x86: SVM: move tsc ratio definitions to svm.h
        KVM: x86: SVM: fix avic spec based definitions again
        KVM: MIPS: remove reference to trap&emulate virtualization
        KVM: x86: document limitations of MSR filtering
        KVM: x86: Only do MSR filtering when access MSR by rdmsr/wrmsr
        KVM: x86/emulator: Emulate RDPID only if it is enabled in guest
        KVM: x86/pmu: Fix and isolate TSX-specific performance event logic
        KVM: x86: mmu: trace kvm_mmu_set_spte after the new SPTE was set
        KVM: x86/svm: Clear reserved bits written to PerfEvtSeln MSRs
        KVM: x86: Trace all APICv inhibit changes and capture overall status
        KVM: x86: Add wrappers for setting/clearing APICv inhibits
        KVM: x86: Make APICv inhibit reasons an enum and cleanup naming
        KVM: X86: Handle implicit supervisor access with SMAP
        KVM: X86: Rename variable smap to not_smap in permission_fault()
        ...
      38904911
    • Masahiro Yamada's avatar
      modpost: restore the warning message for missing symbol versions · bf5c0c22
      Masahiro Yamada authored
      This log message was accidentally chopped off.
      
      I was wondering why this happened, but checking the ML log, Mark
      precisely followed my suggestion [1].
      
      I just used "..." because I was too lazy to type the sentence fully.
      Sorry for the confusion.
      
      [1]: https://lore.kernel.org/all/CAK7LNAR6bXXk9-ZzZYpTqzFqdYbQsZHmiWspu27rtsFxvfRuVA@mail.gmail.com/
      
      Fixes: 4a679593 ("kbuild: modpost: Explicitly warn about unprototyped symbols")
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      bf5c0c22