Re: [PATCH v2 53/63] KVM: x86: Use struct_group() to zero decode cache

2021-08-18 Thread Kees Cook
On Wed, Aug 18, 2021 at 10:53:58PM +, Sean Christopherson wrote: > On Wed, Aug 18, 2021, Kees Cook wrote: > > On Wed, Aug 18, 2021 at 03:11:28PM +, Sean Christopherson wrote: > > > From dbdca1f4cd01fee418c252e54c360d518b2b1ad6 Mon Sep 17 00:00:00 2001 > > > From: Sean Christopherson > > >

Re: [PATCH v2 53/63] KVM: x86: Use struct_group() to zero decode cache

2021-08-18 Thread Kees Cook
On Wed, Aug 18, 2021 at 03:11:28PM +, Sean Christopherson wrote: > On Tue, Aug 17, 2021, Kees Cook wrote: > > arch/x86/kvm/emulate.c | 3 +-- > > arch/x86/kvm/kvm_emulate.h | 19 +++ > > 2 files changed, 12 insertions(+), 10 deletions(-) > > > > diff --git

Re: [PATCH v2 53/63] KVM: x86: Use struct_group() to zero decode cache

2021-08-18 Thread Sean Christopherson
On Tue, Aug 17, 2021, Kees Cook wrote: > arch/x86/kvm/emulate.c | 3 +-- > arch/x86/kvm/kvm_emulate.h | 19 +++ > 2 files changed, 12 insertions(+), 10 deletions(-) > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c > index 2837110e66ed..2608a047e769 100644 >

[PATCH v2 53/63] KVM: x86: Use struct_group() to zero decode cache

2021-08-18 Thread Kees Cook
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring fields. Add struct_group() to mark region of struct x86_emulate_ctxt that should be initialized to zero. Cc: Paolo Bonzini Cc: Sean