[PATCH 0/4] Fix vmalloc regression

2008-11-07 Thread Glauber Costa
Nick,

This is the whole set of patches I was talking about.
Patch 3 is the one that in fact fixes the problem
Patches 1 and 2 are debugging aids I made use of, and could be possibly
useful to others
Patch 4 removes guard pages entirely for non-debug kernels, as we have already
previously discussed.

Hope it's all fine.


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Fix vmalloc regression

2008-11-07 Thread walt

Glauber Costa wrote:

Nick,

This is the whole set of patches I was talking about.
Patch 3 is the one that in fact fixes the problem...


Yep, patch 3 works for me, thanks.  Only the 32-bit kernel
seems to need the patch, FWIW.


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Fix vmalloc regression

2008-11-07 Thread Nick Piggin
On Fri, Nov 07, 2008 at 08:35:50PM -0200, Glauber Costa wrote:
 Nick,
 
 This is the whole set of patches I was talking about.
 Patch 3 is the one that in fact fixes the problem
 Patches 1 and 2 are debugging aids I made use of, and could be possibly
 useful to others
 Patch 4 removes guard pages entirely for non-debug kernels, as we have already
 previously discussed.
 
 Hope it's all fine.

OK, these all look good, but I may only push 3/4 for Linus in this round,
along with some of the changes from my patch that you tested as well.

With the DEBUG_PAGEALLOC case, I have been thinking that we perhaps should
turn off the lazy unmapping optimisation as well, so it catches use
after free similarly to the page allocator... but probably it is a good
idea at least to avoid the double-guard page for 2.6.28?

Anyway thanks for these, I'll send them up to Andrew/Linus and cc you.

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Fix vmalloc regression

2008-11-07 Thread Glauber Costa
On Sat, Nov 08, 2008 at 01:58:32AM +0100, Nick Piggin wrote:
 On Fri, Nov 07, 2008 at 08:35:50PM -0200, Glauber Costa wrote:
  Nick,
  
  This is the whole set of patches I was talking about.
  Patch 3 is the one that in fact fixes the problem
  Patches 1 and 2 are debugging aids I made use of, and could be possibly
  useful to others
  Patch 4 removes guard pages entirely for non-debug kernels, as we have 
  already
  previously discussed.
  
  Hope it's all fine.
 
 OK, these all look good, but I may only push 3/4 for Linus in this round,
 along with some of the changes from my patch that you tested as well.

Makes total sense.
 
 With the DEBUG_PAGEALLOC case, I have been thinking that we perhaps should
 turn off the lazy unmapping optimisation as well, so it catches use
 after free similarly to the page allocator... but probably it is a good
 idea at least to avoid the double-guard page for 2.6.28?

Makes sense. Maybe poisoning after free would also be useful?
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] Fix vmalloc regression

2008-11-07 Thread Nick Piggin
On Saturday 08 November 2008 13:13, Glauber Costa wrote:
 On Sat, Nov 08, 2008 at 01:58:32AM +0100, Nick Piggin wrote:
  On Fri, Nov 07, 2008 at 08:35:50PM -0200, Glauber Costa wrote:
   Nick,
  
   This is the whole set of patches I was talking about.
   Patch 3 is the one that in fact fixes the problem
   Patches 1 and 2 are debugging aids I made use of, and could be possibly
   useful to others
   Patch 4 removes guard pages entirely for non-debug kernels, as we have
   already previously discussed.
  
   Hope it's all fine.
 
  OK, these all look good, but I may only push 3/4 for Linus in this round,
  along with some of the changes from my patch that you tested as well.

 Makes total sense.

OK, sent. Thanks again.


  With the DEBUG_PAGEALLOC case, I have been thinking that we perhaps
  should turn off the lazy unmapping optimisation as well, so it catches
  use after free similarly to the page allocator... but probably it is a
  good idea at least to avoid the double-guard page for 2.6.28?

 Makes sense. Maybe poisoning after free would also be useful?

It's a problem because we're only dealing with virtual address, rather
than real memory. So we don't really have anything to poison (we don't
know what the caller will do with the memory). I guess it would be
possible to poison in the page allocator or in vfree, but probably
not worthwhile (after the immediate-unmap debug option).
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html