Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/kern/lib/libsysproxy rump libsysproxy: More workaro...



details:   https://anonhg.NetBSD.org/src/rev/d9a31997c69d
branches:  trunk
changeset: 369549:d9a31997c69d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Aug 21 10:24:23 2022 +0000

description:
rump libsysproxy: More workarounds for pmap abuse.

diffstat:

 sys/rump/kern/lib/libsysproxy/sysproxy.c |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 85baf8d51fe3 -r d9a31997c69d sys/rump/kern/lib/libsysproxy/sysproxy.c
--- a/sys/rump/kern/lib/libsysproxy/sysproxy.c  Sun Aug 21 10:18:20 2022 +0000
+++ b/sys/rump/kern/lib/libsysproxy/sysproxy.c  Sun Aug 21 10:24:23 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysproxy.c,v 1.8 2019/10/06 15:11:17 uwe Exp $ */
+/*     $NetBSD: sysproxy.c,v 1.9 2022/08/21 10:24:23 riastradh Exp $   */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysproxy.c,v 1.8 2019/10/06 15:11:17 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysproxy.c,v 1.9 2022/08/21 10:24:23 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/filedesc.h>
@@ -38,6 +38,19 @@
 #include <sys/lockdebug.h>
 #include <sys/psref.h>
 
+#if defined(__i386__) || defined(__x86_64__)
+/*
+ * This file abuses the pmap abstraction to create its own statically
+ * allocated struct pmap object, even though it can't do anything
+ * useful with such a thing from userland.  On x86 the struct pmap
+ * definition is private, so we have to go to extra effort to abuse it
+ * there.  This should be fixed -- all of the struct pmap definitions
+ * should be private, and then rump can furnish its own fake struct
+ * pmap without clashing with anything.
+ */
+#include <machine/pmap_private.h>
+#endif
+
 #define _RUMP_SYSPROXY
 #include <rump/rumpuser.h>
 



Home | Main Index | Thread Index | Old Index