From: Greg Kroah-Hartman Date: Tue, 1 Feb 2022 17:54:13 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.302~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a5650b800a1b6a51c75dec686ca4cb8451a232c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: kvm-x86-fix-misplaced-backport-of-work-around-leak-of-uninitialized-stack-contents.patch revert-drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch revert-tc358743-fix-register-i2c_rd-wr-function-fix.patch --- diff --git a/queue-4.4/kvm-x86-fix-misplaced-backport-of-work-around-leak-of-uninitialized-stack-contents.patch b/queue-4.4/kvm-x86-fix-misplaced-backport-of-work-around-leak-of-uninitialized-stack-contents.patch new file mode 100644 index 00000000000..9687e9d4fc6 --- /dev/null +++ b/queue-4.4/kvm-x86-fix-misplaced-backport-of-work-around-leak-of-uninitialized-stack-contents.patch @@ -0,0 +1,57 @@ +From guillaume.bertholon@ens.fr Tue Feb 1 18:51:26 2022 +From: Guillaume Bertholon +Date: Tue, 1 Feb 2022 18:17:51 +0100 +Subject: KVM: x86: Fix misplaced backport of "work around leak of uninitialized stack contents" +To: gregkh@linuxfoundation.org +Cc: stable@vger.kernel.org, Guillaume Bertholon +Message-ID: <1643735871-15065-1-git-send-email-guillaume.bertholon@ens.fr> + +From: Guillaume Bertholon + +The upstream commit 541ab2aeb282 ("KVM: x86: work around leak of +uninitialized stack contents") resets `exception` in the function +`kvm_write_guest_virt_system`. +However, its backported version in stable (commit ba7f1c934f2e +("KVM: x86: work around leak of uninitialized stack contents")) applied +the change in `emulator_write_std` instead. + +This patch moves the memset instruction back to +`kvm_write_guest_virt_system`. + +Fixes: ba7f1c934f2e ("KVM: x86: work around leak of uninitialized stack contents") +Signed-off-by: Guillaume Bertholon +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/x86.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/arch/x86/kvm/x86.c ++++ b/arch/x86/kvm/x86.c +@@ -4417,13 +4417,6 @@ static int emulator_write_std(struct x86 + if (!system && kvm_x86_ops->get_cpl(vcpu) == 3) + access |= PFERR_USER_MASK; + +- /* +- * FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED +- * is returned, but our callers are not ready for that and they blindly +- * call kvm_inject_page_fault. Ensure that they at least do not leak +- * uninitialized kernel stack memory into cr2 and error code. +- */ +- memset(exception, 0, sizeof(*exception)); + return kvm_write_guest_virt_helper(addr, val, bytes, vcpu, + access, exception); + } +@@ -4431,6 +4424,13 @@ static int emulator_write_std(struct x86 + int kvm_write_guest_virt_system(struct kvm_vcpu *vcpu, gva_t addr, void *val, + unsigned int bytes, struct x86_exception *exception) + { ++ /* ++ * FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED ++ * is returned, but our callers are not ready for that and they blindly ++ * call kvm_inject_page_fault. Ensure that they at least do not leak ++ * uninitialized kernel stack memory into cr2 and error code. ++ */ ++ memset(exception, 0, sizeof(*exception)); + return kvm_write_guest_virt_helper(addr, val, bytes, vcpu, + PFERR_WRITE_MASK, exception); + } diff --git a/queue-4.4/revert-drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch b/queue-4.4/revert-drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch new file mode 100644 index 00000000000..454d4ed2c36 --- /dev/null +++ b/queue-4.4/revert-drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch @@ -0,0 +1,40 @@ +From guillaume.bertholon@ens.fr Tue Feb 1 18:50:20 2022 +From: Guillaume Bertholon +Date: Tue, 1 Feb 2022 18:11:13 +0100 +Subject: Revert "drm/radeon/ci: disable mclk switching for high refresh rates (v2)" +To: gregkh@linuxfoundation.org +Cc: stable@vger.kernel.org, Guillaume Bertholon +Message-ID: <1643735473-14635-1-git-send-email-guillaume.bertholon@ens.fr> + +From: Guillaume Bertholon + +This reverts commit 0157e2a8a71978c58a7d6cfb3616ab17d9726631. + +The reverted commit was backported and applied twice on the stable branch: +- First as commit 15de2e4c90b7 ("drm/radeon/ci: disable mclk switching for +high refresh rates (v2)") +- Then as commit 0157e2a8a719 ("drm/radeon/ci: disable mclk switching for +high refresh rates (v2)") + +Fixes: 0157e2a8a719 ("drm/radeon/ci: disable mclk switching for high refresh rates (v2)") +Signed-off-by: Guillaume Bertholon +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/radeon/ci_dpm.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/drivers/gpu/drm/radeon/ci_dpm.c ++++ b/drivers/gpu/drm/radeon/ci_dpm.c +@@ -782,12 +782,6 @@ bool ci_dpm_vblank_too_short(struct rade + if (r600_dpm_get_vrefresh(rdev) > 120) + return true; + +- /* disable mclk switching if the refresh is >120Hz, even if the +- * blanking period would allow it +- */ +- if (r600_dpm_get_vrefresh(rdev) > 120) +- return true; +- + if (vblank_time < switch_limit) + return true; + else diff --git a/queue-4.4/revert-tc358743-fix-register-i2c_rd-wr-function-fix.patch b/queue-4.4/revert-tc358743-fix-register-i2c_rd-wr-function-fix.patch new file mode 100644 index 00000000000..3d8de0b5688 --- /dev/null +++ b/queue-4.4/revert-tc358743-fix-register-i2c_rd-wr-function-fix.patch @@ -0,0 +1,36 @@ +From guillaume.bertholon@ens.fr Tue Feb 1 18:50:44 2022 +From: Guillaume Bertholon +Date: Tue, 1 Feb 2022 18:14:41 +0100 +Subject: Revert "tc358743: fix register i2c_rd/wr function fix" +To: gregkh@linuxfoundation.org +Cc: stable@vger.kernel.org, Guillaume Bertholon +Message-ID: <1643735681-14816-1-git-send-email-guillaume.bertholon@ens.fr> + +From: Guillaume Bertholon + +This reverts commit a3f9c74652c749486bf9e989caabcae6f68272ee. + +The reverted commit was backported and applied twice on the stable branch: +- First as commit 44f3c2b6e5e9 ("tc358743: fix register i2c_rd/wr + function fix") at the right position `i2c_wr8_and_or` +- Then as commit a3f9c74652c7 ("tc358743: fix register i2c_rd/wr + function fix") on the wrong function `i2c_wr16_and_or` + +Fixes: a3f9c74652c7 ("tc358743: fix register i2c_rd/wr function fix") +Signed-off-by: Guillaume Bertholon +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/tc358743.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/i2c/tc358743.c ++++ b/drivers/media/i2c/tc358743.c +@@ -241,7 +241,7 @@ static void i2c_wr16(struct v4l2_subdev + + static void i2c_wr16_and_or(struct v4l2_subdev *sd, u16 reg, u16 mask, u16 val) + { +- i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 1) & mask) | val, 1); ++ i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 2) & mask) | val, 2); + } + + static u32 i2c_rd32(struct v4l2_subdev *sd, u16 reg) diff --git a/queue-4.4/series b/queue-4.4/series index 64579318cfe..33cd51cbf25 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -20,3 +20,6 @@ hwmon-lm90-reduce-maximum-conversion-rate-for-g781.patch ipv4-raw-lock-the-socket-in-raw_bind.patch ipv4-tcp-send-zero-ipid-in-synack-messages.patch bluetooth-mgmt-fix-misplaced-bt_hs-check.patch +revert-drm-radeon-ci-disable-mclk-switching-for-high-refresh-rates-v2.patch +revert-tc358743-fix-register-i2c_rd-wr-function-fix.patch +kvm-x86-fix-misplaced-backport-of-work-around-leak-of-uninitialized-stack-contents.patch