Commit Graph

1162 Commits

Author SHA1 Message Date
pooka
5ede295be8 Since the rump kernel does not know when the container it's running in
actually halts, print "halted" in the hypercall.
2015-07-24 14:11:11 +00:00
justin
034bfbdba3 Move hw.machine and hw.machine_arch sysctls to base so rump can use them
This allows uname(3) and uname(1) to work on rump kernels.
2015-07-07 12:38:02 +00:00
pooka
a3cfad0d94 regen 2015-06-18 15:19:50 +00:00
pooka
adb470c84b Remove unreal allocators, unconditionally use subr_{kmem,pool}.
Will, with other work, allow to tighten the memory allocation hypercall
specification to page-granularity allocations in the future.
2015-06-17 11:46:33 +00:00
pooka
844804c7f8 Allow device components to create symlinks in /dev
e.g. /dev/audio -> audio0

from Robert Millan <rmh@freebsd.org> via rumpkernel-users
2015-06-08 12:16:47 +00:00
pooka
7c06b62e62 In case pagedaemon can't release any more memory, use kpause() instead
of cv_timedwait() on the pagedaemon condvar -- it's no use constantly
waking the pagedaemon up for new memory allocation attempts, as will
happen e.g. if new network connections are constantly pouring in.
2015-06-02 14:07:48 +00:00
pooka
0ba8e59f87 Implement fo_poll so that rump_sys_poll(stdout) works
more or less as expected.

from Martin Lucina <martin@lucina.net> via rumpkernel-users
2015-05-26 15:29:39 +00:00
pooka
e63dc818ef call loginit() later, a lot later 2015-05-20 11:02:54 +00:00
pgoyette
50b0fae6fd Regenerate 2015-05-13 02:13:08 +00:00
pgoyette
5608b80ca0 Regen for changes related to separation of compat_sysv syscalls into a
separate module.
2015-05-10 08:13:41 +00:00
pgoyette
e7d73c5ce1 Regen again, this time without the extra word in the "generated from" line. 2015-05-09 06:06:14 +00:00
pgoyette
060ac9689e Regen from syscalls.master 2015-05-09 05:55:43 +00:00
pooka
ac0dac8111 Rename RUMP_COMPAT to RUMP_NBCOMBAT to better signify what the
variable does.
2015-04-23 14:49:26 +00:00
pooka
ef3e63b15f g/c the never-used and never-useful hyperstubs.c 2015-04-23 06:39:19 +00:00
pooka
79729d845f Apparently new source files need to be added to each Makefile.inc
individually.  Who comes up with this kind of crappy build infra?
2015-04-22 20:10:56 +00:00
pooka
04469a37d8 Define rump_nativeabi_p() under arch, where one would logically expect
it to be defined.
2015-04-22 18:12:39 +00:00
pooka
b13c75b964 Build compat code only when specified by RUMP_COMPAT 2015-04-22 17:57:49 +00:00
pooka
2c5012fa3d Apparently not all ports define struct clockframe in cpu.h, so we cannot
provide our definition that way.  Instead, generate the struct clockframe
passed to hardclock() in MD code.
2015-04-22 17:38:33 +00:00
pooka
87792ce272 Include kern_clock.c in rump kernels. 2015-04-22 16:49:42 +00:00
pooka
6d5d1af88e track cpu_onproc 2015-04-22 16:01:07 +00:00
pooka
b9e12739d0 Use hardclock_ticks instead of a homegrown variable.
... not that I understand how various kernel algorithms can work
after enough uptime with hardclock_ticks being a signed int.
2015-04-21 16:18:50 +00:00
riastradh
5db50cc603 Revert previous -- a little too quick on the commit trigger.
Ran some tests but not enough.  There is a deadlock against myself:

rndsink_request acquires rndsinks_lock
-> rnd_getmore
-> hyperentropy feedrandom (or any other rndsource callback)
-> rnd_add_data
-> rndsinks_distribute acquires rndsinks_lock

Need to break this cycle before rndsource callbacks can invoke
rnd_add_data.
2015-04-21 04:05:57 +00:00
riastradh
f8b6ebf6aa Restore simplicity of rump hyperentropy `hardware RNG'. 2015-04-21 03:53:50 +00:00
pooka
6195daadda Give remote clients struct pmap storage. Although the pmap is unused,
that way we can sure that the pmap macro framework doesn't access all
the wrong places.
2015-04-18 15:49:18 +00:00
pooka
4bcf04c271 Don't share file descriptors between proc0 and local clients. 2015-04-17 13:03:38 +00:00
pooka
d00bf326fc set the local clients' comm to "rumplocal" instead of "system" 2015-04-17 13:02:54 +00:00
pooka
08ecc2ccae g/c rump_vmmap
No recollection what it was used for; didn't seem to be used even when
it was originally added 5th August 2007.
2015-04-17 12:46:33 +00:00
pooka
a60844e2f3 Give the kernel/local pmaps actual storage.
That way friendly neighborhood macros won't go scribbling
in the wrong places.
2015-04-17 12:43:15 +00:00
pooka
280b06dac2 "extern int hz" was written in a very aesthetically pleasing way in this
file, but let's just be happy with the sys/kernel.h style of writing it.
2015-04-16 10:08:59 +00:00
riastradh
78c7cd3319 Fix rump build: rndpseudo_50.c now needed by kernel, not rnd device. 2015-04-14 13:32:34 +00:00
riastradh
67d6ba47fb Convert remaining MI <sys/rnd.h> stragglers. Many MD ones left. 2015-04-13 16:46:33 +00:00
justin
d71fdf45b9 regen after syscall update 2015-04-08 13:31:42 +00:00
pooka
a9585c3c6c Use RUMP_PMAP_KERNEL and RUMP_PMAP_LOCAL to denote
kernel and local client pmaps, respectively.
2015-04-03 16:46:39 +00:00
pooka
52af998366 Use a different vmspace for rump kernel proc0 and local clients.
While the rump kernel and local clients are by definition in the same
host vmspace, there are subtle differences in how in-kernel code works
in case accessing the kernel vmspace or a user process vmspace.

Problem discovered by riastradh's "read(fd, NULL, 1)" test.
2015-04-03 16:40:55 +00:00
pooka
0c4fe4730c Use vmspace of calling [rump kernel] process instead of sysspace. 2015-04-03 16:37:02 +00:00
pooka
735543fb1b fix typo
"set curlwp to context" -> "set curlwp to implicit context"
from Martin Lucina <martin@lucina.net>
2015-03-23 15:42:29 +00:00
christos
dfddf4df80 regen 2015-03-08 20:32:21 +00:00
christos
d1ef60ebe3 regen 2015-03-07 16:38:49 +00:00
christos
31250ee2de belated regen (posix_fallocate, readlinkat) 2015-02-25 13:20:05 +00:00
maxv
20fc3c6998 Kill kmeminit(). 2015-02-06 18:19:22 +00:00
pooka
2beaa9633d default newvers.sh parameters to reproducible build 2015-02-04 12:48:05 +00:00
pooka
6af7f52b7f Account for lwps so that rump_sys_setuid() doesn't hit a KASSERT when
it tries to reaccount a switching procs lwps.

from Mato Lucina
2015-01-21 14:39:37 +00:00
pooka
547f1a3188 Execute softints in the order in which they are scheduled (per level). 2015-01-14 18:51:56 +00:00
pooka
e82a50e44e Implement softint_schedule_cpu() for rump kernels.
While distributing processing all over the place is not relevant for
high-performance rump kernel I/O stacks (and downright counterproductive),
the mechanism is used e.g. to reach a quiescent state when detaching
an interface, and therefore a semantically correct implementation is
required.

Fixes at least an uncommon race in the ifconfig destroy case.
reported & patch tested by Justin Cormack.
2015-01-14 18:46:38 +00:00
pooka
0397f3a735 Move sysproxy support into a separate component, rumpkern_sysproxy,
instead of it being always provided by the rump kernel base.  This
move accomplishes two things:

1) it is no longer necessary to provide sysproxy hypercall stubs for
   platforms which do not want to use sysproxy
2) it is easier to reason about the security aspects, since configurations
   not linking the sysproxy component simply do not support remote
   system calls

discussed on rumpkernel-users
2015-01-07 22:24:03 +00:00
pooka
a38686d502 Extend RUMP_USE_CTOR to SYSCTL_SETUP(), similar to what is already
done in MODULE().  The sysctl tree nodes from all components which
were loaded when rump_init() was called now get created -- mimics the
monolithic kernel.

No change to the monolithic kernel.
2015-01-04 22:11:40 +00:00
pooka
787cba47eb Put all sysproxy routines to their own C module, sysproxy.c 2015-01-03 17:23:51 +00:00
chs
6d40f9ff57 add a new "fo_mmap" fileops method to allow use of arbitrary uvm_objects for
mappings of file objects.  move vnode-specific details of mmap()ing a vnode
from uvm_mmap() to the new vnode-specific vn_mmap().  add new uvm_mmap_dev()
and uvm_mmap_anon() convenience functions for mapping character devices
and anonymous memory, and replace all other calls to uvm_mmap() with those.
use the new fileop in drm2 so that libdrm can use mmap() to map things
like on other platforms (instead of the ioctl that we have used so far).
2014-12-14 23:48:58 +00:00
pooka
eaa241e501 Remove shlib_version files and just use Makefile SHLIB_MAJOR/MINOR,
with the default provided by Makefile.rump (they're all 0.0 anyway)
2014-12-02 01:59:10 +00:00
pooka
7901989f05 most of this manpage moved to rumpkernel.7, so simplify a lot 2014-12-02 01:52:13 +00:00