Skip to content

Commit eb164ba

Browse files
authored
fix: disable BTI (fixes #22) (#31)
1 parent d4e3d7c commit eb164ba

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ Currently `MACHINE_CONFIG=T8103` is not correctly building for at least `14.3`
5050
> [!NOTE]
5151
> When attempting to boot try adding the boot-arg: `sudo nvram boot-args="-unsafe_kernel_text"`
5252
53-
> [!WARNING]
54-
> Booting VMAPPLE kernels in VMs only works on Apple M1s [see issue](https://github.com/blacktop/darwin-xnu-build/issues/22)
55-
5653
## Why? 🤔
5754

5855
I'm hoping to patch and build the xnu source in interesting ways to aid in research and development of macOS/iOS security research tools as well as generate [CodeQL](https://securitylab.github.com/tools/codeql) databases for the community to use.

patches/15.0/disable_bti.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/pexpert/pexpert/arm64/apple_arm64_common.h b/pexpert/pexpert/arm64/apple_arm64_common.h
2+
index 56caa9556..460c4c4cc 100644
3+
--- a/pexpert/pexpert/arm64/apple_arm64_common.h
4+
+++ b/pexpert/pexpert/arm64/apple_arm64_common.h
5+
@@ -89,11 +89,4 @@
6+
#define CPU_VERSION_C0 0x20
7+
#define CPU_VERSION_UNKNOWN 0xff
8+
9+
-
10+
-/*
11+
- * Conservatively assume that BTI will be enforced.
12+
- * Individual SoCs and kernel configurations may have different behavior.
13+
- */
14+
-#define BTI_ENFORCED 1
15+
-
16+
#endif /* !_PEXPERT_ARM64_APPLE_ARM64_COMMON_H */

0 commit comments

Comments
 (0)