Skip to content
Snippets Groups Projects
  1. May 31, 2022
  2. May 23, 2022
  3. May 19, 2022
  4. May 05, 2022
  5. May 02, 2022
  6. Mar 09, 2022
  7. Feb 25, 2022
  8. Feb 17, 2022
  9. Feb 16, 2022
  10. Feb 09, 2022
  11. Feb 07, 2022
  12. Jan 27, 2022
    • Alex Deucher's avatar
      drm/amdgpu/UAPI: add new CTX OP to get/set stable pstates · 076fa146
      Alex Deucher authored
      Add a new CTX ioctl operation to set stable pstates for profiling.
      When creating traces for tools like RGP or using SPM or doing
      performance profiling, it's required to enable a special
      stable profiling power state on the GPU.  These profiling
      states set fixed clocks and disable certain other power
      features like powergating which may impact the results.
      
      Historically, these profiling pstates were enabled via sysfs,
      but this adds an interface to enable it via the CTX ioctl
      from the application.  Since the power state is global
      only one application can set it at a time, so if multiple
      applications try and use it only the first will get it,
      the ioctl will return -EBUSY for others.  The sysfs interface
      will override whatever has been set by this interface.
      
      Mesa MR: mesa/drm!207
      
      
      
      v2: don't default r = 0;
      v3: rebase on Evan's PM cleanup
      
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      076fa146
  13. Jan 14, 2022
  14. Jan 11, 2022
  15. Dec 27, 2021
  16. Dec 21, 2021
  17. Dec 16, 2021
  18. Dec 15, 2021
  19. Dec 14, 2021
  20. Dec 11, 2021
    • Drew DeVault's avatar
      Increase default MLOCK_LIMIT to 8 MiB · 9dcc38e2
      Drew DeVault authored
      This limit has not been updated since 2008, when it was increased to 64
      KiB at the request of GnuPG.  Until recently, the main use-cases for this
      feature were (1) preventing sensitive memory from being swapped, as in
      GnuPG's use-case; and (2) real-time use-cases.  In the first case, little
      memory is called for, and in the second case, the user is generally in a
      position to increase it if they need more.
      
      The introduction of IOURING_REGISTER_BUFFERS adds a third use-case:
      preparing fixed buffers for high-performance I/O.  This use-case will take
      as much of this memory as it can get, but is still limited to 64 KiB by
      default, which is very little.  This increases the limit to 8 MB, which
      was chosen fairly arbitrarily as a more generous, but still conservative,
      default value.
      
      It is also possible to raise this limit in userspace.  This is easily
      done, for example, in the use-case of a network daemon: systemd, for
      instance, provides for this via LimitMEMLOCK in the service file; OpenRC
      via the rc_ulimit variables.  However, there is no established userspace
      facility for configuring this outside of daemons: end-user applications do
      not presently have access to a convenient means of raising their limits.
      
      The buck, as it were, stops with the kernel.  It's much easier to address
      it here than it is to bring it to hundreds of distributions, and it can
      only realistically be relied upon to be high-enough by end-user software
      if it is more-or-less ubiquitous.  Most distros don't change this
      particular rlimit from the kernel-supplied default value, so a change here
      will easily provide that ubiquity.
      
      Link: https://lkml.kernel.org/r/20211028080813.15966-1-sir@cmpwn.com
      
      
      Signed-off-by: default avatarDrew DeVault <sir@cmpwn.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Acked-by: default avatarCyril Hrubis <chrubis@suse.cz>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Pavel Begunkov <asml.silence@gmail.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Andrew Dona-Couch <andrew@donacou.ch>
      Cc: Ammar Faizi <ammarfaizi2@gnuweeb.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9dcc38e2
  21. Dec 09, 2021
    • Eric Biggers's avatar
      aio: fix use-after-free due to missing POLLFREE handling · 50252e4b
      Eric Biggers authored
      signalfd_poll() and binder_poll() are special in that they use a
      waitqueue whose lifetime is the current task, rather than the struct
      file as is normally the case.  This is okay for blocking polls, since a
      blocking poll occurs within one task; however, non-blocking polls
      require another solution.  This solution is for the queue to be cleared
      before it is freed, by sending a POLLFREE notification to all waiters.
      
      Unfortunately, only eventpoll handles POLLFREE.  A second type of
      non-blocking poll, aio poll, was added in kernel v4.18, and it doesn't
      handle POLLFREE.  This allows a use-after-free to occur if a signalfd or
      binder fd is polled with aio poll, and the waitqueue gets freed.
      
      Fix this by making aio poll handle POLLFREE.
      
      A patch by Ramji Jiyani <ramjiyani@google.com>
      (https://lore.kernel.org/r/20211027011834.2497484-1-ramjiyani@google.com)
      tried to do this by making aio_poll_wake() always complete the request
      inline if POLLFREE is seen.  However, that solution had two bugs.
      First, it introduced a deadlock, as it unconditionally locked the aio
      context while holding the waitqueue lock, which inverts the normal
      locking order.  Second, it didn't consider that POLLFREE notifications
      are missed while the request has been temporarily de-queued.
      
      The second problem was solved by my previous patch.  This patch then
      properly fixes the use-after-free by handling POLLFREE in a
      deadlock-free way.  It does this by taking advantage of the fact that
      freeing of the waitqueue is RCU-delayed, similar to what eventpoll does.
      
      Fixes: 2c14fa83 ("aio: implement IOCB_CMD_POLL")
      Cc: <stable@vger.kernel.org> # v4.18+
      Link: https://lore.kernel.org/r/20211209010455.42744-6-ebiggers@kernel.org
      
      
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      50252e4b
    • Zack Rusin's avatar
      drm/vmwgfx: Allow checking for gl43 contexts · abaad3d9
      Zack Rusin authored
      
      To make sure we're running on top of hardware that can support
      GL4.3 we need to add a way of querying for those capabilities.
      DRM_VMW_PARAM_GL43 allows userspace to check for presence of
      GL4.3 capable contexts.
      
      Signed-off-by: default avatarZack Rusin <zackr@vmware.com>
      Reviewed-by: default avatarCharmaine Lee <charmainel@vmware.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211206172620.3139754-10-zack@kde.org
      abaad3d9
  22. Dec 02, 2021
  23. Nov 29, 2021
  24. Nov 24, 2021
  25. Nov 23, 2021
  26. Nov 17, 2021
  27. Nov 11, 2021
    • Peter Gonda's avatar
      KVM: SEV: Add support for SEV intra host migration · b5663931
      Peter Gonda authored
      
      For SEV to work with intra host migration, contents of the SEV info struct
      such as the ASID (used to index the encryption key in the AMD SP) and
      the list of memory regions need to be transferred to the target VM.
      This change adds a commands for a target VMM to get a source SEV VM's sev
      info.
      
      Signed-off-by: default avatarPeter Gonda <pgonda@google.com>
      Suggested-by: default avatarSean Christopherson <seanjc@google.com>
      Reviewed-by: default avatarMarc Orr <marcorr@google.com>
      Cc: Marc Orr <marcorr@google.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Sean Christopherson <seanjc@google.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Brijesh Singh <brijesh.singh@amd.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: Wanpeng Li <wanpengli@tencent.com>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: kvm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Message-Id: <20211021174303.385706-3-pgonda@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b5663931
  28. Nov 10, 2021
    • David Hildenbrand's avatar
      virtio-mem: support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE · 61082ad6
      David Hildenbrand authored
      
      The initial virtio-mem spec states that while unplugged memory should not
      be read, the device still has to allow for reading unplugged memory inside
      the usable region. The primary motivation for this default handling was
      to simplify bringup of virtio-mem, because there were corner cases where
      Linux might have accidentially read unplugged memory inside added Linux
      memory blocks.
      
      In the meantime, we:
      1. Removed /dev/kmem in commit bbcd53c9 ("drivers/char: remove
         /dev/kmem for good")
      2. Disallowed access to virtio-mem device memory via /dev/mem in
         commit 2128f4e2 ("virtio-mem: disallow mapping virtio-mem memory via
         /dev/mem")
      3. Sanitized access to virtio-mem device memory via /proc/kcore in
         commit 0daa322b ("fs/proc/kcore: don't read offline sections,
         logically offline pages and hwpoisoned pages")
      4. Sanitized access to virtio-mem device memory via /proc/vmcore in
         commit ce281462 ("virtio-mem: kdump mode to sanitize /proc/vmcore
         access")
      
      "Accidential" access to unplugged memory is no longer possible; we can
      support the new VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE feature that will be
      required by some hypervisors implementing virtio-mem in the near future.
      
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Marek Kedzierski <mkedzier@redhat.com>
      Cc: Hui Zhu <teawater@gmail.com>
      Cc: Sebastien Boeuf <sebastien.boeuf@intel.com>
      Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
      Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      61082ad6
  29. Nov 08, 2021
  30. Nov 04, 2021
  31. Nov 03, 2021
  32. Nov 02, 2021
    • James Prestwood's avatar
      net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter · 18ac597a
      James Prestwood authored
      
      In most situations the neighbor discovery cache should be cleared on a
      NOCARRIER event which is currently done unconditionally. But for wireless
      roams the neighbor discovery cache can and should remain intact since
      the underlying network has not changed.
      
      This patch introduces a sysctl option ndisc_evict_nocarrier which can
      be disabled by a wireless supplicant during a roam. This allows packets
      to be sent after a roam immediately without having to wait for
      neighbor discovery.
      
      A user reported roughly a 1 second delay after a roam before packets
      could be sent out (note, on IPv4). This delay was due to the ARP
      cache being cleared. During testing of this same scenario using IPv6
      no delay was noticed, but regardless there is no reason to clear
      the ndisc cache for wireless roams.
      
      Signed-off-by: default avatarJames Prestwood <prestwoj@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      18ac597a
Loading