Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/arch/mips Do not restore SR on sigreturn: t...
details: https://anonhg.NetBSD.org/src/rev/c76ac7f6f49d
branches: trunk
changeset: 525704:c76ac7f6f49d
user: manu <manu%NetBSD.org@localhost>
date: Mon Apr 15 20:48:12 2002 +0000
description:
Do not restore SR on sigreturn: this could enable the user process to gain
unpropre privileges.
diffstat:
sys/compat/linux/arch/mips/linux_machdep.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 5d92406f4b42 -r c76ac7f6f49d sys/compat/linux/arch/mips/linux_machdep.c
--- a/sys/compat/linux/arch/mips/linux_machdep.c Mon Apr 15 20:42:37 2002 +0000
+++ b/sys/compat/linux/arch/mips/linux_machdep.c Mon Apr 15 20:48:12 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.12 2002/03/31 22:22:46 christos Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.13 2002/04/15 20:48:12 manu Exp $ */
/*-
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.12 2002/03/31 22:22:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.13 2002/04/15 20:48:12 manu Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -181,9 +181,9 @@
sf.lsf_sc.lsc_mdhi = f->f_regs[MULHI];
sf.lsf_sc.lsc_mdlo = f->f_regs[MULLO];
sf.lsf_sc.lsc_pc = f->f_regs[PC];
- sf.lsf_sc.lsc_status = f->f_regs[SR]; /* XXX */
+ sf.lsf_sc.lsc_status = f->f_regs[SR];
sf.lsf_sc.lsc_cause = f->f_regs[CAUSE];
- sf.lsf_sc.lsc_badvaddr = f->f_regs[BADVADDR]; /* XXX */
+ sf.lsf_sc.lsc_badvaddr = f->f_regs[BADVADDR];
/*
* Save signal stack. XXX broken
@@ -270,7 +270,6 @@
f->f_regs[PC] = ksf.lsf_sc.lsc_pc;
f->f_regs[BADVADDR] = ksf.lsf_sc.lsc_badvaddr;
f->f_regs[CAUSE] = ksf.lsf_sc.lsc_cause;
- f->f_regs[SR] = ksf.lsf_sc.lsc_status;
/* Restore signal stack. */
p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;
Home |
Main Index |
Thread Index |
Old Index