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:	Mon, 15 Jun 2009 14:48:58 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, mingo@...hat.com,
	paulus@...ba.org, acme@...hat.com, linux-kernel@...r.kernel.org,
	a.p.zijlstra@...llo.nl, penberg@...helsinki.fi,
	vegard.nossum@...il.com, efault@....de, jeremy@...p.org,
	npiggin@...e.de, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perfcounters/core] perf_counter: x86: Fix call-chain
	support to use NMI-safe methods

* H. Peter Anvin (hpa@...or.com) wrote:
> Linus Torvalds wrote:
> > 
> > On Mon, 15 Jun 2009, Ingo Molnar wrote:
> >> A simple cr2 corruption would explain all those cc1 SIGSEGVs and 
> >> other user-space crashes i saw, with sufficiently intense sampling - 
> >> easily.
> > 
> > Note that we could work around the %cr2 issue, since any corruption is 
> > always nicely "nested" (ie there are never any SMP issues with async 
> > writes to the register).
> > 
> > So what we _could_ do is to have a magic value for %cr2, along with a "NMI 
> > sequence count", and if we see that value, we just return (without doing 
> > anything) from the page fault handler.
> > 
> 
> Wouldn't it be simpler to just require the NMI handler to save and
> restore %cr2 around any potentially faulting references?
> 
> 	-hpa

If we require that around the whole NMI handler execution, then we get
all vmalloc + module text code references handled for free. This would
be a nice-to-have.a And given nmi-handler is not such a frequent code
path, we should not care that much about the performance hit of
saving/restoring the cr2 register at each nmi entry/exit.

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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