summaryrefslogtreecommitdiffstats
path: root/Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-14 11:33:04 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2023-02-16 18:31:40 +0100
commit2c10b61421a28e95a46ab489fd56c0f442ff6952 (patch)
tree186330faa775ca592f95491bb7661c79c664e08e /Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst
parentperf/x86: Refuse to export capabilities for hybrid PMUs (diff)
downloadlinux-2c10b61421a28e95a46ab489fd56c0f442ff6952.tar.xz
linux-2c10b61421a28e95a46ab489fd56c0f442ff6952.zip
kvm: initialize all of the kvm_debugregs structure before sending it to userspace
When calling the KVM_GET_DEBUGREGS ioctl, on some configurations, there might be some unitialized portions of the kvm_debugregs structure that could be copied to userspace. Prevent this as is done in the other kvm ioctls, by setting the whole structure to 0 before copying anything into it. Bonus is that this reduces the lines of code as the explicit flag setting and reserved space zeroing out can be removed. Cc: Sean Christopherson <seanjc@google.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: <x86@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: stable <stable@kernel.org> Reported-by: Xingyuan Mo <hdthky0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Message-Id: <20230214103304.3689213-1-gregkh@linuxfoundation.org> Tested-by: Xingyuan Mo <hdthky0@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/admin-guide/hw-vuln/cross-thread-rsb.rst')
0 files changed, 0 insertions, 0 deletions