On Sun, Apr 22, 2007 at 08:30:02AM +0000, David Laight wrote: > > Module Name: src > Committed By: dsl > Date: Sun Apr 22 08:30:02 UTC 2007 > > Modified Files: > src/sys/arch/arm/arm: arm_machdep.c > src/sys/compat/aoutm68k: aoutm68k_stat.c > src/sys/compat/common: compat_file.c compat_util.c compat_util.h > vfs_syscalls_20.c vfs_syscalls_30.c vfs_syscalls_43.c > src/sys/compat/darwin: darwin_attr.c darwin_mount.c darwin_stat.c > src/sys/compat/freebsd: freebsd_exec_elf32.c freebsd_file.c > src/sys/compat/hpux: hpux_compat.c hpux_exec.c hpux_file.c > src/sys/compat/ibcs2: ibcs2_exec.c ibcs2_exec_coff.c ibcs2_exec_elf32.c > ibcs2_fcntl.c ibcs2_misc.c ibcs2_stat.c > src/sys/compat/irix: irix_exec_elf32.c irix_mount.c irix_stat.c > src/sys/compat/linux/common: linux_exec.c linux_exec_elf32.c > linux_file.c linux_file64.c linux_misc.c linux_misc_notalpha.c > linux_uselib.c > src/sys/compat/linux32/common: linux32_exec_elf32.c linux32_misc.c > linux32_stat.c linux32_time.c linux32_unistd.c > src/sys/compat/mach: mach_exec.c > src/sys/compat/netbsd32: netbsd32_compat_12.c netbsd32_compat_20.c > netbsd32_compat_30.c netbsd32_compat_43.c netbsd32_exec_elf32.c > netbsd32_execve.c netbsd32_fs.c netbsd32_netbsd.c > src/sys/compat/osf1: osf1_exec_ecoff.c osf1_file.c osf1_mount.c > src/sys/compat/pecoff: pecoff_exec.c pecoff_misc.c > src/sys/compat/sunos: sunos_misc.c > src/sys/compat/sunos32: sunos32.h sunos32_misc.c > src/sys/compat/svr4: svr4_exec_elf32.c svr4_exec_elf64.c svr4_fcntl.c > svr4_misc.c svr4_stat.c > src/sys/compat/svr4_32: svr4_32_exec_elf32.c svr4_32_fcntl.c > svr4_32_misc.c svr4_32_stat.c > src/sys/compat/ultrix: ultrix_pathname.c > src/sys/kern: exec_elf32.c exec_script.c kern_acct.c kern_descrip.c > kern_exec.c uipc_usrreq.c vfs_lookup.c vfs_syscalls.c vfs_vnops.c > src/sys/lkm/compat: Makefile.inc > src/sys/lkm/compat/freebsd: Makefile > src/sys/lkm/compat/linux: Makefile > src/sys/lkm/compat/pecoff: Makefile > src/sys/lkm/compat/svr4: Makefile > src/sys/nfs: nfs_subs.c > src/sys/sys: exec.h filedesc.h namei.h > src/sys/uvm: uvm_swap.c > > Log Message: > 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. Why didn't you submit these changes to tech-kern for review? Anything this big really needs to be looked at before checking in. Take care, Bill
Attachment:
pgpfsLkSH1e4N.pgp
Description: PGP signature