Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170601873
D42078.id128230.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
992 B
Referenced Files
None
Subscribers
None
D42078.id128230.diff
View Options
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -107,6 +107,8 @@
br x15
virtdone:
+ BTI_J
+
/* Set up the stack */
adrp x25, initstack_end
add x25, x25, :lo12:initstack_end
@@ -223,6 +225,8 @@
br x15
mp_virtdone:
+ BTI_J
+
/* Start using the AP boot stack */
ldr x4, =bootstack
ldr x4, [x4]
diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h
--- a/sys/arm64/include/asm.h
+++ b/sys/arm64/include/asm.h
@@ -48,7 +48,7 @@
#define LENTRY(sym) \
.text; .align 2; .type sym,#function; sym: \
- .cfi_startproc; DTRACE_NOP
+ .cfi_startproc; BTI_C; DTRACE_NOP
#define ENTRY(sym) \
.globl sym; LENTRY(sym)
#define EENTRY(sym) \
@@ -114,6 +114,14 @@
dsb sy; \
isb
+#ifdef __ARM_FEATURE_BTI_DEFAULT
+#define BTI_C hint #34
+#define BTI_J hint #36
+#else
+#define BTI_C
+#define BTI_J
+#endif
+
#endif /* _MACHINE_ASM_H_ */
#endif /* !__arm__ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 6, 2:33 PM (8 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38415936
Default Alt Text
D42078.id128230.diff (992 B)
Attached To
Mode
D42078: arm64: Add BTI landing pads to assembly functions
Attached
Detach File
Event Timeline
Log In to Comment