]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Dec 2021 14:09:22 +0000 (15:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Dec 2021 14:09:22 +0000 (15:09 +0100)
added patches:
arm64-dts-lx2160a-fix-scl-gpios-property-name.patch
kfence-fix-memory-leak-when-cat-kfence-objects.patch
kvm-vmx-fix-stale-docs-for-kvm-intel.emulate_invalid_guest_state.patch

queue-5.15/arm64-dts-lx2160a-fix-scl-gpios-property-name.patch [new file with mode: 0644]
queue-5.15/kfence-fix-memory-leak-when-cat-kfence-objects.patch [new file with mode: 0644]
queue-5.15/kvm-vmx-fix-stale-docs-for-kvm-intel.emulate_invalid_guest_state.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/arm64-dts-lx2160a-fix-scl-gpios-property-name.patch b/queue-5.15/arm64-dts-lx2160a-fix-scl-gpios-property-name.patch
new file mode 100644 (file)
index 0000000..eea1adb
--- /dev/null
@@ -0,0 +1,40 @@
+From 849e087ba68ac6956c11016ce34f9f10a09a4186 Mon Sep 17 00:00:00 2001
+From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
+Date: Tue, 14 Dec 2021 01:23:33 -0600
+Subject: arm64: dts: lx2160a: fix scl-gpios property name
+
+From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
+
+commit 849e087ba68ac6956c11016ce34f9f10a09a4186 upstream.
+
+Fix the typo in the property name.
+
+Fixes: d548c217c6a3c ("arm64: dts: add QorIQ LX2160A SoC support")
+Signed-off-by: Zhang Ying <ying.zhang22455@nxp.com>
+Signed-off-by: Li Yang <leoyang.li@nxp.com>
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
++++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+@@ -719,7 +719,7 @@
+                       clock-names = "i2c";
+                       clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+                                           QORIQ_CLK_PLL_DIV(16)>;
+-                      scl-gpio = <&gpio2 15 GPIO_ACTIVE_HIGH>;
++                      scl-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
+                       status = "disabled";
+               };
+@@ -768,7 +768,7 @@
+                       clock-names = "i2c";
+                       clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+                                           QORIQ_CLK_PLL_DIV(16)>;
+-                      scl-gpio = <&gpio2 16 GPIO_ACTIVE_HIGH>;
++                      scl-gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
+                       status = "disabled";
+               };
diff --git a/queue-5.15/kfence-fix-memory-leak-when-cat-kfence-objects.patch b/queue-5.15/kfence-fix-memory-leak-when-cat-kfence-objects.patch
new file mode 100644 (file)
index 0000000..799e123
--- /dev/null
@@ -0,0 +1,101 @@
+From 0129ab1f268b6cf88825eae819b9b84aa0a85634 Mon Sep 17 00:00:00 2001
+From: Baokun Li <libaokun1@huawei.com>
+Date: Fri, 24 Dec 2021 21:12:32 -0800
+Subject: kfence: fix memory leak when cat kfence objects
+
+From: Baokun Li <libaokun1@huawei.com>
+
+commit 0129ab1f268b6cf88825eae819b9b84aa0a85634 upstream.
+
+Hulk robot reported a kmemleak problem:
+
+    unreferenced object 0xffff93d1d8cc02e8 (size 248):
+      comm "cat", pid 23327, jiffies 4624670141 (age 495992.217s)
+      hex dump (first 32 bytes):
+        00 40 85 19 d4 93 ff ff 00 10 00 00 00 00 00 00  .@..............
+        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
+      backtrace:
+         seq_open+0x2a/0x80
+         full_proxy_open+0x167/0x1e0
+         do_dentry_open+0x1e1/0x3a0
+         path_openat+0x961/0xa20
+         do_filp_open+0xae/0x120
+         do_sys_openat2+0x216/0x2f0
+         do_sys_open+0x57/0x80
+         do_syscall_64+0x33/0x40
+         entry_SYSCALL_64_after_hwframe+0x44/0xa9
+    unreferenced object 0xffff93d419854000 (size 4096):
+      comm "cat", pid 23327, jiffies 4624670141 (age 495992.217s)
+      hex dump (first 32 bytes):
+        6b 66 65 6e 63 65 2d 23 32 35 30 3a 20 30 78 30  kfence-#250: 0x0
+        30 30 30 30 30 30 30 37 35 34 62 64 61 31 32 2d  0000000754bda12-
+      backtrace:
+         seq_read_iter+0x313/0x440
+         seq_read+0x14b/0x1a0
+         full_proxy_read+0x56/0x80
+         vfs_read+0xa5/0x1b0
+         ksys_read+0xa0/0xf0
+         do_syscall_64+0x33/0x40
+         entry_SYSCALL_64_after_hwframe+0x44/0xa9
+
+I find that we can easily reproduce this problem with the following
+commands:
+
+       cat /sys/kernel/debug/kfence/objects
+       echo scan > /sys/kernel/debug/kmemleak
+       cat /sys/kernel/debug/kmemleak
+
+The leaked memory is allocated in the stack below:
+
+    do_syscall_64
+      do_sys_open
+        do_dentry_open
+          full_proxy_open
+            seq_open            ---> alloc seq_file
+      vfs_read
+        full_proxy_read
+          seq_read
+            seq_read_iter
+              traverse          ---> alloc seq_buf
+
+And it should have been released in the following process:
+
+    do_syscall_64
+      syscall_exit_to_user_mode
+        exit_to_user_mode_prepare
+          task_work_run
+            ____fput
+              __fput
+                full_proxy_release  ---> free here
+
+However, the release function corresponding to file_operations is not
+implemented in kfence.  As a result, a memory leak occurs.  Therefore,
+the solution to this problem is to implement the corresponding release
+function.
+
+Link: https://lkml.kernel.org/r/20211206133628.2822545-1-libaokun1@huawei.com
+Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure")
+Signed-off-by: Baokun Li <libaokun1@huawei.com>
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Acked-by: Marco Elver <elver@google.com>
+Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
+Cc: Alexander Potapenko <glider@google.com>
+Cc: Dmitry Vyukov <dvyukov@google.com>
+Cc: Yu Kuai <yukuai3@huawei.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/kfence/core.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/mm/kfence/core.c
++++ b/mm/kfence/core.c
+@@ -578,6 +578,7 @@ static const struct file_operations obje
+       .open = open_objects,
+       .read = seq_read,
+       .llseek = seq_lseek,
++      .release = seq_release,
+ };
+ static int __init kfence_debugfs_init(void)
diff --git a/queue-5.15/kvm-vmx-fix-stale-docs-for-kvm-intel.emulate_invalid_guest_state.patch b/queue-5.15/kvm-vmx-fix-stale-docs-for-kvm-intel.emulate_invalid_guest_state.patch
new file mode 100644 (file)
index 0000000..2d35a4d
--- /dev/null
@@ -0,0 +1,40 @@
+From 0ff29701ffad9a5d5a24344d8b09f3af7b96ffda Mon Sep 17 00:00:00 2001
+From: Sean Christopherson <seanjc@google.com>
+Date: Tue, 7 Dec 2021 19:30:05 +0000
+Subject: KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_state
+
+From: Sean Christopherson <seanjc@google.com>
+
+commit 0ff29701ffad9a5d5a24344d8b09f3af7b96ffda upstream.
+
+Update the documentation for kvm-intel's emulate_invalid_guest_state to
+rectify the description of KVM's default behavior, and to document that
+the behavior and thus parameter only applies to L1.
+
+Fixes: a27685c33acc ("KVM: VMX: Emulate invalid guest state by default")
+Signed-off-by: Sean Christopherson <seanjc@google.com>
+Message-Id: <20211207193006.120997-4-seanjc@google.com>
+Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/admin-guide/kernel-parameters.txt |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/Documentation/admin-guide/kernel-parameters.txt
++++ b/Documentation/admin-guide/kernel-parameters.txt
+@@ -2403,8 +2403,12 @@
+                       Default is 1 (enabled)
+       kvm-intel.emulate_invalid_guest_state=
+-                      [KVM,Intel] Enable emulation of invalid guest states
+-                      Default is 0 (disabled)
++                      [KVM,Intel] Disable emulation of invalid guest state.
++                      Ignored if kvm-intel.enable_unrestricted_guest=1, as
++                      guest state is never invalid for unrestricted guests.
++                      This param doesn't apply to nested guests (L2), as KVM
++                      never emulates invalid L2 guest state.
++                      Default is 1 (enabled)
+       kvm-intel.flexpriority=
+                       [KVM,Intel] Disable FlexPriority feature (TPR shadow).
index 89180ce0f0fcdbc4f52bf04cec77f2fea736c0d0..9c2284216db65ba17762b3fc9496c84b75693290 100644 (file)
@@ -106,3 +106,6 @@ mm-damon-dbgfs-protect-targets-destructions-with-kdamond_lock.patch
 tee-optee-fix-incorrect-page-free-bug.patch
 f2fs-fix-to-do-sanity-check-on-last-xattr-entry-in-__f2fs_setxattr.patch
 netfs-fix-parameter-of-cleanup.patch
+kvm-vmx-fix-stale-docs-for-kvm-intel.emulate_invalid_guest_state.patch
+arm64-dts-lx2160a-fix-scl-gpios-property-name.patch
+kfence-fix-memory-leak-when-cat-kfence-objects.patch