don't expose vaddr_t to userland.

This commit is contained in:
christos 2020-12-06 03:46:23 +00:00
parent 20c7f62303
commit ee7936c8ba
2 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: proc.h,v 1.32 2020/09/04 08:17:53 mrg Exp $ */
/* $NetBSD: proc.h,v 1.33 2020/12/06 03:46:23 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@ -49,7 +49,7 @@ struct trapframe;
struct mdlwp {
struct trapframe *md_utf; /* trapframe from userspace */
vaddr_t md_ss_addr; /* single step address for ptrace */
__vaddr_t md_ss_addr; /* single step address for ptrace */
int md_ss_instr; /* single step instruction for ptrace */
volatile int md_astpending; /* AST pending on return to userland */
int md_upte[UPAGES_MAX]; /* ptes for mapping u page */
@ -57,7 +57,7 @@ struct mdlwp {
struct mdproc {
/* syscall entry for this process */
void (*md_syscall)(struct lwp *, u_int, u_int, vaddr_t);
void (*md_syscall)(struct lwp *, u_int, u_int, __vaddr_t);
int md_abi; /* which ABI is this process using? */
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.72 2020/08/17 03:19:35 mrg Exp $ */
/* $NetBSD: types.h,v 1.73 2020/12/06 03:46:23 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -64,6 +64,11 @@ typedef __fpregister64_t __fpregister_t;
* the rest of the operating system as possible.
*/
#ifdef _LP64
typedef __uint64_t __vaddr_t;
#else
typedef __uint32_t __vaddr_t;
#endif
#if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
#if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64)