X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..04b8595b18b1b41ac7a206e4b3d51a635f8413d7:/bsd/sys/ubc_internal.h?ds=sidebyside

diff --git a/bsd/sys/ubc_internal.h b/bsd/sys/ubc_internal.h
index d7197f089..093b4a895 100644
--- a/bsd/sys/ubc_internal.h
+++ b/bsd/sys/ubc_internal.h
@@ -108,6 +108,9 @@ struct cs_blob {
 	vm_offset_t	csb_mem_offset;
 	vm_address_t	csb_mem_kaddr;
 	unsigned char	csb_sha1[SHA1_RESULTLEN];
+	unsigned int	csb_sigpup;
+	const char 	*csb_teamid;
+	unsigned int	csb_platform_binary; 
 };
 
 /*
@@ -117,14 +120,17 @@ struct cs_blob {
 struct ubc_info {
 	memory_object_t		ui_pager;	/* pager */
 	memory_object_control_t	ui_control;	/* VM control for the pager */
-	uint32_t		ui_flags;	/* flags */
 	vnode_t 		ui_vnode;	/* vnode for this ubc_info */
 	kauth_cred_t	 	ui_ucred;	/* holds credentials for NFS paging */
 	off_t			ui_size;	/* file size for the vnode */
+	uint32_t		ui_flags;	/* flags */
+	uint32_t		cs_add_gen;	/* generation count when csblob was validated */
 
         struct	cl_readahead   *cl_rahead;	/* cluster read ahead context */
         struct	cl_writebehind *cl_wbehind;	/* cluster write behind context */
 
+	struct timespec		cs_mtime;	/* modify time of file when
+						   first cs_blob was loaded */
 	struct	cs_blob		*cs_blobs; 	/* for CODE SIGNING */
 #if CHECK_CS_VALIDATION_BITMAP
 	void			*cs_valid_bitmap;     /* right now: used only for signed files on the read-only root volume */
@@ -144,13 +150,14 @@ struct ubc_info {
 #define	UI_ISMAPPED	0x00000010	/* vnode is currently mapped */
 #define UI_MAPBUSY	0x00000020	/* vnode is being mapped or unmapped */
 #define UI_MAPWAITING	0x00000040	/* someone waiting for UI_MAPBUSY */
+#define UI_MAPPEDWRITE	0x00000080	/* it's mapped with PROT_WRITE */
 
 /*
  * exported primitives for loadable file systems.
  */
 
 __BEGIN_DECLS
-__private_extern__ void ubc_init(void) __attribute__((section("__TEXT, initcode")));;
+__private_extern__ void ubc_init(void);
 __private_extern__ int	ubc_umount(mount_t mp);
 __private_extern__ void	ubc_unmountall(void);
 __private_extern__ memory_object_t ubc_getpager(vnode_t);
@@ -159,7 +166,7 @@ __private_extern__ void	ubc_destroy_named(vnode_t);
 /* internal only */
 __private_extern__ void	cluster_release(struct ubc_info *);
 __private_extern__ uint32_t cluster_max_io_size(mount_t, int);
-__private_extern__ uint32_t cluster_hard_throttle_limit(vnode_t, uint32_t *, uint32_t);
+__private_extern__ uint32_t cluster_throttle_io_limit(vnode_t, uint32_t *);
 
 
 /* Flags for ubc_getobject() */
@@ -179,14 +186,19 @@ int	ubc_isinuse_locked(vnode_t, int, int);
 
 int	ubc_getcdhash(vnode_t, off_t, unsigned char *);
 
+__attribute__((pure)) boolean_t ubc_is_mapped(const struct vnode *, boolean_t *writable);
+__attribute__((pure)) boolean_t ubc_is_mapped_writable(const struct vnode *);
+
 #ifdef XNU_KERNEL_PRIVATE
-int UBCINFOEXISTS(vnode_t);
+int UBCINFOEXISTS(const struct vnode *);
 #endif /* XNU_KERNEL_PRIVATE */
 
 /* code signing */
 struct cs_blob;
 int	ubc_cs_blob_add(vnode_t, cpu_type_t, off_t, vm_address_t, vm_size_t);
+int	ubc_cs_sigpup_add(vnode_t, vm_address_t, vm_size_t);
 struct cs_blob *ubc_get_cs_blobs(vnode_t);
+void	ubc_get_cs_mtime(vnode_t, struct timespec *);
 int	ubc_cs_getcdhash(vnode_t, off_t, unsigned char *);
 kern_return_t ubc_cs_blob_allocate(vm_offset_t *, vm_size_t *);
 void ubc_cs_blob_deallocate(vm_offset_t, vm_size_t);