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:
@ -17,7 +17,7 @@
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
.text.syscall
|
||||
.privileged
|
||||
.source __FILE__
|
||||
|
||||
/ Linux Signal Trampoline (HOLY CODE)
|
||||
|
||||
@ -103,7 +103,7 @@ __systemfive:
|
||||
.endobj __systemfive,globl,hidden
|
||||
.previous
|
||||
|
||||
.text.syscall
|
||||
.privileged
|
||||
.Lanchorpoint:
|
||||
systemfive.linux:
|
||||
and $0xfff,%eax
|
||||
@ -332,10 +332,10 @@ systemfive.init.syscall:
|
||||
js systemfive.init.done
|
||||
push %rdi
|
||||
push %rsi
|
||||
.weak __text_syscall_addr
|
||||
.weak __text_syscall_size
|
||||
mov $__text_syscall_addr,%edi
|
||||
mov $__text_syscall_size,%esi
|
||||
.weak __privileged_addr
|
||||
.weak __privileged_size
|
||||
mov $__privileged_addr,%edi
|
||||
mov $__privileged_size,%esi
|
||||
syscall
|
||||
pop %rsi
|
||||
pop %rdi
|
||||
|
||||
Reference in New Issue
Block a user