Home
last modified time | relevance | path

Searched refs:canary (Results 1 – 8 of 8) sorted by relevance

/f-stack/freebsd/contrib/libsodium/src/libsodium/sodium/
H A Dutils.c85 static unsigned char canary[CANARY_SIZE]; variable
354 randombytes_buf(canary, sizeof canary); in _sodium_alloc_init()
499 canary_ptr = ((unsigned char *) ptr) - sizeof canary; in _unprotected_ptr_from_user_ptr()
535 size_with_canary = (sizeof canary) + size; in _sodium_malloc()
544 memcpy(unprotected_ptr + unprotected_size, canary, sizeof canary); in _sodium_malloc()
550 user_ptr = canary_ptr + sizeof canary; in _sodium_malloc()
551 memcpy(canary_ptr, canary, sizeof canary); in _sodium_malloc()
602 canary_ptr = ((unsigned char *) ptr) - sizeof canary; in sodium_free()
608 if (sodium_memcmp(canary_ptr, canary, sizeof canary) != 0) { in sodium_free()
612 if (sodium_memcmp(unprotected_ptr + unprotected_size, canary, in sodium_free()
[all …]
/f-stack/freebsd/arm64/linux/
H A Dlinux_sysvec.c187 AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); in linux_copyout_auxargs()
225 char canary[LINUX_AT_RANDOM_LEN]; in linux_copyout_strings() local
250 arc4rand(canary, sizeof(canary), 0); in linux_copyout_strings()
251 destp -= roundup(sizeof(canary), sizeof(void *)); in linux_copyout_strings()
252 imgp->canary = (void *)destp; in linux_copyout_strings()
253 error = copyout(canary, imgp->canary, sizeof(canary)); in linux_copyout_strings()
/f-stack/freebsd/amd64/linux/
H A Dlinux_sysvec.c282 AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); in linux_copyout_auxargs()
326 char canary[LINUX_AT_RANDOM_LEN]; in linux_copyout_strings() local
350 arc4rand(canary, sizeof(canary), 0); in linux_copyout_strings()
351 destp -= roundup(sizeof(canary), sizeof(void *)); in linux_copyout_strings()
352 imgp->canary = (void *)destp; in linux_copyout_strings()
353 error = copyout(canary, imgp->canary, sizeof(canary)); in linux_copyout_strings()
/f-stack/freebsd/i386/linux/
H A Dlinux_sysvec.c235 AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); in linux_copyout_auxargs()
276 char canary[LINUX_AT_RANDOM_LEN]; in linux_copyout_strings() local
306 arc4rand(canary, sizeof(canary), 0); in linux_copyout_strings()
307 destp -= roundup(sizeof(canary), sizeof(void *)); in linux_copyout_strings()
308 imgp->canary = (void *)destp; in linux_copyout_strings()
309 error = copyout(canary, imgp->canary, sizeof(canary)); in linux_copyout_strings()
/f-stack/freebsd/amd64/linux32/
H A Dlinux32_sysvec.c230 AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, PTROUT(imgp->canary)); in linux_copyout_auxargs()
742 char canary[LINUX_AT_RANDOM_LEN]; in linux_copyout_strings() local
764 arc4rand(canary, sizeof(canary), 0); in linux_copyout_strings()
765 destp -= roundup(sizeof(canary), sizeof(uint32_t)); in linux_copyout_strings()
766 imgp->canary = (void *)destp; in linux_copyout_strings()
767 error = copyout(canary, imgp->canary, sizeof(canary)); in linux_copyout_strings()
/f-stack/freebsd/kern/
H A Dkern_exec.c1570 char canary[sizeof(long) * 8]; in exec_copyout_strings() local
1618 arc4rand(canary, sizeof(canary), 0); in exec_copyout_strings()
1619 destp -= sizeof(canary); in exec_copyout_strings()
1620 imgp->canary = (void *)destp; in exec_copyout_strings()
1621 error = copyout(canary, imgp->canary, sizeof(canary)); in exec_copyout_strings()
1624 imgp->canarylen = sizeof(canary); in exec_copyout_strings()
H A Dimgact_elf.c1373 if (imgp->canary != 0) { in __elfN()
1374 AUXARGS_ENTRY_PTR(pos, AT_CANARY, imgp->canary); in __elfN()
/f-stack/freebsd/sys/
H A Dimgact.h86 void *canary; member