public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Christian Casteyde <casteyde.christian@free.fr>,
	vegard.nossum@gmail.com
Subject: Re: [PATCH] kmemleak: Do not enable KMEMCHECK_PARTIAL_OK if DEBUG_KMEMLEAK
Date: Wed, 27 Jan 2010 08:30:29 +0200	[thread overview]
Message-ID: <4B5FDD85.5080701@cs.helsinki.fi> (raw)
In-Reply-To: <20100126175719.7820.74641.stgit@pc1117.cambridge.arm.com>

Hi Catalin,

Catalin Marinas kirjoitti:
> This is a fix for bug #14845 (bugzilla.kernel.org). The
> update_checksum() function in mm/kmemleak.c calls
> kmemcheck_is_obj_initialised() before scanning an object. When
> KMEMCHECK_PARTIAL_OK is enabled, this function returns true. However,
> the crc32_le() reads smaller intervals (32-bit) for which
> kmemleak_is_obj_initialised() is may be false leading to a kmemcheck
> warning.
> 
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Christian Casteyde <casteyde.christian@free.fr>
> Cc: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
>  lib/Kconfig.kmemcheck |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lib/Kconfig.kmemcheck b/lib/Kconfig.kmemcheck
> index 846e039..80660e9 100644
> --- a/lib/Kconfig.kmemcheck
> +++ b/lib/Kconfig.kmemcheck
> @@ -75,7 +75,7 @@ config KMEMCHECK_SHADOW_COPY_SHIFT
>  config KMEMCHECK_PARTIAL_OK
>  	bool "kmemcheck: allow partially uninitialized memory"
>  	depends on KMEMCHECK
> -	default y
> +	default y if !DEBUG_KMEMLEAK
>  	help
>  	  This option works around certain GCC optimizations that produce
>  	  32-bit reads from 16-bit variables where the upper 16 bits are
> 

Disabling KMEMCHECK_PARTIAL_OK can cause other false positives so maybe 
we should add a new function to kmemcheck for kmemleak that only reads 
full intervals?

  reply	other threads:[~2010-01-27  6:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 17:57 [PATCH] kmemleak: Do not enable KMEMCHECK_PARTIAL_OK if DEBUG_KMEMLEAK Catalin Marinas
2010-01-27  6:30 ` Pekka Enberg [this message]
2010-01-27 11:02   ` Catalin Marinas
2010-01-27 15:09     ` Pekka Enberg
2010-01-29 17:40       ` Catalin Marinas
2010-01-30  8:22         ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B5FDD85.5080701@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=akpm@linux-foundation.org \
    --cc=casteyde.christian@free.fr \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vegard.nossum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox