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]
Message-ID: <1368613266.11138.10.camel@hastur.hellion.org.uk>
Date:	Wed, 15 May 2013 11:21:06 +0100
From:	Ian Campbell <ian.campbell@...rix.com>
To:	<zhenzhong.duan@...cle.com>
CC:	Jan Beulich <JBeulich@...e.com>,
	xen-devel <xen-devel@...ts.xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Tamon Shiose <tamon.shiose@...cle.com>,
	Feng Jin <joe.jin@...cle.com>
Subject: Re: [Xen-devel] [PATCH-v2] xen: Don't call
 arch_trigger_all_cpu_backtrace in dom0(pvm)

On Wed, 2013-05-15 at 16:40 +0800, Zhenzhong Duan wrote:
> On 2013-04-10 00:36, Ian Campbell wrote:
> > On Mon, 2013-04-08 at 08:42 +0100, Jan Beulich wrote:
> >>>>> On 07.04.13 at 07:54, Zhenzhong Duan <zhenzhong.duan@...cle.com> wrote:
> >>> nmi isn't supported in dom0, fallback to general all cpu backtrace code.
> >> Since when is sending NMIs not supported, and since when is this
> >> Dom0-specific? If you want to deal with this, you should do so
> >> properly: Special case sending NMIs in the respective Xen specific
> >> code (using VCPUOP_send_nmi), and carry this out in a way not
> >> dependent upon running (un)privileged.
> > You'd also need to implement the upcall support for receiving NMIs,
> > which IIRC isn't yet done for pvops.
> Hi Ian,
> 
> Could you give a suggestion on which file to change to support NMI upcall?
> I compare with vMCE code, made similar change.
> Use VCPUOP_send_nmi to send nmi between pvm guest vcpus, but nmi isn't 
> triggered.

You need to register a callback with CALLBACKOP_register
CALLBACKTYPE_nmi. You also need to write the code in entry.S to receive
that callback. IIRC you also need to arrange that returning from an NMI
is always done with HYPERVISOR_iret and not optimised to a direct iret
as it can be otherwise. This is to allow the hypervisor to implement NMI
masking correctly.

The linux-2.6.18-xen.hg tree implements NMI callbacks so you may find
inspiration there, although how upstreamable that approach is I'm not
sure. In particular stealing a EFLAGS bit to force the HYPERVISOR_iret
is certain to not be acceptable upstream.

Ian.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ