Preventing stack guard-page hopping
Preventing stack guard-page hopping
Posted Jun 20, 2017 6:54 UTC (Tue) by vbabka (subscriber, #91706)In reply to: Preventing stack guard-page hopping by cpitrat
Parent article: Preventing stack guard-page hopping
Well, it's 900 lines of .patch file text, but the diffstat is around 300 added+deleted, so not that much.
It's large because, as explained in the commit log, the old 1 stack guard page code simply extended to N pages made many accounting issues visible, because the guard page(s) were part of the VMA's [start, end] addresses. The patch deletes that approach and replaces it so that the gap is always between VMA boundaries. That means adjusting the code to check allowed VMA placement/enlargement so that it maintains the gap if the next/prev VMA is a stack one.