NetBSD/sys/rump/librump/rumpkern/rump.3

137 lines
4.0 KiB
Groff
Raw Normal View History

2009-05-28 13:41:05 +04:00
.\" $NetBSD: rump.3,v 1.4 2009/05/28 09:41:05 wiz Exp $
.\"
.\" Copyright (c) 2008 Antti Kantee. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
2009-05-25 03:13:49 +04:00
.Dd May 25, 2009
.Dt RUMP 3
.Os
.Sh NAME
.Nm rump
.Nd Runnable Userspace Meta Program kernel
.Sh LIBRARY
rump Library (librump, \-lrump)
.Sh SYNOPSIS
.In rump/rump.h
.In rump/rump_syscalls.h
.In rump/rumpvnode_if.h
.Sh DESCRIPTION
.Nm
emulates portions of the kernel in order to be able to run kernel code
from a userspace application.
For most parts kernel code is directly used, but in some cases such as
with vm and device drivers a reimplementation suitable for userspace
is provided.
All of the routines in
.Nm
have been compiled in the kernel namespace with
.Dv \-D_KERNEL .
.Pp
Although
.Nm
includes many kernel routines directly, userspace applications should
not attempt to include
.Nx
system headers and call kernel functions directly.
Instead,
.Nm
routines should be called.
In case applications attempt to include
.In sys
headers from the
.Nx
tree, collisions will result on other platforms.
.Pp
Three classes of routines are provided by
.Nm :
.Bl -tag -width XXX -offset indent
.It Native
These routines have been handwritten for
.Nm
operation.
Some are useful purely for
.Nm ,
while others are merely interfaces to existing kernel routines.
An example of the former is
.Fn rump_fakeblk_register ,
while an example of the latter class is
.Fn rump_vfs_unmount .
.Pp
The routines available in this class can be found from the header
.In rump.h .
.It System Calls
It is possible to execute certain system calls from
.Nm .
However, contrary to real system calls, the kernel is never entered,
but the system call backend code compiled into
.Nm
is merely called as a direct function call.
.Pp
The autogenerated list of system calls currently available in
.Nm
can be found from the header
.In rump_syscalls.h .
.It Vnode Interface
2009-05-28 13:41:05 +04:00
To sort out namespace collisions for
.Pf non- Nx
platforms, the whole
vnode interface set is provided under a special namespace.
The operation is the same as in the kernel, but the interface names
begin with the prefix RUMP_VOP.
.Pp
This class of routines is available from the autogenerated header
.In rumpvnode_if.h .
.El
.Pp
Before use
.Nm
must be initialized by calling
.Fn rump_init .
.Sh SEE ALSO
.Xr p2k 3 ,
.Xr rumpuser 3 ,
.Xr ukfs 3
2009-03-22 08:41:49 +03:00
.Rs
.%A Antti Kantee
.%D March 2009
.%J Proceedings of AsiaBSDCon 2009
.%P pp. 71-80
.%T Environmental Independence: BSD Kernel TCP/IP in Userspace
.Re
2009-05-25 03:13:49 +04:00
.Rs
.%A Antti Kantee
.%D May 2009
.%J BSDCan 2009
.%T Kernel Development in Userspace - The Rump Approach
.Re
.Sh HISTORY
.Nm
first appeared in
.Nx 5.0 .
.Sh AUTHORS
.An Antti Kantee Aq pooka@iki.fi
.Sh NOTE
.Nm
is highly experimental and may change in header location, library
name, API and/or ABI without warning.