Up to [cvs.NetBSD.org] / src / lib / librumphijack
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.100 / (download) - annotate - [select for diffs], Tue Oct 16 12:56:10 2012 UTC (7 months, 1 week ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
tls-maxphys-nbase,
tls-maxphys-base,
agc-symver-base,
agc-symver,
HEAD
Changes since 1.99: +35 -8
lines
Diff to previous 1.99 (colored)
* avoid problems if the platform calls readlink() from dlsym() * alias __read_chk() to read() on Linux (technically, though, it should call host __read_chk() instead of read())
Revision 1.99 / (download) - annotate - [select for diffs], Wed Sep 12 10:35:10 2012 UTC (8 months, 1 week ago) by martin
Branch: MAIN
Changes since 1.98: +54 -21
lines
Diff to previous 1.98 (colored)
When emulating poll/select better tell the events of the host kernel apart from those received from the rump kernel. Also handle timeout. Patch from pooka.
Revision 1.98 / (download) - annotate - [select for diffs], Mon Sep 3 12:07:42 2012 UTC (8 months, 2 weeks ago) by pooka
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.97: +7 -6
lines
Diff to previous 1.97 (colored)
one more patch for supporting linux-based networking clients
Revision 1.97 / (download) - annotate - [select for diffs], Mon Sep 3 11:33:35 2012 UTC (8 months, 2 weeks ago) by pooka
Branch: MAIN
Changes since 1.96: +84 -23
lines
Diff to previous 1.96 (colored)
More fixes for Linux (or glibc, really).
Revision 1.96 / (download) - annotate - [select for diffs], Sat Aug 25 18:00:06 2012 UTC (8 months, 4 weeks ago) by pooka
Branch: MAIN
Changes since 1.95: +159 -37
lines
Diff to previous 1.95 (colored)
Make librumphijack compile and work on Linux. Do not try to hijack calls which are not supported on Linux and therefore cannot be handled by the rump kernel side syscall emulation (not that they'd be present in the calling binaries anyway).
Revision 1.95 / (download) - annotate - [select for diffs], Sat Aug 4 03:56:47 2012 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.94: +26 -9
lines
Diff to previous 1.94 (colored)
Implement link(2) in rumphijack. Add a couple trivial test cases.
Revision 1.94 / (download) - annotate - [select for diffs], Fri Jun 29 13:20:25 2012 UTC (10 months, 3 weeks ago) by yamt
Branch: MAIN
Changes since 1.93: +118 -12
lines
Diff to previous 1.93 (colored)
implement descriptor passing.
Revision 1.93 / (download) - annotate - [select for diffs], Mon Jun 25 22:32:47 2012 UTC (10 months, 4 weeks ago) by abs
Branch: MAIN
Changes since 1.92: +3 -3
lines
Diff to previous 1.92 (colored)
Update old-style definitions to ANSI, remove a couple of register definitions along the way. Fixed gcc 4.1 build (thank you vax)
Revision 1.92 / (download) - annotate - [select for diffs], Wed Apr 18 10:37:37 2012 UTC (13 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5
Changes since 1.91: +7 -6
lines
Diff to previous 1.91 (colored)
poll(), pollts() and select() all return int values, but in the hijack emulation of them these get passed as exit values from a pthread as a void* (c.f. pthread_join(), pthread_exit()). Do not use the address of an int variable for these, but provide the address of a void* and assign the value afterwards. Fixes hijacking of pollts/select on 64bit big endian hosts. Spotted by and fix from pooka.
Revision 1.91 / (download) - annotate - [select for diffs], Wed Feb 1 05:34:41 2012 UTC (15 months, 3 weeks ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base4,
netbsd-6-base
Branch point for: netbsd-6
Changes since 1.90: +16 -8
lines
Diff to previous 1.90 (colored)
Change the syscall API for quotas over to the new non-proplib one.
- struct vfs_quotactl_args -> struct quotactl_args
- add sys/stdint.h to sys/quotactl.h for clean userland build
- install sys/quotactl.h in /usr/include
- update set lists for same
- add new marshalling code in libquota
- add new unmarshalling code in vfs_syscalls.c
- discard proplib interpreter code in vfs_quotactl.c
- add dispatching code for the 14 quotactl ops in vfs_quotactl.c
- mark the proplib quotactl syscall obsolete
- add a new syscall number for the new quotactl syscall
- change the name of the syscall to __quotactl()
- remove the decl of the old quotactl from quota/quotaprop.h
- add a decl of the new quotactl to sys/quotactl.h
- update the libc build
- update ktruss
- remove proplib marshalling code from libquota
- update copy of syscall table in gdb ppc sources
- hack rumphijack to accomodate new quotactl name (as I recall,
pooka wanted such a name change to simplify something, but I
don't really see what/how)
This change appears to require a kernel version bump for rumpish
reasons.
Revision 1.90 / (download) - annotate - [select for diffs], Thu Apr 21 13:38:14 2011 UTC (2 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
cherry-xenmp-base,
cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.89: +5 -24
lines
Diff to previous 1.89 (colored)
Disable Fortification for pthread and rump stubs.
Revision 1.89 / (download) - annotate - [select for diffs], Thu Apr 21 08:21:13 2011 UTC (2 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.88: +4 -7
lines
Diff to previous 1.88 (colored)
Backout previous, it breaks lots of tests (tests/lib/librumphijack for example).
Revision 1.88 / (download) - annotate - [select for diffs], Wed Apr 13 12:40:54 2011 UTC (2 years, 1 month ago) by he
Branch: MAIN
Changes since 1.87: +4 -3
lines
Diff to previous 1.87 (colored)
Move the forward declaration of _sys_readlink() outside of the #if, so that the build succeeds even if _FORTIFY_SOURCE isn't > 0.
Revision 1.87 / (download) - annotate - [select for diffs], Tue Apr 12 19:49:48 2011 UTC (2 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.86: +5 -3
lines
Diff to previous 1.86 (colored)
Fix SSP builds (Vladimir Kirillov)
Revision 1.86 / (download) - annotate - [select for diffs], Mon Mar 14 15:15:47 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.85: +3 -3
lines
Diff to previous 1.85 (colored)
fdoff is descriptive enough
Revision 1.85 / (download) - annotate - [select for diffs], Mon Mar 14 15:13:26 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.84: +44 -19
lines
Diff to previous 1.84 (colored)
Make fdoffset configurable. Also, enforce that host descriptors are smaller than the offset.
Revision 1.84 / (download) - annotate - [select for diffs], Thu Mar 10 23:02:56 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.83: +3 -3
lines
Diff to previous 1.83 (colored)
Use rumphijack_dlsym() to figure out where __sysctl() is during init. Otherwise powerpc dlsym() DTWT and returns NULL. (now i have no idea why dlsym() it works from rcinit(), but i'll opt to not care) Hah, only took 15min to debug that crap this time around. I'm quickly approaching zero-time with it.
Revision 1.83 / (download) - annotate - [select for diffs], Thu Mar 10 09:47:32 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.82: +23 -43
lines
Diff to previous 1.82 (colored)
Revert 1.81 and do it in a saner way with an ifdef. Later, when the naming crisis is resolved, we can probably support rump kernel quotas from nb5 also.
Revision 1.82 / (download) - annotate - [select for diffs], Wed Mar 9 23:26:19 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.81: +7 -7
lines
Diff to previous 1.81 (colored)
Make getfh() a pathcall instead of a fhcall. while it does pertain to file handles, it still gets passed a path and we can DTRT based on that.
Revision 1.81 / (download) - annotate - [select for diffs], Wed Mar 9 20:48:57 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.80: +46 -18
lines
Diff to previous 1.80 (colored)
Make this compile/work on NetBSD 5 once again.
Revision 1.80 / (download) - annotate - [select for diffs], Wed Mar 9 18:45:30 2011 UTC (2 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.79: +12 -2
lines
Diff to previous 1.79 (colored)
Add quotactl(2)
Revision 1.79 / (download) - annotate - [select for diffs], Wed Mar 9 18:06:22 2011 UTC (2 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.78: +6 -6
lines
Diff to previous 1.78 (colored)
Fix last entries, make it work again.
Revision 1.78 / (download) - annotate - [select for diffs], Wed Mar 9 15:03:18 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.77: +218 -10
lines
Diff to previous 1.77 (colored)
Add a bunch of process-wide hijack calls. Among other things, it's now possible to use unmodified userspace binaries (rpcbind, mountd, nfsd) to start a rump nfs service and mount file systems from it. pain-rustique:42:~> mount rumpfs on / type rumpfs (local) 10.1.1.1:/export on /mnt type nfs
Revision 1.77 / (download) - annotate - [select for diffs], Wed Mar 9 09:17:12 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.76: +2 -4
lines
Diff to previous 1.76 (colored)
g/c unused global
Revision 1.76 / (download) - annotate - [select for diffs], Tue Mar 8 21:36:01 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.75: +8 -4
lines
Diff to previous 1.75 (colored)
Enforce that the path=/rump specifier specifies and actual path prefix and doesn't accept e.g. /rumpdev (only /rump/dev).
Revision 1.75 / (download) - annotate - [select for diffs], Tue Mar 8 20:59:01 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.74: +95 -48
lines
Diff to previous 1.74 (colored)
Add ``blanket''. It acts like path, except that the prefix does _not_ get removed if the call goes to the rump namespace. So, now it's possible to use e.g. tcpdump (and most other utilities which hardcore a /dev pathname) on a rump kernel: golem> setenv RUMPHIJACK blanket=/dev/bpf golem> tcpdump -n -i virt0 tcpdump: WARNING: SIOCGIFADDR: virt0: Device not configured tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on virt0, link-type EN10MB (Ethernet), capture size 96 bytes 21:55:38.925596 IP 192.168.2.101 > 204.152.190.12: ICMP echo request, id 47811, seq 0, length 64 21:55:39.095596 IP 204.152.190.12 > 192.168.2.101: ICMP echo reply, id 47811, seq 0, length 64 (if you additionally set socket=all in RUMPHIJACK, tcpdump doesn't whine about the "not configured" interface)
Revision 1.74 / (download) - annotate - [select for diffs], Tue Mar 1 10:54:06 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.73: +4 -2
lines
Diff to previous 1.73 (colored)
another comment
Revision 1.73 / (download) - annotate - [select for diffs], Tue Mar 1 10:47:29 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.72: +7 -2
lines
Diff to previous 1.72 (colored)
comment
Revision 1.72 / (download) - annotate - [select for diffs], Mon Feb 28 20:39:07 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.71: +10 -5
lines
Diff to previous 1.71 (colored)
make compiler sign-happy
Revision 1.71 / (download) - annotate - [select for diffs], Mon Feb 28 19:57:36 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.70: +190 -79
lines
Diff to previous 1.70 (colored)
A simple dup2-enforced affine transformation isn't enough when dealing with dup2() from a rump kernel fd to a host kernel fd. Consider: s1 = socket(); s2 = socket(); dup2(s2, 0); Instead, maintain a real mapping table (and get on my knees and pray i don't have to touch this hair-splitting code ever again). Apparently bourne shell scripts from a rump kernel fs work now (sh script.sh; ./script.sh doesn't work for obvious "IT'S THE WRONG FS NAMESPACE" reasons). No test regressions either, so I'm a happy camper.
Revision 1.70 / (download) - annotate - [select for diffs], Sun Feb 27 11:32:12 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.69: +4 -4
lines
Diff to previous 1.69 (colored)
make error messages sensible. from uwe
Revision 1.69 / (download) - annotate - [select for diffs], Fri Feb 25 18:36:36 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.68: +3 -2
lines
Diff to previous 1.68 (colored)
whoops, didn't mean to delete futimes in previous. also from riz
Revision 1.68 / (download) - annotate - [select for diffs], Fri Feb 25 18:29:00 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.67: +12 -3
lines
Diff to previous 1.67 (colored)
support mknod. from riz
Revision 1.67 / (download) - annotate - [select for diffs], Thu Feb 24 12:25:44 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.66: +2 -4
lines
Diff to previous 1.66 (colored)
Make the rumphijack dlsym trampoline call from rumpclient a "real" function call instead of a call through a function pointer. Apparently powerpc ld.elf_so gets __hackish_return_address() wrong if the call is done through a function pointer (digging deeper into that stuff is beyond my interest). Thanks to riz for providing access to a macppc for debugging. Unthanks to the broken toolchain in the default installation which wasted approximately 4 hours of time last night.
Revision 1.66 / (download) - annotate - [select for diffs], Wed Feb 23 15:44:38 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.65: +26 -14
lines
Diff to previous 1.65 (colored)
Return value audit: properly set errno and return -1. Fixes at least cross-kernel mv(1).
Revision 1.65 / (download) - annotate - [select for diffs], Wed Feb 23 15:29:21 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.64: +9 -2
lines
Diff to previous 1.64 (colored)
+access(2)
Revision 1.64 / (download) - annotate - [select for diffs], Wed Feb 23 15:23:15 2011 UTC (2 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.63: +5 -27
lines
Diff to previous 1.63 (colored)
Put the dlsym-from-this-object trampoline into a separate source module which is compiled -fno-optimize-sibling-calls instead of trying to fool the optimizer in various ways in the trampoline. thanks to yamt for the tip
Revision 1.63 / (download) - annotate - [select for diffs], Mon Feb 21 20:11:56 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.62: +4 -2
lines
Diff to previous 1.62 (colored)
If minfd for F_DUPFD is >= hijackoff, assume it means a minimum value in the rump kernel and adjust accordingly.
Revision 1.62 / (download) - annotate - [select for diffs], Mon Feb 21 13:19:35 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.61: +19 -2
lines
Diff to previous 1.61 (colored)
disallow mmap(MAP_FILE) from a rump kernel fd
Revision 1.61 / (download) - annotate - [select for diffs], Mon Feb 21 12:55:21 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.60: +5 -6
lines
Diff to previous 1.60 (colored)
Actually, we need both lseek and _lseek so that out-of-libc references go to the right place instead of directly to __lseek. Seeking in mplayer works now.
Revision 1.60 / (download) - annotate - [select for diffs], Mon Feb 21 12:51:06 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.59: +51 -4
lines
Diff to previous 1.59 (colored)
hijack:
1) {,f,l}chflags (used e.g. by cp(1))
2) p{read,write}{,v} (used by many)
Revision 1.59 / (download) - annotate - [select for diffs], Sun Feb 20 23:47:04 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.58: +33 -14
lines
Diff to previous 1.58 (colored)
fix tests/lib/librumphijack/t_asyncio:invafd -- dual poll on invalid fd
Revision 1.58 / (download) - annotate - [select for diffs], Sat Feb 19 19:17:33 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.57: +4 -4
lines
Diff to previous 1.57 (colored)
fix symlink pathname examination (rationale-to-joerg: so that it works)
Revision 1.57 / (download) - annotate - [select for diffs], Sat Feb 19 13:10:35 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.56: +58 -2
lines
Diff to previous 1.56 (colored)
hijack __getcwd()
Revision 1.56 / (download) - annotate - [select for diffs], Sat Feb 19 13:09:40 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.55: +4 -4
lines
Diff to previous 1.55 (colored)
and now with less crazy whitespace
Revision 1.55 / (download) - annotate - [select for diffs], Sat Feb 19 13:07:53 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.54: +8 -2
lines
Diff to previous 1.54 (colored)
support PF_OROUTE and PF_MPLS where available
Revision 1.54 / (download) - annotate - [select for diffs], Fri Feb 18 19:27:06 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.53: +6 -4
lines
Diff to previous 1.53 (colored)
hijack libc-internal name for lseek so that libc-internal callers go to the right kernel too.
Revision 1.53 / (download) - annotate - [select for diffs], Fri Feb 18 14:44:46 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.52: +5 -2
lines
Diff to previous 1.52 (colored)
block cross-kernel rename in the other direction also
Revision 1.52 / (download) - annotate - [select for diffs], Fri Feb 18 14:33:11 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.51: +21 -8
lines
Diff to previous 1.51 (colored)
fix rename
Revision 1.51 / (download) - annotate - [select for diffs], Fri Feb 18 14:25:04 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.50: +3 -2
lines
Diff to previous 1.50 (colored)
uhm, put PF_LOCAL on the socketlist
Revision 1.50 / (download) - annotate - [select for diffs], Fri Feb 18 13:04:52 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.49: +3 -3
lines
Diff to previous 1.49 (colored)
give the signmonkey a banana
Revision 1.49 / (download) - annotate - [select for diffs], Fri Feb 18 11:41:32 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.48: +139 -30
lines
Diff to previous 1.48 (colored)
Use the env variable RUMPHIJACK to specify what facilities should be hijacked. If it's not specified, the default is "path=/rump,socket=all:nolocal". So, if you're moof and want to relive your domain/os days (??), you can do this: pain-rustique:51:~> setenv RUMPHIJACK 'path=//' pain-rustique:52:~> df //dev Filesystem 1K-blocks Used Avail %Cap Mounted on rumpfs 1 1 0 100% / pain-rustique:53:~> df /dev Filesystem 1K-blocks Used Avail %Cap Mounted on /dev/wd0a 1019864 280640 688232 28% /
Revision 1.48 / (download) - annotate - [select for diffs], Thu Feb 17 17:18:08 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.47: +26 -3
lines
Diff to previous 1.47 (colored)
Support mount/unmount too. So, things are now generally at a stage where you can mount a file system with a userspace server *without* it having to go through puffs. Say, you first start a server with ffs capability and map a host ffs image into it: rump_server -lrumpvfs -lrumpfs_ffs \ -d key=/ffsimg,hostpath=ffs2.img,size=e unix:///tmp/ffsserv Then, configure your shell to talk to the rump server: setenv RUMP_SERVER unix:///tmp/ffsserv setenv LD_PRELOAD /usr/lib/librumphijack.so Create a mountpoint and mount the file system: pain-rustique:60:~> sh $ cd /rump $ ls dev $ ls -l total 1 drwxr-xr-x 2 root wheel 512 Feb 17 18:00 dev $ mkdir mnt $ mount_ffs /ffsimg /rump/mnt mount_ffs: Warning: realpath /ffsimg: No such file or directory $ df -h mnt Filesystem Size Used Avail %Cap Mounted on /ffsimg 496M 380M 91M 80% /mnt $ du -sckh * 192K dev 380M mnt 381M total $ umount -R mnt $ df -h mnt Filesystem Size Used Avail %Cap Mounted on rumpfs 1.0K 1.0K 0B 100% / $ (note, you need -R to umount due to various degrees of unsuccesful magic it attempts to perform without it)
Revision 1.47 / (download) - annotate - [select for diffs], Thu Feb 17 15:20:10 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.46: +50 -8
lines
Diff to previous 1.46 (colored)
In case dup2(n, n+FDOFF) is done, the caller thinks there are two distinct file descriptors, but the rump kernel thinks they are both the same. Now, if either one is closed by the application, "both" will be closed in the rump kernel. To fix this, maintain an alias-mask. It's not a perfect solution, though (consider e.g. F_SETFL). Maybe we should actually dup the fd and maintain a mapping table? Also, prevent the host from opening file descriptors onto the places in the fd namespace that have been dupped. These together fix "cat < /rump/foo" in a hijacked /bin/sh. (the first one makes sure stdin is open in cat and the second one makes sure it doesn't try to cat something from /usr/share/locale instead of stdin)
Revision 1.46 / (download) - annotate - [select for diffs], Thu Feb 17 12:52:33 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.45: +3 -3
lines
Diff to previous 1.45 (colored)
fix signature. from pgoyette
Revision 1.45 / (download) - annotate - [select for diffs], Thu Feb 17 12:23:58 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.44: +373 -10
lines
Diff to previous 1.44 (colored)
Hijack pathname-based system calls. Now all paths starting with /rump are hijacked to go to the rump server. So you can e.g. start a hijacked shell and cd to /rump: $ cd /rump $ pwd /rump $ ls -l dev/null crwxr-xr-x 1 root wheel 2, 2 Feb 17 12:35 dev/null $ ls -l /dev/null crw-rw-rw- 1 root wheel 2, 2 Dec 22 2009 /dev/null $ chmod 0 /dev/null chmod: /dev/null: Operation not permitted $ chmod 0 dev/null $ ls -l /rump/dev/null c--------- 1 root wheel 2, 2 Feb 17 12:35 /rump/dev/null (of course the rump server must have vfs loaded for that to work)
Revision 1.44 / (download) - annotate - [select for diffs], Wed Feb 16 19:26:58 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: bouyer-quota2-base
Changes since 1.43: +8 -11
lines
Diff to previous 1.43 (colored)
* set default server connection retry to 0 (no reconnection attempts). while for some cases attempting retry after server restart works brilliantly (e.g. firefox), in other cases it's quite disasterous (sshd doesn't like its file descriptors going missing and does not attempt to reopen them, leading to a quite catastophic loop of EBADF once the server does come back) * rename RUMPHIJACK_RETRY to the slightly more sensible RUMPHIJACK_RETRYCONNECT
Revision 1.43 / (download) - annotate - [select for diffs], Wed Feb 16 17:56:46 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.42: +5 -3
lines
Diff to previous 1.42 (colored)
Support vfork. Add rumpclient wrapper for daemon(3).
Revision 1.42 / (download) - annotate - [select for diffs], Wed Feb 16 15:33:46 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.41: +23 -35
lines
Diff to previous 1.41 (colored)
Push the fiddly tasks for exec and fork from rumphijack to rumpclient. This makes it possible easily execute those operations also from non-hijacked rump clients (plus fixes one memory leak in an error branch).
Revision 1.41 / (download) - annotate - [select for diffs], Tue Feb 15 14:01:52 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.40: +3 -4
lines
Diff to previous 1.40 (colored)
dup() is now implemented using fcntl()
Revision 1.40 / (download) - annotate - [select for diffs], Tue Feb 15 13:59:28 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.39: +125 -48
lines
Diff to previous 1.39 (colored)
Properly implement fcntl commands: F_DUPFD, F_CLOSEM, F_MAXFD
Revision 1.39 / (download) - annotate - [select for diffs], Mon Feb 14 14:56:23 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.38: +77 -9
lines
Diff to previous 1.38 (colored)
A bunch of changes which essentially make sshd work with a hijacked
rump tcp/ip stack:
* sshd likes to fork and then re-exec itself
==> trap execve() and augment the env with the current parameters
essential to a rump kernel (kernel communication fd, information
about dup2'd file descriptors)
* sshd likes to play lots of games with pipes, socketpairs and dup{,2}()
==> make sure we do not close essential rump client descriptors:
dup() them to a safe place, except for F_CLOSEM where we
simply leave them alone. also, partially solved by the above,
make sure the process's set of rump kernel descriptors persists
over exec()
* sshd likes to chdir() before exec
==> for unix-style rump_sp(7) sockets save the full path on the
initial exec and use it afterwards. thread the path through
the environment in execve()
Revision 1.38 / (download) - annotate - [select for diffs], Sat Feb 12 10:25:46 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.37: +3 -4
lines
Diff to previous 1.37 (colored)
Fix select() if no fds are set. patch from Alexander Nasonov, PR lib/44552
Revision 1.37 / (download) - annotate - [select for diffs], Fri Feb 11 14:02:12 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.36: +3 -3
lines
Diff to previous 1.36 (colored)
play the important typecast game
Revision 1.36 / (download) - annotate - [select for diffs], Fri Feb 11 12:46:41 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.35: +19 -6
lines
Diff to previous 1.35 (colored)
ssh mostly ignores the return value of select(), so if the timeout expired it would assume that all input set descriptors had activity. In case we get rv == 0 from the poll backend, zero out the fd sets to signal that in fact no descriptors have activity. Before this commit ssh was "jittery" when run through a rump tcp/ip stack (interactive sessions kept blocking on stdin and you had to "peddle" the connection). Now it works smoothly ... or at least smoothly enough so that this commit could be done through a rump tcp/ip stack: USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root ssh 125 0 tcp localhost.65517 cvs.netbsd.org.22
Revision 1.35 / (download) - annotate - [select for diffs], Tue Feb 8 19:12:54 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.34: +8 -8
lines
Diff to previous 1.34 (colored)
Fix pasto, use GETSYSCALLS() where possible
Revision 1.34 / (download) - annotate - [select for diffs], Tue Feb 8 14:45:35 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.33: +57 -20
lines
Diff to previous 1.33 (colored)
Make sure we can do host kevent since the -current (and recent nb5) libc resolver uses it. Error out in case of rump fd kevent (TODO). Fixes one more problem pointed out by Alexander Nasonov. Also, implement dup(). (TODO: implement it along the fcntl path too)
Revision 1.33 / (download) - annotate - [select for diffs], Tue Feb 8 12:20:11 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.32: +3 -2
lines
Diff to previous 1.32 (colored)
add std dprint to fdcall
Revision 1.32 / (download) - annotate - [select for diffs], Mon Feb 7 19:34:39 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.31: +16 -3
lines
Diff to previous 1.31 (colored)
Force gcc to generate a stack frame for the call to dlsym(RTLD_NEXT). Without this hack at least amd64 -O2 just used jmp and The Wrong Thing happened.
Revision 1.31 / (download) - annotate - [select for diffs], Mon Feb 7 12:23:05 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.30: +6 -4
lines
Diff to previous 1.30 (colored)
duh, _sys_read, not read. STAY FIXED, DAMNIT!
Revision 1.30 / (download) - annotate - [select for diffs], Mon Feb 7 11:51:02 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.29: +3 -3
lines
Diff to previous 1.29 (colored)
Unbreak the ssp lossage from the default -current build by removing it. I still don't have any idea what the ssp stuff is supposed to do and how it's supposed to even begin to work. If someone wants to change this now, run tests/lib/librumphijack before commit so that I can avoid another multihour debugging session!
Revision 1.29 / (download) - annotate - [select for diffs], Mon Feb 7 10:28:18 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.28: +13 -13
lines
Diff to previous 1.28 (colored)
call the non-compat pollts() from inside the library
Revision 1.28 / (download) - annotate - [select for diffs], Sun Feb 6 15:48:20 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.27: +28 -3
lines
Diff to previous 1.27 (colored)
make it possible to specify client connection retry model in RUMPHIJACK_RETRY
Revision 1.27 / (download) - annotate - [select for diffs], Sun Feb 6 13:05:19 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.26: +8 -6
lines
Diff to previous 1.26 (colored)
be kinder about kqueue() (but paradoxically omit the surprise)
Revision 1.26 / (download) - annotate - [select for diffs], Sat Feb 5 16:59:24 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.25: +3 -3
lines
Diff to previous 1.25 (colored)
uncommit part of previous which wasn't supposed to change
Revision 1.25 / (download) - annotate - [select for diffs], Sat Feb 5 16:57:39 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.24: +23 -4
lines
Diff to previous 1.24 (colored)
Wrap daemon() since it forks. Otherwise we lose the rumpclient kq descriptor and have multiple processes using the commfd.
Revision 1.24 / (download) - annotate - [select for diffs], Sat Feb 5 12:38:19 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.23: +5 -8
lines
Diff to previous 1.23 (colored)
Fix some snafus to allow rumphijack to work on -current. reported by Alexander Nasonov
Revision 1.23 / (download) - annotate - [select for diffs], Thu Jan 27 18:12:19 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.22: +8 -12
lines
Diff to previous 1.22 (colored)
Use NEEDED for librumpclient instead of loading it manually.
Revision 1.22 / (download) - annotate - [select for diffs], Thu Jan 27 18:05:16 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.21: +4 -6
lines
Diff to previous 1.21 (colored)
Set server reconnection timeout to infinite. There probably need to be some toggle eventually, but for now I'm optimizing the default for my firefox use ;)
Revision 1.21 / (download) - annotate - [select for diffs], Wed Jan 26 18:48:32 2011 UTC (2 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.20: +25 -3
lines
Diff to previous 1.20 (colored)
make SSP friendly
Revision 1.20 / (download) - annotate - [select for diffs], Tue Jan 25 17:37:00 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.19: +6 -5
lines
Diff to previous 1.19 (colored)
fix compilation on -current
Revision 1.19 / (download) - annotate - [select for diffs], Tue Jan 25 12:53:45 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.18: +6 -5
lines
Diff to previous 1.18 (colored)
the usual fun for WARNS=4 signed, unsigned
Revision 1.18 / (download) - annotate - [select for diffs], Tue Jan 25 12:21:36 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.17: +3 -3
lines
Diff to previous 1.17 (colored)
dramatic whitespace fix
Revision 1.17 / (download) - annotate - [select for diffs], Tue Jan 25 12:18:33 2011 UTC (2 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.16: +282 -438
lines
Diff to previous 1.16 (colored)
Rewrite to declare most dual-kernel calls with macros. This helps with adding new calls and makes all existing fd-accepting hijacked calls dual-kernel. It would be better to autogenerate the code from syscalls.master, but this is easier for now.
Revision 1.16 / (download) - annotate - [select for diffs], Wed Jan 19 11:27:01 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Branch point for: bouyer-quota2
Changes since 1.15: +23 -9
lines
Diff to previous 1.15 (colored)
Do the standard dance for sendto/recvfrom since nspluginwrapper wants to use them. XXX: need to fold the dance sequence into a common routine.
Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 18 23:43:21 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.14: +6 -6
lines
Diff to previous 1.14 (colored)
fix lp64 snafu (hopefully) from pgoyette
Revision 1.14 / (download) - annotate - [select for diffs], Tue Jan 18 19:41:02 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.13: +34 -9
lines
Diff to previous 1.13 (colored)
* attempt to match libc non-compat names (XXX: needs work) * make shutdown() a dual-stack call * flip the default to use host for PF_UNIX, since that's generally the desired case (because of X)
Revision 1.13 / (download) - annotate - [select for diffs], Tue Jan 18 16:00:04 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.12: +3 -2
lines
Diff to previous 1.12 (colored)
pollts: Since fds[] does not go to both kernels, set revents to 0 when splitting the vector. Now any stale revents passed by the caller do not get counted as results for the kernel which did not "win" the poll. This fixes a situation where a firefox transfer would occasionally stall. Now firefox works full speed with a rump networking stack.
Revision 1.12 / (download) - annotate - [select for diffs], Tue Jan 18 14:51:14 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.11: +5 -2
lines
Diff to previous 1.11 (colored)
Don't count sparse elements in the poll vector for host fds.
Revision 1.11 / (download) - annotate - [select for diffs], Tue Jan 18 14:45:30 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.10: +3 -3
lines
Diff to previous 1.10 (colored)
Fix conversion: there are 1000*1000 nanoseconds in a millisecond, not 1000.
Revision 1.10 / (download) - annotate - [select for diffs], Tue Jan 18 11:04:10 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.9: +24 -10
lines
Diff to previous 1.9 (colored)
Fix dup2 mask so that dup2'ing a rump kernel fd to 1 does not cause stderr to be treated as a rump kernel fd as well. Makes e.g. bozohttpd work better with stderr logging. Also, add aborty stubs for kqueue. (implementing kqueue is even trickier than implementing select/poll since we need to keep state for two kqueue fd's)
Revision 1.9 / (download) - annotate - [select for diffs], Mon Jan 17 16:30:09 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.8: +4 -4
lines
Diff to previous 1.8 (colored)
Use host_close() instead of close() where we know it to be the right interface.
Revision 1.8 / (download) - annotate - [select for diffs], Mon Jan 17 16:27:54 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.7: +31 -45
lines
Diff to previous 1.7 (colored)
Adapt to rump syscall changes. The correct rump compat syscall is now automatically picked based on the ABI of the target the library is compiled for. (the host libc symbolname to override still needs a little attention based on the system version)
Revision 1.7 / (download) - annotate - [select for diffs], Sun Jan 9 19:56:33 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.6: +98 -33
lines
Diff to previous 1.6 (colored)
Networked X11 clients have the annoying property that they need to contact the X server. Since most of the useful cases these days are local, add a toggle which forwards PF_LOCAL sockets to the host and all other protocol families to the rump kernel. This makes an unmodified firefox work with a rump TCP/IP stack. I'm sure someone will find applications for being able to run multiple web browser profiles on one OS with each browser having a different IP address in the same subnet ...
Revision 1.6 / (download) - annotate - [select for diffs], Sun Jan 9 14:15:06 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.5: +9 -5
lines
Diff to previous 1.5 (colored)
Don't depend on malloc(0) returning non-NULL.
Revision 1.5 / (download) - annotate - [select for diffs], Sun Jan 9 10:28:46 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.4: +19 -6
lines
Diff to previous 1.4 (colored)
dprintf to stderr. stop doing it if stderr_fileno gets dup2()'d
Revision 1.4 / (download) - annotate - [select for diffs], Sat Jan 8 21:30:24 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.3: +91 -68
lines
Diff to previous 1.3 (colored)
Support dual kernel select() by emulating it with pollts(). It would have been much easier if up to and including 5.0 we wouldn't silently cap the nfds argument to poll(!!!). Makes things like socket(1) work out-of-the-box, and pretty much every other decidedly prehistoric select() user. (netcat is a slight exception since it sets FD_SETSIZE, a.k.a. interface-of-the-year, to 16)
Revision 1.3 / (download) - annotate - [select for diffs], Sat Jan 8 18:11:46 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.2: +53 -25
lines
Diff to previous 1.2 (colored)
support pollts and rewrite poll in terms of pollts
Revision 1.2 / (download) - annotate - [select for diffs], Sat Jan 8 14:19:27 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.1: +189 -95
lines
Diff to previous 1.1 (colored)
Support fork() and dup2(). This is sufficient to make an unmodified httpd(8) be able to serve pages via a rump networking stack.
Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 7 19:52:43 2011 UTC (2 years, 4 months ago) by pooka
Branch: MAIN
Begin work on a syscall hijacking library which can be LD_PRELOADed to convince non-rumped applications to communicate with a rump kernel instead of the host kernel. The precision of what goes where is not exactly surgical, but for example when wanting to debug a web server's TCP/IP stack interaction, it might be enough. When all you have is a hand grenade, all problems look like a .... hmm? There's still plenty to figure out. For example, I'm not sure what the user interface will be like. Now it just attempts to hijack network communication. It also needs to sync with symbol renaming in libc, and maybe autogenerate the non-schizophrenic wrappers where the communication is heading to exactly one destination, lest I'll be a mummmy by the time I finish writing them all. As a fun example of a non-non-schizophrenic one, consider poll(). Work in progress, but I managed to get two non-rumped netcats talking to each other or fetching the index from a non-rumped thttpd. telnet works in one direction (i can read the data from netcat, but anything i send back is not printed). bozohttpd uses dup2() which i haven't bothered to address yet, etcetc. (not hooking this up the build for now)