NetBSD-Bugs archive

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

kern/50489: non-default emulations lack extensability via syscall_establish

>Number:         50489
>Category:       kern
>Synopsis:       non-default emulations lack extensability via syscall_establish
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 30 02:15:00 +0000 2015
>Release:        NetBSD 7.99.21
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at  |
System: NetBSD 7.99.21 NetBSD 7.99.21 (POKEY 2015-11-22 01:39:12) #1: Sun Nov 22 11:03:58 PHT 2015 amd64
Architecture: x86_64
Machine: amd64
	Currently, the capabilities of the default emulation can be
	enhanced by dynamic loading of modules which install new
	syscalls (via syscall_{,dis}establish in kern/kern_syscall.c).

	But this extensibility feature is only available in the default
	emulation.  For other emulations, particularly compat_netbsd32,
	the emulation's cabilities need to be built-in to the relevant
	module, so the module becomes an all-or-nothing.

	Additionally, the compat_netbsd32 module ends up with potentially
	lots of dependencies on other modules, and convoluted #ifdef
	blocks to determine availability of the dependencies in built-in
	version.  This also restricts the ability of the compat module
	to gain capabilities if underlying default-emulation modules are
	loaded to provide the back-end capabilities.
	* Modify the 'struct emul' to contain a pointer to a per-emulation
	  list of syscalls which can be resolved by a module auto-load
	  (currently, only the default emulation has such a list)
	* Modify the sys_nomodule() routine (in kern/kern_syscall.h) to
	  reference the per-emulation list, and remove the restriction on
	  (em == &emul_netbsd)
	* Move the current list of autoloadable syscalls to kern/kern_exec.c
	  where it can be included in the initialization of the default
	  emulations' 'struct emul emul_netbsd'
	* Update the syscall list(s) in the various compat modules to have
	  their own list of autoloadable syscalls
	* Split the existing compat modules into multiple modules, and
	  update the new modules to call syscall_{,dis}establish as

	(There might be other details I haven't included above, but this
	should be a pretty good start on design spec.)


Home | Main Index | Thread Index | Old Index