linux(4): Deduplicate mprotect, madvise
MFC after: 1 week
(cherry picked from commit 553b1a4e4eb426d2c29a033b284c13bfbab30334)