3rd party sysconf interceptor may crash if it's called before unsafe_stack_setup
However pageSize is not useful here. mmap should round up on it's own, SFS_CHECK can be removed.
Differential D57924
[safestack] Remove pageSize vitalybuka on Feb 7 2019, 1:24 PM. Authored by
Details 3rd party sysconf interceptor may crash if it's called before unsafe_stack_setup However pageSize is not useful here. mmap should round up on it's own, SFS_CHECK can be removed.
Diff Detail
Event TimelineComment Actions Alternatively, we could have a static buffer we use as a 'temporary' safe stack while initialization runs. I'm not really set on that idea, but it seems cleaner and like it may be more future proof in case another syscall we use (like getrlimit() right now) is intercepted. What do you think? Comment Actions LGTM as long as https://reviews.llvm.org/D57863 doesn't land (to ensure that struct tinfo *tinfo = reinterpret_cast<struct tinfo *>(addr); is a valid pointer to writable memory as the guard is no longer rounded up to page size.) |