Lines Matching full:guard
55 // protector pass to store the stack guard (see getStackCookieLocation()
116 inline void *unsafe_stack_alloc(size_t size, size_t guard) { in unsafe_stack_alloc() argument
117 SFS_CHECK(size + guard >= size); in unsafe_stack_alloc()
118 void *addr = Mmap(nullptr, size + guard, PROT_READ | PROT_WRITE, in unsafe_stack_alloc()
121 Mprotect(addr, guard, PROT_NONE); in unsafe_stack_alloc()
122 return (char *)addr + guard; in unsafe_stack_alloc()
125 inline void unsafe_stack_setup(void *start, size_t size, size_t guard) { in unsafe_stack_setup() argument
127 SFS_CHECK((char *)start + guard >= (char *)start); in unsafe_stack_setup()
134 unsafe_stack_guard = guard; in unsafe_stack_setup()
238 size_t guard = 0; in INTERCEPTOR() local
242 pthread_attr_getguardsize(attr, &guard); in INTERCEPTOR()
248 pthread_attr_getguardsize(&tmpattr, &guard); in INTERCEPTOR()
266 void *addr = unsafe_stack_alloc(size, guard); in INTERCEPTOR()
267 // Put tinfo at the end of the buffer. guard may be not page aligned. in INTERCEPTOR()
275 tinfo->unsafe_stack_guard = guard; in INTERCEPTOR()
304 size_t guard = 4096; in __safestack_init() local
311 void *addr = unsafe_stack_alloc(size, guard); in __safestack_init()
312 unsafe_stack_setup(addr, size, guard); in __safestack_init()