Lines Matching defs:guard
30 // protector pass to store the stack guard (see getStackCookieLocation()
91 inline void *unsafe_stack_alloc(size_t size, size_t guard) {
92 SFS_CHECK(size + guard >= size);
93 void *addr = Mmap(nullptr, size + guard, PROT_READ | PROT_WRITE,
96 Mprotect(addr, guard, PROT_NONE);
97 return (char *)addr + guard;
100 inline void unsafe_stack_setup(void *start, size_t size, size_t guard) {
102 SFS_CHECK((char *)start + guard >= (char *)start);
109 unsafe_stack_guard = guard;
213 size_t guard = 0;
217 pthread_attr_getguardsize(attr, &guard);
223 pthread_attr_getguardsize(&tmpattr, &guard);
230 void *addr = unsafe_stack_alloc(size, guard);
231 // Put tinfo at the end of the buffer. guard may be not page aligned.
239 tinfo->unsafe_stack_guard = guard;
268 size_t guard = 4096;
275 void *addr = unsafe_stack_alloc(size, guard);
276 unsafe_stack_setup(addr, size, guard);