Skip to content

Commit

Permalink
darwin: generate syscalls sdk 15.1 (#2448)
Browse files Browse the repository at this point in the history
  • Loading branch information
patryk4815 committed Aug 25, 2024
1 parent 67678c2 commit df620d7
Show file tree
Hide file tree
Showing 6 changed files with 656 additions and 80 deletions.
182 changes: 163 additions & 19 deletions pwnlib/constants/darwin/aarch64.py

Large diffs are not rendered by default.

182 changes: 163 additions & 19 deletions pwnlib/constants/darwin/amd64.py

Large diffs are not rendered by default.

182 changes: 163 additions & 19 deletions pwnlib/data/includes/darwin/aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
#define VOL_CAP_FMT_SHARED_SPACE 0x00800000
#define VOL_CAP_FMT_VOL_GROUPS 0x01000000
#define VOL_CAP_FMT_SEALED 0x02000000
#define VOL_CAP_FMT_CLONE_MAPPING 0x04000000
#define VOL_CAP_INT_SEARCHFS 0x00000001
#define VOL_CAP_INT_ATTRLIST 0x00000002
#define VOL_CAP_INT_NFSEXPORT 0x00000004
Expand All @@ -108,6 +109,8 @@
#define VOL_CAP_INT_RENAME_EXCL 0x00080000
#define VOL_CAP_INT_RENAME_OPENFAIL 0x00100000
#define VOL_CAP_INT_RENAME_SECLUDE 0x00200000
#define VOL_CAP_INT_ATTRIBUTION_TAG 0x00400000
#define VOL_CAP_INT_PUNCHHOLE 0x00800000
#define ATTR_CMN_NAME 0x00000001
#define ATTR_CMN_DEVID 0x00000002
#define ATTR_CMN_FSID 0x00000004
Expand Down Expand Up @@ -292,6 +295,8 @@
#define IO_SWAP_DISPATCH 0x200000
#define IO_SKIP_ENCRYPTION 0x400000
#define IO_EVTONLY 0x800000
#define IO_NOCACHE_SYSSPACE 0x1000000
#define IO_NOCACHE_SWRITE 0x2000000
#define LOOKUP 0
#define CREATE 1
#define DELETE 2
Expand Down Expand Up @@ -346,6 +351,7 @@
#define VNODE_LOOKUP_NOFOLLOW 0x01
#define VNODE_LOOKUP_NOCROSSMOUNT 0x02
#define VNODE_LOOKUP_CROSSMOUNTNOWAIT 0x04
#define VNODE_LOOKUP_NOFOLLOW_ANY 0x08
#define VNODE_RELOAD 0x01
#define VNODE_WAIT 0x02
#define VNODE_WRITEABLE 0x04
Expand Down Expand Up @@ -424,7 +430,7 @@
#define WANTPARENT 0x0010
#define UIO_MAXIOV 1024
#define UIO_SMALLIOV 8
#define EVFILT_SYSCOUNT 17
#define EVFILT_SYSCOUNT 18
#define KEVENT_FLAG_NONE 0x000000
#define KEVENT_FLAG_IMMEDIATE 0x000001
#define KEVENT_FLAG_ERROR_EVENTS 0x000002
Expand Down Expand Up @@ -502,6 +508,7 @@
#define IMGPF_SPAWN 0x00000010
#define IMGPF_DISABLE_ASLR 0x00000020
#define IMGPF_ALLOW_DATA_EXEC 0x00000040
#define IMGPF_3P_PLUGINS 0x00000080
#define IMGPF_EXEC 0x00000100
#define IMGPF_HIGH_BITS_ASLR 0x00000200
#define IMGPF_IS_64BIT_DATA 0x00000400
Expand All @@ -511,6 +518,7 @@
#define IMGPF_HW_TPRO 0x00004000
#define IMGPF_ROSETTA 0x10000000
#define IMGPF_ALT_ROSETTA 0x20000000
#define IMGPF_RESERVED_2 0x40000000
#define IMGPF_NOJOP 0x80000000
#define IMGPF_SB_DEFAULT 0
#define IMGPF_SB_TRUE 1
Expand Down Expand Up @@ -559,9 +567,34 @@
#define WCONTINUED 0x00000010
#define WNOWAIT 0x00000020
#define WAIT_MYPGRP 0
#define PRIO_DARWIN_GPU 5
#define PRIO_DARWIN_GPU_ALLOW 0x1
#define PRIO_DARWIN_GPU_DENY 0x2
#define PRIO_DARWIN_ROLE 6
#define PRIO_DARWIN_ROLE_DEFAULT 0x0
#define PRIO_DARWIN_ROLE_UI_FOCAL 0x1
#define PRIO_DARWIN_ROLE_UI 0x2
#define PRIO_DARWIN_ROLE_NON_UI 0x3
#define PRIO_DARWIN_ROLE_UI_NON_FOCAL 0x4
#define PRIO_DARWIN_ROLE_TAL_LAUNCH 0x5
#define PRIO_DARWIN_ROLE_DARWIN_BG 0x6
#define PRIO_DARWIN_GAME_MODE 7
#define PRIO_DARWIN_CARPLAY_MODE 8
#define PRIO_DARWIN_GAME_MODE_OFF 0x0
#define PRIO_DARWIN_GAME_MODE_ON 0x1
#define PRIO_DARWIN_CARPLAY_MODE_OFF 0x0
#define PRIO_DARWIN_CARPLAY_MODE_ON 0x1
#define IOMON_ENABLE 0x01
#define IOMON_DISABLE 0x02
#define IOPOL_TYPE_VFS_HFS_CASE_SENSITIVITY 1
#define IOPOL_TYPE_VFS_ALTLINK 11
#define IOPOL_TYPE_VFS_NOCACHE_WRITE_FS_BLKSIZE 12
#define IOPOL_VFS_HFS_CASE_SENSITIVITY_DEFAULT 0
#define IOPOL_VFS_HFS_CASE_SENSITIVITY_FORCE_CASE_SENSITIVE 1
#define IOPOL_VFS_ALTLINK_DISABLED 0
#define IOPOL_VFS_ALTLINK_ENABLED 1
#define IOPOL_CMD_GET 0x00000001
#define IOPOL_CMD_SET 0x00000002
#define IPC_CREAT 0001000
#define IPC_EXCL 0002000
#define IPC_NOWAIT 0004000
Expand Down Expand Up @@ -676,6 +709,7 @@
#define F_GETLEASE 107
#define F_TRANSFEREXTENTS 110
#define F_ATTRIBUTION_TAG 111
#define F_ADDSIGS_MAIN_BINARY 113
#define FCNTL_FS_SPECIFIC_BASE 0x00010000
#define F_DUPFD_CLOEXEC 67
#define FD_CLOEXEC 1
Expand Down Expand Up @@ -903,6 +937,7 @@
#define MADV_FREE_REUSE 8
#define MADV_CAN_REUSE 9
#define MADV_PAGEOUT 10
#define MADV_ZERO 11
#define MINCORE_INCORE 0x1
#define MINCORE_REFERENCED 0x2
#define MINCORE_MODIFIED 0x4
Expand Down Expand Up @@ -1110,6 +1145,9 @@
#define DBG_MACH_IHDLR 0x10
#define DBG_MACH_IPC 0x20
#define DBG_MACH_RESOURCE 0x25
#define DBG_MACH_EXCLAVES 0x2A
#define DBG_MACH_EXCLAVES_SCHEDULER 0x2B
#define DBG_MACH_EPOCH_SYNC 0x2C
#define DBG_MACH_VM 0x30
#define DBG_MACH_LEAKS 0x31
#define DBG_MACH_WORKINGSET 0x32
Expand All @@ -1135,6 +1173,7 @@
#define DBG_MACH_KCOV 0xAD
#define DBG_MACH_MACHDEP_EXCP_SC_x86 0xAE
#define DBG_MACH_MACHDEP_EXCP_SC_ARM 0xAF
#define DBG_MACH_VM_RECLAIM 0xB0
#define DBC_MACH_IO_MMIO_READ 0x1
#define DBC_MACH_IO_MMIO_WRITE 0x2
#define DBC_MACH_IO_PHYS_READ 0x3
Expand Down Expand Up @@ -1176,7 +1215,6 @@
#define MACH_SCHED_MAINTENANCE 0x1f
#define MACH_DISPATCH 0x20
#define MACH_QUANTUM_HANDOFF 0x21
#define MACH_MULTIQ_DEQUEUE 0x22
#define MACH_SCHED_THREAD_SWITCH 0x23
#define MACH_SCHED_SMT_BALANCE 0x24
#define MACH_REMOTE_DEFERRED_AST 0x25
Expand Down Expand Up @@ -1228,6 +1266,7 @@
#define MACH_SCHED_WI_EXTERNAL_WAKEUP 0x61
#define MACH_SCHED_AST_CHECK 0x62
#define MACH_SCHED_PREEMPT_TIMER_ACTIVE 0x63
#define MACH_PROCESSOR_SHUTDOWN 0x64
#define MACH_SCHED_CLUTCH_ROOT_BUCKET_STATE 0x0
#define MACH_SCHED_CLUTCH_TG_BUCKET_STATE 0x1
#define MACH_SCHED_CLUTCH_THREAD_SELECT 0x2
Expand All @@ -1253,20 +1292,83 @@
#define WORKGROUP_INTERVAL_SET_WORKLOAD_ID_NAME 0x7
#define KCOV_STKSZ_THRESHOLD_ABOVE 0x0
#define KCOV_STKSZ_THRESHOLD_BELOW 0x1
#define MACH_MULTIQ_BOUND 1
#define MACH_MULTIQ_GROUP 2
#define MACH_MULTIQ_GLOBAL 3
#define DBG_ZERO_FILL_FAULT 1
#define DBG_PAGEIN_FAULT 2
#define DBG_COW_FAULT 3
#define DBG_CACHE_HIT_FAULT 4
#define DBG_NZF_PAGE_FAULT 5
#define DBG_GUARD_FAULT 6
#define DBG_PAGEINV_FAULT 7
#define DBG_PAGEIND_FAULT 8
#define DBG_COMPRESSOR_FAULT 9
#define DBG_COMPRESSOR_SWAPIN_FAULT 10
#define DBG_COR_FAULT 11
#define DBG_VM_VNODE_PAGEOUT 0x001
#define DBG_VM_FAULT_INTERNAL 0x002
#define DBG_VM_PURGEABLE_TOKEN_ADD 0x040
#define DBG_VM_PURGEABLE_TOKEN_DELETE 0x041
#define DBG_VM_PURGEABLE_TOKEN_RIPEN 0x042
#define DBG_VM_PURGEABLE_OBJECT_ADD 0x048
#define DBG_VM_PURGEABLE_OBJECT_REMOVE 0x049
#define DBG_VM_PURGEABLE_OBJECT_PURGE 0x04a
#define DBG_VM_PURGEABLE_OBJECT_PURGE_ALL 0x04b
#define DBG_VM_PURGEABLE_OBJECT_PURGE_ONE 0x04c
#define DBG_VM_PURGEABLE_OBJECT_PURGE_LOOP 0x04e
#define DBG_VM_MAP_PARTIAL_REAP 0x054
#define DBG_VM_MAP_WILLNEED 0x055
#define DBG_VM_FAULT_CHECK_ZFDELAY 0x100
#define DBG_VM_FAULT_COWDELAY 0x101
#define DBG_VM_FAULT_ZFDELAY 0x102
#define DBG_VM_FAULT_COMPRESSORDELAY 0x103
#define DBG_VM_PAGEOUT_SCAN 0x104
#define DBG_VM_PAGEOUT_BALANCE 0x105
#define DBG_VM_PAGEOUT_FREELIST 0x106
#define DBG_VM_PAGEOUT_PURGEONE 0x107
#define DBG_VM_PAGEOUT_CACHE_EVICT 0x108
#define DBG_VM_PAGEOUT_THREAD_BLOCK 0x109
#define DBG_VM_PAGEOUT_JETSAM 0x10A
#define DBG_VM_INFO1 0x10B
#define DBG_VM_INFO2 0x10C
#define DBG_VM_INFO3 0x10D
#define DBG_VM_INFO4 0x10E
#define DBG_VM_INFO5 0x10F
#define DBG_VM_INFO6 0x110
#define DBG_VM_INFO7 0x111
#define DBG_VM_INFO8 0x112
#define DBG_VM_INFO9 0x113
#define DBG_VM_INFO10 0x114
#define DBG_VM_UPL_PAGE_WAIT 0x120
#define DBG_VM_IOPL_PAGE_WAIT 0x121
#define DBG_VM_PAGE_WAIT_BLOCK 0x122
#define DBG_VM_PAGE_SLEEP 0x123
#define DBG_VM_PAGE_EXPEDITE 0x124
#define DBG_VM_PAGE_EXPEDITE_NO_MEMORY 0x125
#define DBG_VM_PAGE_GRAB 0x126
#define DBG_VM_PAGE_RELEASE 0x127
#define DBG_VM_COMPRESSOR_COMPACT_AND_SWAP 0x128
#define DBG_VM_COMPRESSOR_DELAYED_COMPACT 0x129
#define DBG_VM_OBJECT_SLEEP 0x12a
#define DBG_VM_PAGE_WAKEUP 0x12b
#define DBG_VM_PAGE_WAKEUP_DONE 0x12c
#define DBG_VM_PRESSURE_EVENT 0x130
#define DBG_VM_EXECVE 0x131
#define DBG_VM_WAKEUP_COMPACTOR_SWAPPER 0x132
#define DBG_VM_UPL_REQUEST 0x133
#define DBG_VM_IOPL_REQUEST 0x134
#define DBG_VM_KERN_REQUEST 0x135
#define DBG_VM_DATA_WRITE 0x140
#define DBG_VM_PRESSURE_LEVEL_CHANGE 0x141
#define DBG_VM_PHYS_WRITE_ACCT 0x142
#define DBG_VM_MAP_LOOKUP_ENTRY_FAILURE 0x143
#define VM_DISCONNECT_ALL_PAGE_MAPPINGS 0x00
#define VM_DISCONNECT_TASK_PAGE_MAPPINGS 0x01
#define VM_REAL_FAULT_ADDR_INTERNAL 0x02
#define VM_REAL_FAULT_ADDR_PURGABLE 0x03
#define VM_REAL_FAULT_ADDR_EXTERNAL 0x04
#define VM_REAL_FAULT_ADDR_SHAREDCACHE 0x05
#define VM_REAL_FAULT_FAST 0x06
#define VM_REAL_FAULT_SLOW 0x07
#define VM_MAP_LOOKUP_OBJECT 0x08
#define DBG_ZERO_FILL_FAULT 0x01
#define DBG_PAGEIN_FAULT 0x02
#define DBG_COW_FAULT 0x03
#define DBG_CACHE_HIT_FAULT 0x04
#define DBG_NZF_PAGE_FAULT 0x05
#define DBG_GUARD_FAULT 0x06
#define DBG_PAGEINV_FAULT 0x07
#define DBG_PAGEIND_FAULT 0x08
#define DBG_COMPRESSOR_FAULT 0x09
#define DBG_COMPRESSOR_SWAPIN_FAULT 0x0a
#define DBG_COR_FAULT 0x0b
#define MACH_TASK_SUSPEND 0x0
#define MACH_TASK_RESUME 0x1
#define MACH_THREAD_SET_VOUCHER 0x2
Expand All @@ -1281,6 +1383,31 @@
#define MACH_IPC_KMSG_LINK 0xb
#define MACH_IPC_PORT_ENTRY_MODIFY 0xc
#define MACH_IPC_DESTROY_GUARDED_DESC 0xd
#define MACH_THREAD_SUSPEND 0xe
#define MACH_THREAD_RESUME 0xf
#define MACH_EXCLAVES_SWITCH 0x0
#define MACH_EXCLAVES_XNUPROXY 0x1
#define MACH_EXCLAVES_RPC 0x2
#define MACH_EXCLAVES_UPCALL 0x3
#define MACH_EXCLAVES_BOOT_TASK 0x4
#define MACH_EXCLAVES_SCHEDULER_YIELD 0x0
#define MACH_EXCLAVES_SCHEDULER_SPAWNED 0x1
#define MACH_EXCLAVES_SCHEDULER_TERMINATED 0x2
#define MACH_EXCLAVES_SCHEDULER_WAIT 0x3
#define MACH_EXCLAVES_SCHEDULER_WAKE 0x4
#define MACH_EXCLAVES_SCHEDULER_SUSPENDED 0x5
#define MACH_EXCLAVES_SCHEDULER_RESUMED 0x6
#define MACH_EXCLAVES_SCHEDULER_INTERRUPTED 0x7
#define MACH_EXCLAVES_SCHEDULER_NOTHING_SCHEDULED 0x8
#define MACH_EXCLAVES_SCHEDULER_ALL_EXCLAVES_BOOTED 0x9
#define MACH_EXCLAVES_SCHEDULER_EARLY_ALLOC 0xa
#define MACH_EPOCH_SYNC_WAIT_STALE 0x0
#define MACH_EPOCH_SYNC_WAIT 0x1
#define MACH_EPOCH_SYNC_WAKE_NO_WAITERS 0x2
#define MACH_EPOCH_SYNC_WAKE_ONE 0x3
#define MACH_EPOCH_SYNC_WAKE_ALL 0x4
#define MACH_EPOCH_SYNC_WAKE_ONE_WITH_OWNER 0x5
#define MACH_EPOCH_SYNC_WAKE_THREAD 0x6
#define MACH_THREAD_GROUP_NEW 0x0
#define MACH_THREAD_GROUP_FREE 0x1
#define MACH_THREAD_GROUP_SET 0x2
Expand Down Expand Up @@ -1423,6 +1550,13 @@
#define HV_X86_VM_PROTECT_TRAP 0x2b
#define HV_X86_VM_UNMAP_TRAP 0x2c
#define HV_X86_TSC_OFFSET_SET 0x2d
#define VM_RECLAIM_UPDATE_ACCOUNTING 0x01
#define VM_RECLAIM_ENTRIES 0x02
#define VM_RECLAIM_CHUNK 0x03
#define VM_RECLAIM_ENTRY 0x04
#define VM_RECLAIM_ALL_MEMORY 0x05
#define VM_RECLAIM_ASYNC_MEMORY 0x06
#define VM_RECLAIM_INIT 0x07
#define DBG_NETIP 1
#define DBG_NETARP 2
#define DBG_NETUDP 3
Expand Down Expand Up @@ -2108,6 +2242,7 @@
#define XATTR_NOSECURITY 0x0008
#define XATTR_NODEFAULT 0x0010
#define XATTR_SHOWCOMPRESSION 0x0020
#define XATTR_NOFOLLOW_ANY 0x0040
#define XATTR_MAXNAMELEN 127
#define PR_SLOWHZ 2
#define PRC_IFDOWN 0
Expand Down Expand Up @@ -2141,6 +2276,7 @@
#define CTL_FLAG_REG_SOCK_STREAM 0x4
#define CTL_DATA_NOWAKEUP 0x1
#define CTL_DATA_EOR 0x2
#define __has_safe_buffers 0
#define __DARWIN_ONLY_64_BIT_INO_T 0
#define __DARWIN_ONLY_UNIX_CONFORMANCE 0
#define __DARWIN_ONLY_VERS_1050 0
Expand Down Expand Up @@ -2478,7 +2614,8 @@
#define VQ_NEARLOWDISK 0x2000
#define VQ_DESIRED_DISK 0x4000
#define VQ_FREE_SPACE_CHANGE 0x8000
#define VQ_FLAG10000 0x10000
#define VQ_PURGEABLE_SPACE_CHANGE 0x10000
#define VQ_FLAG20000 0x20000
#define VFS_IOATTR_FLAGS_FUA 0x00000001
#define VFS_IOATTR_FLAGS_UNMAP 0x00000002
#define VFS_IOATTR_FLAGS_SWAPPIN_SUPPORTED 0x00000010
Expand Down Expand Up @@ -2509,7 +2646,7 @@
#define NFSV4_MAX_FH_SIZE 128
#define NFSV3_MAX_FH_SIZE 64
#define NFSV2_MAX_FH_SIZE 32
#define CRYPTEX_AUTH_STRUCT_VERSION 1
#define CRYPTEX_AUTH_STRUCT_VERSION 2
#define EV_FD 1
#define EV_RE 1
#define EV_WR 2
Expand All @@ -2533,6 +2670,10 @@
#define KDEBUG_LEVEL_FULL 3
#define KDBG_FLAG_FILTERED 0x01
#define KDBG_FLAG_NOPROCFILT 0x02
#define __DARWIN_LITTLE_ENDIAN 1234
#define __DARWIN_BIG_ENDIAN 4321
#define __DARWIN_PDP_ENDIAN 3412
#define USE_CLANG_TYPES 0
#define __DARWIN_NULL 0
#define UBC_PUSHDIRTY 0x01
#define UBC_PUSHALL 0x02
Expand Down Expand Up @@ -3068,7 +3209,9 @@
#define SYS_mkfifoat 553
#define SYS_mknodat 554
#define SYS_ungraftdmg 555
#define SYS_MAXSYSCALL 556
#define SYS_coalition_policy_set 556
#define SYS_coalition_policy_get 557
#define SYS_MAXSYSCALL 558
#define SYS_invalid 63
#define SOCK_STREAM 1
#define SOCK_DGRAM 2
Expand Down Expand Up @@ -3116,6 +3259,7 @@
#define SO_NET_SERVICE_TYPE 0x1116
#define SO_NETSVC_MARKING_LEVEL 0x1119
#define SO_RESOLVER_SIGNATURE 0x1131
#define SO_BINDTODEVICE 0x1134
#define NET_SERVICE_TYPE_BE 0
#define NET_SERVICE_TYPE_BK 1
#define NET_SERVICE_TYPE_SIG 2
Expand Down
Loading

0 comments on commit df620d7

Please sign in to comment.