Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...



details:   https://anonhg.NetBSD.org/src/rev/f54b0ea839a8
branches:  netbsd-9
changeset: 1001553:f54b0ea839a8
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Mar 08 10:36:38 2020 +0000

description:
Pull up following revision(s) (requested by pgoyette in ticket #761):

        sys/compat/netbsd32/syscalls.master: revision 1.132
        sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.60

Properly mark netbsd32_compat_43 syscalls that are directly implemented
by calling their compat_43 equivalents.  With these changes, and with
built-in versions of COMPAT_NETBSD32, COMPAT_NOMID, and COMPAT_09, I can
now run a netbsd-0.9 statically linked i386 (32-bit) version of /bin/ls
on a 9.99.x amd64 host!

Addresses PR kern/55047 but more changes coming to handle non-built-in
modules.

XXX pullup-9

diffstat:

 sys/compat/netbsd32/netbsd32_compat_43.c |  24 ++++++++++++++++++++++--
 sys/compat/netbsd32/syscalls.master      |  14 ++++++--------
 2 files changed, 28 insertions(+), 10 deletions(-)

diffs (104 lines):

diff -r 32e0a0cb180f -r f54b0ea839a8 sys/compat/netbsd32/netbsd32_compat_43.c
--- a/sys/compat/netbsd32/netbsd32_compat_43.c  Sun Mar 08 10:28:16 2020 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_43.c  Sun Mar 08 10:36:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_compat_43.c,v 1.57.4.2 2020/01/02 09:50:34 martin Exp $       */
+/*     $NetBSD: netbsd32_compat_43.c,v 1.57.4.3 2020/03/08 10:36:38 martin Exp $       */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_43.c,v 1.57.4.2 2020/01/02 09:50:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_43.c,v 1.57.4.3 2020/03/08 10:36:38 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_43.h"
@@ -769,6 +769,26 @@
            (sy_call_t *)compat_43_netbsd32_sigsetmask },
        { NETBSD32_SYS_compat_43_netbsd32_osigstack, 0,
            (sy_call_t *)compat_43_netbsd32_osigstack },
+/*
+ * These syscalls are provided by emul_netbsd compat_43 code, but their
+ * entry points must still be loaded in the emul_netbsd32 disatch table
+ */
+       { NETBSD32_SYS_compat_43_ogetpagesize, 0,
+           (sy_call_t *)compat_43_sys_getpagesize },
+       { NETBSD32_SYS_compat_43_ogetdtablesize, 0,
+           (sy_call_t *)compat_43_sys_getdtablesize},
+       { NETBSD32_SYS_compat_43_ogethostid, 0,
+           (sy_call_t *)compat_43_sys_gethostid },
+       { NETBSD32_SYS_compat_43_owait, 0,
+           (sy_call_t *)compat_43_sys_wait },
+/*
+ * Skip oquota since it isn't part of compat_43
+ *     { NETBSD32_SYS_compat_43_oquota, 0,
+ *         (sy_call_t *)compat_43_sys_quota },
+ */
+
+/* End of compat_43 syscalls */
+
        { 0, 0, NULL }
 }; 
 
diff -r 32e0a0cb180f -r f54b0ea839a8 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master       Sun Mar 08 10:28:16 2020 +0000
+++ b/sys/compat/netbsd32/syscalls.master       Sun Mar 08 10:36:38 2020 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.127.2.1 2019/11/04 14:46:57 martin Exp $
+       $NetBSD: syscalls.master,v 1.127.2.2 2020/03/08 10:36:38 martin Exp $
 
 ;      from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
 ;      @(#)syscalls.master     8.2 (Berkeley) 1/13/94
@@ -183,7 +183,7 @@
                        { int|netbsd32||ogetkerninfo(int op, \
                            netbsd32_charp where, netbsd32_intp size, \
                            int arg); }
-64     COMPAT_43 MODULAR compat_netbsd32_43    \
+64     COMPAT_43 MODULAR compat_43     \
                        { int|sys||getpagesize(void); } ogetpagesize
 65     COMPAT_12 MODULAR compat_netbsd32_12    \
                        { int|netbsd32||msync(netbsd32_voidp addr, \
@@ -219,7 +219,7 @@
                        { int|netbsd32||setitimer(int which, \
                            netbsd32_itimerval50p_t itv, \
                            netbsd32_itimerval50p_t oitv); }
-84     COMPAT_43 MODULAR compat_netbsd32_43    \
+84     COMPAT_43 MODULAR compat_43     \
                        { int|sys||wait(void); } owait
 85     COMPAT_12 MODULAR compat_netbsd32_12    \
                        { int|netbsd32||oswapon(netbsd32_charp name); }
@@ -232,7 +232,7 @@
 88     COMPAT_43 MODULAR compat_netbsd32_43    \
                        { int|netbsd32||osethostname(netbsd32_charp hostname, \
                            u_int len); }
-89     COMPAT_43 MODULAR compat_netbsd32_43    \
+89     COMPAT_43 MODULAR compat_43     \
                        { int|sys||getdtablesize(void); } ogetdtablesize
 90     STD             { int|netbsd32||dup2(int from, int to); }
 91     UNIMPL          getdopt
@@ -343,7 +343,7 @@
 141    COMPAT_43 MODULAR compat_netbsd32_43    \
                        { int|netbsd32||ogetpeername(int fdes, \
                            netbsd32_voidp asa, netbsd32_intp alen); }
-142    COMPAT_43 MODULAR compat_netbsd32_43    \
+142    COMPAT_43 MODULAR compat_43     \
                        { int32_t|sys||gethostid(void); } ogethostid
 143    COMPAT_43 MODULAR compat_netbsd32_43    \
                        { int|netbsd32||sethostid(int32_t hostid); }
@@ -360,12 +360,10 @@
 148    COMPAT_50 MODULAR compat_netbsd32_50    \
                        { int|netbsd32||quotactl(netbsd32_charp path, int cmd, \
                            int uid, netbsd32_voidp arg); }
-149    COMPAT_43 MODULAR compat_netbsd32_43    \
-                       { int|sys||quota(void); } oquota
 #else
 148    EXCL            compat_netbsd32_quotactl
+#endif
 149    EXCL            compat_netbsd32_quota
-#endif
 150    COMPAT_43 MODULAR compat_netbsd32_43    \
                        { int|netbsd32||ogetsockname(int fdec, \
                            netbsd32_voidp asa, netbsd32_intp alen); }



Home | Main Index | Thread Index | Old Index