lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Aug 2021 16:22:23 +0300
From:   Maxim Levitsky <mlevitsk@...hat.com>
To:     Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org
Cc:     Kieran Bingham <kbingham@...nel.org>,
        Jan Kiszka <jan.kiszka@...mens.com>,
        Andrew Jones <drjones@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Johannes Berg <johannes.berg@...el.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        "H. Peter Anvin" <hpa@...or.com>, Jessica Yu <jeyu@...nel.org>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>,
        Yang Weijiang <weijiang.yang@...el.com>,
        linux-kernel@...r.kernel.org, Borislav Petkov <bp@...en8.de>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Shuah Khan <shuah@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3 0/6] KVM: my debug patch queue

On Wed, 2021-08-11 at 15:10 +0200, Paolo Bonzini wrote:
> On 11/08/21 14:29, Maxim Levitsky wrote:
> > Hi!
> > 
> > I would like to publish two debug features which were needed for other stuff
> > I work on.
> > 
> > One is the reworked lx-symbols script which now actually works on at least
> > gdb 9.1 (gdb 9.2 was reported to fail to load the debug symbols from the kernel
> > for some reason, not related to this patch) and upstream qemu.
> > 
> > The other feature is the ability to trap all guest exceptions (on SVM for now)
> > and see them in kvmtrace prior to potential merge to double/triple fault.
> > 
> > This can be very useful and I already had to manually patch KVM a few
> > times for this.
> > I will, once time permits, implement this feature on Intel as well.
> > 
> > V2:
> > 
> >   * Some more refactoring and workarounds for lx-symbols script
> > 
> >   * added KVM_GUESTDBG_BLOCKIRQ flag to enable 'block interrupts on
> >     single step' together with KVM_CAP_SET_GUEST_DEBUG2 capability
> >     to indicate which guest debug flags are supported.
> > 
> >     This is a replacement for unconditional block of interrupts on single
> >     step that was done in previous version of this patch set.
> >     Patches to qemu to use that feature will be sent soon.
> > 
> >   * Reworked the the 'intercept all exceptions for debug' feature according
> >     to the review feedback:
> > 
> >     - renamed the parameter that enables the feature and
> >       moved it to common kvm module.
> >       (only SVM part is currently implemented though)
> > 
> >     - disable the feature for SEV guests as was suggested during the review
> >     - made the vmexit table const again, as was suggested in the review as well.
> > 
> > V3:
> >   * Modified a selftest to cover the KVM_GUESTDBG_BLOCKIRQ
> >   * Rebased on kvm/queue
> > 
> > Best regards,
> >          Maxim Levitsky
> > 
> > Maxim Levitsky (6):
> >    KVM: SVM: split svm_handle_invalid_exit
> >    KVM: x86: add force_intercept_exceptions_mask
> >    KVM: SVM: implement force_intercept_exceptions_mask
> >    scripts/gdb: rework lx-symbols gdb script
> >    KVM: x86: implement KVM_GUESTDBG_BLOCKIRQ
> >    KVM: selftests: test KVM_GUESTDBG_BLOCKIRQ
> > 
> >   Documentation/virt/kvm/api.rst                |   1 +
> >   arch/x86/include/asm/kvm_host.h               |   5 +-
> >   arch/x86/include/uapi/asm/kvm.h               |   1 +
> >   arch/x86/kvm/svm/svm.c                        |  87 +++++++-
> >   arch/x86/kvm/svm/svm.h                        |   6 +-
> >   arch/x86/kvm/x86.c                            |  12 +-
> >   arch/x86/kvm/x86.h                            |   2 +
> >   kernel/module.c                               |   8 +-
> >   scripts/gdb/linux/symbols.py                  | 203 ++++++++++++------
> >   .../testing/selftests/kvm/x86_64/debug_regs.c |  24 ++-
> >   10 files changed, 266 insertions(+), 83 deletions(-)
> > 
> 
> Queued 1-5-6.
> 
> For patches 2 and 3, please add VMX support too.
> 
> For patch 4, it's not KVM :) so please submit it separately.

Thanks!

I will do this!


Best regards,
	Maxim Levitsky

> 
> Paolo
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ