diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-03-31 18:46:25 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-03-31 18:46:25 +0000 |
commit | c1e0b462ef4e3d7e8ff0d136b5c96ba6846cf844 (patch) | |
tree | 303d9e97ad27d882074d27cd673185b8560107f6 | |
parent | 8eecdaa8b5358772e9ea04657c414b44232c3cb6 (diff) |
Add "bti c" where needed for BTI control flow integrety checks.
ok deraadt@
-rw-r--r-- | lib/csu/aarch64/md_init.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/csu/aarch64/md_init.h b/lib/csu/aarch64/md_init.h index c8420cabeb8..71356c6e93c 100644 --- a/lib/csu/aarch64/md_init.h +++ b/lib/csu/aarch64/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.10 2020/10/19 17:57:40 naddy Exp $ */ +/* $OpenBSD: md_init.h,v 1.11 2023/03/31 18:46:24 kettenis Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -45,6 +45,7 @@ " .type " #entry_pt ",%function \n" \ " .align 4 \n" \ #entry_pt": \n" \ + " bti c \n" \ " sub sp, sp, #16 \n" \ " str lr, [sp] \n" \ " /* fall thru */ \n" \ @@ -68,6 +69,7 @@ " .globl __start \n" \ "_start: \n" \ "__start: \n" \ + " bti c \n" \ " mov x3, x2 /* cleanup */ \n" \ "/* Get argc/argv/envp from stack */ \n" \ " ldr x0, [sp] \n" \ |