Message ID | 1583263716-25150-2-git-send-email-cai@lca.pw (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next,1/2] mm: disable KCSAN for kmemleak | expand |
On Tue, 3 Mar 2020 at 20:28, Qian Cai <cai@lca.pw> wrote: > > This reverts commit a03184297d546c6531cdd40878f1f50732d3bac9. > > Signed-off-by: Qian Cai <cai@lca.pw> Acked-by: Marco Elver <elver@google.com> Thank you! > --- > mm/kmemleak.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/mm/kmemleak.c b/mm/kmemleak.c > index 788dc5509539..e362dc3d2028 100644 > --- a/mm/kmemleak.c > +++ b/mm/kmemleak.c > @@ -1169,12 +1169,7 @@ static bool update_checksum(struct kmemleak_object *object) > u32 old_csum = object->checksum; > > kasan_disable_current(); > - /* > - * crc32() will dereference object->pointer. If an unstable value was > - * returned due to a data race, it will be corrected in the next scan. > - */ > - object->checksum = data_race(crc32(0, (void *)object->pointer, > - object->size)); > + object->checksum = crc32(0, (void *)object->pointer, object->size); > kasan_enable_current(); > > return object->checksum != old_csum; > @@ -1248,7 +1243,7 @@ static void scan_block(void *_start, void *_end, > break; > > kasan_disable_current(); > - pointer = data_race(*ptr); > + pointer = *ptr; > kasan_enable_current(); > > untagged_ptr = (unsigned long)kasan_reset_tag((void *)pointer); > -- > 1.8.3.1 >
On Tue, Mar 03, 2020 at 02:28:36PM -0500, Qian Cai wrote: > This reverts commit a03184297d546c6531cdd40878f1f50732d3bac9. > > Signed-off-by: Qian Cai <cai@lca.pw> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 788dc5509539..e362dc3d2028 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1169,12 +1169,7 @@ static bool update_checksum(struct kmemleak_object *object) u32 old_csum = object->checksum; kasan_disable_current(); - /* - * crc32() will dereference object->pointer. If an unstable value was - * returned due to a data race, it will be corrected in the next scan. - */ - object->checksum = data_race(crc32(0, (void *)object->pointer, - object->size)); + object->checksum = crc32(0, (void *)object->pointer, object->size); kasan_enable_current(); return object->checksum != old_csum; @@ -1248,7 +1243,7 @@ static void scan_block(void *_start, void *_end, break; kasan_disable_current(); - pointer = data_race(*ptr); + pointer = *ptr; kasan_enable_current(); untagged_ptr = (unsigned long)kasan_reset_tag((void *)pointer);
This reverts commit a03184297d546c6531cdd40878f1f50732d3bac9. Signed-off-by: Qian Cai <cai@lca.pw> --- mm/kmemleak.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)