Commit Graph

396 Commits

Author SHA1 Message Date
pooka 71043aa4cb clear cached puffs_cc's in puffs_exit() 2008-08-11 16:23:37 +00:00
pooka 7602ecfa8f * make sure we come out of mainloop in the main context. otherwise in
certain cases the server would jump to hyperspace when unmounted
* sprinkle some debug prints
2008-08-11 15:59:01 +00:00
wiz 67ff3d242e Punctuation markup nit. 2008-05-25 19:38:21 +00:00
wiz 682d8063bf Remove trailing whitespace. 2008-05-25 19:38:14 +00:00
pooka 73bad8cbdb Reserve enough memory for ops which return more than they receive. 2008-03-20 15:28:03 +00:00
pooka 04973f7441 When reading a request from the kernel, only allocate as much memory
as needed to read a request instead of the maximum message size.
Insanely enough, this makes "cheap backend I/O" file systems such
dtfs and sysctlfs perform 10-30% better (depending on the average
size of incoming requests).
2008-01-29 14:54:08 +00:00
pooka 98d94502be whoops, bump date - pretty significant change 2008-01-29 10:15:50 +00:00
pooka be5ed87c1e Fix a weirdosity in the framebuf gotfb interface: hand buffer
ownership to the called routine instead of keeping it.  This means
that callees must now destroy the buffer once they are done with it.
2008-01-29 10:07:29 +00:00
pooka 704ded372f Don't add asserts between testing and commit - especially not
if you're going to write "assert(foo = 0)"
2008-01-28 18:51:03 +00:00
pooka 7c2ddc1d53 Bump version for lazy contexts (probably not necessary, but it's
been a long time since I bumbed the version ;)
2008-01-28 18:42:09 +00:00
pooka d1d05d65b9 Implement lazy contexts for file systems using puffs_mainloop().
Previously each request was executed on its own callcontext and
switched to every time the request was being processed.  Now requests
borrow the mainloop context and switch only if/when they yield.
This takes two context switches away from a file system request
bringing down the typical amounts 2->0 (e.g. dtfs) and 4->2 (e.g.
psshfs).

The interfaces for manually executing requests changed a bit:
puffs_dispatch_create() and puffs_dispatch_exec() must now be used.
They are not tested, as nothing in-tree wants them and I doubt
anyone else is really interested in them either.

Also do some misc code cleanup related to execution contexts.  The
"work-in-progress checkpoint" committed over a year ago was starting
to look slightly weed-infested.
2008-01-28 18:35:49 +00:00
pooka e9ff674b00 For operations with a target (remove, rmdir, link), print the
target cookie.
2008-01-27 00:29:24 +00:00
pooka c142350bc6 Fix fakecc case.
Noticed by Pavel Jirout on current-users
2008-01-17 17:43:14 +00:00
pooka 9f5abca72f Comment out the puffs_executor hacks for now, they have races.
The issue should be solved in another fashion anyway.
2008-01-16 23:17:43 +00:00
pooka 614c59fcb2 Cache a number of execution contexts instead of re-initializing
them every time.  Speeds up pure in-memory file systems such as
sysctlfs or dtfs quite a bit.  For actual I/O-workhorses the result
is of course less tasty.
2008-01-16 21:29:59 +00:00
pooka 3a433fe13b Use PROT_NONE page to protect bottom of stack from overrun 2008-01-16 00:29:42 +00:00
pooka d7412d56b1 Introduce PUFFS_STACKSIZE_MIN to avoid overloading 0 and getting
a warning from the library when really wanting to say "just the
minimum, please".
2008-01-14 13:57:26 +00:00
pooka 1309a27c5e liberate gas-huffin crack-puffin' assert 2008-01-08 00:22:31 +00:00
pooka cf16702d95 fix pasto 2008-01-02 18:11:01 +00:00
pooka b181a1a237 Also pass fromname in the "distributed" case. 2008-01-02 17:57:51 +00:00
pooka 636e495315 Provide some transparent "support" for "distributed" file systems.
If the env variable PUFFS_COMFD is set, the descriptor value
contained in it is used for communication instead of opening
/dev/puffs and doing mount(2).

This feature is obviously very undocumented and should not be used
without adult supervision.
2008-01-02 14:27:42 +00:00
pooka 38a05cc07d Flesh this out a bit more. Unfortunately it's still unfinished,
and I don't know when I'll get a chance to finish it.
2007-12-27 18:50:42 +00:00
pooka c3b193c57f Add a public interface for setting a cookie mapper. 2007-12-25 20:38:01 +00:00
pooka 80ecfb9fc9 * dump r/w return resid
* fix RV dump order to be more logical
2007-12-25 20:36:53 +00:00
pooka a8e13cb420 Add generic getattr routine. 2007-12-19 14:01:16 +00:00
pooka 08c7b6138e * nuke puffs_cc_get{specific,usermount} for good
* move prototypes for puffs_docc and puffs_dopufbuf into the
  public header, as they are should be exposed
2007-12-16 20:02:57 +00:00
pooka 369391b0a0 Clarify that link_target in node_symlink is null-terminated. 2007-12-16 19:10:58 +00:00
pooka 049d39b202 document puffs_dopufbuf 2007-12-15 20:11:38 +00:00
pooka 96294df307 update to match reality 2007-12-15 20:08:06 +00:00
pooka d24dc71203 nuke #define whose purpose has ceased to be 2007-12-11 20:17:26 +00:00
pooka 6617b3099a print newnode cookie value for operations which create nodes 2007-12-09 16:54:17 +00:00
pooka 319ddafdc5 Now that "l" is gone both as an argument to operations and from
componentname, remove all vestiges of puffs_cid.
2007-12-08 19:57:02 +00:00
wiz 397b6da020 Fix typo, remove superfluous minus and describe "fd" as file descriptor
in two places.
2007-12-08 10:56:06 +00:00
pooka dc3259d60e puffs_cc_getusermount(), puffs_cc_getspecific() and puffs_docc() are dead. 2007-12-07 14:55:12 +00:00
pooka 9bc20dea14 free flushbuffer after use 2007-12-05 18:55:19 +00:00
pooka 7d5d7f4ff9 Send a response message for flush operations from the kernel instead
of abusing the return value of write(2).
2007-12-05 12:11:56 +00:00
pooka ca8fca7bb9 inverse inverse logic 2007-12-05 11:06:05 +00:00
pooka 8dad772fa4 apply previous in a more readable way 2007-12-05 10:13:37 +00:00
dogcow 96302ffc73 "fix" complaints about type-punned pointers with some icky casts. 2007-12-05 04:29:10 +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 cf878f1627 add flushops 2007-12-04 20:03:40 +00:00
pooka 661a5edd0a tyop: reserver -> reserve 2007-12-04 19:40:45 +00:00
pooka 2049bce7a5 realloc() len+incr, not offset+incr. Makes space reservation
actually work properly.
2007-12-04 17:21:24 +00:00
wiz 1746ee1de1 Add comma in enumeration. Punctuation nits. Fix a typo. 2007-12-02 22:05:51 +00:00
wiz 6db764bae5 Add comma in enumeration. 2007-12-02 19:43:10 +00:00
wiz 9429ef03ff Fix another persistent spello. 2007-12-01 19:54:01 +00:00
wiz 0b6ffdfedb Fix a typo that has migrated across files. 2007-12-01 19:18:49 +00:00
pooka c8c3c477bb fix gotframe signature to match code 2007-12-01 18:59:36 +00:00
wiz 8498f992c4 Typo fixes. 2007-12-01 18:53:28 +00:00
pooka 21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
pooka aadcb17f11 * allocate pcc as a slice from the stack instead of allocating it
separately
* provide puffs_cc_getcc()

This is in preparation for the removal of you-should-guess-what as
an argument to routines here and there and everywhere.
2007-11-29 17:47:54 +00:00
pooka 73a538eac2 print mode in open 2007-11-29 17:22:04 +00:00
pooka 6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
pooka 7568ff51e1 print more info when receiving an abort 2007-11-26 12:20:21 +00:00
pooka dac2b0c689 fix request size 2007-11-17 17:12:11 +00:00
pooka 4b2334142b puffs_mount():
* initialize values better
* always go through "fail" to see if puffs_daemon() needs to be
  woken up
* open device r/w instead of r/o
2007-11-17 16:06:18 +00:00
pooka 3537e99eb1 Introduce puffs_daemon(), which works like daemon(3) except that it
also synchronizes with puffs_mount() and does not return (exit) in the
parent process until the file system has been mounted.  This makes
it possible to reliably run e.g. mount_foo jippi /kai ; cd /kai/ee
2007-11-16 18:35:10 +00:00
pooka 154c2e54fb dump lookup return values 2007-11-16 14:59:14 +00:00
pooka 805571cfce remove header that was never committed 2007-11-12 17:35:32 +00:00
pooka 9ac65ee1fe * split the putter header into a kernel version and a userland version
+ install latter to /usr/include/dev/putter
* remove last dependencies to puffs from putter, it's completely
  independent now
2007-11-12 16:39:32 +00:00
pooka a02fe51bef Open the kernel descriptor as part of mount(), not init(). Then
it doesn't matter if someone fork()s or does other tricks between
init() and mount() (and besides, now it's where it logically should be).
2007-11-06 15:09:07 +00:00
pooka e5a1d7804c remember to bump version for puffs_mainloop() change 2007-11-05 17:55:23 +00:00
pooka 4b0f2948e2 Pull the daemonizing code out of the library mainloop into the file
servers.  Calling daemon() (i.e. fork()ing) inside a library can
cause nice surprises for e.g. threaded programs.  As discussed with
Greg Oster & others.
2007-11-05 17:48:17 +00:00
pooka bcc59b911e Call puffs_genfs_reclaim directly instead of through an extra jumpgate. 2007-11-05 16:53:00 +00:00
pooka baea362887 Fix a few bugs and memleaks with the threading code. 2007-10-31 16:09:09 +00:00
pooka f7de032584 lock massage, although I don't think there's a happy ending here 2007-10-29 17:47:33 +00:00
pooka 40ffc8b91f Sprinkle some hackish locks here and there, just enough to allow
libp2k & rump to run multithreaded.
2007-10-29 15:52:44 +00:00
pooka b40b63f077 Add possibility to set pre- and post callbacks which will be called
for all operations before or after executing the specific callback
(the api is not be final yet, though).
2007-10-28 18:40:30 +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 944ce6a1a8 dump pid/lwp of caller 2007-10-26 17:24:45 +00:00
pooka cb50a739c3 mmap stacks, makes it possible to align them 2007-10-26 13:51:14 +00:00
pooka 5643bf6454 Make pu_haskq a flag instead of its own variable. 2007-10-25 10:59:45 +00:00
pooka 753b7cae6e Add puffs_cc_schedule() which marks a pcc runnable and will pass
execution to it when in the main loop the next time.
2007-10-21 19:25:58 +00:00
he 71a133879f To work around lint problems, add a LINTED comment on pooka's request. 2007-10-21 16:29:40 +00:00
pooka be98071c8c Always provide caller information from the kernel based on curlwp.
(but don't deprecate the old puffs_cid interface just yet)
2007-10-21 14:28:05 +00:00
pooka cc72c593dd typo in comment 2007-10-21 14:26:15 +00:00
pooka cf6e3aa4f9 When doing a read operation, don't copy the whole kernel buffer to
userspace, since it doesn't contain any information yet.  I should
still rework this more so this is just a quickie to get the read/write
style interface more up to speed with the ioctl version.
2007-10-19 14:38:45 +00:00
pooka ce87c49167 * Change type of boolean functions to, well, boolean instead of int.
* add puffs_cid_isequal() which can be used to test if the two caller
  id's refer to the same process/lwp.
2007-10-18 13:48:04 +00:00
pooka 33c91738e5 Part 1/n of some pretty extensive changes to how the kernel module
interacts with the userspace file server:

  * since the kernel-user communication is not purely request-response
    anymore (hasn't been since 2006), try to rename some "request" to
    "message".  more similar mangling will take place in the future.

  * completely rework how messages are allocated.  previously most of
    them were borrowed from the stack (originally *all* of them),
    but now always allocate dynamically.  this makes the structure
    of the code much cleaner.  also makes it possible to fix a
    locking order violation.  it enables plenty of future enhancements.

  * start generalizing the transport interface to be independent of puffs

  * move transport interface to read/write instead of ioctl.  the
    old one had legacy design problems, and besides, ioctl's suck.
    implement a very generic version for now; this will be
    worked on later hopefully some day reaching "highly optimized".

  * implement libpuffs support behind existing library request
    interfaces.  this will change eventually (I hate those interfaces)
2007-10-11 19:41:13 +00:00
pooka bf2346742b g/c #if 0'd code which isn't likely to get used any time soon 2007-10-09 21:04:55 +00:00
pooka c8c5d830fc SEE ALSO paper 2007-10-05 00:04:59 +00:00
pooka 0e5d568d01 minor updates/clarifications 2007-10-02 13:41:44 +00:00
pooka 174fb761dd Pass reason string to pu_errnotify. Print it in the default
version before aborting.
2007-10-01 21:10:50 +00:00
pooka 930ce5ac9b support error notifications 2007-09-29 22:07:32 +00:00
pooka 6eff998647 silence lint. also noticed by xtraeme 2007-09-27 23:11:41 +00:00
pooka aa533e99dd Add error notifications, which are used to deliver errors from the
kernel to the file server for silly things the file server did,
e.g. attempting to create a file with size VSIZENOTSET.  The file
server can handle these as it chooses, but the default action is
for it to throw its hands in the air and sing "goodbye, cruel world,
it's over, walk on by".
2007-09-27 21:14:49 +00:00
pooka 12e401bc1a Add refuse paper to SEE ALSO 2007-09-24 00:22:25 +00:00
pooka 3875108e18 document puffs_framev_framebuf_ccpromote() 2007-09-06 18:01:34 +00:00
pooka 56b35d3b97 Give cmpframe() the ability to shortcircuit the comparison loop by
signalling back that the buffer under examination is not a response
at all.
2007-09-06 16:08:55 +00:00
pooka 91872d550d xref refuse, don't bump date 2007-09-03 12:34:21 +00:00
pooka dc9a91060d Add gotframe callback, which is called if an incoming frame matches
no outstanding request.
2007-09-01 16:42:42 +00:00
pooka b017aa6055 Pass usermount to errnotify, it might not be available there through
other structures.  CID 4496
2007-08-25 09:30:41 +00:00
pooka 083b854262 Dump lookup/componentname specific info in opdump.
(sigh, I guess I guess I'll never do opdump properly at this rate)
2007-08-22 17:57:48 +00:00
pooka e6d6dce9bf Mimic namei structure changes for puffs. bump both kernel & lib version. 2007-08-22 17:54:30 +00:00
pooka f9009a84a6 puffs_cc_create/destroy aren't supposed to be exported to the user 2007-08-18 10:26:05 +00:00
pooka 4385b647e7 Add accessors for struct puffs_node to prepare for removal from
exported headers.
2007-08-17 17:25:31 +00:00
pooka 25a346d4fb Nuke PUFFSLOOKUP_FOO and move to NAMEI_FOO 2007-08-15 14:19:19 +00:00
pooka ea9b8a0046 run realpath() on the mountpath 2007-08-11 18:04:50 +00:00
pooka a213499d32 dump further info for read/write 2007-08-07 13:44:27 +00:00
pooka 78302eef99 Per rumble's lead in vnodeops, clarify the bit about readdir cookies. 2007-07-31 21:48:18 +00:00
pooka 8631cf4e2b mmap fflags -> prot 2007-07-27 08:28:16 +00:00
pooka b2a631b1fe * add missing credential handle to fsync args
* and now with more cosmetic attack
2007-07-25 09:10:26 +00:00
pooka 9825955cc2 pure cosmetics: minor facelift 2007-07-25 08:31:19 +00:00
pooka b0e54182a4 document puffs_framev_enqueue_waitevent 2007-07-21 09:36:49 +00:00
pooka e30ed21300 Return -1 and errno from puffs_framev_enqueue_waitevent instead of
a direct error value.
2007-07-21 09:29:07 +00:00
pooka e2dc8334cf simplify send loop 2007-07-20 14:55:42 +00:00
pooka 343e8df31e Add puffs_framev_enqueue_waitevent, which waits for read/write/error
events from an i/o descriptor.  It yields until an event happens
and continues execution when the event loop notices the event has
happened.
2007-07-20 13:14:55 +00:00
pooka 99db048c69 note caveat with puffs_node_poll 2007-07-20 10:01:24 +00:00
wiz 77bf5a1ac4 Use HTML escapes. Drop trailing whitespace. Punctuation nits. 2007-07-19 19:25:09 +00:00
pooka f2825a0ae8 Don't float puffs_kargs needlessly around after mount, saves
a couple k of memory (and there was much rejoycing!)
2007-07-19 12:52:28 +00:00
pooka 044229479a wizd reminded me that if I provide the synopsis for puffs_node_seek(),
I would do well to also describe what it does.  so make it so.
2007-07-19 08:32:06 +00:00
pooka 2f6b69c368 Use ioctl(PUFFSREQSIZEOP) instead of mount(MNT_GETARGS) to fetch
the maximum request size after mount.  Calling mount(MNT_GETARGS)
from the file server is currently not kosher, as it vrele()s the
root vnode, potentially causing an inactive, which the file server
cannot handle while it itself is inactive in the kernel (deadlock).
2007-07-19 07:54:46 +00:00
pooka 638ce78980 stuff 2007-07-19 07:48:10 +00:00
pooka d8a510556e get rid of DBG= 2007-07-18 22:38:58 +00:00
pooka 9651f40228 update 2007-07-18 22:23:37 +00:00
pooka 81ec5d68ec uncomment puffs_node_seek - it's supported and in use 2007-07-18 21:41:06 +00:00
pooka 46bd6a6148 puffs_cid* is always const 2007-07-18 21:24:40 +00:00
pooka 08db7d7534 * add mntfromname parameter to puffs_init()
* set it in file servers
2007-07-17 11:34:51 +00:00
dsl 0666faeea3 Add new 'data_len' parameter to mount system call.
Add an additional call with MNT_GETARGS to retrieve the modified
information instead of relying on the kernel code abusing the mount
interface during mount.
2007-07-14 16:02:14 +00:00
pooka fb503062d5 add IO_NDELAY 2007-07-09 09:28:48 +00:00
pooka 181c165c35 bring up-to-date 2007-07-08 17:25:26 +00:00
pooka 3541e44ce7 g/c leftover 2007-07-08 17:24:41 +00:00
pooka 1119cb908e make notifyfunction optional and do not call removeonclose() if
none is given.
2007-07-08 11:24:58 +00:00
pooka 8c9c68dbc2 Make puffs_framebuf better suited from environments with multiple sources:
* in addition add/remove, allow enable/disable, which can be used
  to control events for descriptors without having to remove all the
  data associated with them
* add directsend/receive, which can be used to pass the same buffer
  from the caller to read/writeframe and back again
* add flags to enqueue functions and allow urgent buffers to be
  processed as the next PDU
2007-07-07 21:13:41 +00:00
pooka c3dac7fe6f make few function types match reality 2007-07-06 10:11:02 +00:00
pooka 1451f0dabb document PUFFS_KFLAG_LOOKUP_FULLPNBUF 2007-07-05 22:42:14 +00:00
pooka b710306f2c apply ketchup to recent source changes in libpuffs 2007-07-05 22:37:52 +00:00
pooka 0e40108103 * reorder calls to get results processed even if our I/O descriptors
go back to zero
* don't give up on the read-side of an fd if there is still unreceived data
2007-07-05 12:27:39 +00:00
pooka df6f052d2f Get rid of the "int *refs" parameter to inactive: the same can be
accomplished now with puffs_setbacks.
2007-07-02 10:24:17 +00:00
pooka 79d81a9639 pid is gone 2007-07-01 23:04:13 +00:00
pooka 8023454664 Instead of requesting various pieces of information from node-creating
methods using "please fill me"-pointers, pass "struct puffs_newinfo *"
and provide methods to fill in new node info.
2007-07-01 18:39:39 +00:00
pooka 209b3e08de cast to void * instead of actual (albeit incomplete) type to silence
gcc about type punning with -fstrict-alias
2007-07-01 17:42:19 +00:00
pooka ffe0a01441 Instead of supplying a plain pid, supply an abstract struct puffs_cid *,
which can currently be used to query the pid and lwpid.
2007-07-01 17:22:13 +00:00
pooka 438f52d212 make puffs_cred an opaque type 2007-07-01 15:30:15 +00:00
pooka 5092d42715 print time elapsed between calls 2007-06-30 12:42:25 +00:00
pooka 0f53ecfb54 fold in common code for node creation. no functional change. 2007-06-25 07:52:01 +00:00
pooka c3942902c4 Since we locate in-memory nodes based on the inode number, stat a
file always after creation to cache the inode number given by the
backend file system.  Otherwise we would not find a newly created
node from incore and create another one.  In practise this was
pretty well hidden by the kernel name cache.
2007-06-24 23:02:55 +00:00
pooka 8bfc66776f document KFLAG_NOCACHE{_PAGE,_NAME,} 2007-06-24 22:32:00 +00:00
pooka 53a4105885 Actually, keep PUFFS_KFLAG_NOCACHE and -o cache around as shorthand
to neither page- nor namecache.
2007-06-24 22:25:49 +00:00
pooka 5662e7f720 PUFFS_KFLAG_NOCACHE became two, so introduce the command line options
-o nonamecache and -o nopagecache and adapt file systems where necessary.
2007-06-24 22:18:38 +00:00
pooka 159e84cbd3 Introduce puffs_null_setops(), which initializes the ops vector with
puffs nullfs ops.
2007-06-24 18:42:25 +00:00
pooka b1da438567 * document puffs_pn_remove
* all-around improve the manual page
2007-06-24 18:16:36 +00:00
pooka 564336f084 Introduce puffs_pn_remove() to signal that a node has been deleted
and destroyed, but not yet reclaimed.  This prevents puffs_pn_nodewalk()
from returning stale entries.  Make nullfs use this (some file
systems are a bit too happy with recycling inode numbers).
2007-06-24 17:55:07 +00:00
pooka 86e63e7e27 don't return errno from a function which returns an fd - there's
a "little" room for confusion.  instead, return -1 and let the
caller grab errno.
2007-06-24 17:41:09 +00:00
pooka 18e8d526ea print a specific warning if /dev/puffs cannot be opened in init 2007-06-11 06:13:34 +00:00
pooka f8326bf98e Move puffs to a two clause license where it already isn't so. And
as agc pointed out, even files with the third clause were already
effectively two clause because of a slight bug in the language...
2007-06-06 01:54:59 +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 0b02e3c304 remember to put the results of the final operations (including unmount)
to the kernel in mainloop
2007-05-21 08:30:49 +00:00
pooka 866bcfbb38 Introduce puffs_framev_framebuf_ccpromote, which can be used to
turn a reference to puffs_framebuf in the file system from a
cb/justsend operation to a cc wait, should the file system find
itself desiring the result.
2007-05-20 19:56:56 +00:00
pooka 7c537b89eb Change the signature of puffs_respcmp to return -1,0,1 for smaller,
equal, larger, respectively instead of 0/1 for non/equal.  This
will allow sorting the buffers for faster matching in libpuffs.
While here, change the name from respcmp to framecmp, as that better
reflects the purpose.

NOTE!  there is no obvious way to make compilation fail for file
systems which may already be using this feature (although I don't
think there are any outside our tree, as the feature is two weeks
old).  Nevertheless, non-updated file systems will fail very quickly.
2007-05-20 16:24:37 +00:00