public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Use new wrappers to copy userspace arrays
@ 2023-11-02 18:15 Philipp Stanner
  2023-11-02 18:15 ` [PATCH 1/3] arch/x86/kvm: copy user-array with overflow-check Philipp Stanner
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Philipp Stanner @ 2023-11-02 18:15 UTC (permalink / raw)
  To: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, Sean Christopherson,
	Paolo Bonzini, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, H. Peter Anvin
  Cc: kvm, linux-s390, linux-kernel, x86, Philipp Stanner

Hi,

Linus recently merged [1] the wrapper functions memdup_array_user() and
vmemdup_array_user() in include/linux/string.h for Kernel v6.7

I am currently adding them to all places where (v)memdup_user() had been
used to copy arrays.

The wrapper is different to the wrapped functions only in that it might
return -EOVERFLOW. So this new error code might get pushed up to
userspace. I hope this is fine.

I felt that it might be a good idea to land those three patches here
with a single series, since they all touch something KVM-related.

Kind regards,
P.

[1] https://lore.kernel.org/all/169886743808.2396.17544791408117731525.pr-tracker-bot@kernel.org/

Philipp Stanner (3):
  arch/x86/kvm: copy user-array with overflow-check
  arch/s390/kvm: copy userspace-array safely
  virt/kvm: copy userspace-array safely

 arch/s390/kvm/guestdbg.c | 4 ++--
 arch/x86/kvm/cpuid.c     | 4 ++--
 virt/kvm/kvm_main.c      | 5 ++---
 3 files changed, 6 insertions(+), 7 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-01 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 18:15 [PATCH 0/3] Use new wrappers to copy userspace arrays Philipp Stanner
2023-11-02 18:15 ` [PATCH 1/3] arch/x86/kvm: copy user-array with overflow-check Philipp Stanner
2023-11-02 18:15 ` [PATCH 2/3] arch/s390/kvm: copy userspace-array safely Philipp Stanner
2023-11-03 11:55   ` Claudio Imbrenda
2023-11-02 18:15 ` [PATCH 3/3] virt/kvm: " Philipp Stanner
2023-12-01  1:52 ` [PATCH 0/3] Use new wrappers to copy userspace arrays Sean Christopherson
2023-12-01 11:24   ` Christian Borntraeger
2023-12-01 16:02     ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox