Commit Graph

2729 Commits

Author SHA1 Message Date
pooka
61248571de Satisfy yet another non-modular driver still requiring a manual init call. 2015-05-16 13:59:00 +00:00
pgoyette
50b0fae6fd Regenerate 2015-05-13 02:13:08 +00:00
christos
524046d70c PR/975220: Check return of kthread_create 2015-05-10 14:05:22 +00:00
christos
65bd814e25 CID 274829: Check error from fd_getfile to avoid NULL deref immediately
after.
2015-05-10 14:00:42 +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
pooka
48121ce977 remove files which are autogenerated in every build 2015-05-09 12:03:34 +00:00
pooka
8c13dec0ff Make the cool syscall autogeneration feature work with the
newfangled r/o src feature.
2015-05-09 12:03:10 +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
hannken
e10a32f7f7 Remove miscfs/syncfs and
- move the syncer into kern/vfs_subr.c.

- change the syncer to process the mountlist and VFS_SYNC as appropriate.

- use an API for mount points similiar to the API for vnodes:
  - vfs_syncer_add_to_worklist(struct mount *mp) to add
  - vfs_syncer_remove_from_worklist(struct mount *mp) to remove a mount.

No objections on tech-kern@
2015-05-06 15:57:07 +00:00
rtr
fd12cf39ee make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

* bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect}
2015-05-02 17:18:03 +00:00
prlw1
9521ae7bfd Fix typos 2015-04-28 09:48:30 +00:00
rtr
d2aa9dd71f remove pr_generic from struct pr_usrreqs and all implementations of
pr_generic in protocols.

bump to 7.99.13

approved by rmind@
2015-04-26 21:40:48 +00:00
pooka
a240365213 Add libkvm to list of userspace libraries.
Even though kvm per se isn't support by rump kernels at least for now,
libkvm contains methods such as kvm_getproc2() which can be necessary for
compiling existing applications with kvm awareness as rumprun unikernels.
2015-04-25 08:48:06 +00:00
rtr
eddf3af3c6 make accept, getsockname and getpeername syscalls use sockaddr_big and modify
pr_{accept,sockname,peername} nam parameter type from mbuf * to sockaddr *.

* retained use of mbuftypes[MT_SONAME] for now.
* bump to netbsd version 7.99.12 for parameter type change.

patch posted to tech-net@ 2015/04/19
2015-04-24 22:32:37 +00:00
pooka
ff02be874a There are tests which rely on compat code continuing to be present,
so default RUMP_NBCOMPAT to all releases.

reported by gson
2015-04-24 06:29:56 +00:00
pgoyette
2c08ddf95f Update initialization of sysmon rump library sub-components. These are now handled as part of module initialization, and do not require manual invocation. 2015-04-23 23:23:14 +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
97e480bbad For RUMP_COMPAT, accept "all" as an alias.
Also accept a comma-separated list, since that's easier to pass through
shells than a whitespace-separated list.
2015-04-23 14:39:03 +00:00
pooka
87a65e5d69 Default compat to 60 70, now that it hopefully generates no fallout. 2015-04-23 10:52:18 +00:00
pooka
1e3055e45d regen for COMPAT_50 sprinklage 2015-04-23 10:51:20 +00:00
pooka
f26441069d Mark the vattr50 translation helpers as COMPAT_50 2015-04-23 10:50:29 +00:00
pooka
30f29c7861 support COMPAT_nn flags 2015-04-23 10:50:00 +00:00
pooka
ff30f895ea COMPAT_OIF{DATA,REQ} are defined by compat/sys/sockio.h if need be,
don't define them here unconditionally.
2015-04-23 07:56:03 +00:00
pooka
78d0de80d8 sprinkle COMPAT_50 2015-04-23 07:55:24 +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
165d419fa9 Put 50 back to compat list for a while (some fallout) 2015-04-22 18:14:55 +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
b6f51922f7 default compat to 60 & 70 2015-04-22 17:58:19 +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
459ac4c7e6 rename rumpvfs/compat.c to rumpvfs/rumpvfs_compat50.c 2015-04-22 17:00:59 +00:00
pooka
28f2b5b757 Generate -DCOMPAT_nn from a list of nn provided in RUMP_COMPAT 2015-04-22 16:59:45 +00:00
pooka
87792ce272 Include kern_clock.c in rump kernels. 2015-04-22 16:49:42 +00:00
pooka
e94d45801a emulgate clockframe 2015-04-22 16:48:08 +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
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