Bill Allombert on Wed, 18 Jan 2017 16:24:33 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Use PROT_NONE for unused virtual stack memory


On Wed, Jan 18, 2017 at 02:32:52PM +0000, Jeroen Demeyer wrote:
> The problem was a bug in gp_main_loop() where parivstack_reset() was called
> *without* resetting avma. So you end up in a situation where avma was below
> bot. Before my patch, accessing memory below bot worked fine. With my patch,
> this might give a segmentation fault.
> 
> The fix is easy: reset avma when calling parivstack_reset(). I also made it
> an error to call parivstack_reset() when avma is below the new bottom of the
> stack. This will help to catch similar errors.
> 
> Patch attached...

Applied, thanks!

Cheers,
Bill