Elevate .text.syscall to .privileged

It turns out adding OpenBSD msyscall() origin verification broke the
--ftrace flag. The executable needs to issue raw syscalls while it's
rewriting itself. So they need to be in the same section, and that's
just plain simpler too.
This commit is contained in:
Justine Tunney 2021-02-06 03:17:41 -08:00
parent d7733579d3
commit 9f149e1de3
19 changed files with 30 additions and 38 deletions

View file

@ -111,7 +111,7 @@ static int arch_prctl_freebsd(int code, int64_t addr) {
}
}
static textsyscall int arch_prctl_xnu(int code, int64_t addr) {
static privileged noinline int arch_prctl_xnu(int code, int64_t addr) {
int ax;
switch (code) {
case ARCH_SET_GS:
@ -129,7 +129,7 @@ static textsyscall int arch_prctl_xnu(int code, int64_t addr) {
}
}
static textsyscall int arch_prctl_openbsd(int code, int64_t addr) {
static privileged noinline int arch_prctl_openbsd(int code, int64_t addr) {
int64_t rax;
switch (code) {
case ARCH_GET_FS: