Commit Graph

29 Commits

Author SHA1 Message Date
rillig cb5396addb libpuffs: ignore lint warning about nested extern for now
This should be properly fixed by someone familiar with puffs.
2023-03-31 04:51:32 +00:00
rillig b2baa50111 lint: warn about extern declarations outside headers
https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html
2023-03-28 14:44:34 +00:00
pho 0585557a98 Allow calling puffs_mount(3) before puffs_daemon(3)
puffs_daemon(3) creates a pipe before forking, and the parent process
waits for the child to either complete puffs_mount(3) or fail. If a
user calls puffs_daemon(3) after puffs_mount(3), the function
deadlocks. While this error-reporting functionality is really a nice
thing to have, deadlocking is not great. If the filesystem has already
been mounted, puffs_mount(3) should just daemonize the process and
return.

This became an issue because fuse_daemonize(3) in FUSE API had no such
requirement and some FUSE filesystems in the wild suffered deadlocks.
2022-01-22 07:35:26 +00:00
christos ffeb8dbf4e Define _KERNTYPES for things that need it. 2016-01-23 21:22:45 +00:00
matt fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
pooka 248168affc Remove PUFFS_WITH_THREADS ifdef garbage, just use libc weak symbols. 2010-12-06 14:50:34 +00:00
pooka 689551bfdb Remove suspension support from here too. 2009-12-05 12:13:08 +00:00
pooka 61113f40fd Part 3/n of extensive changes to message handling:
Get rid of the original puffs_req(3) framework and use puffs_framebuf(3)
instead for file system requests.  It has the advantage of being
suitable for transporting a distributed message passing protocol
and therefore us being able to run the file system server on any
host.

Ok, puffs is not quite here yet: libpuffs needs to grow request
routing support and the message contents need to be munged into a
host independent format.  Saying which format would be telling,
but it might begin with an X, end in an L and have the 13th character
in the middle.  Keep an eye out for the sequels: Parts 3+m/n.
2007-12-04 21:24:10 +00:00
pooka edb40ac9bf Add some very initial support for a threading worker model as an
alternative to the (vastly superior ;) continuation model.  This
is very preliminary stuff and not compiled by default (which it
even won't do without some other patches I cannot commit yet).

The raison d'commit of the patch is a snippet which ensures proper
in-order dispatching of all operations, including those which don't
require a response.  Previously many of them would be dispatched
simultaneosly, e.g. fsync and reclaim on the same node, which
obviously isn't all that nice for correct operation.
2007-10-26 17:35:01 +00:00
pooka d8a510556e get rid of DBG= 2007-07-18 22:38:58 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
pooka e9cad0cef9 move puffs request dispatching code into it's own module.
no functional change
2007-05-11 21:42:42 +00:00
pooka bb0de0a878 add stubby version of puffs_framebuf manual page. proper one
forthcoming to an internet near you Real Soon Now(tm)
2007-05-05 16:09:16 +00:00
pooka b223c403fc Add puffs "frame buffers", which are an abstraction of the buffering
and event handling mechanisms required in file servers with blocking
I/O backends.  puffs_framebuf is built on the concept of puffs_cc
and uses those to multiplex execution where needed.

File systems are required to implement three methods:
  * read frame
  * write frame
  * compare if frame is a response to the given one

Memory management is provided by puffs_framebuf, but the file
systems must still, of course, interpret the protocol and do e.g.
byte order conversion.

As always, puffs_framebuf is work in progress.  Current users are
mount_psshfs and mount_9p.
2007-05-05 15:48:18 +00:00
pooka aaf5af07be Move file system and node callbacks into their own manual page.
Improve markup and descriptions a bit (not completely finished yet).
2007-04-16 19:16:02 +00:00
pooka 406a946463 document credentials & access control methods 2007-03-22 17:38:09 +00:00
pooka f4e2aba8ce document puffs_fs_suspend() 2007-01-26 23:55:27 +00:00
pooka d83ed90176 add interfaces for suspending the file system 2007-01-26 23:00:33 +00:00
pooka 2fbe1b2261 document request handling routines 2007-01-20 15:09:34 +00:00
pooka 809ae5f803 Bring the documentation slightly more into sync with the current
reality.  It's still really a far cry from proper documentation,
though.
2007-01-19 21:10:55 +00:00
pooka 05861b929d Checkpoint some more work in progress: for the benefit those file
system backends which operate purely based on paths, push out more
path management into the library and make path management more
abstract: enable a file system to define a bunch of path management
callbacks, which are used by the framework.  Management of normal
/this/is/a/path type paths is provided by the library.
2007-01-15 00:39:02 +00:00
pooka e639bec8c2 Add preliminary code for a nullfs layer, which can be used to mount
a directory hierarchy to another point, just like with the kernel
nullfs.  This is not really a layering scheme yet, but it should
evolve into one.  Currently it can just be used to do 1:1 mapping.
2007-01-11 01:01:55 +00:00
pooka 03a190dc22 lib interface for invalidation routines 2007-01-09 18:15:08 +00:00
pooka 184a7d787c checkpoint some experimental work-in-progress, namely:
Add support for having multiple outstanding operations.  This is done
by exposing enough interfaces so that it is convenient to have the
main event loop in the implementation itself and by providing a
continuation framework for convinient blocking and rescheduling.

works fine, but will undergo further cleanup & development
2006-12-29 15:28:11 +00:00
pooka 49df5bfc7b outline & export code for interfacing with kernel GET/PUT requests 2006-12-07 23:15:20 +00:00
pooka b8a1eae019 initial documentation for the puffs library interface 2006-11-09 01:30:15 +00:00
christos b6f6a56052 pass lint; fix install. 2006-10-23 00:22:24 +00:00
dogcow 8f7efdd62a add the .include <bsd.own.mk>, so .d and .o files don't end up in the CWD.
remove INCDIR=/usr/include, as my leenooks system doesn't have puffs .h files.
2006-10-22 23:51:37 +00:00
pooka 1635cf06bc add libpuffs - the userspace programming interface for puffs
This work was initially started and completed for Google SoC 2005
and tweaked to work a bit better in the past few weeks.  While
being far from complete, it is functional enough to be able and
stable to host a fairly general-purpose in-memory file system in
userspace.  Even so, puffs should be considered experimental and
no binary compatibility for interfaces or crash-freedom or zero
security implications should be relied upon just yet.

The GSoC project was mentored by William Studenmund and the final
review for the code was done by Christos.
2006-10-22 22:52:21 +00:00