Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Only copyin/copyout from and to user addr...
details: https://anonhg.NetBSD.org/src/rev/ee6cbf393a15
branches: trunk
changeset: 373584:ee6cbf393a15
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Feb 19 10:48:06 2023 +0000
description:
Only copyin/copyout from and to user addresses.
diffstat:
sys/arch/mips/mips/db_interface.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r a879ec2de864 -r ee6cbf393a15 sys/arch/mips/mips/db_interface.c
--- a/sys/arch/mips/mips/db_interface.c Sun Feb 19 07:20:44 2023 +0000
+++ b/sys/arch/mips/mips/db_interface.c Sun Feb 19 10:48:06 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.97 2022/10/26 23:38:08 riastradh Exp $ */
+/* $NetBSD: db_interface.c,v 1.98 2023/02/19 10:48:06 mlelstv Exp $ */
/*
* Mach Operating System
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.97 2022/10/26 23:38:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.98 2023/02/19 10:48:06 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_multiprocessor.h"
@@ -190,7 +190,7 @@
* Note that MIPS_KSEG0_START is the proper address for
* both 32-bit and 64-bit kernels.
*/
- if (addr < (vaddr_t)MIPS_KSEG0_START) {
+ if (addr < VM_MAXUSER_ADDRESS) {
err = copyin(src, data, size);
if (err) {
#ifdef DDB
@@ -228,7 +228,7 @@
int err;
/* If asked to fetch from userspace, do it safely */
- if (addr < (vaddr_t)MIPS_KSEG0_START) {
+ if (addr < VM_MAXUSER_ADDRESS) {
err = copyout(data, p, size);
if (err) {
#ifdef DDB
Home |
Main Index |
Thread Index |
Old Index