From: "Luis R. Rodriguez" <mcgrof@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: Exporting kmemleak.h to userspace
Date: Thu, 3 Sep 2009 11:00:07 -0700 [thread overview]
Message-ID: <43e72e890909031100l5f28dd4cu30cf1e1c735e0e9d@mail.gmail.com> (raw)
In-Reply-To: <1251984845.3336.25.camel@johannes.local>
On Thu, Sep 3, 2009 at 6:34 AM, Johannes Berg<johannes@sipsolutions.net> wrote:
> On Thu, 2009-09-03 at 14:18 +0100, Catalin Marinas wrote:
>> On Thu, 2009-09-03 at 09:23 +0300, Pekka Enberg wrote:
>> > On Thu, Sep 3, 2009 at 3:29 AM, Luis R. Rodriguez<mcgrof@gmail.com> wrote:
>> > > I was reviewing kmemleak code and noticed kmemleak.h went exported to
>> > > userspace under include/linux/kmemleak.h. Do we expect userspace to
>> > > use this stuff somehow? All relevant kmemleak structs are kept
>> > > private, I'm curious what userspace apps would use this.
>> >
>> > AFAICT, nobody. Catalin, why is the header exported?
>>
>> I haven't done anything specifically to export it. It probably gets
>> included via other files. Is adding #ifdef __KERNEL__ enough to avoid
>> this problem?
>
> It should be exported only if it's listed in Kbuild,
What do you mean by that?
> which it isn't. Luis?
Well I see kmemleak on
Kernel hacking -->
[*] Kernel memory leak detector
but its not clear to me by what you mean by that it should be exported
only if its listed in Kbuild.
Anyway my point was that userspace does not need kmemleak.h and we are
providing it to userspace. Unfortunately I really am not sure what the
alternative is, it seems we tend to export to userspace a lot of other
kernel headers which userspace does not use. For networking we have
private header space for example on include/net/ but for general
kernel stuff is there an alternative? Should there be? Or as Catalin
mentions should we just use #ifdef __KERNEL__ for headers we do not
want to export to userspace?
Luis
next prev parent reply other threads:[~2009-09-03 18:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 0:29 Luis R. Rodriguez
2009-09-03 6:23 ` Pekka Enberg
2009-09-03 13:18 ` Catalin Marinas
2009-09-03 13:34 ` Johannes Berg
2009-09-03 18:00 ` Luis R. Rodriguez [this message]
2009-09-03 18:04 ` Johannes Berg
2009-09-03 18:06 ` Luis R. Rodriguez
2009-09-03 18:12 ` Johannes Berg
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=43e72e890909031100l5f28dd4cu30cf1e1c735e0e9d@mail.gmail.com \
--to=mcgrof@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=penberg@cs.helsinki.fi \
/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®