dragonfly.git
5 years agoAdd a __printflike.
Peter Avalos [Sun, 8 Feb 2009 16:29:01 +0000 (11:29 -0500)]
Add a __printflike.

Obtained-from: FreeBSD

5 years agoDon't clobber CFLAGS.
Peter Avalos [Sun, 8 Feb 2009 16:27:03 +0000 (11:27 -0500)]
Don't clobber CFLAGS.

Obtained-from: FreeBSD

5 years agoSync libc/gmon with FreeBSD:
Peter Avalos [Tue, 3 Feb 2009 14:20:30 +0000 (09:20 -0500)]
Sync libc/gmon with FreeBSD:

* asm -> __asm
* Change warnx(foo, strerror()) to warn().
* Fix some format strings.
* Mark some statements that should probably use atomic ops.

5 years agoSync lib/net with FreeBSD:
Peter Avalos [Mon, 2 Feb 2009 07:19:33 +0000 (02:19 -0500)]
Sync lib/net with FreeBSD:

* Add a byteorder.9 manual page.
* Remove the addr2ascii and ascii2addr functions.  They aren't used in
  the tree, and there's other functions that are more generic and
  appropriate.
* Fix a few style issues.
* Add and document ether_ntoa_r() and ether_aton_r() functions, which
  accept passed storage buffers rather than using static storage.
  Reimplement ether_ntoa() and ether_aton() in terms of these functions.
  These variants are thread-safe.
* Document that AI_ALL and AI_V4MAPPED flags are currently not supported.
* Add a SIOCGIFINDEX ioctl, which returns the index of a named interface.
  Use this ioctl in if_nametoindex(3) to use network aliases.
* Add restrict qualifier where needed.
* Add inet_ntoa_r() - a re-entrant function of inet_ntoa.
* Note that inet6_option_space.3 and inet6_rthdr_space.3 functions are
  deprecated in favor of inet6_opt_init.3 and inet6_rth_space.3.
* Remove NS and ISO stuff.
* Sync map_v4v6.c with BIND9.
* Instead of re-implementing hton[ls] and friends for each arch, add a
  new MI file, net/ntoh.c, which just implement them using the inline
  functions from <sys/endian.h>.
* Fix some namespace issues in <netdb.h>.

5 years agoSync libc/quad with FreeBSD:
Peter Avalos [Tue, 27 Jan 2009 20:51:36 +0000 (15:51 -0500)]
Sync libc/quad with FreeBSD:

-Remove advertising clause from copyright.

-Remove gcc 1 stuff.

-Add some prototypes in quad.h.

And, while I'm here:

-ANSI function declarations.

5 years agoSync libc/regex with FreeBSD:
Peter Avalos [Tue, 27 Jan 2009 14:17:46 +0000 (09:17 -0500)]
Sync libc/regex with FreeBSD:

-Make regular expression matching aware of multibyte characters.

-Some WARNS cleanup.

-Only stop evaluation of a back reference if the match length is
zero and the recursion level is too deep.

-Add restrict type-qualifier.

5 years agoReplace our strtod with the gdtoa package.
Peter Avalos [Mon, 19 Jan 2009 19:48:45 +0000 (14:48 -0500)]
Replace our strtod with the gdtoa package.

Obtained-from: FreeBSD

5 years agoConfigure gdtoa for DragonFly:
Peter Avalos [Mon, 19 Jan 2009 18:39:20 +0000 (13:39 -0500)]
Configure gdtoa for DragonFly:

-Protect exported symbols with leading underscores.

-Enable locale support.

-Add some missing prototypes.

-Correctly round floating-point numbers when they are printed in
non-default rounding modes.

-On platforms where long is 64 bits, make sure gdtoa doesn't use a
long when it really wants an int.

Obtained-from: FreeBSD

5 years agoAdd a <fenv.h> implementation.
Peter Avalos [Mon, 19 Jan 2009 23:44:52 +0000 (18:44 -0500)]
Add a <fenv.h> implementation.

This is slightly changed from FreeBSD's version since we aren't worried
about backward compatibility with FreeBSD 5.

Obtained-from: FreeBSD
amd64 fixes: dillon

5 years agoSync libc/stdlib with FreeBSD (ignoring jemalloc, pts, and gdtoa):
Peter Avalos [Mon, 19 Jan 2009 02:51:47 +0000 (21:51 -0500)]
Sync libc/stdlib with FreeBSD (ignoring jemalloc, pts, and gdtoa):

-Add a64l(), l64a(), and l64a_r() XSI extentions.  These functions
convert between a 32-bit integer and a radix-64 ASCII string.

-Replace some syscalls with libc version.

-Remove advertising clause.

-alloca() cannot check if the allocation is valid; mention the
consequences.

-Include some verbage about not calling exit() from functions registered
by atexit().

-Use pthread mutexes where possible instead of libc spinlocks.

-Significantly reduce the memory leak as noted in the BUGS section of
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

-Prefer setenv() instead of putenv().

-Convert *env() calls to POSIX:
-unsetenv returns an int.
-putenv takes a char * instead of const char *.
-putenv no longer makes a copy of the input string.
-errno is set appropriately.  Exceptions involve bad environ
variable and internal initialization code.  These both set errno
to EFAULT.

-Make getopt_long() more GNU compatible and sync up with OpenBSD's
version.

-POSIX clearly states that getsubopt() should be declared in <stdlib.h>
not in <unistd.h>

-Use size_t to avoid overflow when sorting arrays larger than 2 GB in
heapsort() and qsort().

-Add new implementations of insque() and remque() which conform to
IEEE Std 1003.1-2001.

-Add qsort_r() for functions that need to be reentrant.

-Improve radixsort()'s preformance when sorting strings with common
prefixes.

-Use 'uint32_t' instead of 'long' when a 32-bit integer is intended in
random(3).

-Rearrange <stdlib.h> in a more logical order based on visibility.

-Move getsubopt()'s prototype to <stdlib.h> (standards).

-Make an internal _getprogname() that is used only inside
libc. For libc, getprogname(3) is a weak symbol in case a
function of the same name is defined in userland.

5 years agoReduce lock contention for simple cases in stdtime.
Peter Avalos [Sat, 17 Jan 2009 03:37:59 +0000 (22:37 -0500)]
Reduce lock contention for simple cases in stdtime.

Normally, we are often reading local time rather than setting time zone,
replace mutex with rwlock, this should eliminate lock contention in
most cases.

Obtained-from: FreeBSD

5 years agoRemove unused source files.
Peter Avalos [Sat, 17 Jan 2009 02:46:08 +0000 (21:46 -0500)]
Remove unused source files.

5 years agoAdd the restrict qualifier to strftime(3) and strptime(3).
Peter Avalos [Sat, 17 Jan 2009 02:22:40 +0000 (21:22 -0500)]
Add the restrict qualifier to strftime(3) and strptime(3).

5 years agoAdd routines to convert time_t to/from fixed-bit fields.
Peter Avalos [Sat, 17 Jan 2009 01:55:46 +0000 (20:55 -0500)]
Add routines to convert time_t to/from fixed-bit fields.

Obtained-from: FreeBSD

5 years agoSync strptime with NetBSD:
Peter Avalos [Fri, 16 Jan 2009 23:45:43 +0000 (18:45 -0500)]
Sync strptime with NetBSD:

-A few code optimiztions.

-%y failed to subtract 1900 from tm_year

-%p (am/pm) only worked at the end of the string

-%E% was treated as %% (ie match a % character)

-Add support for %Z.

-Add %F the ISO 8601 date format which is equivalent to %Y-%m-%d.

-Add gnu extensions: %z, %g, %G, %u.

-Bring in NetBSD's strptime(3) manual page.

5 years agoRemove the timezone() function.
Peter Avalos [Fri, 16 Jan 2009 15:52:59 +0000 (10:52 -0500)]
Remove the timezone() function.

It conflicts with an XSI extension where timezone and daylight are
variables representing:

timezone:  the difference, in seconds, between Coordinated Universal
Time (UTC) and local standard time.

daylight:  set to 0 if Daylight Savings Time conversions should never be
applied for the timezone in use; otherwise, non-zero.

5 years agoUse snprintf instead of sprintf.
Peter Avalos [Fri, 16 Jan 2009 00:40:23 +0000 (19:40 -0500)]
Use snprintf instead of sprintf.

Obtained-from: NetBSD

5 years agoMake sure that %r honors the LC_TIME t_fmt_ampm.
Peter Avalos [Fri, 16 Jan 2009 00:37:18 +0000 (19:37 -0500)]
Make sure that %r honors the LC_TIME t_fmt_ampm.

Obtained-from: NetBSD

5 years agoDon't depend on lcl_mutex being a recursive mutex.
Peter Avalos [Thu, 15 Jan 2009 15:48:06 +0000 (10:48 -0500)]
Don't depend on lcl_mutex being a recursive mutex.

5 years agoSync lib/libc/string with FreeBSD:
Peter Avalos [Wed, 14 Jan 2009 21:01:28 +0000 (16:01 -0500)]
Sync lib/libc/string with FreeBSD:

-Move legacy functions to strings.h.

-A few WARNS and style cleanup.

-Add ffsl(), fls(), flsl(), ffsll(), flsll().

-Merge index.3 and rindex.3 since they are so similar.  Do the same for
strrchr().

-Add memrchr().

-Remove advertising clause from copyrights.

-Add memmem() which is basically the same as strstr().

-Add stpcpy().

-Add a SECURITY CONSIDERATIONS section to remind people about buffer
overflows, etc.

-Add restrict keyword where required.

-Add strndup().

-Correctly document the return value of strerror() and strerror_r() and
the contents of the returned buffer for unknown error codes.

-Add NLS catalogs support to strerror(), strerror_r() and strsignal().
Controlled by NLS define.

-For strl* files, use a less restrictive copyright (original author
changed it).

-strmode.3: strmode does not return 0.

-Move swab()'s prototype to unistd.h IAW SUS.

-Simplify by removing unneeded local variables and explicit
null termination is wcs* functions.

-Move wcscoll() and wcsxfrm() to string/ and do locale-sensitive
collation for single-byte locales.

-Add wcsdup().

-Remove unneeded includes.

-Reimplement wcsrchr(3) more efficiently, using a single forward scan
(like strrchr(3)) instead of scanning forwards to find the end of the
string then scanning backwards to find the character.

-Slightly optimize wcswidth().

-Tell contrib srcs that we have strndup now since some of them provide
their own static definition which will blow up a buildworld.

5 years agoImport the uuid_enc_le(), uuid_dec_le(), uuid_enc_be() and uuid_dec_be() functions...
Peter Avalos [Fri, 2 Jan 2009 02:27:24 +0000 (21:27 -0500)]
Import the uuid_enc_le(), uuid_dec_le(), uuid_enc_be() and uuid_dec_be() functions. These routines are not part of the DCE RPC API. They are provided for convenience.

Obtained-from: FreeBSD

5 years agoSync libc/yp with FreeBSD:
Peter Avalos [Fri, 2 Jan 2009 01:28:07 +0000 (20:28 -0500)]
Sync libc/yp with FreeBSD:

-Set timeout for all NIS RPC requests to 1 second.  This should reduce
the risk of NIS timing out due to packet loss.
-Protect calls with a mutex lock.

5 years agoMerge commit 'chlamydia/master'
Thomas Nikolajsen [Mon, 6 Apr 2009 21:52:47 +0000 (23:52 +0200)]
Merge commit 'chlamydia/master'

5 years agobattd update: fix some errors and improve battd.8
Thomas Nikolajsen [Mon, 6 Apr 2009 21:13:03 +0000 (23:13 +0200)]
battd update: fix some errors and improve battd.8

 - Execute once (-E) didn't work
 - Default time (-T) didn't work
 - Default percentage couldn't be turned off, now -p0 does this
 - battd couldn't start when system on AC
 - battd.8 updated: markup improved
 -  line break at end of sentence
 -  -T better documented
 -  EXAMPLE udated

5 years agoSync zoneinfo database with tzdata2009e from elsie.
Sascha Wildner [Mon, 6 Apr 2009 13:43:12 +0000 (15:43 +0200)]
Sync zoneinfo database with tzdata2009e from elsie.

asia:           8.26 -> 8.29

* Jordan has been going to DST on the last Friday in March since 2002
  and not on the last Thursday.

* Palestine started DST midnight, March 26 and will end midnight,
  September 27.

5 years agoether_input(): Remove unapplied comment
Sepherosa Ziehau [Sun, 5 Apr 2009 04:28:31 +0000 (12:28 +0800)]
ether_input(): Remove unapplied comment

5 years agovlan(4): Support IFF_PROMISC and IFF_ALLMULTI
Sepherosa Ziehau [Sun, 5 Apr 2009 04:26:58 +0000 (12:26 +0800)]
vlan(4): Support IFF_PROMISC and IFF_ALLMULTI

Obtained-from: FreeBSD

5 years agoether_input: Defer promiscous packet discarding until vlan is processed
Sepherosa Ziehau [Sun, 5 Apr 2009 03:38:23 +0000 (11:38 +0800)]
ether_input: Defer promiscous packet discarding until vlan is processed

This is the one of the precondition to make vlan/bridge work: preventing
packets from being dropped prematurely by vlan's parent interface.

5 years agoUse ETHER_IS_MULTICAST, which is more expressive.
Sepherosa Ziehau [Sun, 5 Apr 2009 02:57:27 +0000 (10:57 +0800)]
Use ETHER_IS_MULTICAST, which is more expressive.

5 years agoserializer manpage: Remove IS_SERIALIZED(), which is available only if
Sepherosa Ziehau [Sun, 5 Apr 2009 02:03:26 +0000 (10:03 +0800)]
serializer manpage: Remove IS_SERIALIZED(), which is available only if
INVARIANTS is defined and probably should not be used in any places
other than the serializer implementation itself.

5 years agombuf: Don't discount the objcache limits required by non-pkthdr mbuf
Sepherosa Ziehau [Sun, 5 Apr 2009 02:00:04 +0000 (10:00 +0800)]
mbuf: Don't discount the objcache limits required by non-pkthdr mbuf

5 years agoaltq: ifq needs protection here; not ifnet
Sepherosa Ziehau [Sat, 4 Apr 2009 08:51:40 +0000 (16:51 +0800)]
altq: ifq needs protection here; not ifnet

5 years agoumount(8): Raise WARNS to 6 and fix all warnings.
Sascha Wildner [Sat, 4 Apr 2009 20:50:59 +0000 (22:50 +0200)]
umount(8): Raise WARNS to 6 and fix all warnings.

5 years agosh(1): Fix warnings when compiling with -DNO_HISTORY.
Sascha Wildner [Sat, 4 Apr 2009 20:38:31 +0000 (22:38 +0200)]
sh(1): Fix warnings when compiling with -DNO_HISTORY.

5 years agovkernel: Comment out unused variable.
Sascha Wildner [Sat, 4 Apr 2009 20:31:06 +0000 (22:31 +0200)]
vkernel: Comment out unused variable.

5 years agoRename some log() -> dolog() to not conflict with built-in log().
Sascha Wildner [Sat, 4 Apr 2009 20:26:27 +0000 (22:26 +0200)]
Rename some log() -> dolog() to not conflict with built-in log().

While here, remove trailing whitespace.

5 years agosystat(1): Correct TCP statistics reporting
Sepherosa Ziehau [Sat, 4 Apr 2009 02:43:27 +0000 (10:43 +0800)]
systat(1): Correct TCP statistics reporting

Reported-by: ruse39 on EFnet #dragonflybsd
5 years agobridge(4): if_snd.ifq_maxlen does not need explicit setting
Sepherosa Ziehau [Sat, 4 Apr 2009 02:33:04 +0000 (10:33 +0800)]
bridge(4): if_snd.ifq_maxlen does not need explicit setting

5 years agoHAMMER - Fix extra TAILQ_REMOVE in HAMMER shutdown code.
Matthew Dillon [Sat, 4 Apr 2009 01:35:07 +0000 (18:35 -0700)]
HAMMER - Fix extra TAILQ_REMOVE in HAMMER shutdown code.

Caught-by: New assertions in sys/queue.h imported by pavalos.
5 years agoAMD64 Test Environment - add SDL support to the qemu build
Matthew Dillon [Sat, 4 Apr 2009 01:12:12 +0000 (18:12 -0700)]
AMD64 Test Environment - add SDL support to the qemu build

Qemu may now be built with SDL (X support) using the make directive
WITHSDL=YES.  A new target 'xrun' runs qemu in X mode vs curses mode.

Submitted-by: Antonio Huete
5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 3 Apr 2009 22:12:02 +0000 (15:12 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoAMD64 - Enhance help target for src/test/amd64 build
Matthew Dillon [Fri, 3 Apr 2009 22:10:56 +0000 (15:10 -0700)]
AMD64 - Enhance help target for src/test/amd64 build

Document all targets.  Also add a new target 'sysloader' which will
install the native 32 bit system loader in root.img in case the
64 bit one doesn't work.

5 years agoUse .Va for tunables in manual pages.
Sascha Wildner [Fri, 3 Apr 2009 18:13:15 +0000 (20:13 +0200)]
Use .Va for tunables in manual pages.

5 years agoRedo last commit. Do not require that SRCDIR be specified. Set it
Matthew Dillon [Fri, 3 Apr 2009 18:00:39 +0000 (11:00 -0700)]
Redo last commit.  Do not require that SRCDIR be specified.  Set it
to ${.CURDIR}/../.. by default (originally it was hardwired to /usr/src).

5 years agoRequire that SRCDIR be specified or exist in the environment instead of
Matthew Dillon [Fri, 3 Apr 2009 17:56:41 +0000 (10:56 -0700)]
Require that SRCDIR be specified or exist in the environment instead of
defaulting it to /usr/src.

5 years agoRevoke reimplementation - primary commit part 2/2.
Matthew Dillon [Fri, 3 Apr 2009 16:46:57 +0000 (09:46 -0700)]
Revoke reimplementation - primary commit part 2/2.

This finishes out the primary revoke changes.  Adjust the revoke code
to do a primary pass on the file pointer table and mark fps with FREVOKED,
then do a pass on the process descriptor tables to clean them out.

Add checks to dup() to silently use a dummy fp when the source fp has
been revoked.  This removes revoke/dup races.

Add unix domain in-transit tests.  If a revoked fp is in-transit then
unix-domain sockets are scanned and revoked file pointers replaced with
dummy file pointers.

5 years agoAdd programs to test revocation of open files in the presence of
Matthew Dillon [Fri, 3 Apr 2009 16:24:13 +0000 (09:24 -0700)]
Add programs to test revocation of open files in the presence of
unix domain sockets with in-transit descriptors.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 3 Apr 2009 06:48:28 +0000 (23:48 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoRevoke reimplementation - primary commit part 1/2.
Matthew Dillon [Fri, 3 Apr 2009 06:38:31 +0000 (23:38 -0700)]
Revoke reimplementation - primary commit part 1/2.

Rip out and replace the old revoke code.  The old code basically ripped
vnodes out from under the related VFSs, faked close operations, hacked
up ref counts, and generally wreaked havoc on the system.

The new code is not as efficient, but plays a lot nicer with the kernel.
It locates and closes matching file descriptors (replacing the descriptor
with a dummy that just returns an error).  No ref count hacks are needed
and vnodes are no longer unceremoniously canned.

The new revoke code is also capable of revoking any vnode in the system,
device or file.  root, jail root, and chrooted directories cannot be
revoked.

This also fixes an issue with HAMMER getting confused when one of its
vnodes got ripped out from under it by the old revoke.

5 years agousched_dummy: Silence warning
Sascha Wildner [Fri, 3 Apr 2009 06:34:24 +0000 (08:34 +0200)]
usched_dummy: Silence warning

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 2 Apr 2009 20:03:06 +0000 (13:03 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoAMD64 - Fixes to make dynamic binaries run
Matthew Dillon [Thu, 2 Apr 2009 19:59:29 +0000 (12:59 -0700)]
AMD64 - Fixes to make dynamic binaries run

Fix the Elf64_Auxargs structure.

Misc stuff - Supply the original stack pointer as arg3 to rtld_bind().
Set addr = 0 if no interpreter (static binary).  Enable KTRACE.
Remove unused COPY_SIGCODE.

Taken-from: Loosely taken from FreeBSD, with help from Jordan Gordeev

5 years agovnconfig(8): remove code with no effect
Stathis Kamperis [Thu, 2 Apr 2009 17:37:57 +0000 (17:37 +0000)]
vnconfig(8): remove code with no effect

There is no point in calling anything after an err() call,
since err() itself exits and never fails.

Reviewed-by: dillon@
5 years agopppstats(8): Convert manual page to mdoc.
Sascha Wildner [Thu, 2 Apr 2009 09:17:11 +0000 (11:17 +0200)]
pppstats(8): Convert manual page to mdoc.

5 years agoAMD64 - More signal handler work. Signals now appear to work.
Matthew Dillon [Thu, 2 Apr 2009 06:23:50 +0000 (23:23 -0700)]
AMD64 - More signal handler work.  Signals now appear to work.

Finish implementing signal handler argument construction.  For AMD64 the
arguments are passed in registers rather than on the stack.

Align the stack to 16 bytes.

Misc cleanup, comments, and enable PROCFS in kernel config JG64.

Taken-from: FreeBSD code used as a loose template.

5 years agoFix permissions check for utimes() - owner can call even if u-w.
Matt Dillon [Thu, 2 Apr 2009 03:56:49 +0000 (03:56 +0000)]
Fix permissions check for utimes() - owner can call even if u-w.

The owner of a file can call utimes() to modify the file's access and
modified times even if the file is not user-writable.  Add a VOWN test
for VOP_ACCESS() / naccess() which performs this check.

As far as I know only kern_utimes() needs to use this particular type
of test.

This also fixes issues with cp -p and a few other programs.

Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
5 years agoAMD64 - Remove some debugging.
Matthew Dillon [Thu, 2 Apr 2009 01:07:11 +0000 (18:07 -0700)]
AMD64 - Remove some debugging.

5 years agoAMD64 - Make signals operational, fix reg mappings, fix %fs management, trace
Matthew Dillon [Thu, 2 Apr 2009 00:57:01 +0000 (17:57 -0700)]
AMD64 - Make signals operational, fix reg mappings, fix %fs management, trace

Adjust sigframe, trapframe, mcontext, ucontext, and regs.  Add tf_xflags
too all structures.  Reorder struct regs to match the register layout
in the other structures.

Implement the commented out signaling code.  Signals now work, or at least
do not crash programs.  Theoretically the FP state is also saved and restored.

The exec() code failed to adjust gd_user_fs and gd_user_gs when setting
the msr registers for the user %fs and %gs, causing %fs to unexpectedly
change in running user programs.

Implement trace/debug support functions to set %rip and to single-step.

Define the missing vkernel flag FP_SOFTFP.

5 years agoAMD64 - Minor rtld syncs from FreeBSD
Matthew Dillon [Thu, 2 Apr 2009 00:52:31 +0000 (17:52 -0700)]
AMD64 - Minor rtld syncs from FreeBSD

Mainly change Elf_Word to Elf_Size in _rtld_bind(), plus some other
minor updates.

Taken-from: FreeBSD

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

5 years agoCorrect elf hash element types for 64 bit ELF.
Matthew Dillon [Wed, 1 Apr 2009 21:27:01 +0000 (14:27 -0700)]
Correct elf hash element types for 64 bit ELF.

Suggested-by: smtms
Taken-from: FreeBSD

5 years agoFix quickworld for crossbuilding - use ln -hsf to replace 'cpu' softlink
Matthew Dillon [Wed, 1 Apr 2009 20:07:07 +0000 (13:07 -0700)]
Fix quickworld for crossbuilding - use ln -hsf to replace 'cpu' softlink

5 years agoamd64 test builds - add additional targets
Matthew Dillon [Wed, 1 Apr 2009 20:04:21 +0000 (13:04 -0700)]
amd64 test builds - add additional targets

Add numerous additional targets including an incremental buildworld
feature and gdb64 build to examine 64 bit binaries on 32 bit platforms.

5 years agoRemove CVS ID from the loader help file.
Sascha Wildner [Wed, 1 Apr 2009 13:08:03 +0000 (15:08 +0200)]
Remove CVS ID from the loader help file.

5 years agousched_dummy: just proceed if the current thread is trying to acquire curproc
Simon Schubert [Wed, 1 Apr 2009 09:26:51 +0000 (11:26 +0200)]
usched_dummy:  just proceed if the current thread is trying to acquire curproc

If the current thread is exiting to userland and there is no
rescheduling required, uschedcp will be lp, not NULL, so accept this
situation as well.

5 years agoSimplify the radeon microcode loading.
Hasso Tepper [Wed, 1 Apr 2009 05:50:56 +0000 (08:50 +0300)]
Simplify the radeon microcode loading.

Obtained-from: FreeBSD

5 years agoAdd a comment for reminder about nocache.
Hasso Tepper [Tue, 31 Mar 2009 17:07:06 +0000 (20:07 +0300)]
Add a comment for reminder about nocache.

5 years agoLoad the right microcode for RS780.
Hasso Tepper [Tue, 31 Mar 2009 17:03:03 +0000 (20:03 +0300)]
Load the right microcode for RS780.

Obtained-from: FreeBSD

5 years agoFix typo in cpdup.1.
Peter Avalos [Wed, 1 Apr 2009 03:55:41 +0000 (03:55 +0000)]
Fix typo in cpdup.1.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 1 Apr 2009 03:34:54 +0000 (20:34 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agovkernel: Fix startup race with I/O cothread support.
Matthew Dillon [Wed, 1 Apr 2009 03:32:22 +0000 (20:32 -0700)]
vkernel: Fix startup race with I/O cothread support.

The cothread interlocks using pthread calls but there is a small window
of opportunity where a cpu thread can signal the cothread before the
cothread has managed to interlock its first wait.  Moving the wait from the
top of the loop to the bottom fixes the problem.

Reported-by: Joe Talbott <josepht@cstone.net>
5 years agocpdup: '#' in cpignore files is no longer interpreted as a comment.
Matthew Dillon [Wed, 1 Apr 2009 00:16:31 +0000 (17:16 -0700)]
cpdup: '#' in cpignore files is no longer interpreted as a comment.

A '#' as the first character on a line in a cpignore file used to be
interpreted as a comment.  It is no just considered another valid
character in a filename.  Comments may no longer be represented in
cpignore files.

5 years agoUse atomic_fetchadd_int() in fdrop() instead of the spin-lock.
Matthew Dillon [Tue, 31 Mar 2009 23:56:14 +0000 (16:56 -0700)]
Use atomic_fetchadd_int() in fdrop() instead of the spin-lock.

5 years agoAdjust vfinddev() to return a referenced vnode in *vpp.
Matthew Dillon [Tue, 31 Mar 2009 22:17:33 +0000 (15:17 -0700)]
Adjust vfinddev() to return a referenced vnode in *vpp.

Fix a small race condition in sys_linux_ustat() related to accessing
a vnode which can get ripped out from under the procedure.

5 years agoMarkup fixes in several manual pages.
Sascha Wildner [Tue, 31 Mar 2009 22:14:12 +0000 (00:14 +0200)]
Markup fixes in several manual pages.

5 years agovnconfig(8): document -S default size modifier
Stathis Kamperis [Tue, 31 Mar 2009 07:26:17 +0000 (07:26 +0000)]
vnconfig(8): document -S default size modifier

5 years agoSort SEE ALSO in some manual pages.
Sascha Wildner [Mon, 30 Mar 2009 10:50:26 +0000 (12:50 +0200)]
Sort SEE ALSO in some manual pages.

5 years agovnconfig: remove unnecessary casts
Stathis Kamperis [Mon, 30 Mar 2009 09:57:36 +0000 (09:57 +0000)]
vnconfig: remove unnecessary casts

Approved-by: corecode@
5 years agovnconfig -l: print an error if supplied vn is unknown
Stathis Kamperis [Mon, 30 Mar 2009 07:48:36 +0000 (07:48 +0000)]
vnconfig -l: print an error if supplied vn is unknown

The code as it is has no effect, because `tmp' is never NULL.
Make it behave as initially intended. Also, since we are here
replace the printf() call with errx().

Approved-by: corecode@
5 years agorpc.rstatd(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 16:00:23 +0000 (18:00 +0200)]
rpc.rstatd(8): Silence warnings.

5 years ago<sys/tree.h>: Add __unused (fixes warning in undo(1)).
Sascha Wildner [Sun, 29 Mar 2009 16:04:26 +0000 (18:04 +0200)]
<sys/tree.h>: Add __unused (fixes warning in undo(1)).

5 years agorpc.rusersd(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 16:08:10 +0000 (18:08 +0200)]
rpc.rusersd(8): Silence warnings.

5 years agorpc.rwalld(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 16:16:45 +0000 (18:16 +0200)]
rpc.rwalld(8): Silence warnings.

5 years agorpc.sprayd(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 16:18:36 +0000 (18:18 +0200)]
rpc.sprayd(8): Silence warnings.

5 years agorpc.lockd(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 17:52:21 +0000 (19:52 +0200)]
rpc.lockd(8): Silence warnings.

5 years agorpc.statd(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 17:56:50 +0000 (19:56 +0200)]
rpc.statd(8): Silence warnings.

5 years agorpc.ypxfrd(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 17:58:31 +0000 (19:58 +0200)]
rpc.ypxfrd(8): Silence warnings.

5 years agoyp_mkdb(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 17:59:48 +0000 (19:59 +0200)]
yp_mkdb(8): Silence warnings.

5 years agolib/libc/yp: Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 19:56:27 +0000 (21:56 +0200)]
lib/libc/yp: Silence warnings.

5 years agoypset(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 20:03:14 +0000 (22:03 +0200)]
ypset(8): Silence warnings.

5 years agomountd(8): Silence warnings.
Sascha Wildner [Sun, 29 Mar 2009 20:03:31 +0000 (22:03 +0200)]
mountd(8): Silence warnings.

5 years agoAdjust patch for qemu build - increase size of gen_opc_buf
Matthew Dillon [Sun, 29 Mar 2009 17:29:40 +0000 (10:29 -0700)]
Adjust patch for qemu build - increase size of gen_opc_buf

Work around a memory tromping bug in qemu 0.10.0 and 0.10.1 by
expanding the gen_opc_buf[] array.  I'm not sure where the bug
actually is, but this makes qemu work for us.

5 years agoAdd an indexing feature to the -t option.
Matthew Dillon [Sun, 29 Mar 2009 07:44:30 +0000 (00:44 -0700)]
Add an indexing feature to the -t option.

Add an indexing feature to the -t option where -t 0 indicates the
latest version and higher values indicate successively older versions.
Transaction ids are specified with 0x.

Automatically go into DIFF mode (-d) by default if two -t options are
specified, unless overridden.

Submitted-by: "Joel K. Pettersson" <joelkpettersson@gmail.com>
5 years agoFix an IPI messaging lockup which can occur while in DDB.
Matthew Dillon [Sun, 29 Mar 2009 05:07:42 +0000 (22:07 -0700)]
Fix an IPI messaging lockup which can occur while in DDB.

When entering DDB on a SMP system we must also enter a critical section
prior to stopping the other cpus.  If we do not interrupts may generate
calls to sched_ithd() instead of just flagging the interrupt in ipending
and returning.  This, in turn, may attempt to send an IPI to another
cpu.  These IPIs will not be processed while the target cpu is stopped.
If the IPI FIFO then fills up the lwkt_send_ipiq*() function will hard-loop
and the system will lock-up.

Resizing the window a vkernel is running in while the vkernel is in DDB
exercises the bug.  The bug is more easily demonstrated simply by sending
a stream of SIGWINCH signals via a while(1)/kill loop to the vkernel.

The bug is potentially an issue on all architectures so fix all
architectures.

Reported-by: Joe Talbott <josepht@cstone.net>
With-help-from: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>

5 years agoobjcache(9): Fix wrong function name in the manual page.
Sascha Wildner [Sat, 28 Mar 2009 07:30:06 +0000 (08:30 +0100)]
objcache(9): Fix wrong function name in the manual page.

5 years agovkernel(7): Start sentences on new lines.
Sascha Wildner [Fri, 27 Mar 2009 21:27:38 +0000 (22:27 +0100)]
vkernel(7): Start sentences on new lines.

5 years agomakekey(8): Ansify and remove 'register'.
Sascha Wildner [Fri, 27 Mar 2009 21:02:01 +0000 (22:02 +0100)]
makekey(8): Ansify and remove 'register'.

5 years agomknetid(8): Raise WARNS to 6 and fix warnings (also -Wold-style-definition).
Sascha Wildner [Fri, 27 Mar 2009 20:57:11 +0000 (21:57 +0100)]
mknetid(8): Raise WARNS to 6 and fix warnings (also -Wold-style-definition).

5 years agoddb(4): mention 'show ktr' command
Stathis Kamperis [Sat, 28 Mar 2009 18:02:33 +0000 (18:02 +0000)]
ddb(4): mention 'show ktr' command

5 years agoipflow: Add macros to check ipflow refcnt, which is more expressive
Sepherosa Ziehau [Sat, 28 Mar 2009 06:20:28 +0000 (14:20 +0800)]
ipflow: Add macros to check ipflow refcnt, which is more expressive