All of lore.kernel.org
 help / color / mirror / Atom feed
* Exporting kmemleak.h to userspace
@ 2009-09-03  0:29 Luis R. Rodriguez
  2009-09-03  6:23 ` Pekka Enberg
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2009-09-03  0:29 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Ingo Molnar, Pekka Enberg, Andrew Morton, Paul E. McKenney,
	linux-kernel, Johannes Berg

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.

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Exporting kmemleak.h to userspace
  2009-09-03  0:29 Exporting kmemleak.h to userspace Luis R. Rodriguez
@ 2009-09-03  6:23 ` Pekka Enberg
  2009-09-03 13:18   ` Catalin Marinas
  0 siblings, 1 reply; 8+ messages in thread
From: Pekka Enberg @ 2009-09-03  6:23 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Catalin Marinas, Ingo Molnar, Andrew Morton, Paul E. McKenney,
	linux-kernel, Johannes Berg

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?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Exporting kmemleak.h to userspace
  2009-09-03  6:23 ` Pekka Enberg
@ 2009-09-03 13:18   ` Catalin Marinas
  2009-09-03 13:34     ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Catalin Marinas @ 2009-09-03 13:18 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Luis R. Rodriguez, Ingo Molnar, Andrew Morton, Paul E. McKenney,
	linux-kernel, Johannes Berg

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?

-- 
Catalin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Exporting kmemleak.h to userspace
  2009-09-03 13:18   ` Catalin Marinas
@ 2009-09-03 13:34     ` Johannes Berg
  2009-09-03 18:00       ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2009-09-03 13:34 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Pekka Enberg, Luis R. Rodriguez, Ingo Molnar, Andrew Morton,
	Paul E. McKenney, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

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, which it isn't.
Luis?

johannes


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Exporting kmemleak.h to userspace
  2009-09-03 13:34     ` Johannes Berg
@ 2009-09-03 18:00       ` Luis R. Rodriguez
  2009-09-03 18:04         ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2009-09-03 18:00 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Catalin Marinas, Pekka Enberg, Ingo Molnar, Andrew Morton,
	Paul E. McKenney, linux-kernel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Exporting kmemleak.h to userspace
  2009-09-03 18:00       ` Luis R. Rodriguez
@ 2009-09-03 18:04         ` Johannes Berg
  2009-09-03 18:06           ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2009-09-03 18:04 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Catalin Marinas, Pekka Enberg, Ingo Molnar, Andrew Morton,
	Paul E. McKenney, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

On Thu, 2009-09-03 at 11:00 -0700, Luis R. Rodriguez wrote:

> Anyway my point was that userspace does not need kmemleak.h and we are
> providing it to userspace.

No, we're not providing it to userspace.

If you actually build userspace headers it won't be included.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Exporting kmemleak.h to userspace
  2009-09-03 18:04         ` Johannes Berg
@ 2009-09-03 18:06           ` Luis R. Rodriguez
  2009-09-03 18:12             ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2009-09-03 18:06 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Catalin Marinas, Pekka Enberg, Ingo Molnar, Andrew Morton,
	Paul E. McKenney, linux-kernel

On Thu, Sep 3, 2009 at 11:04 AM, Johannes Berg<johannes@sipsolutions.net> wrote:
> On Thu, 2009-09-03 at 11:00 -0700, Luis R. Rodriguez wrote:
>
>> Anyway my point was that userspace does not need kmemleak.h and we are
>> providing it to userspace.
>
> No, we're not providing it to userspace.
>
> If you actually build userspace headers it won't be included.

Ah then I completely mispoke. Ignore this then.

How *do* you export headers through kbuild then?

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Exporting kmemleak.h to userspace
  2009-09-03 18:06           ` Luis R. Rodriguez
@ 2009-09-03 18:12             ` Johannes Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2009-09-03 18:12 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Catalin Marinas, Pekka Enberg, Ingo Molnar, Andrew Morton,
	Paul E. McKenney, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

On Thu, 2009-09-03 at 11:06 -0700, Luis R. Rodriguez wrote:
> On Thu, Sep 3, 2009 at 11:04 AM, Johannes Berg<johannes@sipsolutions.net> wrote:
> > On Thu, 2009-09-03 at 11:00 -0700, Luis R. Rodriguez wrote:
> >
> >> Anyway my point was that userspace does not need kmemleak.h and we are
> >> providing it to userspace.
> >
> > No, we're not providing it to userspace.
> >
> > If you actually build userspace headers it won't be included.
> 
> Ah then I completely mispoke. Ignore this then.
> 
> How *do* you export headers through kbuild then?

You mention them in include/linux/Kbuild, and then you run "make
headers_install" (I think)

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-03 18:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03  0:29 Exporting kmemleak.h to userspace 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
2009-09-03 18:04         ` Johannes Berg
2009-09-03 18:06           ` Luis R. Rodriguez
2009-09-03 18:12             ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.