From: kettenis Date: Fri, 31 Mar 2023 18:46:24 +0000 (+0000) Subject: Add "bti c" where needed for BTI control flow integrety checks. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e1c483cc9c773f0fd316a259cf106ae071f0f7fc;p=openbsd Add "bti c" where needed for BTI control flow integrety checks. ok deraadt@ --- 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" \