CVS log for src/lib/librumphijack/hijack.c
Up to [cvs.NetBSD.org] / src / lib / librumphijack
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.141: download - view: text, markup, annotated - select for diffs
Tue Nov 12 03:06:58 2024 UTC (3 weeks, 6 days ago) by kre
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +3 -3
lines
dup2() must (except when there's an error) return the new fd. Not 0
unless that happens to be the new fd.
Fixes tests/lib/librumphijack/t_sh/redirect
Revision 1.136.2.1: download - view: text, markup, annotated - select for diffs
Thu Aug 22 19:34:37 2024 UTC (3 months, 2 weeks ago) by martin
Branches: netbsd-10
Diff to: previous 1.136: preferred, colored; next MAIN 1.137: preferred, colored
Changes since revision 1.136: +21 -3
lines
Pull up following revision(s) (requested by ozaki-r in ticket #786):
lib/librumphijack/hijack.c: revision 1.140
librumphijack: support flock
The original author is k-goda@IIJ.
Revision 1.140: download - view: text, markup, annotated - select for diffs
Fri Aug 16 04:23:31 2024 UTC (3 months, 3 weeks ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +21 -3
lines
librumphijack: support flock
The original author is k-goda@IIJ.
Revision 1.139: download - view: text, markup, annotated - select for diffs
Tue Aug 1 07:04:15 2023 UTC (16 months, 1 week ago) by mrg
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +10 -10
lines
fix simple mis-matched function prototype and definitions.
most of these are like, eg
void foo(int[2]);
with either of these
void foo(int*) { ... }
void foo(int[]) { ... }
in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.
found by GCC 12.
Revision 1.138: download - view: text, markup, annotated - select for diffs
Mon Jul 31 04:37:04 2023 UTC (16 months, 1 week ago) by rin
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +3 -3
lines
librump*: Require 10.99.7 or higher for __kevent100
Revision 1.137: download - view: text, markup, annotated - select for diffs
Fri Jul 28 18:19:00 2023 UTC (16 months, 1 week ago) by christos
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +10 -4
lines
Add epoll(2) from Theodore Preduta as part of GSoC 2023
Revision 1.136: download - view: text, markup, annotated - select for diffs
Sat Apr 16 18:15:20 2022 UTC (2 years, 7 months ago) by andvar
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +3 -3
lines
fix various typos in comments and log messages.
Revision 1.135: download - view: text, markup, annotated - select for diffs
Sat Sep 11 14:22:12 2021 UTC (3 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +2 -7
lines
remove fake closefrom()
Revision 1.134: download - view: text, markup, annotated - select for diffs
Sat Sep 11 08:32:11 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +3 -3
lines
librumphijack: fix typo for NetBSD < 5.99.7
Revision 1.133: download - view: text, markup, annotated - select for diffs
Fri Sep 10 21:22:05 2021 UTC (3 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +7 -2
lines
Ignore closefrom(3) for now; too complicated to descern between regular
and rump fds.
Revision 1.132: download - view: text, markup, annotated - select for diffs
Fri Sep 10 20:33:38 2021 UTC (3 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +90 -65
lines
- implement pselect so that the ssh test has a chance to work
- 1 -> EXIT_FAILURE
- more info about fds
Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed May 27 18:55:36 2020 UTC (4 years, 6 months ago) by christos
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +40 -2
lines
Add pathconf and lpathconf (fixes lib/librumphijack/nfs test which uses ls
which now uses lpathconf)
Revision 1.125.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:03:16 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.125.2.2: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.2.2: +19 -6
lines
Mostly merge changes from HEAD upto 20200411
Revision 1.125.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:07:16 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.125.2.1: preferred, colored; branchpoint 1.125: preferred, colored
Changes since revision 1.125.2.1: +5 -5
lines
Merge changes from current as of 20200406
Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Feb 10 23:21:42 2020 UTC (4 years, 9 months ago) by kamil
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
is-mlppp-base,
is-mlppp
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +4 -4
lines
Change types of DUP2ALIAS and DUP2FDMASK bit masks to unsigned
This is for consistency with the DUP2BIT change.
Revision 1.129: download - view: text, markup, annotated - select for diffs
Mon Feb 10 09:10:58 2020 UTC (4 years, 10 months ago) by kamil
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +3 -3
lines
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 - view: text, markup, annotated - select for diffs
Wed Sep 25 20:19:59 2019 UTC (5 years, 2 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +21 -8
lines
teach hijack about the new vfs syscalls
Revision 1.125.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:05:27 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +51 -3
lines
Sync with HEAD
Revision 1.127: download - view: text, markup, annotated - select for diffs
Sun Feb 17 23:35:50 2019 UTC (5 years, 9 months ago) by bad
Branches: MAIN
CVS tags: phil-wifi-20190609,
netbsd-9-base,
netbsd-9-4-RELEASE,
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
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +10 -3
lines
Linux doesn't have paccept().
Revision 1.124.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:01:28 2018 UTC (5 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.124.2.1: preferred, colored; branchpoint 1.124: preferred, colored; next MAIN 1.125: preferred, colored
Changes since revision 1.124.2.1: +43 -2
lines
Sync with HEAD, resolve a few conflicts
Revision 1.126: download - view: text, markup, annotated - select for diffs
Sun Dec 16 14:03:37 2018 UTC (5 years, 11 months ago) by hannken
Branches: MAIN
CVS tags: pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +43 -2
lines
Add an option "modctl" to capture modctl().
Revision 1.124.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:23 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +23 -8
lines
Sync with HEAD
Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Jun 28 06:20:36 2018 UTC (6 years, 5 months ago) by ozaki-r
Branches: 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
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +23 -8
lines
rumphijack: don't modify a cmsg on just validating it
Pointed out by k-goda@IIJ
Revision 1.122.4.1: download - view: text, markup, annotated - select for diffs
Wed Feb 28 18:53:06 2018 UTC (6 years, 9 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1
Diff to: previous 1.122: preferred, colored; next MAIN 1.123: preferred, colored
Changes since revision 1.122: +21 -2
lines
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 - view: text, markup, annotated - select for diffs
Mon Oct 23 06:52:17 2017 UTC (7 years, 1 month ago) by ozaki-r
Branches: 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
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +4 -3
lines
Provide better debug messages for ioctl
Revision 1.123: download - view: text, markup, annotated - select for diffs
Tue Jun 6 19:48:42 2017 UTC (7 years, 6 months ago) by christos
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base,
perseant-stdc-iso10646
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +21 -2
lines
since ln(1) now uses linkat(2) provide a dumb wrapper.
Revision 1.121.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:12 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.121: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121: +34 -3
lines
Sync with HEAD
Revision 1.119.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:00 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.119.2.1: preferred, colored; branchpoint 1.119: preferred, colored; next MAIN 1.120: preferred, colored
Changes since revision 1.119.2.1: +34 -3
lines
Sync with HEAD
Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Feb 16 08:08:01 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: 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
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +34 -3
lines
Support paccept for nc
Revision 1.119.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:05 2017 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +3 -3
lines
Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
Revision 1.121: download - view: text, markup, annotated - select for diffs
Fri Dec 2 20:53:36 2016 UTC (8 years ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20170107,
bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +3 -3
lines
fix test lib/librumphijack/t_sh/runscript
(handle F_DUPFD_CLOEXEC that the shell is now using)
Revision 1.120: download - view: text, markup, annotated - select for diffs
Thu Aug 11 09:48:57 2016 UTC (8 years, 4 months ago) by kre
Branches: MAIN
CVS tags: pgoyette-localcount-20161104,
localcount-20160914
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +6 -2
lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 3 14:30:52 2016 UTC (8 years, 9 months ago) by martin
Branches: 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
Diff to: previous 1.109.2.1: preferred, colored; branchpoint 1.109: preferred, colored; next MAIN 1.110: preferred, colored
Changes since revision 1.109.2.1: +37 -2
lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 3 14:27:54 2016 UTC (8 years, 9 months ago) by martin
Branches: netbsd-7-0
CVS tags: netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE
Diff to: previous 1.109.2.1: preferred, colored; next MAIN 1.109.2.2: preferred, colored
Changes since revision 1.109.2.1: +37 -2
lines
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 - view: text, markup, annotated - select for diffs
Tue Aug 25 13:50:19 2015 UTC (9 years, 3 months ago) by pooka
Branches: MAIN
CVS tags: pgoyette-localcount-base,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726
Branch point for: pgoyette-localcount
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +3 -3
lines
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 - view: text, markup, annotated - select for diffs
Tue Aug 25 13:45:00 2015 UTC (9 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +7 -3
lines
allow mmap() to be called before init runs
Revision 1.117: download - view: text, markup, annotated - select for diffs
Sat Apr 11 12:54:41 2015 UTC (9 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +4 -3
lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 5 00:26:17 2015 UTC (9 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +4 -2
lines
Wrap utimensat() only if present on host
fixes buildrump.sh on NetBSD 6.1.5
Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Mar 4 23:42:26 2015 UTC (9 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +3 -3
lines
Make ATCALL() behave for absolute paths too.
Revision 1.114: download - view: text, markup, annotated - select for diffs
Wed Mar 4 23:31:49 2015 UTC (9 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +34 -7
lines
Define a generic ATCALL() and use it to implement utimensat()
Revision 1.113: download - view: text, markup, annotated - select for diffs
Tue Mar 3 01:24:39 2015 UTC (9 years, 9 months ago) by enami
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +9 -3
lines
Also hijack futimens(2) so that t_sh test passes.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Tue Mar 3 00:19:07 2015 UTC (9 years, 9 months ago) by enami
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +9 -2
lines
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 - view: text, markup, annotated - select for diffs
Tue Dec 9 20:13:38 2014 UTC (10 years ago) by martin
Branches: 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
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -3
lines
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 - view: text, markup, annotated - select for diffs
Tue Nov 4 19:05:17 2014 UTC (10 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +49 -59
lines
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 - view: text, markup, annotated - select for diffs
Wed Aug 20 00:02:21 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.98.2.1: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98.2.1: +25 -16
lines
Rebase to HEAD as of a few days ago.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Tue Aug 12 23:47:09 2014 UTC (10 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -3
lines
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 - view: text, markup, annotated - select for diffs
Sun Aug 10 06:52:22 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107: +4 -8
lines
Rebase.
Revision 1.109: download - view: text, markup, annotated - select for diffs
Mon Jul 21 14:23:43 2014 UTC (10 years, 4 months ago) by gson
Branches: MAIN
CVS tags: tls-maxphys-base,
tls-earlyentropy-base,
netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +4 -6
lines
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 - view: text, markup, annotated - select for diffs
Sat Jul 19 14:14:21 2014 UTC (10 years, 4 months ago) by gson
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +2 -4
lines
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 - view: text, markup, annotated - select for diffs
Thu May 22 11:37:00 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.90.4.3: preferred, colored; branchpoint 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90.4.3: +23 -10
lines
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 - view: text, markup, annotated - select for diffs
Wed Apr 2 17:09:23 2014 UTC (10 years, 8 months ago) by justin
Branches: MAIN
CVS tags: yamt-pagecache-base9
Branch point for: tls-earlyentropy
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +6 -3
lines
Add Android support for rump kernel.
Reviewed by pooka@
Revision 1.106: download - view: text, markup, annotated - select for diffs
Tue Sep 10 16:53:06 2013 UTC (11 years, 3 months ago) by pooka
Branches: MAIN
CVS tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +3 -3
lines
use <rump/rumpuser_port.h>
Revision 1.105: download - view: text, markup, annotated - select for diffs
Wed Jul 31 12:23:25 2013 UTC (11 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +2 -3
lines
remove unnecessary <sys/poll.h> -- musl whines when it's included
Revision 1.104: download - view: text, markup, annotated - select for diffs
Sat Jul 27 17:37:29 2013 UTC (11 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -5
lines
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 - view: text, markup, annotated - select for diffs
Tue Jul 23 21:07:30 2013 UTC (11 years, 4 months ago) by riastradh
Branches: riastradh-drm2
Diff to: previous 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100: +18 -4
lines
sync with HEAD
Revision 1.103: download - view: text, markup, annotated - select for diffs
Mon Jul 22 12:11:03 2013 UTC (11 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: riastradh-drm2-base2,
riastradh-drm2-base1
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +15 -3
lines
Support Linuxen where libc ioctl has cmd as int unstead of unsigned long.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Sat Jul 20 18:46:15 2013 UTC (11 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +3 -2
lines
Fixes when compiling against musl libc.
from Justin Cormack via private email
Revision 1.101: download - view: text, markup, annotated - select for diffs
Thu Jul 18 22:58:35 2013 UTC (11 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +4 -3
lines
sys/cdefs.h should come from rumpuser_port.h
Noticed by Justin Cormack while building against musl libc.
Revision 1.98.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 20 03:00:45 2012 UTC (12 years ago) by tls
Branches: tls-maxphys
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +87 -27
lines
Resync to 2012-11-19 00:00:00 UTC
Revision 1.90.4.3: download - view: text, markup, annotated - select for diffs
Tue Oct 30 18:59:17 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.90.4.2: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.4.2: +460 -93
lines
sync with head
Revision 1.100: download - view: text, markup, annotated - select for diffs
Tue Oct 16 12:56:10 2012 UTC (12 years, 1 month ago) by pooka
Branches: 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
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +35 -8
lines
* 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 - view: text, markup, annotated - select for diffs
Wed Sep 12 10:35:10 2012 UTC (12 years, 3 months ago) by martin
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +54 -21
lines
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 - view: text, markup, annotated - select for diffs
Mon Sep 3 12:07:42 2012 UTC (12 years, 3 months ago) by pooka
Branches: MAIN
Branch point for: tls-maxphys
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +7 -6
lines
one more patch for supporting linux-based networking clients
Revision 1.97: download - view: text, markup, annotated - select for diffs
Mon Sep 3 11:33:35 2012 UTC (12 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +84 -23
lines
More fixes for Linux (or glibc, really).
Revision 1.96: download - view: text, markup, annotated - select for diffs
Sat Aug 25 18:00:06 2012 UTC (12 years, 3 months ago) by pooka
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +159 -37
lines
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 - view: text, markup, annotated - select for diffs
Sat Aug 4 03:56:47 2012 UTC (12 years, 4 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +26 -9
lines
Implement link(2) in rumphijack. Add a couple trivial test cases.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Fri Jun 29 13:20:25 2012 UTC (12 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +118 -12
lines
implement descriptor passing.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Mon Jun 25 22:32:47 2012 UTC (12 years, 5 months ago) by abs
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -3
lines
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 - view: text, markup, annotated - select for diffs
Wed May 23 10:07:33 2012 UTC (12 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.90.4.1: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.4.1: +7 -6
lines
sync with head.
Revision 1.91.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 19 20:06:21 2012 UTC (12 years, 7 months ago) by riz
Branches: 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
Diff to: previous 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91: +7 -6
lines
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 - view: text, markup, annotated - select for diffs
Wed Apr 18 10:37:37 2012 UTC (12 years, 7 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base5
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +7 -6
lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 17 00:05:33 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +16 -8
lines
sync with head
Revision 1.91: download - view: text, markup, annotated - select for diffs
Wed Feb 1 05:34:41 2012 UTC (12 years, 10 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base4,
netbsd-6-base
Branch point for: netbsd-6
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +16 -8
lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 21 13:38:14 2011 UTC (13 years, 7 months ago) by joerg
Branches: MAIN
CVS tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
cherry-xenmp-base,
cherry-xenmp
Branch point for: yamt-pagecache
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +5 -24
lines
Disable Fortification for pthread and rump stubs.
Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Apr 21 08:21:13 2011 UTC (13 years, 7 months ago) by martin
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +4 -7
lines
Backout previous, it breaks lots of tests (tests/lib/librumphijack for
example).
Revision 1.88: download - view: text, markup, annotated - select for diffs
Wed Apr 13 12:40:54 2011 UTC (13 years, 8 months ago) by he
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +4 -3
lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 12 19:49:48 2011 UTC (13 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +5 -3
lines
Fix SSP builds (Vladimir Kirillov)
Revision 1.86: download - view: text, markup, annotated - select for diffs
Mon Mar 14 15:15:47 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -3
lines
fdoff is descriptive enough
Revision 1.85: download - view: text, markup, annotated - select for diffs
Mon Mar 14 15:13:26 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +44 -19
lines
Make fdoffset configurable. Also, enforce that host descriptors
are smaller than the offset.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Mar 10 23:02:56 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +3 -3
lines
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 - view: text, markup, annotated - select for diffs
Thu Mar 10 09:47:32 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +23 -43
lines
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 - view: text, markup, annotated - select for diffs
Wed Mar 9 23:26:19 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +7 -7
lines
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 - view: text, markup, annotated - select for diffs
Wed Mar 9 20:48:57 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +46 -18
lines
Make this compile/work on NetBSD 5 once again.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Mar 9 18:45:30 2011 UTC (13 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +12 -2
lines
Add quotactl(2)
Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Mar 9 18:06:22 2011 UTC (13 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +6 -6
lines
Fix last entries, make it work again.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Mar 9 15:03:18 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +218 -10
lines
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 - view: text, markup, annotated - select for diffs
Wed Mar 9 09:17:12 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -4
lines
g/c unused global
Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Mar 8 21:36:01 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +8 -4
lines
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 - view: text, markup, annotated - select for diffs
Tue Mar 8 20:59:01 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +95 -48
lines
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 - view: text, markup, annotated - select for diffs
Sat Mar 5 15:09:23 2011 UTC (13 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.16.2.3: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.2.3: +931 -101
lines
Sync with HEAD
Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Mar 1 10:54:06 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +4 -2
lines
another comment
Revision 1.73: download - view: text, markup, annotated - select for diffs
Tue Mar 1 10:47:29 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +7 -2
lines
comment
Revision 1.72: download - view: text, markup, annotated - select for diffs
Mon Feb 28 20:39:07 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +10 -5
lines
make compiler sign-happy
Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Feb 28 19:57:36 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +190 -79
lines
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 - view: text, markup, annotated - select for diffs
Sun Feb 27 11:32:12 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +4 -4
lines
make error messages sensible. from uwe
Revision 1.69: download - view: text, markup, annotated - select for diffs
Fri Feb 25 18:36:36 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -2
lines
whoops, didn't mean to delete futimes in previous. also from riz
Revision 1.68: download - view: text, markup, annotated - select for diffs
Fri Feb 25 18:29:00 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +12 -3
lines
support mknod. from riz
Revision 1.67: download - view: text, markup, annotated - select for diffs
Thu Feb 24 12:25:44 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -4
lines
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 - view: text, markup, annotated - select for diffs
Wed Feb 23 15:44:38 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +26 -14
lines
Return value audit: properly set errno and return -1.
Fixes at least cross-kernel mv(1).
Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Feb 23 15:29:21 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +9 -2
lines
+access(2)
Revision 1.64: download - view: text, markup, annotated - select for diffs
Wed Feb 23 15:23:15 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +5 -27
lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 21 20:11:56 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -2
lines
If minfd for F_DUPFD is >= hijackoff, assume it means a minimum
value in the rump kernel and adjust accordingly.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon Feb 21 13:19:35 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +19 -2
lines
disallow mmap(MAP_FILE) from a rump kernel fd
Revision 1.61: download - view: text, markup, annotated - select for diffs
Mon Feb 21 12:55:21 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +5 -6
lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 21 12:51:06 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +51 -4
lines
hijack:
1) {,f,l}chflags (used e.g. by cp(1))
2) p{read,write}{,v} (used by many)
Revision 1.59: download - view: text, markup, annotated - select for diffs
Sun Feb 20 23:47:04 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +33 -14
lines
fix tests/lib/librumphijack/t_asyncio:invafd -- dual poll on invalid fd
Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat Feb 19 19:17:33 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +4 -4
lines
fix symlink pathname examination (rationale-to-joerg: so that it works)
Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Feb 19 13:10:35 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +58 -2
lines
hijack __getcwd()
Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Feb 19 13:09:40 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +4 -4
lines
and now with less crazy whitespace
Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Feb 19 13:07:53 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +8 -2
lines
support PF_OROUTE and PF_MPLS where available
Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Feb 18 19:27:06 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +6 -4
lines
hijack libc-internal name for lseek so that libc-internal callers
go to the right kernel too.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Fri Feb 18 14:44:46 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +5 -2
lines
block cross-kernel rename in the other direction also
Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Feb 18 14:33:11 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +21 -8
lines
fix rename
Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri Feb 18 14:25:04 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -2
lines
uhm, put PF_LOCAL on the socketlist
Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri Feb 18 13:04:52 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -3
lines
give the signmonkey a banana
Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Feb 18 11:41:32 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +139 -30
lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 17 17:18:08 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +26 -3
lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 17 15:20:10 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +50 -8
lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 17 12:52:33 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +3 -3
lines
fix signature. from pgoyette
Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Feb 17 12:23:58 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +373 -10
lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 17 11:59:23 2011 UTC (13 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.16.2.2: preferred, colored
Changes since revision 1.16.2.2: +225 -81
lines
Sync with HEAD
Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Feb 16 19:26:58 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: bouyer-quota2-base
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +8 -11
lines
* 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 - view: text, markup, annotated - select for diffs
Wed Feb 16 17:56:46 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +5 -3
lines
Support vfork. Add rumpclient wrapper for daemon(3).
Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Feb 16 15:33:46 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +23 -35
lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 15 14:01:52 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -4
lines
dup() is now implemented using fcntl()
Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Feb 15 13:59:28 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +125 -48
lines
Properly implement fcntl commands: F_DUPFD, F_CLOSEM, F_MAXFD
Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Feb 14 14:56:23 2011 UTC (13 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +77 -9
lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 12 10:25:46 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -4
lines
Fix select() if no fds are set.
patch from Alexander Nasonov, PR lib/44552
Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Feb 11 14:02:12 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3
lines
play the important typecast game
Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Feb 11 12:46:41 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +19 -6
lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 8 19:12:54 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +8 -8
lines
Fix pasto, use GETSYSCALLS() where possible
Revision 1.16.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 8 16:19:04 2011 UTC (13 years, 10 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.16.2.1: preferred, colored
Changes since revision 1.16.2.1: +413 -501
lines
Sync with HEAD
Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Feb 8 14:45:35 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +57 -20
lines
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 - view: text, markup, annotated - select for diffs
Tue Feb 8 12:20:11 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -2
lines
add std dprint to fdcall
Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Feb 7 19:34:39 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +16 -3
lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 7 12:23:05 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +6 -4
lines
duh, _sys_read, not read. STAY FIXED, DAMNIT!
Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Feb 7 11:51:02 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +3 -3
lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 7 10:28:18 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +13 -13
lines
call the non-compat pollts() from inside the library
Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Feb 6 15:48:20 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +28 -3
lines
make it possible to specify client connection retry model in
RUMPHIJACK_RETRY
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Feb 6 13:05:19 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +8 -6
lines
be kinder about kqueue()
(but paradoxically omit the surprise)
Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Feb 5 16:59:24 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -3
lines
uncommit part of previous which wasn't supposed to change
Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Feb 5 16:57:39 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +23 -4
lines
Wrap daemon() since it forks. Otherwise we lose the rumpclient kq
descriptor and have multiple processes using the commfd.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Feb 5 12:38:19 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +5 -8
lines
Fix some snafus to allow rumphijack to work on -current.
reported by Alexander Nasonov
Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Jan 27 18:12:19 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +8 -12
lines
Use NEEDED for librumpclient instead of loading it manually.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Jan 27 18:05:16 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -6
lines
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 - view: text, markup, annotated - select for diffs
Wed Jan 26 18:48:32 2011 UTC (13 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +25 -3
lines
make SSP friendly
Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Jan 25 17:37:00 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +6 -5
lines
fix compilation on -current
Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Jan 25 12:53:45 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -5
lines
the usual fun for WARNS=4
signed,
unsigned
Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Jan 25 12:21:36 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3
lines
dramatic whitespace fix
Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Jan 25 12:18:33 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +282 -438
lines
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 - view: text, markup, annotated - select for diffs
Thu Jan 20 14:24:53 2011 UTC (13 years, 10 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +47 -2
lines
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 - view: text, markup, annotated - select for diffs
Wed Jan 19 11:27:01 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Branch point for: bouyer-quota2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +23 -9
lines
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 - view: text, markup, annotated - select for diffs
Tue Jan 18 23:43:21 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -6
lines
fix lp64 snafu (hopefully)
from pgoyette
Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Jan 18 19:41:02 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +34 -9
lines
* 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 - view: text, markup, annotated - select for diffs
Tue Jan 18 16:00:04 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -2
lines
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 - view: text, markup, annotated - select for diffs
Tue Jan 18 14:51:14 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +5 -2
lines
Don't count sparse elements in the poll vector for host fds.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Jan 18 14:45:30 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -3
lines
Fix conversion: there are 1000*1000 nanoseconds in a millisecond, not 1000.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Jan 18 11:04:10 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +24 -10
lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 17 16:30:09 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -4
lines
Use host_close() instead of close() where we know it to be the
right interface.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Jan 17 16:27:54 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +31 -45
lines
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 - view: text, markup, annotated - select for diffs
Sun Jan 9 19:56:33 2011 UTC (13 years, 11 months ago) by pooka
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +98 -33
lines
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 - view: text, markup, annotated - select for diffs
Sun Jan 9 14:15:06 2011 UTC (13 years, 11 months ago) by pooka
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +9 -5
lines
Don't depend on malloc(0) returning non-NULL.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jan 9 10:28:46 2011 UTC (13 years, 11 months ago) by pooka
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +19 -6
lines
dprintf to stderr. stop doing it if stderr_fileno gets dup2()'d
Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Jan 8 21:30:24 2011 UTC (13 years, 11 months ago) by pooka
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +91 -68
lines
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 - view: text, markup, annotated - select for diffs
Sat Jan 8 18:11:46 2011 UTC (13 years, 11 months ago) by pooka
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +53 -25
lines
support pollts and rewrite poll in terms of pollts
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Jan 8 14:19:27 2011 UTC (13 years, 11 months ago) by pooka
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +189 -95
lines
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 - view: text, markup, annotated - select for diffs
Fri Jan 7 19:52:43 2011 UTC (13 years, 11 months ago) by pooka
Branches: 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)
CVSweb <webmaster@jp.NetBSD.org>