Source-Changes-HG archive

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

[src/netbsd-7-1]: src/sys/arch/sparc64/sparc64 Pull up following revision(s) ...



details:   https://anonhg.NetBSD.org/src/rev/6d793dc09af4
branches:  netbsd-7-1
changeset: 800796:6d793dc09af4
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Sep 04 16:08:30 2017 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1504):
        sys/arch/sparc64/sparc64/compat_13_machdep.c: revision 1.24
Apply only CCR. Otherwise userland could set PSTATE_PRIV in %pstate and get
kernel privileges on the hardware.
ok martin

diffstat:

 sys/arch/sparc64/sparc64/compat_13_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 76869b056fd5 -r 6d793dc09af4 sys/arch/sparc64/sparc64/compat_13_machdep.c
--- a/sys/arch/sparc64/sparc64/compat_13_machdep.c      Sun Aug 27 05:46:11 2017 +0000
+++ b/sys/arch/sparc64/sparc64/compat_13_machdep.c      Mon Sep 04 16:08:30 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_13_machdep.c,v 1.23 2009/11/21 04:16:52 rmind Exp $     */
+/*     $NetBSD: compat_13_machdep.c,v 1.23.50.1 2017/09/04 16:08:30 snj Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.23 2009/11/21 04:16:52 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.23.50.1 2017/09/04 16:08:30 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -129,7 +129,7 @@
                return (EINVAL);
        /* take only psr ICC field */
 #ifdef __arch64__
-       tf->tf_tstate = (int64_t)(tf->tf_tstate & ~TSTATE_CCR) | scp->sc_tstate;
+       tf->tf_tstate = (int64_t)(tf->tf_tstate & ~TSTATE_CCR) | (scp->sc_tstate & TSTATE_CCR);
 #else
        tf->tf_tstate = (int64_t)(tf->tf_tstate & ~TSTATE_CCR) | PSRCC_TO_TSTATE(scp->sc_psr);
 #endif



Home | Main Index | Thread Index | Old Index