Implement more security stuff
- Support deterministic stacks on OpenBSD - Support OpenBSD system call origin verification - Fix overrun by one in chibicc string token allocator - Get all chibicc tests passing under Address Sanitizer
This commit is contained in:
2
libc/sysv/consts/MAP_CONCEAL.s
Normal file
2
libc/sysv/consts/MAP_CONCEAL.s
Normal file
@@ -0,0 +1,2 @@
|
||||
.include "libc/sysv/consts/syscon.inc"
|
||||
.syscon mmap MAP_CONCEAL 0 0 0x20000 0x8000 0
|
||||
@@ -1,2 +1,2 @@
|
||||
.include "libc/sysv/consts/syscon.inc"
|
||||
.syscon mmap MAP_GROWSDOWN 0x0100 0 0x0400 0x0400 0x100000
|
||||
.syscon mmap MAP_GROWSDOWN 0x0100 0 0x0400 0x4000 0x100000
|
||||
|
||||
2
libc/sysv/consts/MAP_NOCORE.s
Normal file
2
libc/sysv/consts/MAP_NOCORE.s
Normal file
@@ -0,0 +1,2 @@
|
||||
.include "libc/sysv/consts/syscon.inc"
|
||||
.syscon compat MAP_NOCORE 0 0 0x20000 0x8000 0
|
||||
2
libc/sysv/consts/__NR_msyscall.s
Normal file
2
libc/sysv/consts/__NR_msyscall.s
Normal file
@@ -0,0 +1,2 @@
|
||||
.include "libc/sysv/consts/syscon.inc"
|
||||
.syscon nr __NR_msyscall -1 -1 -1 0x0025 -1
|
||||
@@ -21,7 +21,6 @@ hidden extern const long MAP_NORESERVE;
|
||||
hidden extern const long MAP_POPULATE;
|
||||
hidden extern const long MAP_PRIVATE;
|
||||
hidden extern const long MAP_SHARED;
|
||||
hidden extern const long MAP_STACK;
|
||||
hidden extern const long MAP_TYPE;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
@@ -34,6 +33,7 @@ COSMOPOLITAN_C_END_
|
||||
|
||||
#define MAP_32BIT SYMBOLIC(MAP_32BIT)
|
||||
#define MAP_ANONYMOUS SYMBOLIC(MAP_ANONYMOUS)
|
||||
#define MAP_CONCEAL SYMBOLIC(MAP_CONCEAL)
|
||||
#define MAP_DENYWRITE SYMBOLIC(MAP_DENYWRITE)
|
||||
#define MAP_EXECUTABLE SYMBOLIC(MAP_EXECUTABLE)
|
||||
#define MAP_GROWSDOWN SYMBOLIC(MAP_GROWSDOWN)
|
||||
@@ -46,7 +46,8 @@ COSMOPOLITAN_C_END_
|
||||
#define MAP_POPULATE SYMBOLIC(MAP_POPULATE)
|
||||
#define MAP_TYPE SYMBOLIC(MAP_TYPE)
|
||||
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#define MAP_STACK MAP_GROWSDOWN
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#define MAP_NOCORE MAP_CONCEAL
|
||||
#define MAP_STACK MAP_GROWSDOWN
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_MAP_H_ */
|
||||
|
||||
@@ -332,6 +332,7 @@
|
||||
#define __NR_io_uring_enter SYMBOLIC(__NR_io_uring_enter)
|
||||
#define __NR_io_uring_register SYMBOLIC(__NR_io_uring_register)
|
||||
#define __NR_pledge SYMBOLIC(__NR_pledge)
|
||||
#define __NR_msyscall SYMBOLIC(__NR_msyscall)
|
||||
#define __NR_ktrace SYMBOLIC(__NR_ktrace)
|
||||
#define __NR_kqueue SYMBOLIC(__NR_kqueue)
|
||||
#define __NR_kevent SYMBOLIC(__NR_kevent)
|
||||
@@ -1105,6 +1106,7 @@ hidden extern const long __NR_io_uring_setup;
|
||||
hidden extern const long __NR_io_uring_enter;
|
||||
hidden extern const long __NR_io_uring_register;
|
||||
hidden extern const long __NR_pledge;
|
||||
hidden extern const long __NR_msyscall;
|
||||
hidden extern const long __NR_ktrace;
|
||||
hidden extern const long __NR_kqueue;
|
||||
hidden extern const long __NR_kevent;
|
||||
|
||||
Reference in New Issue
Block a user