9 years agoFix libthread_xu's use of MAP_STACK. Guards were not being setup properly.
Matthew Dillon [Thu, 23 Apr 2009 20:05:24 +0000 (13:05 -0700)]
Fix libthread_xu's use of MAP_STACK.  Guards were not being setup properly.

MAP_STACK mappings do not immediately extend down to their base, so calling
mprotect() on the base is basically a NOP.  Instead of calling mprotect() we
call mmap() with MAP_FIXED to force the guard.

Properly use MAP_FIXED when setting up the primary guard on the original
user stack.  The address specified in the mmap() is only a hint when MAP_FIXED
is not used, and will not properly map the anonymous area.  Also, new kernels
do not allow non-MAP_STACK mappings to override MAP_STACK mappings and the
user stack area is a MAP_STACK mapping, so use of MAP_FIXED is mandatory here.

9 years agoAdd missing files from umtx errno fixes commit.
Matthew Dillon [Thu, 23 Apr 2009 19:14:30 +0000 (12:14 -0700)]
Add missing files from umtx errno fixes commit.

9 years agoFix VM panic. Add required overflow check for MAP_STACK and MAP_FIXED mmaps
Matthew Dillon [Thu, 23 Apr 2009 18:54:47 +0000 (11:54 -0700)]
Fix VM panic.  Add required overflow check for MAP_STACK and MAP_FIXED mmaps

Certain mmap() calls were not properly checking that (addr + size) does not
overflow, causing a kernel panic.

Reported-by: Alex Hornung <ahornung@gmail.com>
9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 23 Apr 2009 17:35:47 +0000 (10:35 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoFix an errno leak in libthread_xu's calls to umtx.
Matthew Dillon [Thu, 23 Apr 2009 17:34:34 +0000 (10:34 -0700)]
Fix an errno leak in libthread_xu's calls to umtx.

Add a syscall entry point that returns errno instead of loading the
errno variable and use it to make umtx calls deep in libthread_xu,
avoiding the whole errno issue and fixing the leak.

Submitted-by: Alex Hornung
9 years agoAdd fpsetsticky() documentation (from NetBSD).
Sascha Wildner [Thu, 23 Apr 2009 08:59:46 +0000 (10:59 +0200)]
Add fpsetsticky() documentation (from NetBSD).

9 years agoAdd xdr_int64_t()/xdr_u_int64_t() documentation (from OpenBSD).
Sascha Wildner [Thu, 23 Apr 2009 08:58:23 +0000 (10:58 +0200)]
Add xdr_int64_t()/xdr_u_int64_t() documentation (from OpenBSD).

9 years agoAdd strnlen()/wcsnlen() documentation (from FreeBSD).
Sascha Wildner [Thu, 23 Apr 2009 08:56:48 +0000 (10:56 +0200)]
Add strnlen()/wcsnlen() documentation (from FreeBSD).

9 years agoAdd wcstof()/wcstold() documentation (from NetBSD).
Sascha Wildner [Thu, 23 Apr 2009 08:55:46 +0000 (10:55 +0200)]
Add wcstof()/wcstold() documentation (from NetBSD).

9 years agoAdd strunvisx() documentation (from FreeBSD).
Sascha Wildner [Thu, 23 Apr 2009 08:54:34 +0000 (10:54 +0200)]
Add strunvisx() documentation (from FreeBSD).

9 years agoBring in ypclnt(3) manual page (from NetBSD).
Sascha Wildner [Thu, 23 Apr 2009 08:53:13 +0000 (10:53 +0200)]
Bring in ypclnt(3) manual page (from NetBSD).

9 years agoFreeBSD-SA-09:05.telnet - fix environment based code execution vulnerability
Matthew Dillon [Thu, 23 Apr 2009 00:57:21 +0000 (17:57 -0700)]
FreeBSD-SA-09:05.telnet - fix environment based code execution vulnerability

9 years agoApply FreeBSD-SA-09:07.libc - fix information leak in db(3)
Matthew Dillon [Wed, 22 Apr 2009 23:09:06 +0000 (16:09 -0700)]
Apply FreeBSD-SA-09:07.libc - fix information leak in db(3)

Obtained-from: FreeBSD

9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 22 Apr 2009 21:51:29 +0000 (14:51 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoIncrease the number of internal spinlocks available to libc from 20 to 128
Matthew Dillon [Wed, 22 Apr 2009 21:50:37 +0000 (14:50 -0700)]
Increase the number of internal spinlocks available to libc from 20 to 128

Fix an issue where the new malloc wants to use more internal spinlocks
then libthread_xu declares.

9 years agoFix a bug in krealloc(). Note that krealloc() is very rarely used.
Matthew Dillon [Wed, 22 Apr 2009 20:04:23 +0000 (13:04 -0700)]
Fix a bug in krealloc().  Note that krealloc() is very rarely used.

krealloc() was improperly calling zoneindex() when transitioning from
zone-controlled memory to non-zone-controlled (big) memory.

9 years agoFix vkernel issues - enable ithread preemption, races, and more.
Matthew Dillon [Wed, 22 Apr 2009 19:56:37 +0000 (12:56 -0700)]
Fix vkernel issues - enable ithread preemption, races, and more.

signalintr() was improperly entering a critical section, preventing
sched_ithd() from being able to preempt the current thread.  Adjust
so the code matches the pc32 code.

lwp0 was being assigned cpu_heavy_switch instead of cpu_lwkt_switch,
which works fine on pc32 but blows up the vkernel if process 0 gets
preempted, because vkernel LWKT processes are not assigned vmspaces.
Properly use cpu_lwkt_switch() to fix the problem.

We were not checking for pending reschedule requests when the
vmspace_ctl() call got interrupted by a signal.  NOTE:  There is
still a race after the check prior to re-entry into vmspace_ctl()
which needs to be closed.

Tracked-down-by: corecode, dillon
9 years agoReplace the old BSD malloc code with a port of our slab allocator.
Matthew Dillon [Wed, 22 Apr 2009 19:18:07 +0000 (12:18 -0700)]
Replace the old BSD malloc code with a port of our slab allocator.

This should give us a better base with which we can work up a
more thread-friendly user malloc.  Buildworld performance is about
the same (just slightly faster).  malloc performance is about twice as
fast as the original.

9 years agotcp/ip4 mapped address: Add tcp6_soport()
Sepherosa Ziehau [Wed, 22 Apr 2009 13:49:40 +0000 (21:49 +0800)]
tcp/ip4 mapped address: Add tcp6_soport()

For IPv6 v6 only address or inp's address family is not known yet,
e.g. before connect(2) is called on the INET6 socket, this function
acts exactly the same as cpu0_soport() (the soport function before
this commit).  If a INET6 socket is connected to IPv4 mapped address,
then this function simply falls back to tcp_soport().

9 years agotcp/ipv4 mapped address: Make sure that tcp_output is done on inpcb's owner CPU
Sepherosa Ziehau [Wed, 22 Apr 2009 12:54:12 +0000 (20:54 +0800)]
tcp/ipv4 mapped address: Make sure that tcp_output is done on inpcb's owner CPU

9 years agotcp_timer: Add assertion to make sure that tcp timers are only accessed
Sepherosa Ziehau [Tue, 21 Apr 2009 14:09:24 +0000 (22:09 +0800)]
tcp_timer: Add assertion to make sure that tcp timers are only accessed
on their pcb's owner CPU

9 years agotmpnam(3) manual page: Correct function name.
Sascha Wildner [Wed, 22 Apr 2009 03:46:46 +0000 (05:46 +0200)]
tmpnam(3) manual page: Correct function name.

9 years agovmstat(8): align columns when reporting stats with -m
Stathis Kamperis [Tue, 21 Apr 2009 16:31:18 +0000 (16:31 +0000)]
vmstat(8): align columns when reporting stats with -m

Reviewed-by: dillon@
9 years agoSync libc/stdio with FreeBSD:
Peter Avalos [Sun, 19 Apr 2009 05:26:39 +0000 (05:26 +0000)]
Sync libc/stdio with FreeBSD:

* Rewrite asprintf() as a wrapper around vasprintf().

* Add dprintf() and vdprintf() from POSIX.1-2008.

* Remove an obsolete comment from fclose.3 regarding the placement
of a FUNLOCKFILE() call.

* Remove useless variable 'nofile' in fdopen().

* Remove comment about clearerr() being the only method of clearing
the EOF indicator, fseek() may also be used for this.

* Add commentary explaining why we return EBADF upon attempts to fflush()
a read-only file.

* Fix a few style and whitespace nits.

* Suggest that fgets() be used instead of gets().

* Don't use __sgetc() to avoid overwriting fwide(3) orientation
(__srget() call by __sgetc() uses _SET_ORIENTATION macro).

* Fix a sign-compare issue in fgetwln().

* Use C99-style initializers.

* Correct some buffer sizes.

* Rework the floating point code in printf().  Significant changes:

 - We used to round long double arguments to double.  Now we print
 them properly.

 - Bugs involving '%F', corner cases of '#' and 'g' format
 specifiers, and the '.*' precision specifier have been fixed.

 - Added support for the "'" specifier to print thousands' grouping
 characters in a locale-dependent manner.

 - Implement the __vfprintf() side of hexadecimal floating point
 support.  All that is still needed is a routine to convert the
 mantissa to hex digits one nibble at a time in the style of ultoa().

* Add restrict qualifier.

* Add rewind() to the list of functions which may fail and set errno.

* Improve documentation for fgetpos() and fsetpos(), and discourage
users from assuming that fpos_t is an integral type.

* Describe the restrictions on seeking on wide character streams, and also
point out that fseek() clears the ungetwc() buffer.

* Save errno from getting clobbered where appropriate.

* Resulting fseek() offset must fit in long, required by POSIX,
so add LONG_MAX and final tests for it.

* Disallow negative seek as POSIX requires for fseek{o}.

* Catch few possible off_t overflows.

* Make fseek(... SEEK_CUR) fails if current file-position is unspecified.

* Move all stdio internal flags processing and setting out of __sread(),
__swrite() and __sseek() to higher level. According to funopen(3) they all
are just wrappers to something like standard read(2), write(2) and
lseek(2), i.e. must not touch stdio internals because they are replaceable
with any other functions knows nothing about stdio internals.

* Rename cantwrite() to prepwrite().  The latter is less confusing,
since the macro isn't really a predicate, and it has side-effects.
Also, don't set errno if prepwrite() fails, since this is done in
prepwrite() now.

* Fix a potential deadlock in _fwalk in a threaded environment.
A file flag (__SIGN) was added to stdio.h that, when set, tells
_fwalk to ignore it in its walk.  This seemed to be needed in
refill.c because each file needs to be locked when flushing.

* Call __sgetc() directly in getchar() instead of taking an expensive
detour through getc().

* Add getdelim() and getline().

* Document dependence of mktemp(3) on the non-reentrant arc4random(3).

* Fix a few bugs with the _gettemp() routine which implements mkstemp(),
mkstemps(), and mkdtemp().
 - Add proper range checking for the 'slen' parameter passed to mkstemps().
 - Try all possible permutations of a template if a collision is encountered.
 Previously, once a single template character reached 'z', it would not wrap
 around to '0' and keep going until it encountered the original starting
 letter.  In the edge case that the randomly generated starting name used
 all 'z' characters, only that single name would be tried before giving up.

* Use arc4random_uniform(3) since modulo size is not power of 2 in _gettemp.

* Write the message to stderr, not file descriptor 2, so that perror()
writes to the correct stream if stderr has been redirected with freopen().

* Use strerror_r() to format the error message so that strerror()'s static
buffer does not get clobbered in perror().

* Move the positional argument handling code for vfprintf() to a new file,
printf-pos.c, and move common definitions to printflocal.h.

* Remove advertising clause in the copyrights.

* In rewind.c:
 1) add missing __sinit() as in fseek() it pretends to be.
 2) use clearerr_unlocked() since we already lock stream before _fseeko()
 3) don't zero errno at the end, it explicitely required by POSIX as the
 only one method to test rewind() error condition.
 4) don't clearerr() if error happens in _fseeko()

* When __SOPT is cleared, clear __SOFF too.

* Save a few cycles and don't initialize the locking fields in FILE if
they aren't going to be used later.

* Add ENVIRONMENT section to tmpnam(3) and mention there that TMPDIR is
ignored when issetugid(3) is true.  Also add a SECURITY CONSIDERATIONS

* Describe file-position behaviour from POSIX in ungetc(3).

* Remove duplicate check for EOF from ungetc(); __ungetc() already checks.

* In vasprintf, free the buffer when __vfprintf() fails and don't bother
trying to shrink the buffer with realloc() before returning it.

* Rework the floating point code in printf().  Significant changes:
 - We used to round long double arguments to double.  Now we print
 them properly.
 - Bugs involving '%F', corner cases of '#' and 'g' format
 specifiers, and the '.*' precision specifier have been fixed.
 - Added support for the "'" specifier to print thousands' grouping
 characters in a locale-dependent manner.
 - Implement the __vfprintf() side of hexadecimal floating point
 support.  All that is still needed is a routine to convert the
 mantissa to hex digits one nibble at a time in the style of ultoa().

* %e conversions with precision 0 should not cause a decimal point to
  be printed.

* Fix %f conversions where the number of significant digits is < expt.

* %E-like %g and %G conversions should remove trailing zeroes unless
the # flag is present.  Implement this behavior and add a comment
describing it.

* Implement __hdtoa() and __hldtoa() and enable printf() support for %a
and %A, which print floating-point numbers in hexadecimal.

* Add an extensible printf implementation compatible with GLIBC.

* Add support for multibyte decimal_point encodings, e.g., U+066B.

* Add support for multibyte thousands_sep encodings, e.g., U+066C.
The integer thousands' separator code is rewritten in order to
avoid having to preallocate a buffer for the largest possible
digit string with the most possible instances of the longest
possible multibyte thousands' separator. The new version inserts
thousands' separators for integers using the same code as floating point.

* Introduce a local variable and use it instead of passed in parameter
to get rid of restrict qualifier discarding in vswscanf().

* Set the error indicator on an attempt to write to a read-only stream
in wsetup.c.

* Move the format_arg() attribute handling to <sys/cdefs.h> where it

Obtained-from:  FreeBSD & NetBSD

9 years agoAdd the wcsnlen() function.
Peter Avalos [Sun, 19 Apr 2009 02:24:40 +0000 (02:24 +0000)]
Add the wcsnlen() function.

Obtained-from: FreeBSD

9 years agoAdd wcstof() and wcstold() functions.
Peter Avalos [Sun, 19 Apr 2009 02:09:36 +0000 (02:09 +0000)]
Add wcstof() and wcstold() functions.

Obtained-from: NetBSD

9 years agoAdd the strnlen() function.
Peter Avalos [Sun, 19 Apr 2009 00:07:53 +0000 (00:07 +0000)]
Add the strnlen() function.

Obtained-from: FreeBSD

9 years agocxm(4): Silence compilation warning.
Sascha Wildner [Mon, 20 Apr 2009 02:34:40 +0000 (04:34 +0200)]
cxm(4): Silence compilation warning.

9 years agomake upgrade: Don't remove /usr/lib/crt[1in].o anymore.
Sascha Wildner [Mon, 20 Apr 2009 02:31:59 +0000 (04:31 +0200)]
make upgrade: Don't remove /usr/lib/crt[1in].o anymore.

9 years agocsu: adjust readme
Simon Schubert [Sun, 19 Apr 2009 23:09:54 +0000 (01:09 +0200)]
csu:  adjust readme

9 years agocsu: move crt files to /usr/lib
Simon Schubert [Sun, 19 Apr 2009 22:46:24 +0000 (00:46 +0200)]
csu:  move crt files to /usr/lib

Instead of installing our start files in gcc directories, install the
generic ones in /usr/lib.  This should make porting other compilers more

Requested-by: hasso@
9 years agogcc: add /usr/lib to the startfile search path
Simon Schubert [Sun, 19 Apr 2009 21:26:43 +0000 (23:26 +0200)]
gcc:  add /usr/lib to the startfile search path

This will allow us to place some files (crt1.o etc) into /usr/lib, and
use other startfiles (like crtbegin.o) from their own gcc directories.

9 years agocxm(4) manual page: Fix typos.
Sascha Wildner [Sun, 19 Apr 2009 02:09:40 +0000 (04:09 +0200)]
cxm(4) manual page: Fix typos.

9 years agocxm(4): Oops, remove #include opt_cxm.h for now.
Sascha Wildner [Sun, 19 Apr 2009 01:03:12 +0000 (03:03 +0200)]
cxm(4): Oops, remove #include opt_cxm.h for now.

9 years agometeor(4) manual page: Add bktr(4) and cxm(4) references.
Sascha Wildner [Sun, 19 Apr 2009 00:52:49 +0000 (02:52 +0200)]
meteor(4) manual page: Add bktr(4) and cxm(4) references.

9 years agobktr(4) manual page: Add cxm(4) reference.
Sascha Wildner [Sun, 19 Apr 2009 00:52:27 +0000 (02:52 +0200)]
bktr(4) manual page: Add cxm(4) reference.

9 years agoAdd cxm(4), a driver for Hauppauge PVR-250/350 video capture cards.
Sascha Wildner [Sun, 19 Apr 2009 00:49:17 +0000 (02:49 +0200)]
Add cxm(4), a driver for Hauppauge PVR-250/350 video capture cards.

Before the driver can be used, two firmware files have to be extracted
from the Windows driver which cannot be redistributed with DragonFly.
For further information see the manual page.

It was tested on a PVR-250 which was kindly donated by Hasso Tepper
(many thanks for this!).

Ported-from: FreeBSD (ports/multimedia/pvr250), with modifications

9 years agopcidevs: Regenerate pcidevs.h and pcidevs_data.h
Sascha Wildner [Sun, 19 Apr 2009 00:35:08 +0000 (02:35 +0200)]
pcidevs: Regenerate pcidevs.h and pcidevs_data.h

9 years agopcidevs: Add iTVC16
Sascha Wildner [Sun, 19 Apr 2009 00:33:21 +0000 (02:33 +0200)]
pcidevs: Add iTVC16

9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 17 Apr 2009 21:09:40 +0000 (14:09 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoCPDUP - Fix lack of error reporting if created target directory cannot stat.
Matthew Dillon [Fri, 17 Apr 2009 21:08:31 +0000 (14:08 -0700)]
CPDUP - Fix lack of error reporting if created target directory cannot stat.

Fix a lack of error reporting if a just-created target directory cannot
be stat()'ed or chown()'d.

9 years agodevelopment(7): Add some documentation links.
Sascha Wildner [Fri, 17 Apr 2009 11:43:42 +0000 (13:43 +0200)]
development(7): Add some documentation links.

9 years agoFix printf(3) and friends when printing a float with precision 0.
Sascha Wildner [Fri, 17 Apr 2009 11:08:00 +0000 (13:08 +0200)]
Fix printf(3) and friends when printing a float with precision 0.

The decimal point shall be supressed in this case.

Reported-by: y0netan1
Patch-by: pavalos
9 years agolibc: malloc: minor code cleanup (no operational changes)
Matthew Dillon [Thu, 16 Apr 2009 23:30:45 +0000 (16:30 -0700)]
libc: malloc: minor code cleanup (no operational changes)

9 years agonewfs_hammer(8): Mention the nightly 'hammer cleanup' in the info message.
Sascha Wildner [Thu, 16 Apr 2009 01:20:36 +0000 (03:20 +0200)]
newfs_hammer(8): Mention the nightly 'hammer cleanup' in the info message.

9 years agocrontab(8)/mtrace(8): Remove CVS ID handling.
Sascha Wildner [Wed, 15 Apr 2009 23:29:36 +0000 (01:29 +0200)]
crontab(8)/mtrace(8): Remove CVS ID handling.

9 years agoFix the way <sys/ioccom.h> is included throughout our tree.
Sascha Wildner [Wed, 15 Apr 2009 12:21:52 +0000 (14:21 +0200)]
Fix the way <sys/ioccom.h> is included throughout our tree.

The original intention was to include it only in header files which
define ioctl codes and not in .c or .h files which include headers
that define ioctl codes.

Adjust the tree to follow this idea.

Pointed-out-by: Guy Harris <guy@alum.mit.edu>
Dragonfly-bug:  <http://bugs.dragonflybsd.org/issue1334>

9 years agolib/libpthread/Makefile: Oops, add missing '\'.
Sascha Wildner [Wed, 15 Apr 2009 12:23:34 +0000 (14:23 +0200)]
lib/libpthread/Makefile: Oops, add missing '\'.

9 years agopthread(3): Move pthread(3) manual page to lib/libpthread too.
Sascha Wildner [Wed, 15 Apr 2009 11:37:59 +0000 (13:37 +0200)]
pthread(3): Move pthread(3) manual page to lib/libpthread too.

It does need some further adjustment.

9 years agoRemove libc_r from list of Lb values and adjust libpthread manpages' Lb.
Sascha Wildner [Wed, 15 Apr 2009 11:28:04 +0000 (13:28 +0200)]
Remove libc_r from list of Lb values and adjust libpthread manpages' Lb.

9 years agoMove pthread* manpages to lib/libpthread as they are not libc_r specific.
Sascha Wildner [Wed, 15 Apr 2009 11:07:13 +0000 (13:07 +0200)]
Move pthread* manpages to lib/libpthread as they are not libc_r specific.

9 years agomagic(3): Fix program name extraction from core dumps.
Sascha Wildner [Tue, 14 Apr 2009 22:44:25 +0000 (00:44 +0200)]
magic(3): Fix program name extraction from core dumps.

Remove trailing whitespace only instead of unconditionally removing the
last character from the program name (see comments).

Reported-by: hasso
Located-by: Eric J. Christeson
Taken-from:  FreeBSD's libmagic

9 years agoposix_spawn_file_actions_init(3) manual page: Fix wrong usage of .Fn
Sascha Wildner [Tue, 14 Apr 2009 03:47:15 +0000 (05:47 +0200)]
posix_spawn_file_actions_init(3) manual page: Fix wrong usage of .Fn

9 years agoSync zoneinfo database with tzdata2009f from elsie.
Sascha Wildner [Mon, 13 Apr 2009 13:40:16 +0000 (15:40 +0200)]
Sync zoneinfo database with tzdata2009f from elsie.

asia:           8.29 -> 8.30

Pakistan will observe DST from April 15, 2009 instead of May 1 like
previously planned.

9 years agoAdd some new DLTs found in libpcap-1.0.0
Sepherosa Ziehau [Mon, 13 Apr 2009 12:35:30 +0000 (20:35 +0800)]
Add some new DLTs found in libpcap-1.0.0

9 years agoAllow users to turn off certain arp logging.
Sepherosa Ziehau [Mon, 13 Apr 2009 11:37:07 +0000 (19:37 +0800)]
Allow users to turn off certain arp logging.

Obtained-from: FreeBSD

9 years agoAdd description about sysctl nodes under net.link.ether.inet
Sepherosa Ziehau [Mon, 13 Apr 2009 11:19:34 +0000 (19:19 +0800)]
Add description about sysctl nodes under net.link.ether.inet

Obtained-from: FreeBSD

9 years agopciconf(8): Raise WARNS to 6 and fix warning.
Sascha Wildner [Sun, 12 Apr 2009 19:41:51 +0000 (21:41 +0200)]
pciconf(8): Raise WARNS to 6 and fix warning.

9 years agorpc.lockd(8): Raise WARNS to 3 and fix warnings.
Sascha Wildner [Sun, 12 Apr 2009 18:22:23 +0000 (20:22 +0200)]
rpc.lockd(8): Raise WARNS to 3 and fix warnings.

9 years agodhclient.conf(5) manual page: Use better mdoc (taken from FreeBSD).
Sascha Wildner [Sun, 12 Apr 2009 17:26:01 +0000 (19:26 +0200)]
dhclient.conf(5) manual page: Use better mdoc (taken from FreeBSD).

9 years agorcmd(3) manual page: Add missing .El
Sascha Wildner [Sun, 12 Apr 2009 17:25:23 +0000 (19:25 +0200)]
rcmd(3) manual page: Add missing .El

9 years agoi4b(4): Reorder includes slightly to silence some compilation warnings.
Sascha Wildner [Sun, 12 Apr 2009 16:22:27 +0000 (18:22 +0200)]
i4b(4): Reorder includes slightly to silence some compilation warnings.

9 years agoi4b(4): Initialize callout handles before first accessing them.
Sascha Wildner [Sun, 12 Apr 2009 09:54:46 +0000 (11:54 +0200)]
i4b(4): Initialize callout handles before first accessing them.

9 years agosppp(4): Properly initialize keepalive_timeout.
Sascha Wildner [Sun, 12 Apr 2009 09:02:59 +0000 (11:02 +0200)]
sppp(4): Properly initialize keepalive_timeout.

9 years agobuild(7): mention Makefile_upgrade.inc
Stathis Kamperis [Sun, 12 Apr 2009 11:53:55 +0000 (11:53 +0000)]
build(7): mention Makefile_upgrade.inc

This file contains all files which are obsolete as of now and can be
removed by a 'make upgrade' run.

Reviewed-by: swildner@
9 years agoPut lwkt_serialize_array_{enter,try,exit}() into its own header file;
Sepherosa Ziehau [Sun, 12 Apr 2009 06:25:07 +0000 (14:25 +0800)]
Put lwkt_serialize_array_{enter,try,exit}() into its own header file;
name it sys/serialize2.h according to our convention.

9 years agoifnet serializer split: Whack ifnet.if_serializer if driver supplies
Sepherosa Ziehau [Sun, 12 Apr 2009 06:15:51 +0000 (14:15 +0800)]
ifnet serializer split: Whack ifnet.if_serializer if driver supplies
serialize functions; mainly to catch invalid reference of if_serializer.

9 years agopktgen: Use ifnet_{serialize,deserialize}_tx()
Sepherosa Ziehau [Sun, 12 Apr 2009 02:02:17 +0000 (10:02 +0800)]
pktgen: Use ifnet_{serialize,deserialize}_tx()

9 years agoSplit ifnet serializer step 4/many: Add IFNET_SERIALIZE_MAIN, which is
Sepherosa Ziehau [Sat, 11 Apr 2009 07:58:20 +0000 (15:58 +0800)]
Split ifnet serializer step 4/many: Add IFNET_SERIALIZE_MAIN, which is
used by polling(4) code.  Now polling(4) no longer tries to hold all
of the serializers of the driver; it just holds driver's main serializer.

9 years agoemx(4): Add serialize/deserialize functions which just skip main serializer
Sepherosa Ziehau [Sat, 11 Apr 2009 05:25:32 +0000 (13:25 +0800)]
emx(4): Add serialize/deserialize functions which just skip main serializer

9 years agoFactor out lwkt_serialize_array_{enter,try,exit}()
Sepherosa Ziehau [Sat, 11 Apr 2009 05:10:19 +0000 (13:10 +0800)]
Factor out lwkt_serialize_array_{enter,try,exit}()

9 years agoAdd IFNET_SERIALIZE_RX(idx)
Sepherosa Ziehau [Sat, 11 Apr 2009 03:13:22 +0000 (11:13 +0800)]

9 years agoSplit ifnet serializer step 3/many: We no longer need to hold RX
Sepherosa Ziehau [Sat, 11 Apr 2009 03:05:06 +0000 (11:05 +0800)]
Split ifnet serializer step 3/many: We no longer need to hold RX
serializer before calling ifnet.if_input()

9 years agoSplit ifnet serializer step 2/many: Add if_serialize_assert() function
Sepherosa Ziehau [Sat, 11 Apr 2009 02:37:59 +0000 (10:37 +0800)]
Split ifnet serializer step 2/many: Add if_serialize_assert() function
pointer to ifnet, so that upper layer could assert ifnet's serialization
states.  Remove the serialization state assertion on ifnet.if_input()
path, since the serialization state normaly has nothing to do with the
input processing.

9 years agoMerge altq_cbq fix defc2f8f8d209ca94cc6f3d0a8f64c465258a43f
Sepherosa Ziehau [Wed, 8 Apr 2009 12:05:06 +0000 (20:05 +0800)]
Merge altq_cbq fix defc2f8f8d209ca94cc6f3d0a8f64c465258a43f

9 years agoLet emx(4) install its own ifnet serialize functions
Sepherosa Ziehau [Tue, 7 Apr 2009 13:13:51 +0000 (21:13 +0800)]
Let emx(4) install its own ifnet serialize functions

9 years agoPut ifnet.if_serializer assertion under FIX_SERIALIZE_ASSERT
Sepherosa Ziehau [Tue, 7 Apr 2009 13:11:59 +0000 (21:11 +0800)]
Put ifnet.if_serializer assertion under FIX_SERIALIZE_ASSERT

9 years agoSplit ifnet serialize step 1/many: Add if_{serialize,deserialize,tryserialize}()
Sepherosa Ziehau [Sun, 5 Apr 2009 01:04:08 +0000 (09:04 +0800)]
Split ifnet serialize step 1/many: Add if_{serialize,deserialize,tryserialize}()
function pointers to ifnet.

These three function pointers accept ifnet struct and ifnet_serialize

The ifnet_serialize enumeration indicates the serialization type:
    All of the serializers should be held.  Except for if_start and if_input,
    this enumeration must be used when call ifnet function pointers.
    Only transmit serializer should be held.  This enumeration could be used
    when calling ifnet.if_start.
    Only receive serializer should be held.  This enumeration could be used
    when calling ifnet.if_input.

If the NIC driver does not set these three function pointer, then if_attach()
will set them to the default ones: only one serializer (if_serializer) is used
and ifnet_serialize parameter is ignored.

Following several inline functions are added which are sheer wrappers of the
three ifnet serialize function pointers:

All of the protocol layers and most of the pseudo drivers are converted.

Discussed-with: dillon@

9 years agofts(3): fix typo in MLINK
Stathis Kamperis [Sun, 12 Apr 2009 08:41:57 +0000 (08:41 +0000)]
fts(3): fix typo in MLINK

9 years agokdump: Add net/if_arp.h include
Thomas Nikolajsen [Sun, 12 Apr 2009 06:19:15 +0000 (08:19 +0200)]
kdump: Add net/if_arp.h include

Missing in 7a80e26d5284cff1a1ddbfa4098cf939e9569155

9 years agoRevert "kdump: Add net/if_arp.h include"
Thomas Nikolajsen [Sun, 12 Apr 2009 06:13:37 +0000 (08:13 +0200)]
Revert "kdump: Add net/if_arp.h include"

This reverts commit b81d560f4a7e775a5f5636141f28bdd82425b4fe.

Commit made with wrong username.

9 years agokdump: Add net/if_arp.h include
Charlie [Sun, 12 Apr 2009 05:46:40 +0000 (07:46 +0200)]
kdump: Add net/if_arp.h include

Missing in 7a80e26d5284cff1a1ddbfa4098cf939e9569155

9 years agoxdr(3): Add some missing MLINKS.
Sascha Wildner [Sat, 11 Apr 2009 20:47:05 +0000 (22:47 +0200)]
xdr(3): Add some missing MLINKS.

9 years agolibc/include/namespace.h: Add _getprogname().
Sascha Wildner [Sat, 11 Apr 2009 19:51:08 +0000 (21:51 +0200)]
libc/include/namespace.h: Add _getprogname().

9 years agosln(4): Include <sys/param.h>
Sepherosa Ziehau [Sat, 11 Apr 2009 11:50:14 +0000 (19:50 +0800)]
sln(4): Include <sys/param.h>

9 years agoUnbreak GENERIC building
Sepherosa Ziehau [Sat, 11 Apr 2009 11:40:26 +0000 (19:40 +0800)]
Unbreak GENERIC building

9 years agonetgraph/i4b: sppp struct should start with arpcom, so netgraph could work
Sepherosa Ziehau [Sat, 11 Apr 2009 11:19:41 +0000 (19:19 +0800)]
netgraph/i4b: sppp struct should start with arpcom, so netgraph could work

Reported-by: swildner@
9 years agoBump the version number for the OpenSSL-0.9.8k import.
Peter Avalos [Sat, 11 Apr 2009 08:47:31 +0000 (08:47 +0000)]
Bump the version number for the OpenSSL-0.9.8k import.

9 years agoMerge branch 'vendor/OPENSSL'
Peter Avalos [Sat, 11 Apr 2009 03:15:33 +0000 (03:15 +0000)]
Merge branch 'vendor/OPENSSL'

9 years agoUpgrade to OpenSSL-0.9.8k.
Peter Avalos [Sat, 11 Apr 2009 03:00:56 +0000 (03:00 +0000)]
Upgrade to OpenSSL-0.9.8k.

This fixes security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789)
and other minor bugs.  See CHANGES for more details.

9 years agoAdd README.DELETED to the vendor branch for OpenSSL.
Peter Avalos [Sat, 11 Apr 2009 02:44:26 +0000 (02:44 +0000)]
Add README.DELETED to the vendor branch for OpenSSL.

This is probably a good idea for other directories as well.  It's too
cumbersome not having this file available on the vendor branch, since
that's really where the work is done to remove unwanted files from the
vendor's distribution.

9 years agoComment out granpt() from stdlib.h.
Peter Avalos [Sat, 11 Apr 2009 01:18:46 +0000 (01:18 +0000)]
Comment out granpt() from stdlib.h.

We don't support this yet (hopefully soon).

Noticed-by: beket
9 years agoAdd `set -o tabcomplete' to /bin/sh
YONETANI Tomokazu [Sat, 14 Feb 2009 13:37:20 +0000 (22:37 +0900)]
Add `set -o tabcomplete' to /bin/sh

When set, it binds <tab> to the libedit filename completion function.
Taken-From: NetBSD
In our version, it's turned on by default in an interactive shell.
If you don't like it, put the following line

  set +o tabcomplete >/dev/null 2>&1 || true

in your ~/.shinit (or whatever path $ENV is set to) .

9 years agoAdd missing MLINKS for fts(3)
Stathis Kamperis [Fri, 10 Apr 2009 22:58:20 +0000 (22:58 +0000)]
Add missing MLINKS for fts(3)

9 years agoAdd missing MLINKS for bus_dma(9)
Stathis Kamperis [Fri, 10 Apr 2009 15:45:55 +0000 (15:45 +0000)]
Add missing MLINKS for bus_dma(9)

9 years agocallbootd: Silence warnings.
Sascha Wildner [Fri, 10 Apr 2009 18:22:08 +0000 (20:22 +0200)]
callbootd: Silence warnings.

9 years agoAdd missing MLINK for STAILQ_FOREACH_MUTABLE
Stathis Kamperis [Fri, 10 Apr 2009 13:55:02 +0000 (13:55 +0000)]

9 years agoAdd missing MLINKS for strto{f,ld} functions
Stathis Kamperis [Fri, 10 Apr 2009 08:26:23 +0000 (08:26 +0000)]
Add missing MLINKS for strto{f,ld} functions

9 years agofpgetround(3): Sync manual page with FreeBSD.
Sascha Wildner [Thu, 9 Apr 2009 09:24:42 +0000 (11:24 +0200)]
fpgetround(3): Sync manual page with FreeBSD.

9 years agotrpt(8): Raise WARNS to 6 and fix warnings.
Sascha Wildner [Wed, 8 Apr 2009 20:39:41 +0000 (22:39 +0200)]
trpt(8): Raise WARNS to 6 and fix warnings.