Home | History | Annotate | Download | only in common
History log of /src/sys/compat/common/compat_util.h
RevisionDateAuthorComments
 1.24  27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.23  21-Feb-2013  pgoyette branches: 1.23.36; 1.23.38;
Move boottime50 and its associated sysctl into the compat module. As
noted on tech-kern. Should fix PR/47579.

OK christos@

Will request pull-up to 6.0 in a few days.
 1.22  14-Dec-2009  mrg branches: 1.22.12; 1.22.18; 1.22.22;
replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
it's based upon with a common compat_elf_check_interp().

tested on MALTA64 and sparc64.
 1.21  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.20  28-Apr-2008  martin branches: 1.20.6; 1.20.8; 1.20.14;
Remove clause 3 and 4 from TNF licenses
 1.19  20-Jan-2008  dsl branches: 1.19.6; 1.19.8; 1.19.10;
Remove stackgap functions externs.
 1.18  22-Apr-2007  dsl branches: 1.18.8; 1.18.14; 1.18.20;
Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
- which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
search for absolute pathnames in the emulation root, if that fails it will
retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
the real root is returned instead (matching the behaviour of emul_lookup,
but being a cheap comparison here) so that programs that scan "../.."
looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
 1.17  04-Mar-2007  christos branches: 1.17.2; 1.17.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16  11-Dec-2005  christos branches: 1.16.26;
merge ktrace-lwp.
 1.15  29-May-2005  christos branches: 1.15.2;
- sprinkle const.
- add XXXUNCONST to the emul_find() pbuf argument free'ing. XXX: this needs
an api change.
- avoid variable shadowing.
 1.14  29-Jun-2003  fvdl branches: 1.14.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.13  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.12  29-Nov-2002  jdolecek add emul_find_interp() function: the function looks for interpreter
in alternative emul tree first, and updates interpreter pathname
if found there; if not found in alternative emul tree, pathname
without the emul prefix is checked, and error returned if the file
doesn't exist
 1.11  29-Nov-2002  jdolecek de-__P()
 1.10  16-Mar-2002  christos make the stackgap_{init,alloc} functions MP friendly (i.e. pass struct proc *
in, instead of using curproc). While there add an optional size argument to
stackgap_init.
 1.9  22-Jan-2001  jdolecek branches: 1.9.2; 1.9.4;
Introduce CHECK_ALT_SYMLINK() - this checks for alternative location without
following links, hence is usable for checking of presence of a symlink.
Also slighly cleanup EXISTS and CREAT cases - use symbolic constants
instead of 0/1.
This is needed for emulation of readlink(2), lchown(2) and similar.
Addresses kern/11757.
 1.8  01-Dec-2000  jdolecek add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now
 1.7  20-Nov-2000  jdolecek make const the struct emul * pointers passed/used in stackgap_init(),
stackgap_alloc()
 1.6  24-Apr-1999  cgd branches: 1.6.2;
implement a simple function, emul_flags_translate() to do table-based
flags translation.
 1.5  09-Feb-1999  christos branches: 1.5.2; 1.5.4; 1.5.6;
char * and char ** -> const char * and const char **
 1.4  05-Sep-1998  christos Assign copyright to TNF.
 1.3  10-Oct-1997  fvdl Add getdirentries backward compat syscall. Provide common function to
signal cookie overflow during emulated getdents and friends.
 1.2  12-Oct-1996  thorpej branches: 1.2.10;
Don't inline stackgap_init() and stackgap_alloc(). Doing so generates
an include file dependency graph that's much more complicated than
it needs to be, and wastes space in the kernel.
 1.1  24-Jun-1995  christos - Extracted all compat routines from the kern directory and moved here.
- Created compat_util.c and compat_util.h to be used by the compatibility
modules, so they don't duplicate the same code.
- Added prototypes to the stackgap allocation routines.
 1.2.10.1  14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.6.1  30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.5.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.5.2.1  21-Jun-1999  cgd pull up rev(s) 1.6 from trunk. (cgd)
 1.6.2.3  11-Feb-2001  bouyer Sync with HEAD.
 1.6.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.1  22-Nov-2000  bouyer Sync with HEAD.
 1.9.4.1  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.2  11-Dec-2002  thorpej Sync with HEAD.
 1.9.2.1  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.14.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.15.2.3  21-Jan-2008  yamt sync with head
 1.15.2.2  03-Sep-2007  yamt sync with head.
 1.15.2.1  21-Jun-2006  yamt sync with head.
 1.16.26.2  07-May-2007  yamt sync with head.
 1.16.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.17.4.1  11-Jul-2007  mjf Sync with head.
 1.17.2.1  27-May-2007  ad Sync with head.
 1.18.20.1  20-Jan-2008  bouyer Sync with HEAD
 1.18.14.1  18-Feb-2008  mjf Sync with HEAD.
 1.18.8.1  23-Mar-2008  matt sync with HEAD
 1.19.10.3  11-Mar-2010  yamt sync with head
 1.19.10.2  04-May-2009  yamt sync with head.
 1.19.10.1  16-May-2008  yamt sync with head.
 1.19.8.1  18-May-2008  yamt sync with head.
 1.19.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.19.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.20.14.1  14-Dec-2009  mrg pullup from -current:
>replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
>it's based upon with a common compat_elf_check_interp().
>
>tested on MALTA64 and sparc64.
 1.20.8.1  19-Jan-2009  skrll Sync with HEAD.
 1.20.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.22.22.1  25-Feb-2013  tls resync with head
 1.22.18.1  14-Mar-2013  riz Pull up following revision(s) (requested by pgoyette in ticket #837):
sys/compat/common/kern_time_50.c: revision 1.25
sys/kern/init_sysctl.c: revision 1.195
sys/kern/init_main.c: revision 1.447
sys/compat/common/compat_util.h: revision 1.23
sys/compat/common/compat_mod.h: revision 1.1
sys/compat/common/compat_mod.c: revision 1.16
sys/compat/common/compat_mod.c: revision 1.17
sys/compat/common/compat_mod.c: revision 1.18
sys/compat/common/vfs_syscalls_43.c: revision 1.55
Move boottime50 and its associated sysctl into the compat module. As
noted on tech-kern. Should fix PR/47579.
OK christos@
Will request pull-up to 6.0 in a few days.
Wrap sysctl_teardown(&compat_clog) with the appropriate #if defined()s
remove empty #if
 1.22.12.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.23.38.1  10-Jun-2019  christos Sync with HEAD
 1.23.36.1  07-Mar-2018  pgoyette Move the emul_find_root() and emul_find_interp() to a new file
subr_emul.c

The previous location was in exec_elf.c but that can get built
multiple times for a single kernel, so we could end up with
duplicate symbols.

Thanks to ,rg@ for the heads-up.

RSS XML Feed