Skip to content

Commit

Permalink
xnu-2050.22.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Darwin authored and das committed Jun 4, 2017
1 parent c12504b commit 74d6983
Show file tree
Hide file tree
Showing 63 changed files with 1,094 additions and 4,728 deletions.
1 change: 0 additions & 1 deletion bsd/conf/MASTER
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ options SYSV_SEM # SVID semaphores # <sysv_sem>
options SYSV_MSG # SVID messages # <sysv_msg>
options SYSV_SHM # SVID shared mem # <sysv_shm>
options PSYNCH # pthread synch # <psynch>
options PANIC_INFO # want kernel panic info # <panic_info>
options DEVELOPMENT # dev kernel # <development>

# secure_kernel - secure kernel from user programs
Expand Down
4 changes: 2 additions & 2 deletions bsd/conf/MASTER.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#
# Standard Apple Research Configurations:
# -------- ----- -------- ---------------
# BASE = [ intel mach medium config_dtrace vol pst gdb kernobjc fixpri simple_clock mdebug kernserv driverkit uxpr kernstack ipc_compat ipc_debug sysv_sem sysv_msg sysv_shm audit panic_info config_imageboot config_workqueue psynch zleaks memorystatus vm_pressure_events ]
# BASE = [ intel mach medium config_dtrace vol pst gdb kernobjc fixpri simple_clock mdebug kernserv driverkit uxpr kernstack ipc_compat ipc_debug sysv_sem sysv_msg sysv_shm audit config_imageboot config_workqueue psynch zleaks memorystatus vm_pressure_events ]
# FILESYS = [ devfs revfs hfs journaling fdesc config_fse quota namedstreams fifo config_volfs hfs_compression config_hfs_std config_hfs_alloc_rbtree config_hfs_trim config_imgsrc_access config_triggers config_ext_resolver config_searchfs ]
# NETWORKING = [ inet inet6 compat_oldsock tcpdrop_synfin bpfilter ipdivert ipfirewall ipv6firewall ipfw2 dummynet traffic_mgt sendfile bond vlan gif stf zlib randomipid ifnet_input_chk config_mbuf_jumbo if_bridge PF ]
# NFS = [ nfsclient nfsserver ]
Expand All @@ -56,7 +56,7 @@
# PROFILE = [ RELEASE profile ]
# DEBUG = [ BASE NETWORKING NFS VPN FILESYS libdriver_g debug xpr_debug mach_assert ]
#
# EMBEDDED_BASE = [ intel mach bsmall vol pst gdb kernobjc fixpri simple_clock mdebug kernserv driverkit uxpr kernstack ipc_compat ipc_debug sysv_sem sysv_msg sysv_shm audit panic_info config_imageboot config_workqueue psynch ]
# EMBEDDED_BASE = [ intel mach bsmall vol pst gdb kernobjc fixpri simple_clock mdebug kernserv driverkit uxpr kernstack ipc_compat ipc_debug sysv_sem sysv_msg sysv_shm audit config_imageboot config_workqueue psynch ]
# EMBEDDED_FILESYS = [ devfs hfs journaling fdesc fifo ]
# EMBEDDED_NET = [ inet compat_oldsock tcpdrop_synfin bpfilter ]
# EMBEDDED = [ EMBEDDED_BASE EMBEDDED_NET VPN EMBEDDED_FILESYS libdriver no_printf_str no_kprintf_str no_kdebug ]
Expand Down
2 changes: 0 additions & 2 deletions bsd/conf/files
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ OPTIONS/development optional development
OPTIONS/sysv_sem optional sysv_sem
OPTIONS/sysv_msg optional sysv_msg
OPTIONS/sysv_shm optional sysv_shm
OPTIONS/panic_info optional panic_info
OPTIONS/no_bsd_inlines optional no_bsd_inlines

#
Expand Down Expand Up @@ -529,7 +528,6 @@ bsd/kern/kern_lockf.c standard
bsd/kern/kern_fork.c standard
bsd/kern/kern_malloc.c standard
bsd/kern/kern_mman.c standard
bsd/kern/kern_panicinfo.c optional panic_info
bsd/kern/kern_physio.c standard
bsd/kern/kern_priv.c standard
bsd/kern/kern_proc.c standard
Expand Down
2 changes: 1 addition & 1 deletion bsd/dev/i386/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, package_thermal_intr,
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
(void *)offsetof(cpuid_thermal_leaf_t, package_thermal_intr),
sizeof(boolean_t),
cpu_thermal, "I", "Packge Thermal interrupt and Status");
cpu_thermal, "I", "Package Thermal interrupt and Status");

SYSCTL_PROC(_machdep_cpu_thermal, OID_AUTO, hardware_feedback,
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_LOCKED,
Expand Down
10 changes: 5 additions & 5 deletions bsd/hfs/hfs_catalog.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000-2011 Apple Inc. All rights reserved.
* Copyright (c) 2000-2013 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
Expand Down Expand Up @@ -481,7 +481,7 @@ cat_findname(struct hfsmount *hfsmp, cnid_t cnid, struct cat_desc *outdescp)
* catalog descriptor (when supplied outdescp is non-null).
*/
int
cat_idlookup(struct hfsmount *hfsmp, cnid_t cnid, int allow_system_files,
cat_idlookup(struct hfsmount *hfsmp, cnid_t cnid, int allow_system_files, int wantrsrc,
struct cat_desc *outdescp, struct cat_attr *attrp, struct cat_fork *forkp)
{
struct BTreeIterator * iterator;
Expand Down Expand Up @@ -542,7 +542,7 @@ cat_idlookup(struct hfsmount *hfsmp, cnid_t cnid, int allow_system_files,

result = cat_lookupbykey(hfsmp, keyp,
((allow_system_files != 0) ? HFS_LOOKUP_SYSFILE : 0),
0, 0, outdescp, attrp, forkp, NULL);
0, wantrsrc, outdescp, attrp, forkp, NULL);
/* No corresponding file/folder record found for a thread record,
* mark the volume inconsistent.
*/
Expand Down Expand Up @@ -594,7 +594,7 @@ cat_lookupmangled(struct hfsmount *hfsmp, struct cat_desc *descp, int wantrsrc,
return (ENOENT);
}

result = cat_idlookup(hfsmp, fileID, 0, outdescp, attrp, forkp);
result = cat_idlookup(hfsmp, fileID, 0,0, outdescp, attrp, forkp);
if (result)
return (ENOENT);
/* It must be in the correct directory */
Expand Down Expand Up @@ -1850,7 +1850,7 @@ cat_set_childlinkbit(struct hfsmount *hfsmp, cnid_t cnid)
lockflags = hfs_systemfile_lock(hfsmp, SFL_CATALOG, HFS_EXCLUSIVE_LOCK);

/* Look up our catalog folder record */
retval = cat_idlookup(hfsmp, cnid, 0, &desc, &attr, NULL);
retval = cat_idlookup(hfsmp, cnid, 0, 0, &desc, &attr, NULL);
if (retval) {
hfs_systemfile_unlock(hfsmp, lockflags);
hfs_end_transaction(hfsmp);
Expand Down
3 changes: 2 additions & 1 deletion bsd/hfs/hfs_catalog.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002-2007 Apple Inc. All rights reserved.
* Copyright (c) 2002-2013 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
Expand Down Expand Up @@ -296,6 +296,7 @@ extern int cat_lookup ( struct hfsmount *hfsmp,
extern int cat_idlookup (struct hfsmount *hfsmp,
cnid_t cnid,
int allow_system_files,
int wantrsrc,
struct cat_desc *outdescp,
struct cat_attr *attrp,
struct cat_fork *forkp);
Expand Down
11 changes: 9 additions & 2 deletions bsd/hfs/hfs_cnode.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002-2012 Apple Inc. All rights reserved.
* Copyright (c) 2002-2013 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
Expand Down Expand Up @@ -999,6 +999,13 @@ hfs_getnewvnode(
issystemfile = (descp->cd_flags & CD_ISMETA) && (vtype == VREG);
wantrsrc = flags & GNV_WANTRSRC;

/* Sanity check the vtype and mode */
if (vtype == VBAD) {
/* Mark the FS as corrupt and bail out */
hfs_mark_volume_inconsistent(hfsmp);
return (EINVAL);
}

/* Zero out the out_flags */
*out_flags = 0;

Expand Down Expand Up @@ -1543,7 +1550,7 @@ hfs_valid_cnode(struct hfsmount *hfsmp, struct vnode *dvp, struct componentname
}
}
} else {
if (cat_idlookup(hfsmp, cnid, 0, NULL, NULL, NULL) == 0) {
if (cat_idlookup(hfsmp, cnid, 0, 0, NULL, NULL, NULL) == 0) {
stillvalid = 1;
*error = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions bsd/hfs/hfs_link.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2010 Apple Inc. All rights reserved.
* Copyright (c) 1999-2013 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
Expand Down Expand Up @@ -539,7 +539,7 @@ hfs_vnop_link(struct vnop_link_args *ap)
struct cat_attr cattr;

/* If inode is missing then we lost a race with unlink. */
if ((cat_idlookup(hfsmp, cp->c_fileid, 0, NULL, &cattr, NULL) != 0) ||
if ((cat_idlookup(hfsmp, cp->c_fileid, 0, 0, NULL, &cattr, NULL) != 0) ||
(cattr.ca_fileid != cp->c_fileid)) {
error = ENOENT;
goto out;
Expand Down
12 changes: 6 additions & 6 deletions bsd/hfs/hfs_vfsops.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2012 Apple Inc. All rights reserved.
* Copyright (c) 1999-2013 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
Expand Down Expand Up @@ -824,7 +824,7 @@ hfs_reload_callback(struct vnode *vp, void *cargs)

/* lookup by fileID since name could have changed */
lockflags = hfs_systemfile_lock(args->hfsmp, SFL_CATALOG, HFS_SHARED_LOCK);
args->error = cat_idlookup(args->hfsmp, cp->c_fileid, 0, &desc, &cp->c_attr, datafork);
args->error = cat_idlookup(args->hfsmp, cp->c_fileid, 0, 0, &desc, &cp->c_attr, datafork);
hfs_systemfile_unlock(args->hfsmp, lockflags);
if (args->error) {
return (VNODE_RETURNED_DONE);
Expand Down Expand Up @@ -1005,7 +1005,7 @@ hfs_reload(struct mount *mountp)
}

/* Reload the volume name */
if ((error = cat_idlookup(hfsmp, kHFSRootFolderID, 0, &cndesc, NULL, NULL)))
if ((error = cat_idlookup(hfsmp, kHFSRootFolderID, 0, 0, &cndesc, NULL, NULL)))
return (error);
vcb->volumeNameEncodingHint = cndesc.cd_encoding;
bcopy(cndesc.cd_nameptr, vcb->vcbVN, min(255, cndesc.cd_namelen));
Expand Down Expand Up @@ -3279,7 +3279,7 @@ hfs_vget(struct hfsmount *hfsmp, cnid_t cnid, struct vnode **vpp, int skiplock,
const char *nameptr;

lockflags = hfs_systemfile_lock(hfsmp, SFL_CATALOG, HFS_SHARED_LOCK);
error = cat_idlookup(hfsmp, cnid, 0, &cndesc, &cnattr, &cnfork);
error = cat_idlookup(hfsmp, cnid, 0, 0, &cndesc, &cnattr, &cnfork);
hfs_systemfile_unlock(hfsmp, lockflags);

if (error) {
Expand Down Expand Up @@ -6272,7 +6272,7 @@ hfs_relocate_journal_file(struct hfsmount *hfsmp, u_int32_t jnl_size, int resize
goto free_fail;
}

error = cat_idlookup(hfsmp, hfsmp->hfs_jnlfileid, 1, &journal_desc, &journal_attr, &journal_fork);
error = cat_idlookup(hfsmp, hfsmp->hfs_jnlfileid, 1, 0, &journal_desc, &journal_attr, &journal_fork);
if (error) {
printf("hfs_relocate_journal_file: cat_idlookup returned %d\n", error);
goto free_fail;
Expand Down Expand Up @@ -6489,7 +6489,7 @@ hfs_reclaim_journal_info_block(struct hfsmount *hfsmp, u_int32_t allocLimit, vfs
}

/* Update the catalog record for .journal_info_block */
error = cat_idlookup(hfsmp, hfsmp->hfs_jnlinfoblkid, 1, &jib_desc, &jib_attr, &jib_fork);
error = cat_idlookup(hfsmp, hfsmp->hfs_jnlinfoblkid, 1, 0, &jib_desc, &jib_attr, &jib_fork);
if (error) {
printf("hfs_reclaim_journal_info_block: cat_idlookup returned %d\n", error);
goto fail;
Expand Down
6 changes: 3 additions & 3 deletions bsd/hfs/hfs_vfsutils.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000-2010 Apple Inc. All rights reserved.
* Copyright (c) 2000-2013 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
Expand Down Expand Up @@ -270,7 +270,7 @@ OSErr hfs_MountHFSVolume(struct hfsmount *hfsmp, HFSMasterDirectoryBlock *mdb,
vcb->vcbAtrb &= ~kHFSVolumeUnmountedMask;

if (error == noErr) {
error = cat_idlookup(hfsmp, kHFSRootFolderID, 0, NULL, NULL, NULL);
error = cat_idlookup(hfsmp, kHFSRootFolderID, 0, 0, NULL, NULL, NULL);
if (HFS_MOUNT_DEBUG) {
printf("hfs_mounthfs (std): error looking up root folder (%d) \n", error);
}
Expand Down Expand Up @@ -663,7 +663,7 @@ OSErr hfs_MountHFSPlusVolume(struct hfsmount *hfsmp, HFSPlusVolumeHeader *vhp,
}

/* Pick up volume name and create date */
retval = cat_idlookup(hfsmp, kHFSRootFolderID, 0, &cndesc, &cnattr, NULL);
retval = cat_idlookup(hfsmp, kHFSRootFolderID, 0, 0, &cndesc, &cnattr, NULL);
if (retval) {
if (HFS_MOUNT_DEBUG) {
printf("hfs_mounthfsplus: cat_idlookup returned (%d) getting rootfolder \n", retval);
Expand Down
Loading

0 comments on commit 74d6983

Please sign in to comment.