lkml.org 
[lkml]   [2008]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kmemcheck: lazy checking for MOVS instructions
On Fri, Sep 12, 2008 at 11:06 AM, Ingo Molnar <mingo@elte.hu> wrote:
>> From: Vegard Nossum <vegard.nossum@gmail.com>
>> Date: Thu, 11 Sep 2008 17:31:07 +0200
>> Subject: [PATCH] kmemcheck: lazy checking for MOVS instructions
>>
>> This patch adds the support for lazy (as opposed to eager) checking
>> for [REP] MOVS instructions (mostly used in memcpy()). This means that
>> if both the source and destination addresses are tracked by kmemcheck,
>> we copy the shadow memory instead of checking that it is initialized.
>>
>> In this way, we get rid of a few more false positives.
>
> looks good to me. I've applied it to tip/kmemcheck - but can zap it and
> pull your for-tip branch as well.

Please zap, I believe it contains an error :-)

In short, when reading/writing the shadow memory of the second page in
a page-boundary-crossing memory access, the offsets into the second
shadow page will be wrong (off by up to 8 bytes). It's a pretty
obscure case, but it would be nice to have it fixed. Will send a pull
request later.

Thanks,


Vegard

--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036


\
 
 \ /
  Last update: 2008-09-12 19:11    [W:0.069 / U:2.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site