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] [day] [month] [year] [list]
Date:   Thu, 20 Sep 2018 10:50:17 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Yi Wang <wang.yi59@....com.cn>, rkrcmar@...hat.com,
        tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
        x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        zhong.weidong@....com.cn, xu.xi8@....com.cn, peng.hao2@....com.cn,
        jiang.biao2@....com.cn
Subject: Re: [PATCH] KVM: x86: fix failure of injecting exceptions in
 x86_emulate_instruction

+cc Peng Hao and Jiang Biao

On Thu, Sep 20, 2018 at 06:53:55PM +0200, Paolo Bonzini wrote:
> On 20/09/2018 18:30, Paolo Bonzini wrote:
> > On 06/09/2018 10:02, Yi Wang wrote:
> >> In order to fix a page table walk issue, commit 6ea6e84309ca
> >> ("KVM: x86: inject exceptions produced by x86_decode_insn") check
> >> if variable ctxt->have_exception true and inject the exception.
> >> Unfortunately, ctxt->have_exception is set to true only in function
> >> x86_emulate_insn(), which won't be called before invoking
> >> inject_emulated_exception() in the 6ea6e84309ca.
> >> This patch fix this issue.
> >>
> >> Signed-off-by: Yi Wang <wang.yi59@....com.cn>
> >> Reviewed-by: Xi Xu <xu.xi8@....com.cn>
> > 
> > Queued, thanks.  Do you have a testcase for this?
> 
> Unqueued, sorry.  The hypercall test from kvm-unit-tests fails.  A
> VMCALL on the "edge" of canonical address space, i.e. at 0x7ffffffffffd,
> raises a general protection fault before this patch and a double fault
> afterwards.

Peng Hao submitted a very similar patch[1], the difference being that
it also modified x86_emulate_instruction() to ignore the result of
inject_emulated_exception().  I have no idea if that change is correct
but it may be related to the aforementioned unit test failing.

[1] https://lkml.org/lkml/2018/9/19/38

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ