mint0x33/arch
Greg Kroah-Hartman 1d43de93b3 kvm: initialize all of the kvm_debugregs structure before sending it to userspace
commit 2c10b61421a28e95a46ab489fd56c0f442ff6952 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:46:07 +01:00
..
alpha exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
arc arc: iounmap() arg is volatile 2022-11-03 23:50:54 +09:00
arm exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
arm64 exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
blackfin
c6x
cris
frv
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-06 07:46:34 +01:00
hexagon hexagon: Fix function name in die() 2023-02-06 07:46:34 +01:00
ia64 ia64: make IA64_MCA_RECOVERY bool instead of tristate 2023-02-06 07:46:34 +01:00
m32r
m68k exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
metag
microblaze exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
mips exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
mn10300
nios2 exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
openrisc exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
parisc parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case 2023-02-22 12:46:03 +01:00
powerpc exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
s390 exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
score
sh exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
sparc exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
tile
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 13:16:56 +02:00
unicore32 linux/const.h: move UL() macro to include/linux/const.h 2022-11-10 15:47:24 +01:00
x86 kvm: initialize all of the kvm_debugregs structure before sending it to userspace 2023-02-22 12:46:07 +01:00
xtensa exit: Add and use make_task_dead. 2023-02-06 07:46:33 +01:00
.gitignore
Kconfig x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol 2021-12-22 09:17:59 +01:00