Commit Graph

11864 Commits

Author SHA1 Message Date
christos
fecee97ce4 We can USE_FORT now. 2007-06-03 17:36:08 +00:00
christos
aaa4c88713 provide a weak symbol for readlink since it is used internally. 2007-06-03 17:35:24 +00:00
christos
d9b4f5bb0a #undef the fortified functions we use, otherwise we end up calling ourselves
recursively.
XXX: Do we need namespace.h here?
2007-06-03 17:34:35 +00:00
christos
201eeae43d this is not needed. 2007-05-31 21:46:03 +00:00
rmind
05d5495566 We should clean the ${ASM} files, not a ${PSEUDO}, which is really "pseudo" ;)
Pointed out by <veego>.
2007-05-31 05:44:14 +00:00
tls
dc99372be9 Match usage of FORTIFY_SOURCE on other platforms by not requiring special
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).

Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3).  But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
2007-05-30 21:14:35 +00:00
tls
2368dc663d Move FORTIFY_SOURCE implementation from the somewhat ill-named "libssp"
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do.  Goodbye, libssp
dependency in libraries and executables.  Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.
2007-05-30 01:13:14 +00:00
veego
e4f44a55a6 Fix compile errors on i386 by changing %ld to %zu. 2007-05-29 19:07:19 +00:00
tls
64e3562f4f Fix two bugs reported by Simon Burge: 1) USE_FORT and USE_SSP should be
disabled on platforms where GCC doesn't support -fstack-protector.  2) The
libssl Makefile had a hard-coded USE_FORT=yes.
2007-05-29 13:55:31 +00:00
blymn
eaa84a63c0 Change debug handling, now we write debug out iff CURSES_TRACE_FILE
has been set in the environment, this prevents people using MKDEBUGLIB
getting more than they bargained for.

Tidied up the debug settings in the Makefile to reflect the above change,
we no longer need to have FULL_DEBUG since nothing is written by default.
2007-05-29 13:20:21 +00:00
blymn
070937be37 Fix some compiler warnings.
Remove shadowed variable declarations when DEBUG is defined.
2007-05-29 11:10:55 +00:00
manu
d04d1dbd4b Try to make select(2) man page more insightful, by providing an example.
Based on contribution form Jean-Yves Migeon <Jean-Yves.Migeon@bde.espci.fr>
2007-05-29 07:54:17 +00:00
blymn
e124de36d8 Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
2007-05-28 15:01:53 +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
christos
2d9dad6f00 Add rl_completion_matches, fix remove_history 2007-05-27 19:45:37 +00:00
tnozaki
ec36328c0e s/approprate/appropriate/ 2007-05-26 13:14:13 +00:00
christos
534e84b17b mention bcopy and bzero. 2007-05-24 20:50:28 +00:00
plunky
28aef083c5 add generic Device Controls usage page information 2007-05-24 18:05:11 +00:00
agc
9cdcc01daf After we've malloc'd an area of storage, zero out this storage, "just in
case".
2007-05-24 00:55:57 +00:00
christos
0fb2cf5330 forgot to pass the len argument; pointed out by thor. 2007-05-23 23:38:40 +00:00
tls
1f3bd3b216 memset does not have 'src' as its second argument. or, at least, in my
opinion it shouldn't.
2007-05-23 22:50:04 +00:00
tls
3c0130638c The b-functions (bcopy, bzero) should not be in string.h, and we were
missing strings.h.  Fix this so we mirror the organization of these
header files in /usr/include proper.
2007-05-23 22:35:38 +00:00
tls
8c0e7700ad Fix typo: "lne"->"len" 2007-05-23 21:38:00 +00:00
tls
019754b194 From christos: make inline functions static __inline, because some userland programs might redefine inline, or the compiler might not listen to us although we use __attribute__((__always_inline__)) 2007-05-23 21:13:14 +00:00
christos
35b6e48aee fix tyops 2007-05-23 15:00:39 +00:00
christos
d66f24ca74 add documentation for libssp 2007-05-23 14:41:02 +00:00
tnozaki
dddcbe5bf3 s/preposturously/preposterously/ 2007-05-21 15:32:17 +00:00
tnozaki
20e197918c s/conform/conforms/ 2007-05-21 15:29:51 +00:00
tnozaki
080f488178 s/wcttype/wctype/ 2007-05-21 15:20:40 +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
wiz
c54913c02b Remove scheduler activations references. Bump date. 2007-05-19 14:24:42 +00:00
pooka
1a07ce5385 quick TODO-list. very incomplete 2007-05-19 12:03:30 +00:00
pooka
cc2ad436bf Allocate buf in 4k chunks instead of 64k chunks. If we are seriously
reclaiming and the network/server is slow, we might have thousands
of buffers allocated at the same time causing the process to run
out of vm space.  Rate limiting the number of outstanding ops would
be a nicer choice, but that requires more complex changes.
2007-05-19 11:01:21 +00:00
pooka
e001b11fcd default refcount to 1 in inactive 2007-05-18 18:01:55 +00:00
pooka
0218526006 document puffs_node_poll 2007-05-18 14:38:15 +00:00
pooka
75bb6c40b0 dispatch PUFFS_VN_POLL 2007-05-18 13:53:54 +00:00
pooka
91681cc8fd * stuff results back to kernel before calling kevent - the file server
loop function might generate some results.  and this is still "after"
  event handling (except for the first call, but I'm not too keen on
  optimizing for that)
* don't be such a baby about EINTR from kevent().  if we get it, suck
  it up and continue instead of quitting
2007-05-18 13:24:23 +00:00
christos
4be3505e2e fix for yamt-idlelwp 2007-05-17 21:42:32 +00:00
pooka
6a3281d2da Calling puffs_exit() in fuse_{exit,unmount}() is wrong, as those
shouldn't release resources.  As a quick hack to prevent double
frees etc, introduce "dead" variable into fuse channel to signal
if the backing puffs resource was already freed.  XXX: the check
is only in exit/unmount currently.

Proper fix really depends on some puffs features I still haven't
gotten around to doing.
2007-05-17 21:28:12 +00:00
pooka
a367d901e0 create hash for the root path object 2007-05-17 21:00:32 +00:00
pooka
d2228f155e initialize refusenode contents to 0
(don't change malloc to calloc and expect things not to break)
2007-05-17 16:41:18 +00:00
pooka
ae3221667f reflect today's mount changes 2007-05-17 15:21:14 +00:00
pooka
c8b0a89198 reflect changes in fs mount: use puffs_mount() instead of
puffs_domount() & puffs_start()
2007-05-17 14:13:04 +00:00
pooka
c7561a8e7c Reflect kernel changes for supplying root node information in mount
instead of puffs_start().  Get completely rid of puffs_start(), as
everything it used to do is now handled by the mount routine.
Introduce an optional pre-mount call puffs_setrootinfo() for setting
non-default root node information.  As the old puffs_mount() is
now virtually useless, say byebye to it and rename the old
puffs_domount() to puffs_mount(), but add a root cookie parameter
to compensate for the late puffs_start().
2007-05-17 14:03:13 +00:00
pooka
5a69314b41 struct puffs_usermoint does sound more lively, but be serious and
fix the typos to puffs_usermount
2007-05-17 13:31:30 +00:00
christos
19468d62cc More fixes:
- make sure that the args array is NULL terminated.
- make sure argc is initialized and argv is set to NULL after freeing.
- make the deep copy function an opt interface function.
2007-05-17 01:55:43 +00:00
xtraeme
b18c74c93e Add the $NetBSD$ tag, it's easier to know what revision you have. 2007-05-16 22:17:52 +00:00
christos
c0df99a133 - Always check strdup return. For now we are lazy and bail instead of cleaning
up.
- Use malloc and free instead of macros, delete macros.
- Merge the two copies of deep copy and free args that were slightly buggy
  into one and use that one.

XXX: Lots of ints should be size_t.
XXX: Bailing on error is not a good thing for a library.
XXX: Defs.h should be eliminated completely. Not all files need all the headers.
2007-05-16 21:39:08 +00:00