diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-04-15 03:13:09 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-04-15 03:13:09 +0300 |
| commit | ee60c510fb3468ec6fab98419218c4e7b37e2ca3 (patch) | |
| tree | a7748768691d1accaf7e2c4522df58a7c8bf969d /tools/include/nolibc/stackprotector.h | |
| parent | 3203a08c1266689c204fb8f10d6bb5186921fce2 (diff) | |
| parent | b070dc36291fec966ad915f80a4f239b5c70c290 (diff) | |
| download | linux-ee60c510fb3468ec6fab98419218c4e7b37e2ca3.tar.xz | |
Merge tag 'nolibc-20260412-for-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc
Pull nolibc updates from Thomas Weißschuh:
- Many new features and optimizations to printf()
- Rename non-standard symbols to avoid collisions with application code
- Support for byteswap.h, endian.h, err.h and asprintf()
- 64-bit dev_t
- Smaller cleanups and fixes to the code and build system
* tag 'nolibc-20260412-for-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc: (61 commits)
selftests/nolibc: use gcc 15
tools/nolibc: support UBSAN on gcc
tools/nolibc: create __nolibc_no_sanitize_ubsan
selftests/nolibc: don't skip tests for unimplemented syscalls anymore
selftests/nolibc: explicitly handle ENOSYS from ptrace()
tools/nolibc: add byteorder conversions
tools/nolibc: add the _syscall() macro
tools/nolibc: move the call to __sysret() into syscall()
tools/nolibc: rename the internal macros used in syscall()
selftests/nolibc: only use libgcc when really necessary
selftests/nolibc: test the memory allocator
tools/nolibc: check for overflow in calloc() without divisions
tools/nolibc: add support for asprintf()
tools/nolibc: use __builtin_offsetof()
tools/nolibc: use makedev() in fstatat()
tools/nolibc: handle all major and minor numbers in makedev() and friends
tools/nolibc: make dev_t 64 bits wide
tools/nolibc: move the logic of makedev() and friends into functions
selftests/nolibc: add a test for stat().st_rdev
selftests/nolibc: add some tests for makedev() and friends
...
Diffstat (limited to 'tools/include/nolibc/stackprotector.h')
| -rw-r--r-- | tools/include/nolibc/stackprotector.h | 8 |
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; |
