login
Header Space

 
 

Re: [PATCH 1/2] kmemcheck v3

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Vegard Nossum <vegard.nossum@...>
Cc: Andi Kleen <andi@...>, Linux Kernel Mailing List <linux-kernel@...>, Ingo Molnar <mingo@...>, Pekka Enberg <penberg@...>, Richard Knutsson <ricknu-0@...>, Christoph Lameter <clameter@...>
Date: Friday, February 8, 2008 - 9:48 am

On Fri, Feb 08, 2008 at 01:59:57PM +0100, Vegard Nossum wrote:

Given that you don't seem to handle networking yet I wonder how
many cases you really tested so far.


There's the stack for once too. And some others I'm probably
forgetting.


You only need this for the size and to detect string instructions, right?
The address should be delivered with the page fault and the r/w status too.

I think for string instructions you could probably detect it with
a little state machine that detects multiple page faults on the same
instruction.

Or just prevent the compiler/the code from generating string instructions.
There should not be that many once you stop gcc from generating inline
string ops (-Os is probably enough for that) 

For size you could in theory use VT which has special support in the CPU
to help with parsing this, although that would limit it to modern CPUs
and would require quite some infrastructure.


I'm pretty sure there are other special instructions that you will
eventually run into. Intel (and sometimes AMD) add new ones each CPU
generation :) Reimplementing instruction decoding on x86 is not
an easy job. Anyways if you really want to do it I would rather
recommend to use one of the existing codes like the x86-emulate
that is in KVM, but even that one is far from complete. Trying
to avoid it would probably better.

-Andi

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] kmemcheck v3, Vegard Nossum, (Thu Feb 7, 5:36 pm)
Re: [PATCH 1/2] kmemcheck v3, Andi Kleen, (Fri Feb 8, 7:55 am)
Re: [PATCH 1/2] kmemcheck v3, Vegard Nossum, (Fri Feb 8, 8:18 am)
Re: [PATCH 1/2] kmemcheck v3, Andi Kleen, (Fri Feb 8, 9:20 am)
Re: [PATCH 1/2] kmemcheck v3, Vegard Nossum, (Fri Feb 8, 8:59 am)
Re: [PATCH 1/2] kmemcheck v3, Andi Kleen, (Fri Feb 8, 9:48 am)
Re: [PATCH 1/2] kmemcheck v3, Ingo Molnar, (Sat Feb 9, 5:33 am)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 7:37 am)
Re: [PATCH 1/2] kmemcheck v3, Andi Kleen, (Fri Feb 8, 8:15 am)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 7:43 am)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 7:31 am)
Re: [PATCH 1/2] kmemcheck v3, Andi Kleen, (Fri Feb 8, 8:10 am)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 7:39 am)
Re: [PATCH 1/2] kmemcheck v3, Christoph Lameter, (Fri Feb 8, 3:10 am)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 3:48 am)
Re: [PATCH 1/2] kmemcheck v3, Christoph Lameter, (Thu Feb 7, 5:53 pm)
Re: [PATCH 1/2] kmemcheck v3, Vegard Nossum, (Thu Feb 7, 6:12 pm)
Re: [PATCH 1/2] kmemcheck v3, Christoph Lameter, (Thu Feb 7, 6:53 pm)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 2:30 am)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 2:33 am)
Re: [PATCH 1/2] kmemcheck v3, Vegard Nossum, (Thu Feb 7, 7:18 pm)
Re: [PATCH 1/2] kmemcheck v3, Christoph Lameter, (Thu Feb 7, 7:32 pm)
Re: [PATCH 1/2] kmemcheck v3, Pekka Enberg, (Fri Feb 8, 2:40 am)
Re: [PATCH 1/2] kmemcheck v3, Ingo Molnar, (Fri Feb 8, 4:09 am)
[PATCH 2/2] kmemcheck v3, Vegard Nossum, (Thu Feb 7, 5:39 pm)
speck-geostationary