Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Control Flow Enforcement with Indirect Branch Tracking #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions block_trampolines.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
// x86-64 trampoline
////////////////////////////////////////////////////////////////////////////////
.macro trampoline arg0, arg1
endbr64
mov -0x1007(%rip), \arg1 # Load the block pointer into the second argument
xchg \arg1, \arg0 # Swap the first and second arguments
jmp *-0x1008(%rip) # Call the block function
Expand Down Expand Up @@ -161,6 +162,7 @@
// AArch64 (ARM64) trampoline
////////////////////////////////////////////////////////////////////////////////
.macro trampoline arg0, arg1
bti c
adr x17, #-4096
mov \arg1, \arg0
ldp \arg0, x17, [x17]
Expand Down
2 changes: 1 addition & 1 deletion objc_msgSend.aarch64.S
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# define EH_NOP .seh_nop
#else
// Marks the real start and end of the function
# define EH_START .cfi_startproc
# define EH_START .cfi_startproc; bti c
# define EH_END .cfi_endproc

// The following directives are either not
Expand Down
2 changes: 1 addition & 1 deletion objc_msgSend.x86-64.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# define SECOND_ARGUMENT %rdx
# define THIRD_ARGUMENT %r8
#else
# define START_PROC(x) .cfi_startproc
# define START_PROC(x) .cfi_startproc; endbr64
# define END_PROC(x) .cfi_endproc
# define FRAME_OFFSET(x) .cfi_adjust_cfa_offset x
# define FIRST_ARGUMENT_STR "%rdi"
Expand Down