]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2025 07:10:58 +0000 (08:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2025 07:10:58 +0000 (08:10 +0100)
added patches:
revert-vfio-platform-check-the-bounds-of-read-write-syscalls.patch

queue-6.12/revert-vfio-platform-check-the-bounds-of-read-write-syscalls.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/revert-vfio-platform-check-the-bounds-of-read-write-syscalls.patch b/queue-6.12/revert-vfio-platform-check-the-bounds-of-read-write-syscalls.patch
new file mode 100644 (file)
index 0000000..c8f81bb
--- /dev/null
@@ -0,0 +1,45 @@
+From c59171a0f6e59a39aa2c6ccea532632353e585ce Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Wed, 19 Feb 2025 08:01:16 +0100
+Subject: Revert "vfio/platform: check the bounds of read/write syscalls"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 61ba518195d61c38c6cb86f83135e51f93735442.
+
+It had been committed multiple times to the tree, and isn't needed
+again.
+
+Link: https://lore.kernel.org/r/a082db2605514513a0a8568382d5bd2b6f1877a0.camel@cyberus-technology.de
+Reported-by: Stefan Nürnberger <stefan.nuernberger@cyberus-technology.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/vfio/platform/vfio_platform_common.c |   10 ----------
+ 1 file changed, 10 deletions(-)
+
+--- a/drivers/vfio/platform/vfio_platform_common.c
++++ b/drivers/vfio/platform/vfio_platform_common.c
+@@ -393,11 +393,6 @@ static ssize_t vfio_platform_read_mmio(s
+       count = min_t(size_t, count, reg->size - off);
+-      if (off >= reg->size)
+-              return -EINVAL;
+-
+-      count = min_t(size_t, count, reg->size - off);
+-
+       if (!reg->ioaddr) {
+               reg->ioaddr =
+                       ioremap(reg->addr, reg->size);
+@@ -479,11 +474,6 @@ static ssize_t vfio_platform_write_mmio(
+       if (off >= reg->size)
+               return -EINVAL;
+-
+-      count = min_t(size_t, count, reg->size - off);
+-
+-      if (off >= reg->size)
+-              return -EINVAL;
+       count = min_t(size_t, count, reg->size - off);
index 34489935f4db1dd3b14350484aa4dc98c43a3b87..9e6d1d923ab896f1fc94d3e01533b1cdb344b52f 100644 (file)
@@ -227,3 +227,4 @@ scsi-ufs-core-ensure-clk_gating.lock-is-used-only-after-initialization.patch
 io_uring-kbuf-reallocate-buf-lists-on-upgrade.patch
 vsock-keep-the-binding-until-socket-destruction.patch
 vsock-orphan-socket-after-transport-release.patch
+revert-vfio-platform-check-the-bounds-of-read-write-syscalls.patch