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:   Tue, 23 Feb 2021 17:56:40 +0800
From:   Aili Yao <yaoaili@...gsoft.com>
To:     Borislav Petkov <bp@...en8.de>
CC:     <tony.luck@...el.com>, <mingo@...hat.com>, <tglx@...utronix.de>,
        <hpa@...or.com>, <x86@...nel.org>, <linux-edac@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <yangfeng1@...gsoft.com>,
        <yaoaili@...gsoft>
Subject: Re: [PATCH v2] x86/mce: fix wrong no-return-ip logic in
 do_machine_check()

On Tue, 23 Feb 2021 10:43:00 +0100
Borislav Petkov <bp@...en8.de> wrote:

> On Tue, Feb 23, 2021 at 10:27:55AM +0800, Aili Yao wrote:
> > When Guest access one address with UE error, it will exit guest mode,
> > the host will do the recovery job, and then one SIGBUS is send to
> > the VCPU and qemu will catch the signal, there is only address and
> > error level no RIPV in signal, so qemu will assume RIPV is cleared and
> > inject the error into guest OS.  
> 
> Lemme see:
> 
> void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr)
> 
>     /* If we get an action required MCE, it has been injected by KVM
>      * while the VM was running.  An action optional MCE instead should
>      * be coming from the main thread, which qemu_init_sigbus identifies
>      * as the "early kill" thread.
>      */
>     assert(code == BUS_MCEERR_AR || code == BUS_MCEERR_AO);
> 
>     ...
> 
> 	kvm_mce_inject(cpu, paddr, code);
> 
> in that function:
> 
>     if (code == BUS_MCEERR_AR) {
>         status |= MCI_STATUS_AR | 0x134;
>         mcg_status |= MCG_STATUS_EIPV;
>     } else {
>         status |= 0xc0;
>         mcg_status |= MCG_STATUS_RIPV;
>     }
> 
> That looks like a valid RIP bit to me. Then cpu_x86_inject_mce() gets
> that mcg_status and injects it into the guest.

What i inject is AR error, and I don't see MCG_STATUS_RIPV flag.

Tks
Aili Yao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ