From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: preempt notifier emulation host crash fix Date: Mon, 11 Feb 2008 10:18:19 +0200 Message-ID: <47B004CB.2040507@qumranet.com> References: <20080203224518.GH7185@v2.random> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net To: Andrea Arcangeli Return-path: In-Reply-To: <20080203224518.GH7185@v2.random> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Andrea Arcangeli wrote: > Hello, > > there's a small glitch in the preempt notifier external module > emulation. The overloaded debug handler will not detect when a debug > exception has been generated by ptrace and it'll crash the host by > calling the preempt emulator like if this was a KVM preempt emulated > exception, instead of notifying userland. > > To detect when the preempt emulation is needed and when the exception > should be bypassed to the original handler, I decided to use bit 10 of > db7 that can't be set to 1 by ptrace, the mask against the userland > passed db7 value is 0xfc00, so bit 10 is forbidden to be on unless it > was KVM setting it manually with 0x701 (kvm really only needs 0x301 to > get exact exception, dunno what 0x400 means, it's defined reserved, > but it doesn't matter what it means as long as ptrace can't set it ;). > Applied, thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/