Commit Graph

2691 Commits

Author SHA1 Message Date
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
riastradh
e6d0ae95b0 Cull unused INRENAME and INRELOOKUP from callers. 2015-04-21 03:19:03 +00:00
riastradh
aef6e9be2d regen for good measure (no functional change) 2015-04-20 23:11:27 +00:00
riastradh
46e71c7d57 Make VOP_LINK return directory still locked and referenced.
Ride 7.99.10 bump.
2015-04-20 22:59:19 +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
46b4bd4192 include sockstat in list of utilities 2015-04-17 13:04:19 +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
rtr
a2ba5e69ab * change pr_bind to accept struct sockaddr * instead of struct mbuf *
* update protocol bind implementations to use/expect sockaddr *
  instead of mbuf *
* introduce sockaddr_big struct for storage of addr data passed via
  sys_bind; sockaddr_big is of sufficient size and alignment to
  accommodate all addr data sizes received.
* modify sys_bind to allocate sockaddr_big instead of using an mbuf.
* bump kernel version to 7.99.9 for change to pr_bind() parameter type.

Patch posted to tech-net@
  http://mail-index.netbsd.org/tech-net/2015/03/15/msg005004.html

The choice to use a new structure sockaddr_big has been retained since
changing sockaddr_storage size would lead to unnecessary ABI change. The
use of the new structure does not preclude future work that increases
the size of sockaddr_storage and at that time sockaddr_big may be
trivially replaced.

Tested by mrg@ and myself, discussed with rmind@, posted to tech-net@
2015-04-03 20:01:07 +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
ozaki-r
24f231a2bd Add opt_net_mpsafe.h for rump 2015-04-03 07:56:54 +00:00
jmcneill
8a9ff04ba8 Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.
2015-03-28 14:09:58 +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
pooka
4ea3e40cc7 "rump" -> "rump kernel" police 2015-03-18 13:20:20 +00:00
christos
dfddf4df80 regen 2015-03-08 20:32:21 +00:00
christos
ccbcae9faf Add snippet to build syscalls. 2015-03-08 15:22:02 +00:00
christos
6e1be9e387 regen 2015-03-08 15:21:20 +00:00
christos
702f49ac99 factor out the syscall building code 2015-03-08 15:20:07 +00:00
christos
bb3f5d4d7f regen 2015-03-08 15:19:40 +00:00
christos
dffa3aaa60 regen and add a build target. 2015-03-08 15:07:33 +00:00
justin
7b6e31cdaa Add risc-v to checked out rump architectures 2015-03-07 22:00:07 +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
christos
5a70401cf6 PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong. 2015-02-22 00:50:30 +00:00
pooka
16ea0ea222 add libc++ 2015-02-13 00:31:42 +00:00
rjs
652788239c Add DCCP protocol support from KAME. 2015-02-10 19:11:52 +00:00
christos
d83ca2bff1 regen 2015-02-10 17:43:44 +00:00
justin
01c483dd39 Add rtadvd to rump user sources 2015-02-08 20:22:01 +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
justin
3a953aac64 Revert removal of opt_inet.h as many cases may still require it 2015-01-18 17:33:08 +00:00
justin
863783fab4 Move defines of INET and INET6 from opt_inet.h to Makefile.inc
As discussed with pooka@
fixes current issues with ipv6 on rump being broken
2015-01-18 17:06:24 +00:00
dennis
a533f08417 Regen. 2015-01-16 21:41:07 +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
riastradh
3e78aa497a Name kmem_free(rn, sizeof(*rn)) as freeprivate to match makeprivate.
Per pooka's request from a year or so ago when I passed this patch by
him a year or so ago, if I recall correctly.
2015-01-07 04:05:26 +00:00
riastradh
c1b55c2b04 Don't leak rn on vcache_get failure. 2015-01-07 03:45:18 +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
2ca71ee5e6 limit visibility of sysproxy calls to where they are needed 2015-01-03 17:24:20 +00:00
pooka
787cba47eb Put all sysproxy routines to their own C module, sysproxy.c 2015-01-03 17:23:51 +00:00
hannken
333c9d2e48 Always use (struct rumpfs_node **) as key to vcache operations. 2015-01-03 16:30:32 +00:00
christos
c182898b0d We have three sets of DTYPE_ constants in the kernel:
altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
2015-01-02 19:42:05 +00:00
hannken
af86340e95 Change rumpfs to vcache. 2015-01-01 16:02:50 +00:00
justin
0d02d6e5ad Add fdisk to rump listsrcdirs 2014-12-24 21:21:18 +00:00
dennis
1542bceaa3 Update stats-keeping in sys/kern/vfs_cache.c to remove (most)
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations.  Update comment describing
the locking protocol to include this.
2014-12-24 19:56:49 +00:00
justin
86336f8d9d Add mdconfig to rump listsrcdirs 2014-12-23 13:23:47 +00:00
pooka
401c4cd769 workaround bin/49481 2014-12-16 15:33:22 +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
1572824f8c include lib/i18n_module in user sources
It's used by the libc build to determine the citrus module version,
so including it will give us consistent results both with a full
NetBSD checkout and a rumprun things only checkout.
2014-12-10 16:54:58 +00:00
pooka
5121db8ab2 Add genassym
It's not reeeaaallly required currently, but libc build for some archs
(e.g. arm) wants to run it, and genassym is small enough for it to be
simplest to just include it.
2014-12-05 01:49:51 +00:00
christos
b38f9a9502 add printers. 2014-12-03 00:19:04 +00:00
ozaki-r
f89f3b9feb Get rid of weak_alias for bridge_input
bridge_input is now not directly called from ether_input,
so we can remove weak_alias for it.
2014-12-02 14:34:19 +00:00
wiz
f497467a53 Use Nx. 2014-12-02 09:05:15 +00:00
ozaki-r
087b8cc474 Revert "Pull if_drain routine out of m_reclaim"
The commit broke dlopen()'d rumpnet on platforms where ld.so does not
override weak aliases (e.g. musl, Solaris, potentially OS X, ...).

Requested by pooka@.
2014-12-02 04:43:35 +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
pooka
4c9416f8e4 add a high-level rumpkernel.7 manpage 2014-12-02 01:51:45 +00:00
pooka
1b3fbb4b1b need -Wno-unused-parameter with -Wextra 2014-12-01 23:08:15 +00:00
pooka
0201ddbb4c define the warnings used for hypercall components once 2014-12-01 22:58:41 +00:00
pooka
03d8c7895a RUMPCOMP_USER has been deprecated for long enough, remove it. 2014-12-01 22:54:32 +00:00
ozaki-r
0b2631673e Pull if_drain routine out of m_reclaim
It's if-specific and should be in if.c.

No functional change.
2014-11-27 03:15:51 +00:00
pooka
8994492cd1 On second thought, let's not build the rump kernel component for ac97
by default.  The component is not used on a NetBSD target anyway.
2014-11-19 01:08:42 +00:00
pooka
784dbdc3ce Add hdaudio driver as a rump kernel component
tested by booting a rump kernel on a T61, coupled with a client which
writes some Roy Buchanan to /dev/audio
2014-11-19 00:18:58 +00:00
pooka
a0d2bb5e74 delay() can't use rumpuser_clock_sleep(), because that may unschedule().
Instead, busyloop with calls to rumpuser_clock_gettime().  Fixing delay()
properly should addressed in hypercall rev.18 by introducing a nowrap
variant/flag for rumpuser_clock_sleep().
2014-11-18 16:57:52 +00:00
pooka
ef964280f3 Attempt to make sure that DELAY()/delay() is available in all MD names. 2014-11-18 13:05:33 +00:00
pooka
c9ae4a1d22 add ac97 component
for use with eap and others
2014-11-18 09:04:20 +00:00
pooka
557725048e Add eap PCI audio driver.
tested by playing audio with rump kernel booted on qemu with -soundhw es1370
2014-11-18 08:43:03 +00:00
nonaka
a0b2d4d1c7 Adopy recent software volume control change. 2014-11-18 04:29:06 +00:00
pooka
3bc1213af0 Release all hypervisor-level resources for rump_etfs paths when the
rump kernel is halted.

Allows a Xen domU to not complain after it was shut down, or something
like that.  Requested by Martin Lucina.
2014-11-17 14:30:31 +00:00
nakayama
c0067af94a Wrap iconv.h also with #ifdef __NetBSD__. 2014-11-16 15:31:12 +00:00
nakayama
51553e0795 Using host iconv(3) is limited to NetBSD host. 2014-11-16 04:26:46 +00:00
nakayama
fb45a1eb84 Make rump_smbfs(8) uses host iconv(3) to convert filenames
character set.
2014-11-15 18:49:04 +00:00
pooka
77e862601f Move rump kernel man pages from various sources to sys/rump
namely:
  * src/lib is used only when building for POSIX'y platforms, but
    the man pages have their use for all platforms
  * rumpuser.3 is a function of the rump kernel, not one of the of
    the POSIX'y implementation hosted in src/lib/librumpuser

no functional change
2014-11-09 17:39:37 +00:00
pooka
b4d5024ba8 Ensure that no two VIRTIF's have the same modname, therefore
allowing them to coexist in the same rump kernel.

from Alexander Guy, via github
2014-11-06 23:25:16 +00:00
pooka
86040218de Add rump kernel component for viornd
tested: qemu -device virtio-rng-pci
2014-11-06 00:45:58 +00:00
justin
88f8b8fb5f Add libelf to rump directories 2014-10-29 21:16:06 +00:00
pooka
28b6ad5803 Perform internal consistency check automatically. 2014-10-29 19:59:32 +00:00
justin
539cfda85b Revert, zfs was already elsewhere in list 2014-10-29 19:35:29 +00:00
justin
d924940d40 Add zfs files to rump userspace sources 2014-10-29 17:36:07 +00:00
ozaki-r
58dd466be8 Make shmif buildable when DRPINTF enabled 2014-09-17 04:20:58 +00:00
pooka
1dc56c39a2 Implement pci_intr_setattr()
(well, kinda.  it just ignores the MPSAFE param for now, but that's
easy to fix later)
2014-08-26 10:58:13 +00:00
pooka
67433f3a0f Remove and obsolete rumpkern_time as a separate component. 2014-08-25 18:44:02 +00:00
pooka
b124cf15b4 No longer create a special process context to fork remote clients off
of, simply always rfork off of proc1 closing all descriptors, and have
the rump kernel open 0/1/2 if the parent process is "1".

Fixes tests/rump/rumpkernel/t_sp, which was failing since the
abovementioned special process change due to attempting to deliver a
signal to the special process and the special process was not equipped
to handle one.
2014-08-25 14:58:48 +00:00
pooka
272d41f121 Add a compile-time selector for I/O space operations. Needs more work
some day, but allows virtio drivers to work today.
2014-08-22 14:28:58 +00:00
pooka
b41a4e160f Nuke the DOMAINADD() macro and just call domain_attach(), now that things
work correctly that way.
2014-08-22 11:34:28 +00:00
pooka
08f38d958e Build virtio components as part of RUMPPCIDEVS 2014-08-22 09:58:55 +00:00
pooka
db494c8796 Add a rump kernel component for ld@virtio. 2014-08-22 09:57:05 +00:00
pooka
d7b8f51b8f Add a rump kernel component for the vioif virtio network interface. 2014-08-22 09:48:54 +00:00
pooka
e125b93131 Add a rump kernel component for the virtio bus. 2014-08-22 09:45:29 +00:00