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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191122152505.GB9822@local-michael-cet-test>
Date:   Fri, 22 Nov 2019 23:25:05 +0800
From:   Yang Weijiang <weijiang.yang@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Yang Weijiang <weijiang.yang@...el.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, jmattson@...gle.com,
        sean.j.christopherson@...el.com, yu.c.zhang@...ux.intel.com,
        alazar@...defender.com, edwin.zhai@...el.com
Subject: Re: [PATCH v7 6/9] vmx: spp: Set up SPP paging table at
 vmentry/vmexit

On Thu, Nov 21, 2019 at 05:08:07PM +0100, Paolo Bonzini wrote:
> On 21/11/19 16:22, Yang Weijiang wrote:
> > On Thu, Nov 21, 2019 at 11:18:48AM +0100, Paolo Bonzini wrote:
> >> On 19/11/19 09:49, Yang Weijiang wrote:
> >>> +			if (spte & PT_SPP_MASK) {
> >>> +				fault_handled = true;
> >>> +				vcpu->run->exit_reason = KVM_EXIT_SPP;
> >>> +				vcpu->run->spp.addr = gva;
> >>> +				kvm_skip_emulated_instruction(vcpu);
> >>
> >> Do you really want to skip the current instruction?  Who will do the write?
> >>
> > If the destination memory is SPP protected, the target memory is
> > expected unchanged on a "write op" in guest, so would like to skip current 
> > instruction.
> 
> This is how you are expecting SPP to be used, but another possibility is
> to unprotect and reenter the guest.  In this case
> kvm_skip_emulated_instruction would be wrong (and once this decision is
> made, it would be very, very hard to change it).
> 
> However, you clearly need a way to skip the instruction, and for that
> you could store the current instruction length in vcpu->run->spp.  Then
> userspace can adjust RIP manually if desired.
>
Looks good to me, will add the length, thanks!
> Thanks,
> 
> Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ