Home | History | Annotate | Download | only in netbsd32
History log of /src/sys/compat/netbsd32/netbsd32_mod.c
RevisionDateAuthorComments
 1.23  08-Aug-2020  christos PR/55547: Dan Plassche: Fix BSD/OS binary emulation.
Centralize lcall sniffer and recognize the BSD/OS flavor.
 1.22  21-Mar-2020  pgoyette Restore code to sysctl_free() the compat32 shadow tree
 1.21  15-Mar-2020  pgoyette Use SYSCTL_SETUP mechanism to establish our sysctl tree, rather than
using explicit calls to netbsd32_sysctl_{init,fini}()
 1.20  09-Mar-2020  pgoyette Rework previous, so that the real syscall code is not invoked from within
the module_hook code. Otherwise, if the syscall just happens to be exit()
we will exit while still holding a reference to the hook's localcount, and
nothing will ever release that reference. Attempts to manually unload the
module will hang indefinitely, as will modstat(8).

XXX pullup-9
 1.19  09-Mar-2020  pgoyette If a syscall requires a module to be autoloaded, the initial invocation
of that syscall will return ERESTART. For amd64's netbsd32_syscall()
that means we need to back up the PC saved in the trap frame so we can
re-issue the syscall instruction. For "normal" syscall traps, we saved
the instruction length in the trap frame, but this was missing for the
oosyscall/lcall path. Since the PC was not backed up, the kernel-only
value ERESTART was returned to userland, causing all sort of grief for
old compat_netbsd32 executables!

XXX Pullup-9
 1.18  08-Mar-2020  pgoyette fix indentation. NFCI
 1.17  08-Mar-2020  pgoyette Fix another left-over from last year's [pgoyette-compat] work. This
allows recognition of the oosyscall sequence for amd64.

Fixes PR kern/55038

XXX pullup-9
 1.16  20-Nov-2019  pgoyette Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation. Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !
 1.15  27-Jan-2019  pgoyette branches: 1.15.4;
Merge the [pgoyette-compat] branch
 1.14  26-Dec-2018  mrg remove duplicated prototypes and dated XXX comments.
 1.13  03-Dec-2015  pgoyette branches: 1.13.16; 1.13.18;
Merge the compat_sysv module into the sysv_ipc module - it should
never have been a separate module in the first place (my bad).

Adjust dependencies as appropriate.
 1.12  01-Dec-2015  pgoyette Prepare for new compat_netbsd32_mqueue module to be split out of
compat_netbsd32. Refactor the COMPAT_50 code related to mqueue,
and update the syscall definitions. Remove dependency on mqueue
from the compat_netbsd32 module (the new module will gain this
dependency).

Continuation of work on PR kern/50489
 1.11  01-Dec-2015  pgoyette Add MODULE infrastructure to netbsd32_nfssvc.c, remove dependency on it
from netbsd32_mod.c
 1.10  30-Nov-2015  pgoyette Factor the basic dependency list out of the #ifdef _KERNEL_OPT block, since
the only difference was ksem (which is available as either built-in or
loadable module).
 1.9  10-Oct-2015  pgoyette Ooops, spell the module name in full. "mqueue" vs "mq"
 1.8  10-Oct-2015  pgoyette And yet another dependency, this time on mq
 1.7  10-Oct-2015  pgoyette Add another dependency for nfsserver
 1.6  13-Jun-2015  christos we need compat_sysv now.
 1.5  22-Jul-2014  maxv branches: 1.5.2; 1.5.4;
1) On 64bit systems, don't add the 32bit execsw[] to the global exec array.
exec_elf32 works on 32bit systems only, and will crash 32bit binaries on
64bit systems.
2) Now that exec_elf32 is dormant, we can give the native ELF loaders the
highest priority.

Binaries will load faster now (system boot, compilation, etc.).

With the help of njloy@. Discussed a bit on tech-kern@, no disagreement.
 1.4  11-Jul-2014  maxv netbsd32 should depend on exec_elf32, since it will use exec_elf32's functions.
This fixes
# modload compat_netbsd32
when exec_elf32 is not loaded.

ok njoly@
 1.3  07-Mar-2014  christos branches: 1.3.2;
c99 initializers for struct execsw
 1.2  19-Sep-2013  christos exec modules need to be of the exec kind
 1.1  19-Nov-2008  ad branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.14; 1.1.26; 1.1.36; 1.1.40;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.1.40.1  18-May-2014  rmind sync with head
 1.1.36.2  03-Dec-2017  jdolecek update from HEAD
 1.1.36.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.26.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.14.2  04-May-2009  yamt sync with head.
 1.1.14.1  19-Nov-2008  yamt file netbsd32_mod.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:25 +0000
 1.1.10.2  19-Jan-2009  skrll Sync with HEAD.
 1.1.10.1  19-Nov-2008  skrll file netbsd32_mod.c was added on branch nick-hppapmap on 2009-01-19 13:17:36 +0000
 1.1.8.2  17-Jan-2009  mjf Sync with HEAD.
 1.1.8.1  19-Nov-2008  mjf file netbsd32_mod.c was added on branch mjf-devfs2 on 2009-01-17 13:28:46 +0000
 1.1.6.2  19-Nov-2008  ad Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.1.6.1  19-Nov-2008  ad file netbsd32_mod.c was added on branch christos-time_t on 2008-11-19 18:36:06 +0000
 1.1.4.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.1.4.1  19-Nov-2008  haad file netbsd32_mod.c was added on branch haad-dm on 2008-12-13 01:14:03 +0000
 1.3.2.1  10-Aug-2014  tls Rebase.
 1.5.4.2  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.5.4.1  22-Sep-2015  skrll Sync with HEAD
 1.5.2.2  17-Nov-2015  riz Revert ticket #1020, per pgoyette in ticket #1041.
 1.5.2.1  08-Nov-2015  riz Pull up following revision(s) (requested by pgoyette in ticket #1020):
sys/compat/netbsd32/netbsd32_mod.c: revision 1.6
sys/compat/netbsd32/netbsd32_mod.c: revision 1.7
sys/compat/netbsd32/netbsd32_mod.c: revision 1.8
sys/compat/netbsd32/netbsd32_mod.c: revision 1.9
sys/compat/linux/common/linux_mod.c: revision 1.5
Add an additional dependency on compat_sysv
Add another dependency for nfsserver
And yet another dependency, this time on mq
Ooops, spell the module name in full. "mqueue" vs "mq"
we need compat_sysv now.
 1.13.18.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.13.18.1  10-Jun-2019  christos Sync with HEAD
 1.13.16.19  25-Jan-2019  pgoyette Move the netbsd32_machine32_hook into the main kernel with most of
the other hooks.

Although this hook might better belong in compat/netbsd32/ code,
there are some machines without a netbsd32 module (for example, i386
and sgimips) which still have consumers/users of this hook. :(
 1.13.16.18  24-Jan-2019  pgoyette Rework placement of the new netbsd32_machine32_hook
 1.13.16.17  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.13.16.16  23-Sep-2018  pgoyette Use a .h file to define the xxx_{init,fini} routines, and include
the compat_stub.h header to get the definition of the kern_proc_32
hook.
 1.13.16.15  23-Sep-2018  pgoyette The kern_proc_32 hook is in the main kernel, so don't make another
one here.
 1.13.16.14  23-Sep-2018  pgoyette More work on kern_proc_32
 1.13.16.13  18-Sep-2018  pgoyette The COMPAT_HOOK macros were renamed to MODULE_HOOK, adjust all callers
 1.13.16.12  18-Sep-2018  pgoyette Use the MP-safe compat hooks for netbsd32_compat_80.c's modctl
 1.13.16.11  14-Sep-2018  pgoyette OMG it builds!

Finish rearranging the amd64 MD compat_netbsd32 code.

XXX Other architectures will be dealt with later.
 1.13.16.10  14-Sep-2018  pgoyette Work in progress - get the arch-specific netbsd32_machdep.c code to
build as a module.

XXX Doesn't work when the code is built-in to the kernel.
 1.13.16.9  14-Sep-2018  pgoyette Require coredump since netbsd32 module will be built with COREDUMP enabled.
 1.13.16.8  13-Sep-2018  pgoyette More clean-up of module dependencies
 1.13.16.7  13-Sep-2018  pgoyette Now that compat_netbsd32 is no longer monolithic, it no longer
requires compat_09 (and all higher) compat code. Adjust the
requirements list accordingly.
 1.13.16.6  11-Sep-2018  pgoyette Move netbsd32_rndpseudo_50.c out of the main netbsd32 module and into
the module that handles netbsd32_50 compatability.
 1.13.16.5  11-Sep-2018  pgoyette Install the syscalls into the netbsd32 table, not the default/native table.
 1.13.16.4  10-Sep-2018  pgoyette More work on splitting the compat_netbsd32 module
 1.13.16.3  09-Sep-2018  pgoyette The compat_netbsd32 module requires compat_09 and above. Since we
removed the alias names, we need to explicitly refer to the oldest
non-32 required compat module.
 1.13.16.2  21-Mar-2018  pgoyette Split compat/rndpseudo_50.c into two pieces, one for native compat and
a second piece for compat32. Update both modules accordingly.
 1.13.16.1  11-Mar-2018  pgoyette Update module dependencies
 1.15.4.4  10-Mar-2020  martin Pull up following revision(s) (requested by pgoyette in ticket #778):

sys/compat/netbsd32/netbsd32_mod.c: revision 1.20
sys/arch/amd64/amd64/trap.c: revision 1.127

Rework previous, so that the real syscall code is not invoked from within
the module_hook code. Otherwise, if the syscall just happens to be exit()
we will exit while still holding a reference to the hook's localcount, and
nothing will ever release that reference. Attempts to manually unload the
module will hang indefinitely, as will modstat(8).

XXX pullup-9
 1.15.4.3  09-Mar-2020  martin Pull up following revision(s) (requested by pgoyette in ticket #770):

sys/compat/netbsd32/netbsd32_mod.c: revision 1.19

If a syscall requires a module to be autoloaded, the initial invocation
of that syscall will return ERESTART. For amd64's netbsd32_syscall()
that means we need to back up the PC saved in the trap frame so we can
re-issue the syscall instruction. For "normal" syscall traps, we saved
the instruction length in the trap frame, but this was missing for the
oosyscall/lcall path. Since the PC was not backed up, the kernel-only
value ERESTART was returned to userland, causing all sort of grief for
old compat_netbsd32 executables!

XXX Pullup-9
 1.15.4.2  09-Mar-2020  martin Apply patch, requested by pgoyette in ticket #775 to fix fallout from
ticket #762:

sys/compat/netbsd32/netbsd32_mod.c (patched)

Fiy arguments to MODULE_HOOK_SET for the new amd64_oosyscall_hook.
 1.15.4.1  08-Mar-2020  martin Pull up following revision(s) (requested by pgoyette in ticket #762):

sys/arch/amd64/amd64/trap.c: revision 1.126
sys/compat/netbsd32/netbsd32_mod.c: revision 1.17
sys/compat/netbsd32/netbsd32_mod.c: revision 1.18
sys/sys/compat_stub.h: revision 1.23

Fix another left-over from last year's [pgoyette-compat] work. This
allows recognition of the oosyscall sequence for amd64.

Fixes PR kern/55038
XXX pullup-9

-

fix indentation. NFCI

RSS XML Feed