CVS commit: src/sys/rump/kern/lib/libsysproxy

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:24:23 UTC 2022

Modified Files:
src/sys/rump/kern/lib/libsysproxy: sysproxy.c

Log Message:
rump libsysproxy: More workarounds for pmap abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/kern/lib/libsysproxy/sysproxy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/kern/lib/libsysproxy

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:24:23 UTC 2022

Modified Files:
src/sys/rump/kern/lib/libsysproxy: sysproxy.c

Log Message:
rump libsysproxy: More workarounds for pmap abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/kern/lib/libsysproxy/sysproxy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/kern/lib/libsysproxy/sysproxy.c
diff -u src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.8 src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.9
--- src/sys/rump/kern/lib/libsysproxy/sysproxy.c:1.8	Sun Oct  6 15:11:17 2019
+++ src/sys/rump/kern/lib/libsysproxy/sysproxy.c	Sun Aug 21 10:24:23 2022
@@ -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 
-__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 
 #include 
@@ -38,6 +38,19 @@ __KERNEL_RCSID(0, "$NetBSD: sysproxy.c,v
 #include 
 #include 
 
+#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 
+#endif
+
 #define _RUMP_SYSPROXY
 #include 
 



CVS commit: src/sys/rump/kern/lib/libcrypto

2021-08-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 21 09:08:55 UTC 2021

Modified Files:
src/sys/rump/kern/lib/libcrypto: Makefile

Log Message:
rename glue.c to sodium_module.c


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/kern/lib/libcrypto/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/kern/lib/libcrypto/Makefile
diff -u src/sys/rump/kern/lib/libcrypto/Makefile:1.22 src/sys/rump/kern/lib/libcrypto/Makefile:1.23
--- src/sys/rump/kern/lib/libcrypto/Makefile:1.22	Sat Aug 21 04:47:23 2021
+++ src/sys/rump/kern/lib/libcrypto/Makefile	Sat Aug 21 05:08:55 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2021/08/21 08:47:23 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2021/08/21 09:08:55 christos Exp $
 #
 
 S=${.CURDIR}/../../../..
@@ -80,7 +80,7 @@ SODIUM_SRCS+=	aead_xchacha20poly1305.c
 SODIUM_SRCS+=	aead_chacha20poly1305.c
 SODIUM_SRCS+=	core_hchacha20.c
 SODIUM_SRCS+=	ed25519_ref10.c
-SODIUM_SRCS+=	glue.c
+SODIUM_SRCS+=	sodium_module.c
 
 SRCS+=	${SODIUM_SRCS}
 



CVS commit: src/sys/rump/kern/lib/libcrypto

2021-08-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 21 09:08:55 UTC 2021

Modified Files:
src/sys/rump/kern/lib/libcrypto: Makefile

Log Message:
rename glue.c to sodium_module.c


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/kern/lib/libcrypto/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/kern/lib/libcrypto

2021-08-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 21 08:47:23 UTC 2021

Modified Files:
src/sys/rump/kern/lib/libcrypto: Makefile

Log Message:
Add glue.c for libsodium (suggested by riastradh). Tidy up.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/kern/lib/libcrypto/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/kern/lib/libcrypto

2021-08-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Aug 21 08:47:23 UTC 2021

Modified Files:
src/sys/rump/kern/lib/libcrypto: Makefile

Log Message:
Add glue.c for libsodium (suggested by riastradh). Tidy up.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/kern/lib/libcrypto/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/kern/lib/libcrypto/Makefile
diff -u src/sys/rump/kern/lib/libcrypto/Makefile:1.21 src/sys/rump/kern/lib/libcrypto/Makefile:1.22
--- src/sys/rump/kern/lib/libcrypto/Makefile:1.21	Thu Aug 27 10:01:36 2020
+++ src/sys/rump/kern/lib/libcrypto/Makefile	Sat Aug 21 04:47:23 2021
@@ -1,16 +1,17 @@
-#	$NetBSD: Makefile,v 1.21 2020/08/27 14:01:36 riastradh Exp $
+#	$NetBSD: Makefile,v 1.22 2021/08/21 08:47:23 christos Exp $
 #
 
-SODIUM_IMPORTDIR=${.CURDIR}/../../../../external/isc/libsodium
-SODIUM_DIR=${.CURDIR}/../../../../external/isc/libsodium/dist/src/libsodium
-
-.PATH:	${.CURDIR}/../../../../crypto/adiantum\
-	${.CURDIR}/../../../../crypto/aes\
-	${.CURDIR}/../../../../crypto/blowfish\
-	${.CURDIR}/../../../../crypto/camellia\
-	${.CURDIR}/../../../../crypto/cast128\
-	${.CURDIR}/../../../../crypto/des\
-	${.CURDIR}/../../../../crypto/skipjack\
+S=${.CURDIR}/../../../..
+SODIUM_IMPORTDIR=${S}/external/isc/libsodium
+SODIUM_DIR=${SODIUM_IMPORTDIR}/dist/src/libsodium
+
+.PATH:	${S}/crypto/adiantum		\
+	${S}/crypto/aes			\
+	${S}/crypto/blowfish		\
+	${S}/crypto/camellia		\
+	${S}/crypto/cast128		\
+	${S}/crypto/des			\
+	${S}/crypto/skipjack		\
 	${SODIUM_DIR}/crypto_scalarmult/curve25519/ref10		\
 	${SODIUM_DIR}/crypto_scalarmult/curve25519			\
 	${SODIUM_DIR}/crypto_scalarmult	\
@@ -22,7 +23,8 @@ SODIUM_DIR=${.CURDIR}/../../../../extern
 	${SODIUM_DIR}/crypto_aead/xchacha20poly1305/sodium		\
 	${SODIUM_DIR}/crypto_aead/chacha20poly1305/sodium		\
 	${SODIUM_DIR}/crypto_core/hchacha20\
-	${SODIUM_DIR}/crypto_core/ed25519/ref10
+	${SODIUM_DIR}/crypto_core/ed25519/ref10\
+	${SODIUM_IMPORTDIR}/src
 
 LIB=	rumpkern_crypto
 COMMENT=Cryptographic routines
@@ -78,6 +80,7 @@ SODIUM_SRCS+=	aead_xchacha20poly1305.c
 SODIUM_SRCS+=	aead_chacha20poly1305.c
 SODIUM_SRCS+=	core_hchacha20.c
 SODIUM_SRCS+=	ed25519_ref10.c
+SODIUM_SRCS+=	glue.c
 
 SRCS+=	${SODIUM_SRCS}
 



CVS commit: src/sys/rump/kern/lib

2019-09-11 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Wed Sep 11 20:31:30 UTC 2019

Modified Files:
src/sys/rump/kern/lib/libsys_cygwin: syscalls.conf
src/sys/rump/kern/lib/libsys_linux: syscalls.conf
src/sys/rump/kern/lib/libsys_sunos: syscalls.conf

Log Message:
define sysautoload here too, to catch up with kern/makesyscalls.sh r1.173
XXX: This needs to be re-thought


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libsys_linux/syscalls.conf
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_sunos/syscalls.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/kern/lib

2019-09-11 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Wed Sep 11 20:31:30 UTC 2019

Modified Files:
src/sys/rump/kern/lib/libsys_cygwin: syscalls.conf
src/sys/rump/kern/lib/libsys_linux: syscalls.conf
src/sys/rump/kern/lib/libsys_sunos: syscalls.conf

Log Message:
define sysautoload here too, to catch up with kern/makesyscalls.sh r1.173
XXX: This needs to be re-thought


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libsys_linux/syscalls.conf
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_sunos/syscalls.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf
diff -u src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf:1.1 src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf:1.2
--- src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf:1.1	Wed Apr 10 16:44:54 2013
+++ src/sys/rump/kern/lib/libsys_cygwin/syscalls.conf	Wed Sep 11 20:31:30 2019
@@ -1,10 +1,11 @@
-#	$NetBSD: syscalls.conf,v 1.1 2013/04/10 16:44:54 pooka Exp $
+#	$NetBSD: syscalls.conf,v 1.2 2019/09/11 20:31:30 bad Exp $
 #
 
 sysnames="rump_cygwin_syscalls.c"
 sysnumhdr="rump_cygwin_syscall.h"
 syssw="rump_cygwin_sysent.c"
 sysarghdr="rump_cygwin_syscallargs.h"
+sysautoload="rump_cygwin_syscalls_autoload.c"
 compatopts=""
 libcompatopts=""
 

Index: src/sys/rump/kern/lib/libsys_linux/syscalls.conf
diff -u src/sys/rump/kern/lib/libsys_linux/syscalls.conf:1.2 src/sys/rump/kern/lib/libsys_linux/syscalls.conf:1.3
--- src/sys/rump/kern/lib/libsys_linux/syscalls.conf:1.2	Thu Mar  7 19:08:54 2013
+++ src/sys/rump/kern/lib/libsys_linux/syscalls.conf	Wed Sep 11 20:31:30 2019
@@ -1,10 +1,11 @@
-#	$NetBSD: syscalls.conf,v 1.2 2013/03/07 19:08:54 pooka Exp $
+#	$NetBSD: syscalls.conf,v 1.3 2019/09/11 20:31:30 bad Exp $
 #
 
 sysnames="rump_linux_syscalls.c"
 sysnumhdr="rump_linux_syscall.h"
 syssw="rump_linux_sysent.c"
 sysarghdr="rump_linux_syscallargs.h"
+sysautoload="rump_linux_syscalls_autoload.c"
 compatopts=""
 libcompatopts=""
 

Index: src/sys/rump/kern/lib/libsys_sunos/syscalls.conf
diff -u src/sys/rump/kern/lib/libsys_sunos/syscalls.conf:1.1 src/sys/rump/kern/lib/libsys_sunos/syscalls.conf:1.2
--- src/sys/rump/kern/lib/libsys_sunos/syscalls.conf:1.1	Tue Apr  9 13:08:33 2013
+++ src/sys/rump/kern/lib/libsys_sunos/syscalls.conf	Wed Sep 11 20:31:30 2019
@@ -1,10 +1,11 @@
-#	$NetBSD: syscalls.conf,v 1.1 2013/04/09 13:08:33 pooka Exp $
+#	$NetBSD: syscalls.conf,v 1.2 2019/09/11 20:31:30 bad Exp $
 #
 
 sysnames="rump_sunos_syscalls.c"
 sysnumhdr="rump_sunos_syscall.h"
 syssw="rump_sunos_sysent.c"
 sysarghdr="rump_sunos_syscallargs.h"
+sysautoload="rump_sunos_syscalls_autoload.c"
 compatopts=""
 libcompatopts=""
 



re: CVS commit: src/sys/rump/kern/lib/libsljit/arch/mips

2019-01-21 Thread matthew green
> Module Name:  src
> Committed By: alnsn
> Date: Tue Jan 22 01:25:53 UTC 2019
> 
> Modified Files:
>   src/sys/rump/kern/lib/libsljit/arch/mips: cache.c
> 
> Log Message:
> Cast register_t to uintptr_t before casting to void *.
> 
> Not sure what's going on here but evbmips64-el build fails
> without this cast.

on mips64 and the default userland, register_t is 64 bit
but uintptr_t and void * are both 32 bit.  your change
is right -- going via uintptr_t.


.mrg.


Re: CVS commit: src/sys/rump/kern

2013-11-16 Thread Alexander Nasonov
Martin Husemann wrote:
> I copied the ".if" from src/sys/modules/Makefile - please feel free to
> fix both instances. But arm is missing , so it would
> not compile.

I now see where the problem is. I listed those three arches because they
support modules but other sljit arches don't always have modules.

Is there a make variable to check whether modules are supported?

Alex


Re: CVS commit: src/sys/rump/kern

2013-11-16 Thread Martin Husemann
On Sat, Nov 16, 2013 at 04:50:42PM +, Alexander Nasonov wrote:
> I don't think that sljit supports all arms. If you want bpfjit on arm (or
> mips) you should build with MKSLJIT=yes. Default is "no" on these arches.

Yes, but with your suggested change (or my interpretation of it, at least),
the build would fail on all arm with MKSLJIT=yes.

Martin


Re: CVS commit: src/sys/rump/kern

2013-11-16 Thread Alexander Nasonov
Martin Husemann wrote:
> I copied the ".if" from src/sys/modules/Makefile - please feel free to
> fix both instances. But arm is missing , so it would
> not compile.

I don't think that sljit supports all arms. If you want bpfjit on arm (or
mips) you should build with MKSLJIT=yes. Default is "no" on these arches.

Alex



Re: CVS commit: src/sys/rump/kern

2013-11-16 Thread Martin Husemann
On Sat, Nov 16, 2013 at 11:17:09AM +, Alexander Nasonov wrote:
> Martin Husemann wrote:
> > Log Message:
> > sljit is only available on very few architectures, so do not try to build
> > it on all.
> 
> We have a special MKSLJIT variable. It's enabled by default on the three
> arches you listed below but it can also be turned on on arm and mips.

I copied the ".if" from src/sys/modules/Makefile - please feel free to
fix both instances. But arm is missing , so it would
not compile.

Martin


Re: CVS commit: src/sys/rump/kern

2013-11-16 Thread Alexander Nasonov
Martin Husemann wrote:
> Log Message:
> sljit is only available on very few architectures, so do not try to build
> it on all.

We have a special MKSLJIT variable. It's enabled by default on the three
arches you listed below but it can also be turned on on arm and mips.

Alex

> To generate a diff of this commit:
> cvs rdiff -u -r1.6 -r1.7 src/sys/rump/kern/Makefile.rumpkerncomp
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 

> Modified files:
> 
> Index: src/sys/rump/kern/Makefile.rumpkerncomp
> diff -u src/sys/rump/kern/Makefile.rumpkerncomp:1.6 
> src/sys/rump/kern/Makefile.rumpkerncomp:1.7
> --- src/sys/rump/kern/Makefile.rumpkerncomp:1.6   Sat Nov 16 01:39:18 2013
> +++ src/sys/rump/kern/Makefile.rumpkerncomp   Sat Nov 16 10:34:47 2013
> @@ -1,9 +1,15 @@
> -#$NetBSD: Makefile.rumpkerncomp,v 1.6 2013/11/16 01:39:18 rmind Exp $
> +#$NetBSD: Makefile.rumpkerncomp,v 1.7 2013/11/16 10:34:47 martin Exp $
>  #
>  
>  .include 
>  
> -RUMPKERNCOMPS=   crypto sljit tty z
> +RUMPKERNCOMPS=   crypto tty z
> +
> +.if ${MACHINE_ARCH} == "i386" || \
> +${MACHINE_ARCH} == "x86_64" || \
> +${MACHINE_ARCH} == "sparc"
> +RUMPKERNCOMPS+=  sljit
> +.endif
>  
>  .if ${MKZFS} != "no"
>  RUMPKERNCOMPS+=solaris
> 


--