[SSI] openssi/kernel/arch/x86_64/kernel ldt.c, 1.1, 1.2 process.c, 1.1, 1.2 ptrace.c, 1.2, 1.3 x8664_ksyms.c, 1.2, 1.3
John Hughes <[email protected]> Mon, 15 Feb 2010 16:51:41 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/arch/x86_64/kernel
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv29261/arch/x86_64/kernel
Modified Files:
Tag: OPENSSI-DEBIAN
ldt.c process.c ptrace.c x8664_ksyms.c
Log Message:
Patch VANILLA x86_64 files for OpenSSI
Index: ldt.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/arch/x86_64/kernel/ldt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ldt.c 13 Feb 2010 13:46:35 -0000 1.1
+++ ldt.c 15 Feb 2010 16:51:39 -0000 1.2
@@ -81,7 +81,10 @@
return 0;
}
-static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
+#ifndef CONFIG_SSI
+static
+#endif
+inline int copy_ldt(mm_context_t *new, mm_context_t *old)
{
int err = alloc_ldt(new, old->size, 0);
if (err < 0)
Index: process.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/arch/x86_64/kernel/process.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- process.c 13 Feb 2010 13:46:35 -0000 1.1
+++ process.c 15 Feb 2010 16:51:39 -0000 1.2
@@ -50,7 +50,11 @@
asmlinkage extern void ret_from_fork(void);
+#ifdef CONFIG_SSI
+unsigned long kernel_thread_flags = IS_KTHREAD | CLONE_VM | CLONE_UNTRACED;
+#else
unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
+#endif
atomic_t hlt_counter = ATOMIC_INIT(0);
Index: ptrace.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/arch/x86_64/kernel/ptrace.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ptrace.c 15 Feb 2010 16:48:43 -0000 1.2
+++ ptrace.c 15 Feb 2010 16:51:39 -0000 1.3
@@ -18,6 +18,10 @@
#include <linux/security.h>
#include <linux/audit.h>
+#ifdef CONFIG_SSI
+#include <linux/vproc.h>
+#endif
+
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/system.h>
@@ -193,9 +197,15 @@
/* are we already being traced? */
if (current->ptrace & PT_PTRACED)
goto out;
+#ifndef CONFIG_SSI
+ /*
+ * SSI_XXX ssi doesn't support CONFIG_SECURITY NOW and we
+ * don't have the parent.
+ */
ret = security_ptrace(current->parent, current);
if (ret)
goto out;
+#endif
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
ret = 0;
@@ -208,8 +218,24 @@
get_task_struct(child);
read_unlock(&tasklist_lock);
if (!child)
+#ifdef CONFIG_SSI
+ {
+ struct vproc *vp = LOCATE_VPROC_PID(pid, "sys_ptrace");
+ int dummy;
+ long tmpret;
+
+ if (!vp)
+ goto out;
+ (void)VPOP_PTRACE(vp, request, addr, data, &dummy, &tmpret);
+ ret = tmpret;
+ VPROC_RELE(vp, "sys_ptrace");
goto out;
+ }
+#else
+ goto out;
+#endif
+
ret = -EPERM;
if (pid == 1) /* you may not mess with init */
goto out_tsk;
@@ -354,6 +380,9 @@
tmp &= ~TRAP_FLAG;
put_stack_long(child, EFL_OFFSET,tmp);
wake_up_process(child);
+#ifdef CONFIG_VPROC
+ VPOP_NOTIFY_PARENT(child->p_vproc, 0, 0);
+#endif
ret = 0;
break;
}
@@ -405,6 +434,9 @@
tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
put_stack_long(child, EFL_OFFSET, tmp);
wake_up_process(child);
+#ifdef CONFIG_VPROC
+ VPOP_NOTIFY_PARENT(child->p_vproc, 0, 0);
+#endif
break;
}
@@ -425,6 +457,9 @@
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
+#ifdef CONFIG_VPROC
+ VPOP_NOTIFY_PARENT(child->p_vproc, 0, 0);
+#endif
ret = 0;
break;
}
Index: x8664_ksyms.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/arch/x86_64/kernel/x8664_ksyms.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- x8664_ksyms.c 15 Feb 2010 16:48:43 -0000 1.2
+++ x8664_ksyms.c 15 Feb 2010 16:51:39 -0000 1.3
@@ -57,7 +57,11 @@
EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(disable_irq_nosync);
EXPORT_SYMBOL(probe_irq_mask);
+#ifdef CONFIG_SSI
+EXPORT_SYMBOL(__kernel_thread_with_pid);
+#else
EXPORT_SYMBOL(kernel_thread);
+#endif
EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(get_cmos_time);
@@ -87,15 +91,26 @@
EXPORT_SYMBOL(strpbrk);
EXPORT_SYMBOL(strstr);
+#ifdef CONFIG_SSI
+EXPORT_SYMBOL(strncpy_from_user_lcl);
+EXPORT_SYMBOL(__strncpy_from_user_lcl);
+EXPORT_SYMBOL(clear_user_lcl);
+EXPORT_SYMBOL(__clear_user_lcl);
+EXPORT_SYMBOL(copy_from_user_lcl);
+EXPORT_SYMBOL(copy_to_user_lcl);
+EXPORT_SYMBOL(strnlen_user_lcl);
+#else
EXPORT_SYMBOL(strncpy_from_user);
EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(clear_user);
EXPORT_SYMBOL(__clear_user);
-EXPORT_SYMBOL(copy_user_generic);
EXPORT_SYMBOL(copy_from_user);
EXPORT_SYMBOL(copy_to_user);
-EXPORT_SYMBOL(copy_in_user);
EXPORT_SYMBOL(strnlen_user);
+#endif
+
+EXPORT_SYMBOL(copy_in_user);
+EXPORT_SYMBOL(copy_user_generic);
#ifdef CONFIG_PCI
EXPORT_SYMBOL(pci_alloc_consistent);
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev