From 1f75ae3d8ea333a43c6ae5c3bd7622221549ab46 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Thu, 14 Jun 2007 14:27:47 +0000 Subject: When macppc was switched to __HAVE_VM_PAGE_MD, data structures were incorrectly exposed to userland, protect with _KERNEL. Tested by Antoine Jacoutot --- sys/arch/macppc/include/vmparam.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/arch/macppc/include/vmparam.h b/sys/arch/macppc/include/vmparam.h index 9ace5e9b546..ab20ab911a9 100644 --- a/sys/arch/macppc/include/vmparam.h +++ b/sys/arch/macppc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.18 2007/05/27 15:46:02 drahn Exp $ */ +/* $OpenBSD: vmparam.h,v 1.19 2007/06/14 14:27:46 drahn Exp $ */ /* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ /*- @@ -96,6 +96,8 @@ extern vaddr_t ppc_kvm_stolen; #define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 +#ifdef _KERNEL + #define __HAVE_VM_PAGE_MD struct pv_entry; struct vm_page_md { @@ -106,5 +108,7 @@ struct vm_page_md { LIST_INIT(&((pg)->mdpage.pv_list)); \ } while (0) +#endif + #endif -- cgit v1.2.3