Commit Graph

14657 Commits

Author SHA1 Message Date
wiz
35124272d3 Remove duplicate "the". From Henning Petersen in PR 44640. 2011-02-26 12:56:35 +00:00
pooka
f70541ba1f whoops, didn't mean to delete futimes in previous. also from riz 2011-02-25 18:36:36 +00:00
pooka
b183f0392f support mknod. from riz 2011-02-25 18:29:00 +00:00
pooka
da73d5bcb9 Ok, for reasons I can't begin to understand, the binaries I tested
yesterday on powerpc broke overnight.  Apparently adding one more
function before the call to dlsym() fixes things again.  I hope
I don't have to add another one tomorrow ....
2011-02-25 16:01:41 +00:00
pooka
9e33d7d6e2 fix __RCSID 2011-02-25 15:12:06 +00:00
joerg
b7b592d544 Back out using the thread register (if present) for now.
libgcc_s's __register_frame_info gets called from libc's CSU code before
the libc constructors are run. __register_frame_info in turn calls
pthread_mutex_lock. libpthread is not initialised at this point and
therefore pthread__self() traps when deferencing the thread register.
This worked before because the garbage from pthread__self() is
effectively ignored.
2011-02-25 14:32:38 +00:00
pooka
74ed8d21f3 fix my whitespace copypaste 2011-02-25 11:55:28 +00:00
pooka
ba7613308e Fix LE softfloat (mostly theoretical) and comment.
from Alessandro Forin
2011-02-25 11:53:07 +00:00
pooka
8c15d641b0 Fix static fallback path. 2011-02-24 14:22:04 +00:00
pooka
b8eb9b59e8 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.
2011-02-24 12:25:44 +00:00
pooka
e1463ae3cd Die with a sensible error message if a symbol cannot be found. 2011-02-24 09:52:34 +00:00
joerg
1631a78097 Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-02-24 04:28:41 +00:00
pooka
edac4b359f duh, remember to cvs add hijack.h too...
from pgoyette
2011-02-23 18:18:24 +00:00
pooka
7e61a6ce53 Return value audit: properly set errno and return -1.
Fixes at least cross-kernel mv(1).
2011-02-23 15:44:38 +00:00
pooka
2350034b27 +access(2) 2011-02-23 15:29:21 +00:00
pooka
247a92b203 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
2011-02-23 15:23:15 +00:00
skrll
1548def5e3 Remove old hack for broken binutils. 2011-02-23 10:26:09 +00:00
tron
fb1591b100 Remove "NOLINT" setting that was apparently committed by accident and
breaks the build.
2011-02-22 17:32:49 +00:00
pooka
27ec9b9d1d Add support for a byteswapped disklabel so that I can mount
NetBSD/sparc anita images on my i386.
2011-02-22 15:42:15 +00:00
pooka
97c20c765b Disable string aliasing for rump_syscalls.c. I can't figure out
how to otherwise make the kernel's register_t coreography to work
with the return value here in a MI fashion.
2011-02-22 14:02:54 +00:00
joerg
9674b81ed9 Introduce __weakref_visible to handle the different required visibility
for weak references. GCC 4.2+ and Clang require static, older GCC wants
extern. Change __weak_reference to include sym. This requires changes
the existing users to not reuse the name of the symbol, but avoids
further differences between GCC 4.1 and GCC 4.2+/clang.
2011-02-22 05:45:05 +00:00
christos
10e6f9749d remove duplicate weak aliases 2011-02-21 22:07:44 +00:00
pooka
a63f48d68d If minfd for F_DUPFD is >= hijackoff, assume it means a minimum
value in the rump kernel and adjust accordingly.
2011-02-21 20:11:56 +00:00
pooka
b1f4a8807b disallow mmap(MAP_FILE) from a rump kernel fd 2011-02-21 13:19:35 +00:00
pooka
dc0a4e21dd 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.
2011-02-21 12:55:21 +00:00
pooka
463ea53fc5 hijack:
1) {,f,l}chflags (used e.g. by cp(1))
  2) p{read,write}{,v} (used by many)
2011-02-21 12:51:06 +00:00
pooka
611baabe1a xfer rump_server(1), downgrade experimentalness level a bit 2011-02-21 08:50:45 +00:00
pooka
aa7f369f19 v-node -> vnode
(for consistency)
2011-02-21 07:11:11 +00:00
joerg
4bf46019d9 Redo the SSP wrappers to be transparent on the resulting object files.
This works by having the inline wrapper calling a second function which
uses renaming to output the correct function name.
2011-02-21 00:40:07 +00:00
pooka
3c9255c1a2 fix tests/lib/librumphijack/t_asyncio:invafd -- dual poll on invalid fd 2011-02-20 23:47:04 +00:00
pooka
d9a5e73fe5 minor clarification 2011-02-20 14:21:04 +00:00
pooka
6d9d147305 fix symlink pathname examination (rationale-to-joerg: so that it works) 2011-02-19 19:17:33 +00:00
pooka
9c67a5d8a0 hijack __getcwd() 2011-02-19 13:10:35 +00:00
pooka
bfd70564a0 and now with less crazy whitespace 2011-02-19 13:09:40 +00:00
pooka
9cb130af6b support PF_OROUTE and PF_MPLS where available 2011-02-19 13:07:53 +00:00
joerg
e189b01ad3 Support the different weakref semantic in GCC 4.2 and clang. 2011-02-18 23:41:57 +00:00
joerg
86df96f692 Allow building with the changed weakref semantic in GCC 4.2 and clang. 2011-02-18 23:37:36 +00:00
christos
01d6c84859 PR/44599: Steven Vernon: libedit acts as if no data read if editmode is turned
off because nread is uninitialized in the edit disabled case.
2011-02-18 20:53:05 +00:00
pooka
5191458a1c hijack libc-internal name for lseek so that libc-internal callers
go to the right kernel too.
2011-02-18 19:27:06 +00:00
pooka
4674f09289 I think I skipped the class where they taught that multiplication
is done before addition...
2011-02-18 16:22:10 +00:00
pooka
f836d17195 Improve isrmt() check: it cannot be a rmt fd if there are no pipes
open for the fd.  Prevents collision with rumphijack.

Also, prevent potential hyperspace memory access.

Does someone want to write tests for this facility?
2011-02-18 16:10:09 +00:00
pooka
c0f2e1965c block cross-kernel rename in the other direction also 2011-02-18 14:44:46 +00:00
pooka
ff90450826 fix rename 2011-02-18 14:33:11 +00:00
pooka
b8883bd5ec uhm, put PF_LOCAL on the socketlist 2011-02-18 14:25:04 +00:00
pooka
0e29006e71 give the signmonkey a banana 2011-02-18 13:04:52 +00:00
pooka
c89b586dc4 Document .Ev RUMPHIJACK 2011-02-18 12:22:46 +00:00
pooka
45c58b6c6a 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% /
2011-02-18 11:41:32 +00:00
pooka
aedd7db813 Support rest of file types in vtype -> s_ifmt 2011-02-17 17:55:36 +00:00
pooka
7379975cf9 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)
2011-02-17 17:18:08 +00:00
wiz
cd90032d22 Use more appropriate markup. Fix a typo. 2011-02-17 17:03:17 +00:00