NetBSD-Bugs archive

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

Re: kern/55047: Missing COMPAT_43 Syscalls on amd64 for COMPAT_09 and COMPAT_NOMID



The following reply was made to PR kern/55047; it has been noted by GNATS.

From: Dan Plassche <dplassche%gmail.com@localhost>
To: Paul Goyette <paul%whooppee.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: kern/55047: Missing COMPAT_43 Syscalls on amd64 for COMPAT_09 and COMPAT_NOMID
Date: Thu, 5 Mar 2020 23:07:11 -0500

 Hey Paul,
 
 I am still getting error 78 "Function not implemented" calling
 ogetpagesize on amd64, so I will confirm my steps below in case I
 missed anything.
 
 > 1. Apply the attached patch to $SRC/sys/compat/netbsd32/syscalls.master
 
 I had to manually apply the patch as follows, but the new file that
 was copied to /usr/src/sys/compat/netbsd32/syscalls.master matched
 your patched version:
 
 # diff syscalls.master.def.bak syscalls.master.new
 186c186
 < 64    COMPAT_43 MODULAR compat_netbsd32_43    \
 ---
 > 64    COMPAT_43 MODULAR compat_43     \
 222c222
 < 84    COMPAT_43 MODULAR compat_netbsd32_43    \
 ---
 > 84    COMPAT_43 MODULAR compat_43     \
 235c235
 < 89    COMPAT_43 MODULAR compat_netbsd32_43    \
 ---
 > 89    COMPAT_43 MODULAR compat_43     \
 346c346
 < 142   COMPAT_43 MODULAR compat_netbsd32_43    \
 ---
 > 142   COMPAT_43 MODULAR compat_43     \
 363c363
 < 149   COMPAT_43 MODULAR compat_netbsd32_43    \
 ---
 > 149   COMPAT_43 MODULAR compat_43     \
 
 # ls -A -l syscalls.m*; cksum syscalls.m*
 -rw-r--r--  1 root  wsrc  49775 Mar  5 20:50 syscalls.master
 -rw-r--r--  1 root  wsrc  49820 Jan 18 02:33 syscalls.master.def.bak
 -rw-r--r--  1 root  wsrc  49775 Mar  5 20:50 syscalls.master.new
 2700770084 49775 syscalls.master
 1012686789 49820 syscalls.master.def.bak
 2700770084 49775 syscalls.master.new
 
 > 2. Re-generate the various syscall files using
 >
 >     # cd $SRC/sys/compat/netbsd32
 >     # /bin/sh $SRC/sys/kern/makesyscalls.sh syscalls.conf syscalls.master
 
 Ran the makesyscalls.sh command in /usr/src/sys/compat/netbsd32 as
 specifed and got the following confirmation:
 
 # /bin/sh /usr/src/sys/kern/makesyscalls.sh syscalls.conf syscalls.master
 Generated following files:
 netbsd32_syscallargs.h netbsd32_syscall.h netbsd32_sysent.c
 netbsd32_syscalls.c netbsd32_syscalls_autoload.c
 netbsd32_systrace_args.c /dev/null /dev/null /dev/null
 
 > 3. Rebuild and install your kernel and modules
 
 Done.  I'm using a copy of GENERIC with EXEC_AOUT and COMPAT_NOMID enabled.
 
 # uname -a
 NetBSD nbsd90 9.99.48 NetBSD 9.99.48 (UNIX) #0: Thu Mar  5 21:27:18
 EST 2020  dp@nbsd90:/usr/src/sys/arch/amd64/compile/UNIX amd64
 # ls -A -l /stand/amd64/9.99.48/modules | grep "compat_43"
 drwxr-xr-x  2 root  wheel  512 Mar  5 21:46 compat_43
 
 > Short analysis:  the syscalls.master file uses "sys" prefix for these
 > syscalls, since they don't need a wrapper.  But it says to load the
 > compat_netbsd32_43 module, while the actual sys_* implementations are
 > located in the compat_43 module.  The patch tells it to load from the
 > correct module.
 
 Thank you for this context.
 



Home | Main Index | Thread Index | Old Index