linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
       [not found] <1322775683-8741-1-git-send-email-mathieu.desnoyers@efficios.com>
@ 2011-12-01 21:41 ` Mathieu Desnoyers
  2011-12-01 21:57   ` Christoph Hellwig
                     ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Mathieu Desnoyers @ 2011-12-01 21:41 UTC (permalink / raw)
  To: Greg KH, Mathieu Desnoyers
  Cc: devel, lttng-dev, Linus Torvalds, Christoph Hellwig,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

LTTng needs this symbol exported. It calls it to ensure its tracing
buffers and allocated data structures never trigger a page fault. This
is required to handle page fault handler tracing and NMI tracing
gracefully.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Christoph Hellwig <hch@infradead.org>
CC: Christoph Lameter <cl@linux-foundation.org>
CC: Tejun Heo <tj@kernel.org>
CC: David Howells <dhowells@redhat.com>
CC: David McCullough <davidm@snapgear.com>
CC: D Jeff Dionne <jeff@uClinux.org>
CC: Greg Ungerer <gerg@snapgear.com>
CC: Paul Mundt <lethal@linux-sh.org>
CC: linux-mm@kvack.org
CC: linux-kernel@vger.kernel.org
CC: Greg KH <greg@kroah.com>
---
 mm/nommu.c   |    1 +
 mm/vmalloc.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/nommu.c b/mm/nommu.c
index b982290..b22a0d9 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -441,6 +441,7 @@ EXPORT_SYMBOL_GPL(vm_unmap_aliases);
 void  __attribute__((weak)) vmalloc_sync_all(void)
 {
 }
+EXPORT_SYMBOL_GPL(vmalloc_sync_all);
 
 /**
  *	alloc_vm_area - allocate a range of kernel address space
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 3231bf3..37ddce5 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2137,6 +2137,7 @@ EXPORT_SYMBOL(remap_vmalloc_range);
 void  __attribute__((weak)) vmalloc_sync_all(void)
 {
 }
+EXPORT_SYMBOL_GPL(vmalloc_sync_all);
 
 
 static int f(pte_t *pte, pgtable_t table, unsigned long addr, void *data)
-- 
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 21:41 ` [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules Mathieu Desnoyers
  2011-12-01 21:57   ` Christoph Hellwig
  2011-12-01 21:57   ` Christoph Hellwig
@ 2011-12-01 21:57   ` Christoph Hellwig
  2011-12-01 22:13     ` Greg KH
  2011-12-01 21:57   ` Christoph Hellwig
  3 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2011-12-01 21:57 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Greg KH, devel, lttng-dev, Linus Torvalds, Christoph Hellwig,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> LTTng needs this symbol exported. It calls it to ensure its tracing
> buffers and allocated data structures never trigger a page fault. This
> is required to handle page fault handler tracing and NMI tracing
> gracefully.

We:

 a) don't export symbols unless they have an intree-user
 b) especially don't export something as lowlevel as this one.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 21:41 ` [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules Mathieu Desnoyers
                     ` (2 preceding siblings ...)
  2011-12-01 21:57   ` Christoph Hellwig
@ 2011-12-01 21:57   ` Christoph Hellwig
  3 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-12-01 21:57 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Greg KH, devel, lttng-dev, Linus Torvalds, Christoph Hellwig,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> LTTng needs this symbol exported. It calls it to ensure its tracing
> buffers and allocated data structures never trigger a page fault. This
> is required to handle page fault handler tracing and NMI tracing
> gracefully.

We:

 a) don't export symbols unless they have an intree-user
 b) especially don't export something as lowlevel as this one.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 21:41 ` [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules Mathieu Desnoyers
  2011-12-01 21:57   ` Christoph Hellwig
@ 2011-12-01 21:57   ` Christoph Hellwig
  2011-12-01 21:57   ` Christoph Hellwig
  2011-12-01 21:57   ` Christoph Hellwig
  3 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-12-01 21:57 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Greg KH, devel, lttng-dev, Linus Torvalds, Christoph Hellwig,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> LTTng needs this symbol exported. It calls it to ensure its tracing
> buffers and allocated data structures never trigger a page fault. This
> is required to handle page fault handler tracing and NMI tracing
> gracefully.

We:

 a) don't export symbols unless they have an intree-user
 b) especially don't export something as lowlevel as this one.

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 21:41 ` [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules Mathieu Desnoyers
@ 2011-12-01 21:57   ` Christoph Hellwig
  2011-12-01 21:57   ` Christoph Hellwig
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-12-01 21:57 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: devel, David Howells, Greg Ungerer, Christoph Lameter,
	D Jeff Dionne, linux-kernel, Christoph Hellwig, linux-mm,
	lttng-dev, Paul Mundt, Tejun Heo, Linus Torvalds,
	David McCullough

On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> LTTng needs this symbol exported. It calls it to ensure its tracing
> buffers and allocated data structures never trigger a page fault. This
> is required to handle page fault handler tracing and NMI tracing
> gracefully.

We:

 a) don't export symbols unless they have an intree-user
 b) especially don't export something as lowlevel as this one.

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 21:57   ` Christoph Hellwig
@ 2011-12-01 22:13     ` Greg KH
  2011-12-01 22:19       ` Mathieu Desnoyers
  2011-12-01 22:28       ` Christoph Hellwig
  0 siblings, 2 replies; 10+ messages in thread
From: Greg KH @ 2011-12-01 22:13 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Mathieu Desnoyers, devel, lttng-dev, Linus Torvalds,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

On Thu, Dec 01, 2011 at 04:57:00PM -0500, Christoph Hellwig wrote:
> On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> > LTTng needs this symbol exported. It calls it to ensure its tracing
> > buffers and allocated data structures never trigger a page fault. This
> > is required to handle page fault handler tracing and NMI tracing
> > gracefully.
> 
> We:
> 
>  a) don't export symbols unless they have an intree-user

lttng is now in-tree in the drivers/staging/ area.  See linux-next for
details if you are curious.

>  b) especially don't export something as lowlevel as this one.

Mathieu, there's nothing else you can do to get this information?  Or
does lttng really want such lowlevel data?

thanks,

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 22:13     ` Greg KH
@ 2011-12-01 22:19       ` Mathieu Desnoyers
  2011-12-01 22:41         ` Greg KH
  2011-12-01 22:28       ` Christoph Hellwig
  1 sibling, 1 reply; 10+ messages in thread
From: Mathieu Desnoyers @ 2011-12-01 22:19 UTC (permalink / raw)
  To: Greg KH
  Cc: Christoph Hellwig, devel, lttng-dev, Linus Torvalds,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

* Greg KH (greg@kroah.com) wrote:
> On Thu, Dec 01, 2011 at 04:57:00PM -0500, Christoph Hellwig wrote:
> > On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> > > LTTng needs this symbol exported. It calls it to ensure its tracing
> > > buffers and allocated data structures never trigger a page fault. This
> > > is required to handle page fault handler tracing and NMI tracing
> > > gracefully.
> > 
> > We:
> > 
> >  a) don't export symbols unless they have an intree-user
> 
> lttng is now in-tree in the drivers/staging/ area.  See linux-next for
> details if you are curious.
> 
> >  b) especially don't export something as lowlevel as this one.
> 
> Mathieu, there's nothing else you can do to get this information?  Or
> does lttng really want such lowlevel data?

LTTng calls vmalloc_sync_all() to make sure it won't crash the system
(due to recursive page fault) when hooking on the page fault handler and
on any hook that would happen to sit in a function hit by NMI context.
So it really goes beyond just extracting information for this one I'm
afraid: it's a matter of execution correctness.

This is a point I'm really anal about: the tracer should _never_ crash
the traced system, _ever_, in any foreseeable condition.

Thanks,

Mathieu

> 
> thanks,
> 
> greg k-h

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 22:13     ` Greg KH
  2011-12-01 22:19       ` Mathieu Desnoyers
@ 2011-12-01 22:28       ` Christoph Hellwig
  2011-12-01 23:00         ` Greg KH
  1 sibling, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2011-12-01 22:28 UTC (permalink / raw)
  To: Greg KH
  Cc: Christoph Hellwig, Mathieu Desnoyers, devel, lttng-dev,
	Linus Torvalds, Christoph Lameter, Tejun Heo, David Howells,
	David McCullough, D Jeff Dionne, Greg Ungerer, Paul Mundt,
	linux-mm, linux-kernel

On Thu, Dec 01, 2011 at 02:13:37PM -0800, Greg KH wrote:
> On Thu, Dec 01, 2011 at 04:57:00PM -0500, Christoph Hellwig wrote:
> > On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> > > LTTng needs this symbol exported. It calls it to ensure its tracing
> > > buffers and allocated data structures never trigger a page fault. This
> > > is required to handle page fault handler tracing and NMI tracing
> > > gracefully.
> > 
> > We:
> > 
> >  a) don't export symbols unless they have an intree-user
> 
> lttng is now in-tree in the drivers/staging/ area.  See linux-next for
> details if you are curious.

Eww - merging stuff without discussion on lkml is more than evil.

Either way, it was guaranteed that drivers/staging is considered out of
tree for core code.  I'm defintively dead set against exporting anything
for staging and opening that slippery slope.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 22:19       ` Mathieu Desnoyers
@ 2011-12-01 22:41         ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2011-12-01 22:41 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Christoph Hellwig, devel, lttng-dev, Linus Torvalds,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

On Thu, Dec 01, 2011 at 05:19:40PM -0500, Mathieu Desnoyers wrote:
> * Greg KH (greg@kroah.com) wrote:
> > On Thu, Dec 01, 2011 at 04:57:00PM -0500, Christoph Hellwig wrote:
> > > On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> > > > LTTng needs this symbol exported. It calls it to ensure its tracing
> > > > buffers and allocated data structures never trigger a page fault. This
> > > > is required to handle page fault handler tracing and NMI tracing
> > > > gracefully.
> > > 
> > > We:
> > > 
> > >  a) don't export symbols unless they have an intree-user
> > 
> > lttng is now in-tree in the drivers/staging/ area.  See linux-next for
> > details if you are curious.
> > 
> > >  b) especially don't export something as lowlevel as this one.
> > 
> > Mathieu, there's nothing else you can do to get this information?  Or
> > does lttng really want such lowlevel data?
> 
> LTTng calls vmalloc_sync_all() to make sure it won't crash the system
> (due to recursive page fault) when hooking on the page fault handler and
> on any hook that would happen to sit in a function hit by NMI context.
> So it really goes beyond just extracting information for this one I'm
> afraid: it's a matter of execution correctness.

Ok, fair enough.

Christoph, is there any other way to achive something like this without
this symbol being exported that you know of?

thanks,

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules
  2011-12-01 22:28       ` Christoph Hellwig
@ 2011-12-01 23:00         ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2011-12-01 23:00 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Mathieu Desnoyers, devel, lttng-dev, Linus Torvalds,
	Christoph Lameter, Tejun Heo, David Howells, David McCullough,
	D Jeff Dionne, Greg Ungerer, Paul Mundt, linux-mm, linux-kernel

On Thu, Dec 01, 2011 at 05:28:03PM -0500, Christoph Hellwig wrote:
> On Thu, Dec 01, 2011 at 02:13:37PM -0800, Greg KH wrote:
> > On Thu, Dec 01, 2011 at 04:57:00PM -0500, Christoph Hellwig wrote:
> > > On Thu, Dec 01, 2011 at 04:41:13PM -0500, Mathieu Desnoyers wrote:
> > > > LTTng needs this symbol exported. It calls it to ensure its tracing
> > > > buffers and allocated data structures never trigger a page fault. This
> > > > is required to handle page fault handler tracing and NMI tracing
> > > > gracefully.
> > > 
> > > We:
> > > 
> > >  a) don't export symbols unless they have an intree-user
> > 
> > lttng is now in-tree in the drivers/staging/ area.  See linux-next for
> > details if you are curious.
> 
> Eww - merging stuff without discussion on lkml is more than evil.

Do you really want discussing all staging driver crap on lkml?

Core changes, like this one, for stuff in staging should be done on
lkml, which is what this conversation is :)

> Either way, it was guaranteed that drivers/staging is considered out of
> tree for core code.

The zram and zcache code would tend to disagree with you there :)

> I'm defintively dead set against exporting anything for staging and
> opening that slippery slope.

How else should we handle something like this then?  Some code, this one
specifically, is trying to get merged, so taking it slowly, through
staging, and getting it reviewed and cleaned up better before it can go
into the "real" part of the kernel, is the whole goal here.

Here's a real need for a symbol that an existing, shipping, useful
kernel module is wanting to use.

If you can provide a way that this can be handled without such an
export, that does not require digging through the symbol table (which is
what it was doing and I rightfully objected to that), then please let us
know.

Otherwise, what are our alternatives here, to just forbid this code from
ever being merged?

thanks,

greg k-h

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-12-01 23:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1322775683-8741-1-git-send-email-mathieu.desnoyers@efficios.com>
2011-12-01 21:41 ` [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules Mathieu Desnoyers
2011-12-01 21:57   ` Christoph Hellwig
2011-12-01 21:57   ` Christoph Hellwig
2011-12-01 21:57   ` Christoph Hellwig
2011-12-01 22:13     ` Greg KH
2011-12-01 22:19       ` Mathieu Desnoyers
2011-12-01 22:41         ` Greg KH
2011-12-01 22:28       ` Christoph Hellwig
2011-12-01 23:00         ` Greg KH
2011-12-01 21:57   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox