mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Kicinski <kubakici@wp.pl>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, "Kees Cook" <keescook@chromium.org>,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Maciej Żenczykowski" <zenczykowski@gmail.com>
Subject: Re: [PATCH] userns: suppress kmemleak message
Date: Thu, 3 Nov 2016 15:06:31 +0000	[thread overview]
Message-ID: <20161103150631.0c655722@jkicinski-Precision-T1700> (raw)
In-Reply-To: <87a8dgvcke.fsf@xmission.com>

On Thu, 03 Nov 2016 09:54:25 -0500, Eric W. Biederman wrote:
> Dmitry Torokhov <dmitry.torokhov@gmail.com> writes:
> 
> > We do not ever intend to unregister "user" sysctl table, unfortunately
> > it leads kmemleak to believe that we are leaking memory:  
> 
> Sounds like an issue with kmemleak because we do retain references.
> 
> So no we don't intend to unregister the table.
> 
> As for the patch.
> 
> Nacked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> 
> I can't see the using kmemleak_not_leak is possibly good form.  I
> would much rather have suggestions about constructs that won't confuse
> kmemleak and won't need ugly annotations that serve no purpose but to
> appease a tool.  Perhaps the user_header variable needs to be moved out
> of user_namespace_sysctl_init.

FWIW the problem now is that the compiler is clever enough to never
write the pointer to memory so kmemleak can't find it.  user_header is
just held in a register for as long as it's needed even though the
variable is static.

  reply	other threads:[~2016-11-03 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03  5:39 Dmitry Torokhov
2016-11-03 14:04 ` Jakub Kicinski
2016-11-03 14:54 ` Eric W. Biederman
2016-11-03 15:06   ` Jakub Kicinski [this message]
2016-12-15 12:16   ` Fubo Chen
2016-12-16  9:39     ` Johannes Berg
2016-12-16 13:52       ` Fubo Chen

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=20161103150631.0c655722@jkicinski-Precision-T1700 \
    --to=kubakici@wp.pl \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=johannes@sipsolutions.net \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zenczykowski@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

all inboxes | Powered by JetHome®