Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode/dev Implement dummy `cpu_mcontext_validate...



details:   https://anonhg.NetBSD.org/src/rev/68da33737476
branches:  trunk
changeset: 779885:68da33737476
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Mon Jun 25 14:43:54 2012 +0000

description:
Implement dummy `cpu_mcontext_validate' to make it compile again. This
function needs to be implemented in the target secton one day for extra
security.

diffstat:

 sys/arch/usermode/dev/cpu.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 46abbf3b4f0a -r 68da33737476 sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c       Mon Jun 25 07:22:45 2012 +0000
+++ b/sys/arch/usermode/dev/cpu.c       Mon Jun 25 14:43:54 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.70 2012/03/03 21:15:15 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.71 2012/06/25 14:43:54 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_hz.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.70 2012/03/03 21:15:15 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.71 2012/06/25 14:43:54 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -286,6 +286,16 @@
 }
 
 int
+cpu_mcontext_validate(struct lwp *l, const mcontext_t *mcp)
+{
+       /*
+        * can we check here? or should that be done in the target
+        * specific places?
+        */
+       return 0;
+}
+
+int
 cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int flags)
 {
        struct pcb *pcb = lwp_getpcb(l);



Home | Main Index | Thread Index | Old Index