xref: /xnu-10002.41.9/bsd/kern/code_signing/txm.c (revision 699cd48037512bf4380799317ca44ca453c82f57)
1*699cd480SApple OSS Distributions /*
2*699cd480SApple OSS Distributions  * Copyright (c) 2022 Apple Computer, Inc. All rights reserved.
3*699cd480SApple OSS Distributions  *
4*699cd480SApple OSS Distributions  * @APPLE_LICENSE_HEADER_START@
5*699cd480SApple OSS Distributions  *
6*699cd480SApple OSS Distributions  * The contents of this file constitute Original Code as defined in and
7*699cd480SApple OSS Distributions  * are subject to the Apple Public Source License Version 1.1 (the
8*699cd480SApple OSS Distributions  * "License").  You may not use this file except in compliance with the
9*699cd480SApple OSS Distributions  * License.  Please obtain a copy of the License at
10*699cd480SApple OSS Distributions  * http://www.apple.com/publicsource and read it before using this file.
11*699cd480SApple OSS Distributions  *
12*699cd480SApple OSS Distributions  * This Original Code and all software distributed under the License are
13*699cd480SApple OSS Distributions  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14*699cd480SApple OSS Distributions  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15*699cd480SApple OSS Distributions  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16*699cd480SApple OSS Distributions  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
17*699cd480SApple OSS Distributions  * License for the specific language governing rights and limitations
18*699cd480SApple OSS Distributions  * under the License.
19*699cd480SApple OSS Distributions  *
20*699cd480SApple OSS Distributions  * @APPLE_LICENSE_HEADER_END@
21*699cd480SApple OSS Distributions  */
22*699cd480SApple OSS Distributions 
23*699cd480SApple OSS Distributions #include <stdarg.h>
24*699cd480SApple OSS Distributions #include <stdatomic.h>
25*699cd480SApple OSS Distributions #include <os/overflow.h>
26*699cd480SApple OSS Distributions #include <machine/atomic.h>
27*699cd480SApple OSS Distributions #include <mach/vm_param.h>
28*699cd480SApple OSS Distributions #include <mach/vm_map.h>
29*699cd480SApple OSS Distributions #include <mach/shared_region.h>
30*699cd480SApple OSS Distributions #include <vm/vm_kern.h>
31*699cd480SApple OSS Distributions #include <kern/zalloc.h>
32*699cd480SApple OSS Distributions #include <kern/kalloc.h>
33*699cd480SApple OSS Distributions #include <kern/assert.h>
34*699cd480SApple OSS Distributions #include <kern/locks.h>
35*699cd480SApple OSS Distributions #include <kern/sched_prim.h>
36*699cd480SApple OSS Distributions #include <kern/lock_rw.h>
37*699cd480SApple OSS Distributions #include <libkern/libkern.h>
38*699cd480SApple OSS Distributions #include <libkern/section_keywords.h>
39*699cd480SApple OSS Distributions #include <libkern/coretrust/coretrust.h>
40*699cd480SApple OSS Distributions #include <libkern/amfi/amfi.h>
41*699cd480SApple OSS Distributions #include <pexpert/pexpert.h>
42*699cd480SApple OSS Distributions #include <sys/vm.h>
43*699cd480SApple OSS Distributions #include <sys/proc.h>
44*699cd480SApple OSS Distributions #include <sys/codesign.h>
45*699cd480SApple OSS Distributions #include <sys/code_signing.h>
46*699cd480SApple OSS Distributions #include <uuid/uuid.h>
47*699cd480SApple OSS Distributions #include <IOKit/IOBSD.h>
48*699cd480SApple OSS Distributions 
49