The NetBSD Project

CVS log for src/lib/librumphijack/hijack.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / librumphijack

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.136 / (download) - annotate - [select for diffs], Sat Apr 16 18:15:20 2022 UTC (9 months, 2 weeks ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.135: +3 -3 lines
Diff to previous 1.135 (colored)

fix various typos in comments and log messages.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Sep 11 14:22:12 2021 UTC (16 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.134: +2 -7 lines
Diff to previous 1.134 (colored)

remove fake closefrom()

Revision 1.134 / (download) - annotate - [select for diffs], Sat Sep 11 08:32:11 2021 UTC (16 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

librumphijack: fix typo for NetBSD < 5.99.7

Revision 1.133 / (download) - annotate - [select for diffs], Fri Sep 10 21:22:05 2021 UTC (16 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.132: +7 -2 lines
Diff to previous 1.132 (colored)

Ignore closefrom(3) for now; too complicated to descern between regular
and rump fds.

Revision 1.132 / (download) - annotate - [select for diffs], Fri Sep 10 20:33:38 2021 UTC (16 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.131: +90 -65 lines
Diff to previous 1.131 (colored)

- implement pselect so that the ssh test has a chance to work
- 1 -> EXIT_FAILURE
- more info about fds

Revision 1.131 / (download) - annotate - [select for diffs], Wed May 27 18:55:36 2020 UTC (2 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.130: +40 -2 lines
Diff to previous 1.130 (colored)

Add pathconf and lpathconf (fixes lib/librumphijack/nfs test which uses ls
which now uses lpathconf)

Revision 1.125.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:16 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.125.2.2: +19 -6 lines
Diff to previous 1.125.2.2 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.125.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:16 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.125.2.1: +5 -5 lines
Diff to previous 1.125.2.1 (colored) to branchpoint 1.125 (colored)

Merge changes from current as of 20200406

Revision 1.130 / (download) - annotate - [select for diffs], Mon Feb 10 23:21:42 2020 UTC (2 years, 11 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp
Changes since 1.129: +4 -4 lines
Diff to previous 1.129 (colored)

Change types of DUP2ALIAS and DUP2FDMASK bit masks to unsigned

This is for consistency with the DUP2BIT change.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Feb 10 09:10:58 2020 UTC (2 years, 11 months ago) by kamil
Branch: MAIN
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

Avoid unportable bit shift semantics

hijack.c:451:52, left shift of 1 by 31 places cannot be represented in type 'int

Revision 1.128 / (download) - annotate - [select for diffs], Wed Sep 25 20:19:59 2019 UTC (3 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.127: +21 -8 lines
Diff to previous 1.127 (colored)

teach hijack about the new vfs syscalls

Revision 1.125.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:27 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.125: +51 -3 lines
Diff to previous 1.125 (colored)

Sync with HEAD

Revision 1.127 / (download) - annotate - [select for diffs], Sun Feb 17 23:35:50 2019 UTC (3 years, 11 months ago) by bad
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.126: +10 -3 lines
Diff to previous 1.126 (colored)

Linux doesn't have paccept().

Revision 1.124.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:28 2018 UTC (4 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.124.2.1: +43 -2 lines
Diff to previous 1.124.2.1 (colored) to branchpoint 1.124 (colored) next main 1.125 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.126 / (download) - annotate - [select for diffs], Sun Dec 16 14:03:37 2018 UTC (4 years, 1 month ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.125: +43 -2 lines
Diff to previous 1.125 (colored)

Add an option "modctl" to capture modctl().

Revision 1.124.2.1 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:23 2018 UTC (4 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.124: +23 -8 lines
Diff to previous 1.124 (colored)

Sync with HEAD

Revision 1.125 / (download) - annotate - [select for diffs], Thu Jun 28 06:20:36 2018 UTC (4 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Branch point for: phil-wifi
Changes since 1.124: +23 -8 lines
Diff to previous 1.124 (colored)

rumphijack: don't modify a cmsg on just validating it

Pointed out by k-goda@IIJ

Revision 1.122.4.1 / (download) - annotate - [select for diffs], Wed Feb 28 18:53:06 2018 UTC (4 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.122: +21 -2 lines
Diff to previous 1.122 (colored) next main 1.123 (colored)

Pull up following revision(s) (requested by maya in ticket #594):
	lib/librumphijack/hijack.c: revision 1.123
since ln(1) now uses linkat(2) provide a dumb wrapper.

Revision 1.124 / (download) - annotate - [select for diffs], Mon Oct 23 06:52:17 2017 UTC (5 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.123: +4 -3 lines
Diff to previous 1.123 (colored)

Provide better debug messages for ioctl

Revision 1.123 / (download) - annotate - [select for diffs], Tue Jun 6 19:48:42 2017 UTC (5 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Changes since 1.122: +21 -2 lines
Diff to previous 1.122 (colored)

since ln(1) now uses linkat(2) provide a dumb wrapper.

Revision 1.121.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:12 2017 UTC (5 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.121: +34 -3 lines
Diff to previous 1.121 (colored) next main 1.122 (colored)

Sync with HEAD

Revision 1.119.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:00 2017 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.119.2.1: +34 -3 lines
Diff to previous 1.119.2.1 (colored) to branchpoint 1.119 (colored) next main 1.120 (colored)

Sync with HEAD

Revision 1.122 / (download) - annotate - [select for diffs], Thu Feb 16 08:08:01 2017 UTC (5 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.121: +34 -3 lines
Diff to previous 1.121 (colored)

Support paccept for nc

Revision 1.119.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:05 2017 UTC (6 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.121 / (download) - annotate - [select for diffs], Fri Dec 2 20:53:36 2016 UTC (6 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored)

fix test lib/librumphijack/t_sh/runscript
(handle F_DUPFD_CLOEXEC that the shell is now using)

Revision 1.120 / (download) - annotate - [select for diffs], Thu Aug 11 09:48:57 2016 UTC (6 years, 5 months ago) by kre
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, localcount-20160914
Changes since 1.119: +6 -2 lines
Diff to previous 1.119 (colored)


Object to dup2() if target fd is in the range of fd's that
librumphijack reserves for rump to use.

This is not normally a problem, as most applications don't attempt
to use very high fds - but /bin/sh does.

This fix is something of a kludge - really the apparent fd resource limit
ought to be lowered as well, but this is sufficient to allow the shell
to work (when its dup2() gets rejected, it just tries again with a smaller
target fd until it eventually succeeds.)   This fixes the librumphijack
shell ATF tests.

A better, more comprehensive, fix would be good...

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Thu Mar 3 14:30:52 2016 UTC (6 years, 11 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.109.2.1: +37 -2 lines
Diff to previous 1.109.2.1 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored)

Pull up following revision(s) (requested by nakayama in ticket #1096):
	bin/mv/mv.c: revision 1.44
	bin/cp/utils.c: revision 1.43-1.44
	lib/librumphijack/hijack.c: revision 1.112-1.115
	usr.bin/touch/touch.c: revision 1.33
	sbin/restore/tape.c: revision 1.68
	sbin/restore/dirs.c: revision 1.51
Don't truncate at sub-microsecond while preserving timestamps.

One of motivation of this change is to make the behavior of test(1)
-nt/ot with preserved copy (like cp -p) closer to the NetBSD 6.
Of course whether full timestamps are kept or not depends also on
underlying file system.

The ifdef added in mv(1) since existing ifdefs was our local change
to compile it on solaris (though I couldn't test it):
http://mail-index.netbsd.org/tech-userlevel/2014/11/28/msg008831.html

Fix the name of failed function in warning message.

Hijack utimensat(2) so that t_vfs test passes after cp(1)/mv(1) are
changed to use the system call.  Linux also has this system call, but
not tested this on linux.

Also hijack futimens(2) so that t_sh test passes.

Define a generic ATCALL() and use it to implement utimensat()
Make ATCALL() behave for absolute paths too.

Revision 1.109.2.1.2.1 / (download) - annotate - [select for diffs], Thu Mar 3 14:27:54 2016 UTC (6 years, 11 months ago) by martin
Branch: netbsd-7-0
CVS Tags: netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Changes since 1.109.2.1: +37 -2 lines
Diff to previous 1.109.2.1 (colored) next main 1.109.2.2 (colored)

Pull up following revision(s) (requested by nakayama in ticket #1096):
	bin/mv/mv.c: revision 1.44
	bin/cp/utils.c: revision 1.43-1.44
	lib/librumphijack/hijack.c: revision 1.112-1.115
	usr.bin/touch/touch.c: revision 1.33
	sbin/restore/tape.c: revision 1.68
	sbin/restore/dirs.c: revision 1.51
Don't truncate at sub-microsecond while preserving timestamps.

One of motivation of this change is to make the behavior of test(1)
-nt/ot with preserved copy (like cp -p) closer to the NetBSD 6.
Of course whether full timestamps are kept or not depends also on
underlying file system.

The ifdef added in mv(1) since existing ifdefs was our local change
to compile it on solaris (though I couldn't test it):
http://mail-index.netbsd.org/tech-userlevel/2014/11/28/msg008831.html

Fix the name of failed function in warning message.

Hijack utimensat(2) so that t_vfs test passes after cp(1)/mv(1) are
changed to use the system call.  Linux also has this system call, but
not tested this on linux.

Also hijack futimens(2) so that t_sh test passes.

Define a generic ATCALL() and use it to implement utimensat()
Make ATCALL() behave for absolute paths too.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Aug 25 13:50:19 2015 UTC (7 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726
Branch point for: pgoyette-localcount
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

Remember that dlsym() tends to fail on PowerPC during init (or at least
tended), so call rumphijack_dlsym() instead to be safe.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Aug 25 13:45:00 2015 UTC (7 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.117: +7 -3 lines
Diff to previous 1.117 (colored)

allow mmap() to be called before init runs

Revision 1.117 / (download) - annotate - [select for diffs], Sat Apr 11 12:54:41 2015 UTC (7 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.116: +4 -3 lines
Diff to previous 1.116 (colored)

Define the expansion of the VFORK macro, not the symbol `VFORK'.

Fixes hijacking processes that vfork and exec.  Symptom was the child
would spin with read/EAGAIN <-> kevent/EBADF because the inheritance
mechanism relied on setting the holyfd to -1 on fork...which didn't
happen if we didn't hijack vfork.

ok pooka@

Revision 1.116 / (download) - annotate - [select for diffs], Thu Mar 5 00:26:17 2015 UTC (7 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.115: +4 -2 lines
Diff to previous 1.115 (colored)

Wrap utimensat() only if present on host

fixes buildrump.sh on NetBSD 6.1.5

Revision 1.115 / (download) - annotate - [select for diffs], Wed Mar 4 23:42:26 2015 UTC (7 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored)

Make ATCALL() behave for absolute paths too.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Mar 4 23:31:49 2015 UTC (7 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.113: +34 -7 lines
Diff to previous 1.113 (colored)

Define a generic ATCALL() and use it to implement utimensat()

Revision 1.113 / (download) - annotate - [select for diffs], Tue Mar 3 01:24:39 2015 UTC (7 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.112: +9 -3 lines
Diff to previous 1.112 (colored)

Also hijack futimens(2) so that t_sh test passes.

Revision 1.112 / (download) - annotate - [select for diffs], Tue Mar 3 00:19:07 2015 UTC (7 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.111: +9 -2 lines
Diff to previous 1.111 (colored)

Hijack utimensat(2) so that t_vfs test passes after cp(1)/mv(1) are
changed to use the system call.  Linux also has this system call, but
not tested this on linux.

Revision 1.109.2.1 / (download) - annotate - [select for diffs], Tue Dec 9 20:13:38 2014 UTC (8 years, 1 month ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1
Branch point for: netbsd-7-0
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

Pull up following revision(s) (requested by gson in ticket #303):
	lib/librumphijack/hijack.c: revision 1.110
In case of no dup2'd fd's, make sure that F_CLOSEM for the
rump kernel starts from 0.
Fixes rumphijack fdoff test (notably, this bug had nothing to do with
fdoff, and was exposed >3 years after writing the test when rump kernels
started providing fd's 0/1/2)

Revision 1.111 / (download) - annotate - [select for diffs], Tue Nov 4 19:05:17 2014 UTC (8 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.110: +49 -59 lines
Diff to previous 1.110 (colored)

Use autoconf for rump kernel posix hypercall layer.

This gets rid of homegrown hacks and puts all probes in one place.

Tested for NetBSD (build.sh + anita) and Linux (buildrump.sh)

Revision 1.98.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:21 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.98.2.1: +25 -16 lines
Diff to previous 1.98.2.1 (colored) next main 1.99 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Aug 12 23:47:09 2014 UTC (8 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

In case of no dup2'd fd's, make sure that F_CLOSEM for the
rump kernel starts from 0.

Fixes rumphijack fdoff test (notably, this bug had nothing to do with
fdoff, and was exposed >3 years after writing the test when rump kernels
started providing fd's 0/1/2)

Revision 1.107.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:52:22 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.107: +4 -8 lines
Diff to previous 1.107 (colored) next main 1.108 (colored)

Rebase.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Jul 21 14:23:43 2014 UTC (8 years, 6 months ago) by gson
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.108: +4 -6 lines
Diff to previous 1.108 (colored)

Ignore the contents of revents when poll() returns failure.
This is one more part to the fix for PR kern/46464.  Patch
from pooka.

Revision 1.108 / (download) - annotate - [select for diffs], Sat Jul 19 14:14:21 2014 UTC (8 years, 6 months ago) by gson
Branch: MAIN
Changes since 1.107: +2 -4 lines
Diff to previous 1.107 (colored)

Do not assert that the two threads do not simultanously notify each
other, because sometimes they do.  Should fix PR kern/46464.  OK pooka.

Revision 1.90.4.4 / (download) - annotate - [select for diffs], Thu May 22 11:37:00 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.90.4.3: +23 -10 lines
Diff to previous 1.90.4.3 (colored) to branchpoint 1.90 (colored) next main 1.91 (colored)

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")

Revision 1.107 / (download) - annotate - [select for diffs], Wed Apr 2 17:09:23 2014 UTC (8 years, 10 months ago) by justin
Branch: MAIN
CVS Tags: yamt-pagecache-base9
Branch point for: tls-earlyentropy
Changes since 1.106: +6 -3 lines
Diff to previous 1.106 (colored)

Add Android support for rump kernel.

Reviewed by pooka@

Revision 1.106 / (download) - annotate - [select for diffs], Tue Sep 10 16:53:06 2013 UTC (9 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

use <rump/rumpuser_port.h>

Revision 1.105 / (download) - annotate - [select for diffs], Wed Jul 31 12:23:25 2013 UTC (9 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.104: +2 -3 lines
Diff to previous 1.104 (colored)

remove unnecessary <sys/poll.h> -- musl whines when it's included

Revision 1.104 / (download) - annotate - [select for diffs], Sat Jul 27 17:37:29 2013 UTC (9 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.103: +2 -5 lines
Diff to previous 1.103 (colored)

Extend #undef _FORTIFY_SOURCE to both files to avoid compiler
warning for -O0 and fortify combination.

from Alessio Sergi via github

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Tue Jul 23 21:07:30 2013 UTC (9 years, 6 months ago) by riastradh
Branch: riastradh-drm2
Changes since 1.100: +18 -4 lines
Diff to previous 1.100 (colored) next main 1.101 (colored)

sync with HEAD

Revision 1.103 / (download) - annotate - [select for diffs], Mon Jul 22 12:11:03 2013 UTC (9 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1
Changes since 1.102: +15 -3 lines
Diff to previous 1.102 (colored)

Support Linuxen where libc ioctl has cmd as int unstead of unsigned long.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Jul 20 18:46:15 2013 UTC (9 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.101: +3 -2 lines
Diff to previous 1.101 (colored)

Fixes when compiling against musl libc.

from Justin Cormack via private email

Revision 1.101 / (download) - annotate - [select for diffs], Thu Jul 18 22:58:35 2013 UTC (9 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.100: +4 -3 lines
Diff to previous 1.100 (colored)

sys/cdefs.h should come from rumpuser_port.h

Noticed by Justin Cormack while building against musl libc.

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:00:45 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.98: +87 -27 lines
Diff to previous 1.98 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.90.4.3 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:17 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.90.4.2: +460 -93 lines
Diff to previous 1.90.4.2 (colored) to branchpoint 1.90 (colored)

sync with head

Revision 1.100 / (download) - annotate - [select for diffs], Tue Oct 16 12:56:10 2012 UTC (10 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base, agc-symver-base, agc-symver
Branch point for: riastradh-drm2
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 (10 years, 4 months 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 (10 years, 5 months 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 (10 years, 5 months 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 (10 years, 5 months 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 (10 years, 6 months 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 years, 7 months 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 years, 7 months 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.90.4.2 / (download) - annotate - [select for diffs], Wed May 23 10:07:33 2012 UTC (10 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.90.4.1: +7 -6 lines
Diff to previous 1.90.4.1 (colored) to branchpoint 1.90 (colored)

sync with head.

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Thu Apr 19 20:06:21 2012 UTC (10 years, 9 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.91: +7 -6 lines
Diff to previous 1.91 (colored) next main 1.92 (colored)

Pull up following revision(s) (requested by martin in ticket #188):
	lib/librumphijack/hijack.c: revision 1.92
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.92 / (download) - annotate - [select for diffs], Wed Apr 18 10:37:37 2012 UTC (10 years, 9 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.90.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:33 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.90: +16 -8 lines
Diff to previous 1.90 (colored)

sync with head

Revision 1.91 / (download) - annotate - [select for diffs], Wed Feb 1 05:34:41 2012 UTC (11 years 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 (11 years, 9 months 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 (11 years, 9 months 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 (11 years, 9 months 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 (11 years, 9 months 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 (11 years, 10 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 (11 years, 10 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 (11 years, 10 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 (11 years, 10 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 (11 years, 10 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 (11 years, 10 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 (11 years, 10 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 (11 years, 10 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 (11 years, 10 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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.16.2.4 / (download) - annotate - [select for diffs], Sat Mar 5 15:09:23 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.16.2.3: +931 -101 lines
Diff to previous 1.16.2.3 (colored) next main 1.17 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Tue Mar 1 10:54:06 2011 UTC (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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.16.2.3 / (download) - annotate - [select for diffs], Thu Feb 17 11:59:23 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.16.2.2: +225 -81 lines
Diff to previous 1.16.2.2 (colored)

Sync with HEAD

Revision 1.44 / (download) - annotate - [select for diffs], Wed Feb 16 19:26:58 2011 UTC (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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.16.2.2 / (download) - annotate - [select for diffs], Tue Feb 8 16:19:04 2011 UTC (11 years, 11 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.16.2.1: +413 -501 lines
Diff to previous 1.16.2.1 (colored)

Sync with HEAD

Revision 1.34 / (download) - annotate - [select for diffs], Tue Feb 8 14:45:35 2011 UTC (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (11 years, 11 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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.2.1 / (download) - annotate - [select for diffs], Thu Jan 20 14:24:53 2011 UTC (12 years ago) by bouyer
Branch: bouyer-quota2
Changes since 1.16: +47 -2 lines
Diff to previous 1.16 (colored)

Snapshot of work in progress on a modernised disk quota system:
- new quotactl syscall (versionned for backward compat), which takes
  as parameter a path to a mount point, and a prop_dictionary
  (in plistref format) describing commands and arguments.
  For each command, status and data are returned as a prop_dictionary.
  quota commands features will be added to take advantage of this,
  exporting quota data or getting quota commands as plists.

- new on disk-format storage (all 64bit wide), integrated to metadata for
  ffs (and playing nicely with wapbl).
  Quotas are enabled on a ffs filesystem via superblock flags.
  tunefs(8) can enable or disable quotas.
  On a quota-enabled filesystem, fsck_ffs(8) will track per-uid/gid
  block and inode usages, and will check and update quotas in Pass 6.
  quota usage and limits are stored in unliked files (one for users,
  one for groups)l fsck_ffs(8) will create the files if needed, or
  free them if needed. This means that after enabling or disabling
  quotas on a filesystem; a fsck_ffs(8) run is required.
  quotacheck(8) is not needed any more, on a unclean shutdown
  fsck or journal replay will take care of fixing quotas.
  newfs(8) can create a ready-to-mount quota-enabled filesystem
  (superblock flags are set and quota inodes are created).
  Other new features or semantic changes:
  - default quota datas, applied to users or groups which don't already
    have a quota entry
  - per-user/group grace time (instead of a filesystem global one)
  - 0 really means "nothing allowed at all", not "no limit".
    If you want "no limit", set the limit to UQUAD_MAX (tools will
    understand "unlimited" and "-")

  A quota file is structured as follow:
  it starts with a header, containing a few per-filesystem values,
  and the default quota limits.
  Quota entries are linked together as a simple list, each entry has a
  pointer (as an offset withing the file) to the next.
  The header has a pointer to a list of free quota entries, and
  a hash table of in-use entries. The size of the hash table depends
  on the filesystem block size (header+hash table should fit in the
  first block). The file is not sparse and is a multiple of
  filesystem block size (when the free quota entry list is empty a new
  filesystem block is allocated). quota entries to not cross
  filesystem block boundaries.

  In memory, the kernel keeps a cache of recently used quota entries
  as a reference to the block number, and offset withing the block.
  The quota entry itself is keept in the buf cache.

fsck_ffs(8), tunefs(8) and newfs(8) supports are completed (with
related atf tests :)
The kernel can update disk usage and report it via quotactl(2).

Todo: enforce quotas limits (limits are not checked by kernel yet)
      update repquota, edquota and rpc.rquotad to the new world
      implement compat_50_quotactl ioctl.
      update quotactl(2) man page

fsck_ffs required fixes so that allocating new blocks or inodes will
properly update the superblock and cg sumaries. This was not an issue up
to now because superblock and cg sumaries check happened last, but now
allocations or frees can happen in pass 6.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jan 19 11:27:01 2011 UTC (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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 (12 years 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)

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>