Commit Graph

2134 Commits

Author SHA1 Message Date
pooka
734710d913 Use kqueue on *BSD, not just NetBSD. 2013-07-04 17:46:14 +00:00
pooka
200b4dc09f Add a note explaining why there's a homegrown __STRING, __CONCAT, etc. 2013-07-04 11:58:11 +00:00
pooka
be1e0a384e Determine the interface name and the names of exported symbols based
on VIRTIF_BASE.  This allows using various different packet-shoveling
backends in the same rump kernel.
2013-07-04 11:46:51 +00:00
pooka
aa90974447 Apparently warning flags are not kept in CWARNFLAGS. Compensate. 2013-07-04 10:14:04 +00:00
pooka
6b86dfa7fa Some systems provide ioctl() via unistd.h
(not that this is going to work there, but at least we don't
get unnecessary compiler warnings)
2013-07-04 10:09:55 +00:00
pooka
b30b04091e Avoid not-used warning on NetBSD 2013-07-04 09:58:28 +00:00
pooka
eb02078a24 fix warnings 2013-07-04 09:48:01 +00:00
pooka
d9c4c208c1 fix parameter name 2013-07-03 20:17:07 +00:00
pooka
d45448fa65 Adjust for rump_virtif_create() removal. Incidentally, this reduces
the number of exported symbols by one (which is useful for phase 2).
2013-07-03 19:23:46 +00:00
pooka
ba335617f8 regen 2013-07-03 19:22:21 +00:00
pooka
bc38e87441 Having a system-supplied function interface to create virt(4) is not
fully useful when the system doesn't supply anything to configure the
interface with.  So remove rump_virtif_create(), that functionality
is now taken care of with ifcloner.
2013-07-03 19:21:11 +00:00
njoly
75ce45f852 Make RUMP_LOCKDEBUG work again.
With some help from pooka@.
2013-07-03 17:10:28 +00:00
pooka
c5984ae7b9 g/c dummyif, not useful these days 2013-07-03 15:08:01 +00:00
pooka
6b612185b2 Allow alternate interface base names to be specified at compile time. 2013-07-03 15:06:25 +00:00
riastradh
51ab2460e3 Remove now-needless rump cprng_strong_deplete stub.
These rump stubs need to go away at some point...
2013-07-01 20:02:15 +00:00
pooka
5df7109d74 Raise lo0 so that ipv6 config gets done for it.
Requested and tested by Justin Cormack.
2013-06-30 16:04:36 +00:00
pooka
fdd3db309d Remove the route_info weak alias. It's unnecessary since 2011
and confused Linux ld.so, thus preventing dlopen() of librumpnet.
Reported in private email by Justin Cormack.

Also, g/c a few other stubs which are no longer necessary.
2013-06-26 17:10:23 +00:00
stacktic
ba30649b7d regen 2013-06-25 21:07:22 +00:00
stacktic
16b971f199 grab ioctl-related macros 2013-06-25 21:06:39 +00:00
stacktic
53da90559b Make sure sockin module is initialized only once 2013-06-23 19:24:08 +00:00
riastradh
6290b0987e Rework rndsink(9) abstraction and adapt arc4random(9) and cprng(9).
rndsink(9):
- Simplify API.
- Simplify locking scheme.
- Add a man page.
- Avoid races in destruction.
- Avoid races in requesting entropy now and scheduling entropy later.

Periodic distribution of entropy to sinks reduces the need for the
last one, but this way we don't need to rely on periodic distribution
(e.g., in a future tickless NetBSD).

rndsinks_lock should probably eventually merge with the rndpool lock,
but we'll put that off for now.

cprng(9):
- Make struct cprng_strong opaque.
- Move rndpseudo.c parts that futz with cprng guts to subr_cprng.c.
- Fix kevent locking.  (Is kevent locking documented anywhere?)
- Stub out rump cprng further until we can rumpify rndsink instead.
- Strip code to grovel through struct cprng_strong in fstat.
2013-06-23 02:35:23 +00:00
pooka
ef255f82ed sauce previous with a comment 2013-06-14 05:59:50 +00:00
pooka
3dfa58adc5 Ignore too short packets. This condition is true especially for the
first packet on a new bus (len == 0).  Everything else in the stack
besides bpf seemed to be able to deal with one, though.
2013-06-14 05:56:29 +00:00
pooka
26e2849474 Allocate large struct from heap instead of stack for the benefit of
low-stack environments in which this code can run.
2013-06-14 05:54:04 +00:00
pooka
cefaa4c481 Make sure root creds override fs mode (at least in a root cred secmodel).
The correct way is of course for the access method to perform this:

    return kauth_authorize_vnode(cred, KAUTH_ACCESS_ACTION(mode,
        vp->v_type, attr->va_mode), vp, NULL, genfs_can_access(vp->v_type,
        attr->va_mode, attr->va_uid, attr->va_gid, mode, cred));
2013-06-12 12:14:35 +00:00
pooka
b0c0940e1e create /dev with 0755 instead of 0777 (though it's now effectively the
same due to cmask)
2013-06-10 19:48:22 +00:00
pooka
9063a59c24 Create inodes with the specified mode instead of hardcoding to 0755. 2013-06-10 14:15:03 +00:00
dholland
430d02428a right, why does rump have to have its own copy of all the build information? 2013-06-08 22:45:28 +00:00
dholland
a4fc39c06d Cleanups and hacks to make lfs userland stuff build:
- lfs_cksum.c doesn't actually need ulfs_inode.h any more.
   - neither does lfs_itimes.c.
   - add hacks to fsck_lfs to make it compile.
   - add hacks to newfs_lfs to make it compile.
   - fix warning in ulfs_quota.c when quotas are fully disabled
     (as I guess is happening with the rumpity version)

XXX: This commit adds -I${NETBSDSRCDIR}/sys to the Makefiles for
XXX: fsck_lfs, newfs_lfs, and lfs_cleanerd. This needs to be cleaned
XXX: up ASAP; but I consider this less problematic in the short term
XXX: than spewing ulfs_*.h into /usr/include.
2013-06-06 00:54:49 +00:00
pooka
957b817e0a On Linux, pass the inotify descriptor up so that we can correctly read
it in the wait() routine.
2013-06-04 14:54:34 +00:00
rmind
bdfcfdcad8 - NPF connection tracking: rework synchronisation on tracking disable/enable
points and document it.  Split the worker thread into a separate module
  with an interface, so it could be re-used for other tasks.
- Replace ALG list with arrays and thus hit fewer cache lines.
- Misc bug fixes.
2013-06-02 02:20:04 +00:00
pooka
b043cb36bc check for EOF from backing sucket 2013-06-01 20:22:27 +00:00
pooka
98a1d881d2 Some minor tweaks to make this compile on Solaris. 2013-06-01 11:46:14 +00:00
pooka
3731822a1d Assert that we get PRU_ATTACH requests only for the families we
have registered.
2013-06-01 11:44:37 +00:00
pooka
f0037a8c6d default portalgo to random_start, for less connections from port 65535 2013-06-01 11:02:42 +00:00
pooka
ff8987496b cosmetic: put portalgo.c in the conceptually right place 2013-06-01 10:54:24 +00:00
stacktic
3df1f0e301 Add IPv6 support 2013-06-01 10:10:57 +00:00
stacktic
79e963ee99 Translate function parameters between the hypervisor and rump kernel 2013-06-01 10:09:05 +00:00
stacktic
6e6b2fc7a4 regen 2013-06-01 09:50:32 +00:00
stacktic
9a5521f4ff Grab more network-related macros 2013-06-01 09:49:37 +00:00
pooka
5b7912d506 run shutdownhooks 2013-05-31 16:16:40 +00:00
pooka
a46232beac Return 0 for success instead of returning an uninitialized automatic variable.
from Gal Sagie, PR 47837
2013-05-20 10:24:26 +00:00
pooka
cb9dd91b47 one more bump for the recent changes 2013-05-15 21:53:27 +00:00
pooka
2c11ecf9d5 regen 2013-05-15 21:41:25 +00:00
pooka
4acfc19072 Support utimes/futimes. Makes at least fsu_touch work on these platforms. 2013-05-15 21:39:30 +00:00
pooka
0886294feb bump version for rumpuser changes 2013-05-15 19:30:46 +00:00
pooka
646d62fa28 Looks like I'm done revamping, so bump interface version to 17,
where it will hopefully stay for all eternity (unless some snafus
are discovered before NetBSD 7).
2013-05-15 16:00:04 +00:00
pooka
3306a659de Add a generalized rumpuser_syncfd() call which allows the caller
to request a sync or a barrier for fd.
2013-05-15 15:57:01 +00:00
pooka
601de6b09f Pass off_t over the hypercall interface as int64_t to avoid potential
problems in setups where off_t doesn't want to be 64bit.

I'm already excitedly waiting for 128bit off_t and _LARGE_LARGE_FILES
2013-05-15 14:58:24 +00:00
pooka
15dc8bf975 Pass enums over the hypercall interface as ints to avoid some
pathological scenarios from arising in setups where enums might be
of a different size in the rump kernel and hypervisor.
2013-05-15 14:52:49 +00:00