Home | History | Annotate | Download | only in ultrix
History log of /src/sys/compat/ultrix/ultrix_pathname.c
RevisionDateAuthorComments
 1.40  12-Oct-2022  andvar fix few typos in comments.
 1.39  05-Sep-2014  matt Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.
 1.38  14-Dec-2009  matt branches: 1.38.22;
Merge from matt-nb5-mips64
 1.37  29-Jun-2009  dholland Convert 67 namei call sites to use namei_simple, in these functions:

check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr

All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.

XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
 1.36  17-Jan-2009  he branches: 1.36.2;
Adapt to the state after the recent time_t change.
Type changes:
timeval -> timeval50
itimerval -> itimerval50
rusage -> rusage50
and use of the compat_50 calls where appropriate.
Untested, but at least it builds.

Discussed with christos@
 1.35  24-Jun-2008  ad branches: 1.35.4; 1.35.12;
Replace references to getsock/getvnode.
 1.34  21-Mar-2008  ad branches: 1.34.4; 1.34.6; 1.34.8;
Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
 1.33  05-Jan-2008  dsl branches: 1.33.6;
Use FILE_LOCK() and FILE_UNLOCK().
Attempt to fix all the code paths so that the 'fp' returned by fd_getfile()
isn't left locked, and is always unlocked (and ref-counted) before
doing anything that might sleep.
 1.32  27-Dec-2007  christos make this compile again.
 1.31  20-Dec-2007  dsl Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
 1.30  08-Dec-2007  pooka branches: 1.30.4;
Remove cn_lwp from struct componentname. curlwp should be used
from on. The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
 1.29  27-Nov-2007  dogcow branches: 1.29.2;
more VFS_STATVFS(x,y,z) fallout; change them to VFS_STATVFS(x,y). (hi, pooka!)
 1.28  25-Apr-2007  matt branches: 1.28.6; 1.28.8; 1.28.14;
Make this compile again (after stackgap removal)
 1.27  22-Apr-2007  dsl 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.26  04-Mar-2007  christos branches: 1.26.2; 1.26.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.25  09-Feb-2007  ad branches: 1.25.2;
Merge newlock2 to head.
 1.24  11-Dec-2005  christos branches: 1.24.20;
merge ktrace-lwp.
 1.23  26-Feb-2005  perry branches: 1.23.4;
nuke trailing whitespace
 1.22  21-Apr-2004  simonb branches: 1.22.4; 1.22.6;
ANSIfy, some KNF.
 1.21  21-Apr-2004  simonb Fix some statfs->statvfs fallout. Compile tested only...
 1.20  21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.19  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.18  29-Jun-2003  fvdl branches: 1.18.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.17  29-Jun-2003  simonb Fix 'struct lwp *' lossage.
 1.16  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.15  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.14  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.13  13-Nov-2001  lukem add RCSIDs (including regeneration of files as appropriate)
 1.12  14-Jun-2001  thorpej branches: 1.12.2;
Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads. What we do is stick descriptors in the table, but
mark them as "larval". This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again. When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
 1.11  01-Dec-2000  jdolecek branches: 1.11.2;
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.10  30-Mar-2000  augustss Kill register declarations.
 1.9  05-May-1999  thorpej branches: 1.9.2;
Add "use counting" to file entries. When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.
 1.8  09-Feb-1999  christos branches: 1.8.4;
const poisoning and CHECK_ALT_CREAT fixes.
 1.7  09-Aug-1998  perry bzero->memset, bcopy->memcpy, bcmp->memcmp
 1.6  25-May-1997  jonathan lint: add prototype for static local function ultrixstatfs().
 1.5  14-Oct-1996  mhitch Now needs sys/proc.h since compat/common/compat_util.h doesn't anymore.
 1.4  29-Sep-1996  jonathan Fix cut-and-paste (ouap vs ap) bugs so the previous revision actually
compiles. Change variable names to use "ap" instead of "ouap" everywhere
to avoid similar bugs in future.
 1.3  03-Sep-1996  mycroft Define execv() and execve() consistently across emulations.
Do path name translation.
 1.2  07-Apr-1996  jonathan branches: 1.2.4;
Remove gcc -Wall lint from ultrix emulation.-
Mostly adding explicit != comparison to "if (error = copyin/out( ... ))".
Fix comment glitch in ultrix_fs.c
 1.1  07-Jan-1996  jonathan Add '/emul/ultrix' pathname processing to Ultrix emulation, and move
Ultrix syscalls that require that processing out of ultrix_misc.c
to ultrix_pathname.c.
 1.2.4.1  10-Dec-1996  mycroft From trunk:
Do execv() and execve() path name translation consistently across
emulations.
 1.8.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.9.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.9.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.11.2.5  29-May-2002  nathanw #include <sys/sa.h> before <sys/syscallargs.h>, to provide sa_upcall_t
now that <sys/param.h> doesn't include <sys/sa.h>.

(Behold the Power of Ed)
 1.11.2.4  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.11.2.3  06-Dec-2001  wdk struct proc -> struct lwp changes for COMPAT_ULTRIX support
 1.11.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.11.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.12.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.18.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.18.2.5  28-Nov-2004  skrll Adapt to branch
 1.18.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.18.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.18.2.2  03-Aug-2004  skrll Sync with HEAD
 1.18.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.22.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.22.4.1  29-Apr-2005  kent sync with -current
 1.23.4.6  24-Mar-2008  yamt sync with head.
 1.23.4.5  21-Jan-2008  yamt sync with head
 1.23.4.4  07-Dec-2007  yamt sync with head
 1.23.4.3  03-Sep-2007  yamt sync with head.
 1.23.4.2  26-Feb-2007  yamt sync with head.
 1.23.4.1  21-Jun-2006  yamt sync with head.
 1.24.20.2  30-Jan-2007  ad Remove support for SA. Ok core@.
 1.24.20.1  29-Dec-2006  ad Checkpoint work in progress.
 1.25.2.2  07-May-2007  yamt sync with head.
 1.25.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.26.4.1  11-Jul-2007  mjf Sync with head.
 1.26.2.1  08-Jun-2007  ad Sync with head.
 1.28.14.3  18-Feb-2008  mjf Sync with HEAD.
 1.28.14.2  27-Dec-2007  mjf Sync with HEAD.
 1.28.14.1  08-Dec-2007  mjf Sync with HEAD.
 1.28.8.1  09-Jan-2008  matt sync with HEAD
 1.28.6.2  09-Dec-2007  jmcneill Sync with HEAD.
 1.28.6.1  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.29.2.1  26-Dec-2007  ad Sync with head.
 1.30.4.2  08-Jan-2008  bouyer Sync with HEAD
 1.30.4.1  02-Jan-2008  bouyer Sync with HEAD
 1.33.6.2  29-Jun-2008  mjf Sync with HEAD.
 1.33.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.34.8.1  27-Jun-2008  simonb Sync with head.
 1.34.6.3  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.34.6.2  14-May-2008  wrstuden Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.
 1.34.6.1  10-May-2008  wrstuden Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
 1.34.4.3  11-Mar-2010  yamt sync with head
 1.34.4.2  18-Jul-2009  yamt sync with head.
 1.34.4.1  04-May-2009  yamt sync with head.
 1.35.12.1  09-Sep-2009  matt Change to use fixed sized types.
 1.35.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.36.2.1  23-Jul-2009  jym Sync with HEAD.
 1.38.22.1  03-Dec-2017  jdolecek update from HEAD

RSS XML Feed