--- old/usr/src/cmd/sgs/elfdump/common/struct_layout_sparc.c	2016-06-30 21:58:38.735369823 -0400
+++ new/usr/src/cmd/sgs/elfdump/common/struct_layout_sparc.c	2016-06-30 21:58:38.786352240 -0400
@@ -376,6 +376,16 @@
 };
 
 
+static const sl_prsecflags_layout_t prsecflags_layout = {
+       { 0,    20,     0,      0 },            /* sizeof (prsecflags_t) */
+       { 0,    4,      0,      0 },            /* pr_version */
+       { 4,    4,      0,      0 },            /* pr_effective */
+       { 8,    4,      0,      0 },            /* pr_inherit */
+       { 12,   4,      0,      0 },            /* pr_lower */
+       { 16,   4,      0,      0 },            /* pr_upper */
+};
+
+
 
 
 static const sl_arch_layout_t layout_sparc = {
@@ -399,6 +409,7 @@
 	&timestruc_layout,
 	&utsname_layout,
 	&prfdinfo_layout,
+	&prsecflags_layout,
 };
 
 
--- old/usr/src/cmd/sgs/elfdump/common/struct_layout_sparcv9.c	2016-06-30 21:58:39.698609069 -0400
+++ new/usr/src/cmd/sgs/elfdump/common/struct_layout_sparcv9.c	2016-06-30 21:58:39.726014925 -0400
@@ -377,6 +377,16 @@
 };
 
 
+static const sl_prsecflags_layout_t prsecflags_layout = {
+       { 0,    20,     0,      0 },            /* sizeof (prsecflags_t) */
+       { 0,    4,      0,      0 },            /* pr_version */
+       { 4,    4,      0,      0 },            /* pr_effective */
+       { 8,    4,      0,      0 },            /* pr_inherit */
+       { 12,   4,      0,      0 },            /* pr_lower */
+       { 16,   4,      0,      0 },            /* pr_upper */
+};
+
+
 
 
 static const sl_arch_layout_t layout_sparcv9 = {
@@ -400,10 +410,9 @@
 	&timestruc_layout,
 	&utsname_layout,
 	&prfdinfo_layout,
+	&prsecflags_layout,
 };
-
-
-const sl_arch_layout_t *
+ const sl_arch_layout_t *
 struct_layout_sparcv9(void)
 {
 	return (&layout_sparcv9);
--- old/usr/src/cmd/zonecfg/zonecfg.c	2016-06-30 21:58:40.522453362 -0400
+++ new/usr/src/cmd/zonecfg/zonecfg.c	2016-06-30 21:58:40.551920556 -0400
@@ -2117,18 +2117,15 @@
 
 	(void) zonecfg_endadminent(handle);
 
-	if ((err = zonecfg_getsecflagsent(handle, &secflagstab)) != Z_OK) {
-		zone_perror(zone, err, B_FALSE);
-		goto done;
+	if (zonecfg_getsecflagsent(handle, &secflagstab) == Z_OK) {
+		(void) fprintf(of, "%s %s\n", cmd_to_str(CMD_ADD),
+		    rt_to_str(RT_SECFLAGS));
+		export_prop(of, PT_DEFAULT, secflagstab.zone_secflags_default);
+		export_prop(of, PT_LOWER, secflagstab.zone_secflags_lower);
+		export_prop(of, PT_UPPER, secflagstab.zone_secflags_upper);
+		(void) fprintf(of, "%s\n", cmd_to_str(CMD_END));
 	}
 
-	(void) fprintf(of, "%s %s\n", cmd_to_str(CMD_ADD),
-	    rt_to_str(RT_SECFLAGS));
-	export_prop(of, PT_DEFAULT, secflagstab.zone_secflags_default);
-	export_prop(of, PT_LOWER, secflagstab.zone_secflags_lower);
-	export_prop(of, PT_UPPER, secflagstab.zone_secflags_upper);
-	(void) fprintf(of, "%s\n", cmd_to_str(CMD_END));
-
 	/*
 	 * There is nothing to export for pcap since this resource is just
 	 * a container for an rctl alias.
@@ -5624,14 +5621,10 @@
 info_secflags(zone_dochandle_t handle, FILE *fp)
 {
 	struct zone_secflagstab sftab;
-	int err;
 
-	if ((err = zonecfg_lookup_secflags(handle, &sftab)) != Z_OK) {
-		zone_perror(zone, err, B_TRUE);
-		return;
+	if (zonecfg_lookup_secflags(handle, &sftab) == Z_OK) {
+		output_secflags(fp, &sftab);
 	}
-
-	output_secflags(fp, &sftab);
 }
 
 void
@@ -6393,18 +6386,15 @@
 	}
 	(void) zonecfg_endadminent(handle);
 
-	if ((err = zonecfg_getsecflagsent(handle, &secflagstab)) != Z_OK) {
-		zone_perror(zone, err, B_TRUE);
-		return;
-	}
-
-	/*
-	 * No properties are required, but any specified should be
-	 * valid
-	 */
-	if (verify_secflags(&secflagstab) != B_TRUE) {
-		/* Error is reported from verify_secflags */
-		ret_val = Z_BAD_PROPERTY;
+	if (zonecfg_getsecflagsent(handle, &secflagstab) == Z_OK) {
+		/*
+		 * No properties are required, but any specified should be
+		 * valid
+		 */
+		if (verify_secflags(&secflagstab) != B_TRUE) {
+			/* Error is reported from verify_secflags */
+			ret_val = Z_BAD_PROPERTY;
+		}
 	}
 
 	if (!global_scope) {
--- old/usr/src/man/man3proc/Makefile	2016-06-30 21:58:42.435295933 -0400
+++ new/usr/src/man/man3proc/Makefile	2016-06-30 21:58:42.463691144 -0400
@@ -135,6 +135,7 @@
 		proc_str2fltset.3proc		\
 		proc_unctrl_psinfo.3proc	\
 		proc_walk.3proc			\
+		Psecflags.3proc			\
 		Psetbkpt.3proc			\
 		Psetcred.3proc			\
 		Psetfault.3proc			\
--- old/usr/src/pkg/manifests/system-library.man3proc.inc	2016-06-30 21:58:43.382668203 -0400
+++ new/usr/src/pkg/manifests/system-library.man3proc.inc	2016-06-30 21:58:43.410527333 -0400
@@ -128,6 +128,7 @@
 file path=usr/share/man/man3proc/proc_str2fltset.3proc
 file path=usr/share/man/man3proc/proc_unctrl_psinfo.3proc
 file path=usr/share/man/man3proc/proc_walk.3proc
+file path=usr/share/man/man3proc/Psecflags.3proc
 file path=usr/share/man/man3proc/Psetbkpt.3proc
 file path=usr/share/man/man3proc/Psetcred.3proc
 file path=usr/share/man/man3proc/Psetfault.3proc
--- old/usr/src/test/os-tests/tests/secflags/secflags_zonecfg.sh	2016-06-30 21:58:44.176070279 -0400
+++ new/usr/src/test/os-tests/tests/secflags/secflags_zonecfg.sh	2016-06-30 21:58:44.204360547 -0400
@@ -83,6 +83,10 @@
 
 ret=0
 
+expect_success valid-no-config <<EOF
+EOF
+(( $? != 0 )) && ret=1
+
 expect_success valid-full-config <<EOF
 add security-flags
 set lower=none
--- old/usr/src/uts/common/os/sysent.c	2016-06-30 21:58:44.965488229 -0400
+++ new/usr/src/uts/common/os/sysent.c	2016-06-30 21:58:44.993768444 -0400
@@ -63,7 +63,7 @@
 int	auditsys(struct auditcalls *, rval_t *);
 int64_t	brandsys(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t,
     uintptr_t);
-int	brk(caddr_t);
+intptr_t	brk(caddr_t);
 int	chdir(char *);
 int	chmod(char *, int);
 int	chown(char *, uid_t, gid_t);
--- old/usr/src/uts/sun4u/vm/mach_vm_dep.c	2016-06-30 21:58:45.926590926 -0400
+++ new/usr/src/uts/sun4u/vm/mach_vm_dep.c	2016-06-30 21:58:45.954442287 -0400
@@ -315,8 +315,7 @@
 			 */
 			maxslew = MIN(maxslew, (addr - errata57_limit));
 
-			slew = slew % MIN(MIN(aslr_max_map_skew, (addr - base)),
-			    addr - errata57_limit);
+			slew = slew % maxslew;
 			addr -= P2ALIGN(slew, align_amount);
 		}
 
