summaryrefslogtreecommitdiff
path: root/tools/include/nolibc/stackprotector.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/include/nolibc/stackprotector.h')
-rw-r--r--tools/include/nolibc/stackprotector.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/include/nolibc/stackprotector.h b/tools/include/nolibc/stackprotector.h
index 7123aa056cb0..ae8b1d3a374d 100644
--- a/tools/include/nolibc/stackprotector.h
+++ b/tools/include/nolibc/stackprotector.h
@@ -24,9 +24,9 @@ __attribute__((weak,used,noreturn,section(".text.nolibc_stack_chk")))
void __stack_chk_fail(void)
{
pid_t pid;
- my_syscall3(__NR_write, STDERR_FILENO, "!!Stack smashing detected!!\n", 28);
- pid = my_syscall0(__NR_getpid);
- my_syscall2(__NR_kill, pid, SIGABRT);
+ __nolibc_syscall3(__NR_write, STDERR_FILENO, "!!Stack smashing detected!!\n", 28);
+ pid = __nolibc_syscall0(__NR_getpid);
+ __nolibc_syscall2(__NR_kill, pid, SIGABRT);
for (;;);
}
@@ -42,7 +42,7 @@ uintptr_t __stack_chk_guard;
static __no_stack_protector void __stack_chk_init(void)
{
- my_syscall3(__NR_getrandom, &__stack_chk_guard, sizeof(__stack_chk_guard), 0);
+ __nolibc_syscall3(__NR_getrandom, &__stack_chk_guard, sizeof(__stack_chk_guard), 0);
/* a bit more randomness in case getrandom() fails, ensure the guard is never 0 */
if (__stack_chk_guard != (uintptr_t) &__stack_chk_guard)
__stack_chk_guard ^= (uintptr_t) &__stack_chk_guard;