Jesse Keating 7a3296
diff -up linux-2.6.24.sparc64/security/selinux/hooks.c.BAD linux-2.6.24.sparc64/security/selinux/hooks.c
Jesse Keating 7a3296
--- linux-2.6.24.sparc64/security/selinux/hooks.c.BAD	2008-03-21 14:28:06.000000000 -0400
Jesse Keating 7a3296
+++ linux-2.6.24.sparc64/security/selinux/hooks.c	2008-03-21 14:29:10.000000000 -0400
Jesse Keating 7a3296
@@ -3018,6 +3018,7 @@ static int file_map_prot_check(struct fi
Jesse Keating 7a3296
 	const struct cred *cred = current_cred();
Jesse Keating 7a3296
 	int rc = 0;
Jesse Keating 7a3296
 
Jesse Keating 7a3296
+#ifndef CONFIG_SPARC
Jesse Keating 7a3296
 	if ((prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) {
Jesse Keating 7a3296
 		/*
Jesse Keating 7a3296
 		 * We are making executable an anonymous mapping or a
Jesse Keating 7a3296
@@ -3028,6 +3029,7 @@ static int file_map_prot_check(struct fi
Jesse Keating 7a3296
 		if (rc)
Jesse Keating 7a3296
 			goto error;
Jesse Keating 7a3296
 	}
Jesse Keating 7a3296
+#endif
Jesse Keating 7a3296
 
Jesse Keating 7a3296
 	if (file) {
Jesse Keating 7a3296
 		/* read access is always possible with a mapping */
Jesse Keating 7a3296
@@ -3081,6 +3081,7 @@ static int selinux_file_mprotect(struct 
Jesse Keating 7a3296
 	if (selinux_checkreqprot)
Jesse Keating 7a3296
 		prot = reqprot;
Jesse Keating 7a3296
 
Jesse Keating 7a3296
+#ifndef CONFIG_SPARC
Jesse Keating 7a3296
 	if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) {
Jesse Keating 7a3296
 		rc = 0;
Jesse Keating 7a3296
 		if (vma->vm_start >= vma->vm_mm->start_brk &&
Jesse Keating 7a3296
@@ -3103,6 +3103,7 @@ static int selinux_file_mprotect(struct 
Jesse Keating 7a3296
 		if (rc)
Jesse Keating 7a3296
 			return rc;
Jesse Keating 7a3296
 	}
Jesse Keating 7a3296
+#endif
Jesse Keating 7a3296
 
Jesse Keating 7a3296
 	return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED);
Jesse Keating 7a3296
 }