]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch from everywhere
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Apr 2022 07:33:46 +0000 (09:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Apr 2022 07:33:46 +0000 (09:33 +0200)
queue-4.19/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch [deleted file]
queue-4.19/series
queue-5.10/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch [deleted file]
queue-5.10/series
queue-5.15/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch [deleted file]
queue-5.15/series
queue-5.17/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch [deleted file]
queue-5.17/series
queue-5.4/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch [deleted file]
queue-5.4/series

diff --git a/queue-4.19/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch b/queue-4.19/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
deleted file mode 100644 (file)
index c3ab217..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-From a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb Mon Sep 17 00:00:00 2001
-From: Oliver Upton <oupton@google.com>
-Date: Wed, 6 Apr 2022 23:56:13 +0000
-Subject: KVM: Don't create VM debugfs files outside of the VM directory
-
-From: Oliver Upton <oupton@google.com>
-
-commit a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb upstream.
-
-Unfortunately, there is no guarantee that KVM was able to instantiate a
-debugfs directory for a particular VM. To that end, KVM shouldn't even
-attempt to create new debugfs files in this case. If the specified
-parent dentry is NULL, debugfs_create_file() will instantiate files at
-the root of debugfs.
-
-For arm64, it is possible to create the vgic-state file outside of a
-VM directory, the file is not cleaned up when a VM is destroyed.
-Nonetheless, the corresponding struct kvm is freed when the VM is
-destroyed.
-
-Nip the problem in the bud for all possible errant debugfs file
-creations by initializing kvm->debugfs_dentry to -ENOENT. In so doing,
-debugfs_create_file() will fail instead of creating the file in the root
-directory.
-
-Cc: stable@kernel.org
-Fixes: 929f45e32499 ("kvm: no need to check return value of debugfs_create functions")
-Signed-off-by: Oliver Upton <oupton@google.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Link: https://lore.kernel.org/r/20220406235615.1447180-2-oupton@google.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- virt/kvm/kvm_main.c |    8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
---- a/virt/kvm/kvm_main.c
-+++ b/virt/kvm/kvm_main.c
-@@ -610,7 +610,7 @@ static void kvm_destroy_vm_debugfs(struc
- {
-       int i;
--      if (!kvm->debugfs_dentry)
-+      if (IS_ERR(kvm->debugfs_dentry))
-               return;
-       debugfs_remove_recursive(kvm->debugfs_dentry);
-@@ -628,6 +628,12 @@ static int kvm_create_vm_debugfs(struct
-       struct kvm_stat_data *stat_data;
-       struct kvm_stats_debugfs_item *p;
-+      /*
-+       * Force subsequent debugfs file creations to fail if the VM directory
-+       * is not created.
-+       */
-+      kvm->debugfs_dentry = ERR_PTR(-ENOENT);
-+
-       if (!debugfs_initialized())
-               return 0;
index 6e59465b944b9e7375c27012722bfd5c8ce1633c..c8ca6db8983560750663ed334d6bcb03e6bae7cd 100644 (file)
@@ -22,7 +22,6 @@ scsi-mvsas-add-pci-id-of-rocketraid-2640.patch
 drivers-net-slip-fix-npd-bug-in-sl_tx_timeout.patch
 mm-page_alloc-fix-build_zonerefs_node.patch
 mm-kmemleak-take-a-full-lowmem-check-in-kmemleak_-_phys.patch
-kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
 gcc-plugins-latent_entropy-use-dev-urandom.patch
 alsa-hda-realtek-add-quirk-for-clevo-pd50pnt.patch
 alsa-pcm-test-for-silence-field-in-struct-pcm_format_data.patch
diff --git a/queue-5.10/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch b/queue-5.10/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
deleted file mode 100644 (file)
index c8dd9fc..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb Mon Sep 17 00:00:00 2001
-From: Oliver Upton <oupton@google.com>
-Date: Wed, 6 Apr 2022 23:56:13 +0000
-Subject: KVM: Don't create VM debugfs files outside of the VM directory
-
-From: Oliver Upton <oupton@google.com>
-
-commit a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb upstream.
-
-Unfortunately, there is no guarantee that KVM was able to instantiate a
-debugfs directory for a particular VM. To that end, KVM shouldn't even
-attempt to create new debugfs files in this case. If the specified
-parent dentry is NULL, debugfs_create_file() will instantiate files at
-the root of debugfs.
-
-For arm64, it is possible to create the vgic-state file outside of a
-VM directory, the file is not cleaned up when a VM is destroyed.
-Nonetheless, the corresponding struct kvm is freed when the VM is
-destroyed.
-
-Nip the problem in the bud for all possible errant debugfs file
-creations by initializing kvm->debugfs_dentry to -ENOENT. In so doing,
-debugfs_create_file() will fail instead of creating the file in the root
-directory.
-
-Cc: stable@kernel.org
-Fixes: 929f45e32499 ("kvm: no need to check return value of debugfs_create functions")
-Signed-off-by: Oliver Upton <oupton@google.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Link: https://lore.kernel.org/r/20220406235615.1447180-2-oupton@google.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- virt/kvm/kvm_main.c |   10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/virt/kvm/kvm_main.c
-+++ b/virt/kvm/kvm_main.c
-@@ -673,7 +673,7 @@ static void kvm_destroy_vm_debugfs(struc
- {
-       int i;
--      if (!kvm->debugfs_dentry)
-+      if (IS_ERR(kvm->debugfs_dentry))
-               return;
-       debugfs_remove_recursive(kvm->debugfs_dentry);
-@@ -693,6 +693,12 @@ static int kvm_create_vm_debugfs(struct
-       struct kvm_stat_data *stat_data;
-       struct kvm_stats_debugfs_item *p;
-+      /*
-+       * Force subsequent debugfs file creations to fail if the VM directory
-+       * is not created.
-+       */
-+      kvm->debugfs_dentry = ERR_PTR(-ENOENT);
-+
-       if (!debugfs_initialized())
-               return 0;
-@@ -4731,7 +4737,7 @@ static void kvm_uevent_notify_change(uns
-       }
-       add_uevent_var(env, "PID=%d", kvm->userspace_pid);
--      if (kvm->debugfs_dentry) {
-+      if (!IS_ERR(kvm->debugfs_dentry)) {
-               char *tmp, *p = kmalloc(PATH_MAX, GFP_KERNEL_ACCOUNT);
-               if (p) {
index 697e47f145d75e8eaa1c912e4e5d62a820587376..7cc1b3b292aa3932f52fa06ac51ef59c4fe796ab 100644 (file)
@@ -71,7 +71,6 @@ mm-page_alloc-fix-build_zonerefs_node.patch
 mm-fix-unexpected-zeroed-page-mapping-with-zram-swap.patch
 mm-kmemleak-take-a-full-lowmem-check-in-kmemleak_-_phys.patch
 kvm-x86-mmu-resolve-nx_huge_pages-when-kvm.ko-is-loaded.patch
-kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
 memory-renesas-rpc-if-fix-platform-device-leak-in-error-path.patch
 gcc-plugins-latent_entropy-use-dev-urandom.patch
 ath9k-properly-clear-tx-status-area-before-reporting-to-mac80211.patch
diff --git a/queue-5.15/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch b/queue-5.15/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
deleted file mode 100644 (file)
index 6349c7b..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb Mon Sep 17 00:00:00 2001
-From: Oliver Upton <oupton@google.com>
-Date: Wed, 6 Apr 2022 23:56:13 +0000
-Subject: KVM: Don't create VM debugfs files outside of the VM directory
-
-From: Oliver Upton <oupton@google.com>
-
-commit a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb upstream.
-
-Unfortunately, there is no guarantee that KVM was able to instantiate a
-debugfs directory for a particular VM. To that end, KVM shouldn't even
-attempt to create new debugfs files in this case. If the specified
-parent dentry is NULL, debugfs_create_file() will instantiate files at
-the root of debugfs.
-
-For arm64, it is possible to create the vgic-state file outside of a
-VM directory, the file is not cleaned up when a VM is destroyed.
-Nonetheless, the corresponding struct kvm is freed when the VM is
-destroyed.
-
-Nip the problem in the bud for all possible errant debugfs file
-creations by initializing kvm->debugfs_dentry to -ENOENT. In so doing,
-debugfs_create_file() will fail instead of creating the file in the root
-directory.
-
-Cc: stable@kernel.org
-Fixes: 929f45e32499 ("kvm: no need to check return value of debugfs_create functions")
-Signed-off-by: Oliver Upton <oupton@google.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Link: https://lore.kernel.org/r/20220406235615.1447180-2-oupton@google.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- virt/kvm/kvm_main.c |   10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/virt/kvm/kvm_main.c
-+++ b/virt/kvm/kvm_main.c
-@@ -911,7 +911,7 @@ static void kvm_destroy_vm_debugfs(struc
-       int kvm_debugfs_num_entries = kvm_vm_stats_header.num_desc +
-                                     kvm_vcpu_stats_header.num_desc;
--      if (!kvm->debugfs_dentry)
-+      if (IS_ERR(kvm->debugfs_dentry))
-               return;
-       debugfs_remove_recursive(kvm->debugfs_dentry);
-@@ -934,6 +934,12 @@ static int kvm_create_vm_debugfs(struct
-       int kvm_debugfs_num_entries = kvm_vm_stats_header.num_desc +
-                                     kvm_vcpu_stats_header.num_desc;
-+      /*
-+       * Force subsequent debugfs file creations to fail if the VM directory
-+       * is not created.
-+       */
-+      kvm->debugfs_dentry = ERR_PTR(-ENOENT);
-+
-       if (!debugfs_initialized())
-               return 0;
-@@ -5373,7 +5379,7 @@ static void kvm_uevent_notify_change(uns
-       }
-       add_uevent_var(env, "PID=%d", kvm->userspace_pid);
--      if (kvm->debugfs_dentry) {
-+      if (!IS_ERR(kvm->debugfs_dentry)) {
-               char *tmp, *p = kmalloc(PATH_MAX, GFP_KERNEL_ACCOUNT);
-               if (p) {
index e5927190069dfdb7e352f504b16365f702a12536..0c0d89439c75878679db0f4f5a599a231e9843bf 100644 (file)
@@ -146,7 +146,6 @@ mm-page_alloc-fix-build_zonerefs_node.patch
 mm-fix-unexpected-zeroed-page-mapping-with-zram-swap.patch
 mm-kmemleak-take-a-full-lowmem-check-in-kmemleak_-_phys.patch
 kvm-x86-mmu-resolve-nx_huge_pages-when-kvm.ko-is-loaded.patch
-kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
 sunrpc-fix-nfsd-s-request-deferral-on-rdma-transports.patch
 memory-renesas-rpc-if-fix-platform-device-leak-in-error-path.patch
 gcc-plugins-latent_entropy-use-dev-urandom.patch
diff --git a/queue-5.17/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch b/queue-5.17/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
deleted file mode 100644 (file)
index 6afecef..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb Mon Sep 17 00:00:00 2001
-From: Oliver Upton <oupton@google.com>
-Date: Wed, 6 Apr 2022 23:56:13 +0000
-Subject: KVM: Don't create VM debugfs files outside of the VM directory
-
-From: Oliver Upton <oupton@google.com>
-
-commit a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb upstream.
-
-Unfortunately, there is no guarantee that KVM was able to instantiate a
-debugfs directory for a particular VM. To that end, KVM shouldn't even
-attempt to create new debugfs files in this case. If the specified
-parent dentry is NULL, debugfs_create_file() will instantiate files at
-the root of debugfs.
-
-For arm64, it is possible to create the vgic-state file outside of a
-VM directory, the file is not cleaned up when a VM is destroyed.
-Nonetheless, the corresponding struct kvm is freed when the VM is
-destroyed.
-
-Nip the problem in the bud for all possible errant debugfs file
-creations by initializing kvm->debugfs_dentry to -ENOENT. In so doing,
-debugfs_create_file() will fail instead of creating the file in the root
-directory.
-
-Cc: stable@kernel.org
-Fixes: 929f45e32499 ("kvm: no need to check return value of debugfs_create functions")
-Signed-off-by: Oliver Upton <oupton@google.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Link: https://lore.kernel.org/r/20220406235615.1447180-2-oupton@google.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- virt/kvm/kvm_main.c |   10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/virt/kvm/kvm_main.c
-+++ b/virt/kvm/kvm_main.c
-@@ -937,7 +937,7 @@ static void kvm_destroy_vm_debugfs(struc
-       int kvm_debugfs_num_entries = kvm_vm_stats_header.num_desc +
-                                     kvm_vcpu_stats_header.num_desc;
--      if (!kvm->debugfs_dentry)
-+      if (IS_ERR(kvm->debugfs_dentry))
-               return;
-       debugfs_remove_recursive(kvm->debugfs_dentry);
-@@ -960,6 +960,12 @@ static int kvm_create_vm_debugfs(struct
-       int kvm_debugfs_num_entries = kvm_vm_stats_header.num_desc +
-                                     kvm_vcpu_stats_header.num_desc;
-+      /*
-+       * Force subsequent debugfs file creations to fail if the VM directory
-+       * is not created.
-+       */
-+      kvm->debugfs_dentry = ERR_PTR(-ENOENT);
-+
-       if (!debugfs_initialized())
-               return 0;
-@@ -5484,7 +5490,7 @@ static void kvm_uevent_notify_change(uns
-       }
-       add_uevent_var(env, "PID=%d", kvm->userspace_pid);
--      if (kvm->debugfs_dentry) {
-+      if (!IS_ERR(kvm->debugfs_dentry)) {
-               char *tmp, *p = kmalloc(PATH_MAX, GFP_KERNEL_ACCOUNT);
-               if (p) {
index 06c1006994d2eb879db5cfab7ee22c289c377f6f..41253ed2ddd66bbaf8c1bf3dcb2c126962a78aae 100644 (file)
@@ -180,7 +180,6 @@ hugetlb-do-not-demote-poisoned-hugetlb-pages.patch
 revert-fs-binfmt_elf-fix-pt_load-p_align-values-for-loaders.patch
 revert-fs-binfmt_elf-use-pt_load-p_align-values-for-static-pie.patch
 kvm-x86-mmu-resolve-nx_huge_pages-when-kvm.ko-is-loaded.patch
-kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
 sunrpc-fix-nfsd-s-request-deferral-on-rdma-transports.patch
 memory-renesas-rpc-if-fix-platform-device-leak-in-error-path.patch
 gcc-plugins-latent_entropy-use-dev-urandom.patch
diff --git a/queue-5.4/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch b/queue-5.4/kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
deleted file mode 100644 (file)
index 9c73a27..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb Mon Sep 17 00:00:00 2001
-From: Oliver Upton <oupton@google.com>
-Date: Wed, 6 Apr 2022 23:56:13 +0000
-Subject: KVM: Don't create VM debugfs files outside of the VM directory
-
-From: Oliver Upton <oupton@google.com>
-
-commit a44a4cc1c969afec97dbb2aedaf6f38eaa6253bb upstream.
-
-Unfortunately, there is no guarantee that KVM was able to instantiate a
-debugfs directory for a particular VM. To that end, KVM shouldn't even
-attempt to create new debugfs files in this case. If the specified
-parent dentry is NULL, debugfs_create_file() will instantiate files at
-the root of debugfs.
-
-For arm64, it is possible to create the vgic-state file outside of a
-VM directory, the file is not cleaned up when a VM is destroyed.
-Nonetheless, the corresponding struct kvm is freed when the VM is
-destroyed.
-
-Nip the problem in the bud for all possible errant debugfs file
-creations by initializing kvm->debugfs_dentry to -ENOENT. In so doing,
-debugfs_create_file() will fail instead of creating the file in the root
-directory.
-
-Cc: stable@kernel.org
-Fixes: 929f45e32499 ("kvm: no need to check return value of debugfs_create functions")
-Signed-off-by: Oliver Upton <oupton@google.com>
-Signed-off-by: Marc Zyngier <maz@kernel.org>
-Link: https://lore.kernel.org/r/20220406235615.1447180-2-oupton@google.com
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- virt/kvm/kvm_main.c |   10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/virt/kvm/kvm_main.c
-+++ b/virt/kvm/kvm_main.c
-@@ -623,7 +623,7 @@ static void kvm_destroy_vm_debugfs(struc
- {
-       int i;
--      if (!kvm->debugfs_dentry)
-+      if (IS_ERR(kvm->debugfs_dentry))
-               return;
-       debugfs_remove_recursive(kvm->debugfs_dentry);
-@@ -643,6 +643,12 @@ static int kvm_create_vm_debugfs(struct
-       struct kvm_stat_data *stat_data;
-       struct kvm_stats_debugfs_item *p;
-+      /*
-+       * Force subsequent debugfs file creations to fail if the VM directory
-+       * is not created.
-+       */
-+      kvm->debugfs_dentry = ERR_PTR(-ENOENT);
-+
-       if (!debugfs_initialized())
-               return 0;
-@@ -4399,7 +4405,7 @@ static void kvm_uevent_notify_change(uns
-       }
-       add_uevent_var(env, "PID=%d", kvm->userspace_pid);
--      if (kvm->debugfs_dentry) {
-+      if (!IS_ERR(kvm->debugfs_dentry)) {
-               char *tmp, *p = kmalloc(PATH_MAX, GFP_KERNEL_ACCOUNT);
-               if (p) {
index 3f09c7469e48c48d57c27da75b7cd240583621bf..69c3554dfb781c448061c338e9127898bf7dcfa9 100644 (file)
@@ -36,7 +36,6 @@ drivers-net-slip-fix-npd-bug-in-sl_tx_timeout.patch
 perf-imx_ddr-fix-undefined-behavior-due-to-shift-ove.patch
 mm-page_alloc-fix-build_zonerefs_node.patch
 mm-kmemleak-take-a-full-lowmem-check-in-kmemleak_-_phys.patch
-kvm-don-t-create-vm-debugfs-files-outside-of-the-vm-directory.patch
 gcc-plugins-latent_entropy-use-dev-urandom.patch
 ath9k-properly-clear-tx-status-area-before-reporting-to-mac80211.patch
 ath9k-fix-usage-of-driver-private-space-in-tx_info.patch