rpms/kernel/F-9 linux-sparc-tracehook-syscall.patch, NONE, 1.1 config-sparc64-generic, 1.16, 1.17 kernel.spec, 1.794, 1.795

Dennis Gilmore ausil at fedoraproject.org
Sat Oct 11 14:51:03 UTC 2008


Author: ausil

Update of /cvs/extras/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2017

Modified Files:
	config-sparc64-generic kernel.spec 
Added Files:
	linux-sparc-tracehook-syscall.patch 
Log Message:
disable atl1e on sparc64 and backport syscall tracing to use the new tracehook.h entry points from 2.6.27


linux-sparc-tracehook-syscall.patch:

--- NEW FILE linux-sparc-tracehook-syscall.patch ---
diff -uNr linux-2.6.26.noarch/arch/sparc64-orig/kernel/entry.h linux-2.6.26.noarch/arch/sparc64/kernel/entry.h
--- linux-2.6.26.noarch/arch/sparc64-orig/kernel/entry.h	2008-10-10 23:48:00.000000000 -0500
+++ linux-2.6.26.noarch/arch/sparc64/kernel/entry.h	2008-10-10 23:48:34.000000000 -0500
@@ -22,8 +22,7 @@
 			     unsigned long orig_i0,
 			     unsigned long thread_info_flags);
 
-extern asmlinkage void syscall_trace(struct pt_regs *regs,
-				     int syscall_exit_p);
+extern asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p);
 
 extern void bad_trap_tl1(struct pt_regs *regs, long lvl);
 
diff -uNr linux-2.6.26.noarch/arch/sparc64-orig/kernel/ptrace.c linux-2.6.26.noarch/arch/sparc64/kernel/ptrace.c
--- linux-2.6.26.noarch/arch/sparc64-orig/kernel/ptrace.c	2008-10-10 23:48:01.000000000 -0500
+++ linux-2.6.26.noarch/arch/sparc64/kernel/ptrace.c	2008-10-10 23:56:05.000000000 -0500
@@ -1050,8 +1050,10 @@
 	return ret;
 }
 
-asmlinkage void syscall_trace(struct pt_regs *regs, int syscall_exit_p)
+asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p)
 {
+	int ret = 0;
+
 	/* do the secure computing check first */
 	secure_computing(regs->u_regs[UREG_G1]);
 
@@ -1069,10 +1071,10 @@
 		if (syscall_exit_p)
 			tracehook_report_syscall_exit(regs, 0);
 		else
-			tracehook_report_syscall_entry(regs);
+			ret = tracehook_report_syscall_entry(regs);
 	}
 
-	if (unlikely(current->audit_context) && !syscall_exit_p)
+	if (unlikely(current->audit_context) && !syscall_exit_p && !ret)
 		audit_syscall_entry((test_thread_flag(TIF_32BIT) ?
 				     AUDIT_ARCH_SPARC :
 				     AUDIT_ARCH_SPARC64),
@@ -1081,4 +1083,6 @@
 				    regs->u_regs[UREG_I1],
 				    regs->u_regs[UREG_I2],
 				    regs->u_regs[UREG_I3]);
+
+	return ret;
 }
diff -uNr linux-2.6.26.noarch/arch/sparc64-orig/kernel/syscalls.S linux-2.6.26.noarch/arch/sparc64/kernel/syscalls.S
--- linux-2.6.26.noarch/arch/sparc64-orig/kernel/syscalls.S	2008-10-10 23:47:59.000000000 -0500
+++ linux-2.6.26.noarch/arch/sparc64/kernel/syscalls.S	2008-10-10 23:48:40.000000000 -0500
@@ -162,6 +162,8 @@
 	add	%sp, PTREGS_OFF, %o0
 	call	syscall_trace
 	 clr	%o1
+	brnz,pn	%o0, 3f
+	 mov	-ENOSYS, %o0
 	srl	%i0, 0, %o0
 	srl	%i4, 0, %o4
 	srl	%i1, 0, %o1
@@ -173,6 +175,8 @@
 	add	%sp, PTREGS_OFF, %o0
 	call	syscall_trace
 	 clr	%o1
+	brnz,pn	%o0, 3f
+	 mov	-ENOSYS, %o0
 	mov	%i0, %o0
 	mov	%i1, %o1
 	mov	%i2, %o2


Index: config-sparc64-generic
===================================================================
RCS file: /cvs/extras/rpms/kernel/F-9/config-sparc64-generic,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- config-sparc64-generic	4 Aug 2008 22:20:04 -0000	1.16
+++ config-sparc64-generic	11 Oct 2008 14:50:33 -0000	1.17
@@ -188,3 +188,4 @@
 
 CONFIG_NUMA=y
 
+CONFIG_ATL1E=n


Index: kernel.spec
===================================================================
RCS file: /cvs/extras/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.794
retrieving revision 1.795
diff -u -r1.794 -r1.795
--- kernel.spec	10 Oct 2008 23:19:26 -0000	1.794
+++ kernel.spec	11 Oct 2008 14:50:33 -0000	1.795
@@ -729,6 +729,10 @@
 Patch2801: linux-2.6-warn-add-WARN-macro.patch
 Patch2802: linux-2.6-warn-Turn-the-netdev-timeout-WARN_ON-into-WARN.patch
 Patch2803: linux-2.6-warn-rename-WARN-to-WARNING.patch
+
+# backported version of http://git.kernel.org/?p=linux/kernel/git/davem/sparc-2.6.git;a=commitdiff;h=73ccefab8a6590bb3d5b44c046010139108ab7ca
+# needed to build sparc64 kernel
+Patch2900: linux-sparc-tracehook-syscall.patch
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1323,6 +1327,8 @@
 ApplyPatch linux-2.6-warn-Turn-the-netdev-timeout-WARN_ON-into-WARN.patch
 ApplyPatch linux-2.6-warn-rename-WARN-to-WARNING.patch
 
+# backport syscall tracing to use the new tracehook.h entry points.
+ApplyPatch linux-sparc-tracehook-syscall.patch
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -1916,6 +1922,11 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Sat Oct 11 2008 Dennis Gilmore <dennis at ausil.us> 2.6.26.6-68
+- disable atl1e on sparc64
+- backport syscall tracing to use the new tracehook.h entry points on sparc64
+- syscall tracing patch is already upstream in 2.6.27
+
 * Fri Oct 10 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.26.6-67
 - libata: pata_marvell: use the upstream patch for playing nice with ahci
 




More information about the scm-commits mailing list