Skip to content

Commit abca5bd

Browse files
committed
libc: Update macOS headers to SDK 26.1
1 parent 459f3b7 commit abca5bd

File tree

18 files changed

+282
-194
lines changed

18 files changed

+282
-194
lines changed

lib/libc/darwin/SDKSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"MinimalDisplayName":"26.0"}
1+
{"MinimalDisplayName":"26.1"}

lib/libc/darwin/libSystem.tbd

Lines changed: 82 additions & 79 deletions
Large diffs are not rendered by default.

lib/libc/include/any-macos-any/AvailabilityInternal.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
#if __has_builtin(__is_target_os)
3838
#if __is_target_os(macos)
3939
#define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
40-
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_26_0
40+
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_26_1
4141
#endif
4242
#elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
4343
#define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
44-
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_26_0
44+
#define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_26_1
4545
#endif /* __has_builtin(__is_target_os) */
4646
#endif /* defined(__has_builtin) */
4747
#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
@@ -51,11 +51,11 @@
5151
#if __has_builtin(__is_target_os)
5252
#if __is_target_os(ios)
5353
#define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
54-
#define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_26_0
54+
#define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_26_1
5555
#endif
5656
#elif __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
5757
#define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
58-
#define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_26_0
58+
#define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_26_1
5959
#endif /* __has_builtin(__is_target_os) */
6060
#endif /* defined(__has_builtin) */
6161
#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED */
@@ -65,13 +65,13 @@
6565
#if __has_builtin(__is_target_os)
6666
#if __is_target_os(watchos)
6767
#define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
68-
#define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_26_0
68+
#define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_26_1
6969
/* for compatibility with existing code. New code should use platform specific checks */
7070
#define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0
7171
#endif
7272
#elif __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
7373
#define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
74-
#define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_26_0
74+
#define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_26_1
7575
/* for compatibility with existing code. New code should use platform specific checks */
7676
#define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0
7777
#endif /* __has_builtin(__is_target_os) */
@@ -83,13 +83,13 @@
8383
#if __has_builtin(__is_target_os)
8484
#if __is_target_os(tvos)
8585
#define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
86-
#define __TV_OS_VERSION_MAX_ALLOWED __TVOS_26_0
86+
#define __TV_OS_VERSION_MAX_ALLOWED __TVOS_26_1
8787
/* for compatibility with existing code. New code should use platform specific checks */
8888
#define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0
8989
#endif
9090
#elif __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
9191
#define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
92-
#define __TV_OS_VERSION_MAX_ALLOWED __TVOS_26_0
92+
#define __TV_OS_VERSION_MAX_ALLOWED __TVOS_26_1
9393
/* for compatibility with existing code. New code should use platform specific checks */
9494
#define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_9_0
9595
#endif /* __has_builtin(__is_target_os) */
@@ -103,7 +103,7 @@
103103
#if __has_builtin(__is_target_os)
104104
#if __is_target_os(driverkit)
105105
#define __DRIVERKIT_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
106-
#define __DRIVERKIT_VERSION_MAX_ALLOWED __DRIVERKIT_25_0
106+
#define __DRIVERKIT_VERSION_MAX_ALLOWED __DRIVERKIT_25_1
107107
#endif
108108
#endif /* __has_builtin(__is_target_os) */
109109
#endif /* defined(__has_builtin) */
@@ -114,7 +114,7 @@
114114
#if __has_builtin(__is_target_os)
115115
#if __is_target_os(visionos)
116116
#define __VISION_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
117-
#define __VISION_OS_VERSION_MAX_ALLOWED __VISIONOS_26_0
117+
#define __VISION_OS_VERSION_MAX_ALLOWED __VISIONOS_26_1
118118
/* for compatibility with existing code. New code should use platform specific checks */
119119
#define __IPHONE_OS_VERSION_MIN_REQUIRED __IPHONE_17_1
120120
#endif

lib/libc/include/any-macos-any/AvailabilityVersions.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
#define __MAC_15_6 150600
9898
#define __MAC_16_0 160000
9999
#define __MAC_26_0 260000
100+
#define __MAC_26_1 260100
100101
/* __MAC__NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
101102

102103
#define __IPHONE_2_0 20000
@@ -188,6 +189,7 @@
188189
#define __IPHONE_18_6 180600
189190
#define __IPHONE_19_0 190000
190191
#define __IPHONE_26_0 260000
192+
#define __IPHONE_26_1 260100
191193
/* __IPHONE__NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
192194

193195
#define __WATCHOS_1_0 10000
@@ -248,6 +250,7 @@
248250
#define __WATCHOS_11_6 110600
249251
#define __WATCHOS_12_0 120000
250252
#define __WATCHOS_26_0 260000
253+
#define __WATCHOS_26_1 260100
251254
/* __WATCHOS__NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
252255

253256
#define __TVOS_9_0 90000
@@ -308,6 +311,7 @@
308311
#define __TVOS_18_6 180600
309312
#define __TVOS_19_0 190000
310313
#define __TVOS_26_0 260000
314+
#define __TVOS_26_1 260100
311315
/* __TVOS__NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
312316

313317
#define __BRIDGEOS_2_0 20000
@@ -345,6 +349,7 @@
345349
#define __BRIDGEOS_9_5 90500
346350
#define __BRIDGEOS_9_6 90600
347351
#define __BRIDGEOS_10_0 100000
352+
#define __BRIDGEOS_10_1 100100
348353

349354

350355
#define __DRIVERKIT_19_0 190000
@@ -369,6 +374,7 @@
369374
#define __DRIVERKIT_24_5 240500
370375
#define __DRIVERKIT_24_6 240600
371376
#define __DRIVERKIT_25_0 250000
377+
#define __DRIVERKIT_25_1 250100
372378
/* __DRIVERKIT__NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
373379

374380
#define __VISIONOS_1_0 10000
@@ -384,6 +390,7 @@
384390
#define __VISIONOS_2_6 20600
385391
#define __VISIONOS_3_0 30000
386392
#define __VISIONOS_26_0 260000
393+
#define __VISIONOS_26_1 260100
387394
/* __VISIONOS__NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */
388395

389396

@@ -474,6 +481,7 @@
474481
#define MAC_OS_VERSION_15_6 __MAC_15_6
475482
#define MAC_OS_VERSION_16_0 __MAC_16_0
476483
#define MAC_OS_VERSION_26_0 __MAC_26_0
484+
#define MAC_OS_VERSION_26_1 __MAC_26_1
477485

478486
#endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */
479487

lib/libc/include/any-macos-any/mach/arm/exception.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
#define EXC_ARM_SWP 0x104 /* SWP instruction */
7373
#define EXC_ARM_PAC_FAIL 0x105 /* PAC authentication failure */
7474

75+
#define EXC_ARM_MTE_TAGCHECK_FAIL 0x106 /* MTE Tag Check failure */
76+
#define EXC_ARM_MTE_CANONICAL_FAIL 0x107 /* MTE Canonical Tag access fail */
7577

7678
/*
7779
* EXC_BREAKPOINT

lib/libc/include/any-macos-any/mach/machine.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ typedef integer_t cpu_threadtype_t;
409409
#define CPUFAMILY_ARM_BRAVA 0x17d5b93a
410410
#define CPUFAMILY_ARM_TAHITI 0x75d4acb9
411411
#define CPUFAMILY_ARM_TUPAI 0x204526d0
412+
#define CPUFAMILY_ARM_HIDRA 0x1d5a87e8
412413
#define CPUFAMILY_ARM_THERA 0xab345f09
413414
#define CPUFAMILY_ARM_TILOS 0x01d7a72b
414415

lib/libc/include/any-macos-any/mach/port.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ enum mach_port_guard_exception_codes {
487487
kGUARD_EXC_MOVE_PROVISIONAL_REPLY_PORT = 0x00100004,
488488
kGUARD_EXC_REPLY_PORT_SINGLE_SO_RIGHT = 0x00100005,
489489
kGUARD_EXC_MOD_REFS_NON_FATAL = 1u << 21,
490-
kGUARD_EXC_IMMOVABLE_NON_FATAL = 1u << 22,
490+
kGUARD_EXC_IMMOVABLE_NON_FATAL = 1u << 22, /* unused*/
491491
};
492492

493493
#define MAX_FATAL_kGUARD_EXC_CODE kGUARD_EXC_MSG_FILTERED

lib/libc/include/any-macos-any/mach/vm_prot.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,6 @@ typedef int vm_prot_t;
100100

101101
#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
102102

103-
/*
104-
* This is an alias to VM_PROT_EXECUTE to identify callers that
105-
* want to allocate an hardware assisted Read-only/read-write
106-
* trusted path in userland.
107-
*/
108-
#define VM_PROT_RORW_TP (VM_PROT_EXECUTE)
109-
110103
/*
111104
* An invalid protection value.
112105
* Used only by memory_object_lock_request to indicate no change

lib/libc/include/any-macos-any/mach/vm_statistics.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ typedef struct vm_purgeable_info *vm_purgeable_info_t;
283283
#define VM_FLAGS_RESILIENT_MEDIA 0x00000040
284284
#define VM_FLAGS_PERMANENT 0x00000080
285285
#define VM_FLAGS_TPRO 0x00001000
286+
#define VM_FLAGS_MTE 0x00002000
286287
#define VM_FLAGS_OVERWRITE 0x00004000 /* delete any existing mappings first */
287288
/*
288289
* VM_FLAGS_SUPERPAGE_MASK
@@ -299,7 +300,7 @@ typedef struct vm_purgeable_info *vm_purgeable_info_t;
299300
(flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \
300301
(((alias) & ~VM_FLAGS_ALIAS_MASK) << 24))
301302

302-
#define VM_FLAGS_HW (VM_FLAGS_TPRO)
303+
#define VM_FLAGS_HW (VM_FLAGS_TPRO | VM_FLAGS_MTE)
303304

304305
/* These are the flags that we accept from user-space */
305306
#define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \
@@ -358,8 +359,13 @@ __enum_decl(virtual_memory_guard_exception_code_t, uint32_t, {
358359
kGUARD_EXC_SEC_COPY_DENIED = 100,
359360
kGUARD_EXC_SEC_SHARING_DENIED = 101,
360361

362+
/* Fault-related exceptions. */
363+
kGUARD_EXC_MTE_SYNC_FAULT = 200,
364+
kGUARD_EXC_MTE_ASYNC_USER_FAULT = 201,
365+
kGUARD_EXC_MTE_ASYNC_KERN_FAULT = 202
361366
});
362367

368+
#define kGUARD_EXC_MTE_SOFT_MODE 0x100000
363369

364370

365371
#pragma mark Ledger Tags

lib/libc/include/any-macos-any/mach/vm_types.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ typedef uint32_t reg64_t;
7171
typedef uint32_t ppnum_t __kernel_ptr_semantics; /* Physical page number */
7272
#define PPNUM_MAX UINT32_MAX
7373

74+
/*
75+
* For use with mach_vm_update_pointers_with_remote_tags.
76+
* This definition must be kept in sync with the definition in mach_types.defs.
77+
*/
78+
#define VM_OFFSET_LIST_MAX 1024
79+
7480

7581
typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t;
7682
typedef mach_port_t upl_t;

0 commit comments

Comments
 (0)