[LTP] [PATCH 4/4] mmapstress03: Fix 32bit test on 64bit kernel

Cyril Hrubis chrubis@suse.cz
Thu Jan 12 18:00:22 CET 2017


Hi!
> > Something as (((uintptr_t)1) << ((sizeof(void*)<<3) - 1) - pagesize)
> 
> Wouldn't this crash same as original?

That does not seem to be the case here I guess that the reason is that
the size passed to the mmap2() in case of the 32bit binary on 64bit
kernel is so close to 4GB after the patch that it's rejected right away
as well. And possibly for 32bit binary on 32bit kernel 2GB size is
enough to be rejected for the very same reason.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list