When calling scheduler entrypoints for creating new threads and processes,
specify "us" as the thread not the process/ksegrp/kse.
You can always find the others from the thread but the converse is not true.
Theorotically this would lead to runtime being allocated to the wrong
entity in some cases though it is not clear how often this actually happenned.
(would only affect threaded processes and would probably be pretty benign,
but it WAS a bug..)
Reverse a lock/unlock pair that were the wrong way around in some code that
is obviously not run a lot. (but is in some test cases).
This code is not usually run because it covers a case that doesn't
happen a lot (removing a node that has data traversing it).
Mike Silbersack [Sun, 18 Jul 2004 21:39:45 +0000 (21:39 +0000)]
Clarify boot.8 (i386 version) a bit, so that people know
where boot.config needs to reside. Also change /kernel
to /boot/loader, as that is the apparent default now. This
man page probably requires more updates.
Alan Cox [Sun, 18 Jul 2004 21:19:10 +0000 (21:19 +0000)]
Utilize pmap_pte_quick() rather than pmap_pte() in pmap_protect(). The
reason being that pmap_pte_quick() requires the page queues lock, which is
already held, rather than Giant.
After maintaining previous behaviour in writing out the core notes, it's
time now to break with the past: do not write the PID in the first note.
Rationale:
1. [impact of the breakage] Process IDs in core files serve no immediate
purpose to the debugger itself. They are only useful to relate a core
file to a process. This can provide context to the person looking at
the core file, provided one keeps track of this. Overall, not having
the PID in the core file is only in very rare occasions unfortunate.
2. [reason of the breakage] Having one PRSTATUS note contain the PID,
while all others contain the LWPID of the corresponding kernel thread
creates an irregularity for the debugger that cannot easily be worked
around. This is caused by libthread_db correlating user thread IDs to
kernel thread (aka LWP) IDs and thus aware of the actual LWPIDs.
Gary Jennejohn [Sun, 18 Jul 2004 20:13:31 +0000 (20:13 +0000)]
Fix a possible hang which apparently occurs during a warm boot (cold boot
does not display the symptom). Evidently the ifpi2 controller needs to be
massaged more than it was.
Note that this does not close the PR since it was filed against 4.9.
MFC: 5 days
PR: kern/68756
Submitted by: Ari Suutari <ari.suutari@syncrontech.com>
This library is not WARNS=2 clean for -O2 builds, because we include
headers from libpthread that are not WARNS=2 clean for -O2 builds.
Lower the WARNS level to 1. This is the highest level possible for
now.
Correct the mess I made by committing from the wrong tree. Most
notably, this restores some of the contents in thread_db.h as well
as David Xu's copyright notice. This also fixes the includes in
the MD libpthread files which Scott tried to provide a quick fix
for.
David Malone [Sun, 18 Jul 2004 19:10:36 +0000 (19:10 +0000)]
The recent changes to control message passing broke some things
that get certain types of control messages (ping6 and rtsol are
examples). This gets the new code closer to working:
1) Collect control mbufs for processing in the controlp ==
NULL case, so that they can be freed by externalize.
2) Loop over the list of control mbufs, as the externalize
function may not know how to deal with chains.
3) In the case where there is no externalize function,
remember to add the control mbuf to the controlp list so
that it will be returned.
4) After adding stuff to the controlp list, walk to the
end of the list of stuff that was added, incase we added
a chain.
This code can be further improved, but this is enough to get most
things working again.
Mark Murray [Sun, 18 Jul 2004 18:55:31 +0000 (18:55 +0000)]
Rename a preposterously long name with one that might look a bit
more professional. While here, write a few lines of explanatory
text to explain what its for.
For the gbde attach script:
- Ask the user up to X times (3 by default) for the pass-phrase, if
it is incorrect the first time.
- Add support for storing the lockfiles in another other directory
than /etc.
- Document that it is possible to override the location of each single
lockfile.
Scott Long [Sun, 18 Jul 2004 15:59:03 +0000 (15:59 +0000)]
Enable ADAPTIVE_MUTEXES by default by changing the sense of the option to
NO_ADAPTIVE_MUTEXES. This option has been enabled by default on amd64 for
quite some time, and has been extensively tested on i386 and sparc64. It
shows measurable performance gains in many circumstances, and few negative
effects. It would be nice in t he future if adaptive mutexes actually went
to sleep after a certain amount of spinning, but that will require quite a
bit more testing.
Tim J. Robbins [Sun, 18 Jul 2004 10:11:27 +0000 (10:11 +0000)]
Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.
Tim J. Robbins [Sun, 18 Jul 2004 06:56:40 +0000 (06:56 +0000)]
Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.
Hook libthread_db into the build, except for arm and powerpc.
Porting libthread_db to arm and/or powerpc is easy enough, but
we don't build gdb on those platforms yet.
Add rudimentary support and stubs for libthr and libc_r on alpha, amd64,
i386, ia64 and sparc64. Add stubs for alpha, amd64, ia64 and sparc64 for
libpthread.
Restructure the source files to avoid unnecessary use of subdirectories
that also force us to use non-portable compilation flags to deal with
the uncommon compilation requirements (building archive libraries for
linkage into a shared library).
The libpthread support has been copied from the original local and
cleaned-up to make them WARNS=2 clean.
that also force us to use non-portable compilation flags to deal with
the uncommon compilation requirements (building archive libraries for
linkage into a shared library).
The libpthread support has been copied from the original local and
cleaned-up to make them WARNS=2 clean.
Remove the dependency of the :C/regexp/replacement/ variable modifier
from the :S modifier which follows a bit further below. This way the
reader can read each of these two descriptions without having to jump
back and forth in the manpage.
PR: docs/26943
Submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
Robert Watson [Sun, 18 Jul 2004 01:29:43 +0000 (01:29 +0000)]
Drop Giant and acquire the UNIX domain socket subsystem lock a bit
earlier in unp_connect() so that vp->v_socket can't change between
our copying its value to a local variable and later use of that
variable. This may have been responsible for a panic during
shutdown that I experienced where simultaneous closing of a listen
socket by rpcbind and a new connection being made to rpcbind by
mountd.
Alan Cox [Sat, 17 Jul 2004 22:20:53 +0000 (22:20 +0000)]
- Utilize pmap_pte_quick() rather than pmap_pte() in pmap_remove() and
pmap_remove_page(). The reason being that pmap_pte_quick() requires
the page queues lock, which is already held, rather than Giant.
- Assert that the page queues lock is held in pmap_remove_page() and
pmap_remove_pte().
David Malone [Sat, 17 Jul 2004 21:06:36 +0000 (21:06 +0000)]
Add a kern_setsockopt and kern_getsockopt which can read the option
values from either user land or from the kernel. Use them for
[gs]etsockopt and to clean up some calls to [gs]etsockopt in the
Linux emulation code that uses the stackgap.
Alfred Perlstein [Sat, 17 Jul 2004 19:48:49 +0000 (19:48 +0000)]
Support readlink(2) better. Readlink does not nul terminate the
result buffer, so we need to format it ourselves. The problem is
that the length is stored as the return value from readlink, so we
need to pass the return value from our syscall into print_arg.
Motivated by: truss garbage on my screen from reading /etc/malloc.conf.
David Malone [Sat, 17 Jul 2004 19:44:13 +0000 (19:44 +0000)]
The tcp syncache code was leaving the IPv6 flowlabel uninitialised
for the SYN|ACK packet and then letting in6_pcbconnect set the
flowlabel later. Arange for the syncache/syncookie code to set and
recall the flow label so that the flowlabel used for the SYN|ACK
is consistent. This is done by using some of the cookie (when tcp
cookies are enabeled) and by stashing the flowlabel in syncache.
Max Laier [Sat, 17 Jul 2004 17:15:15 +0000 (17:15 +0000)]
Merge in a stable fix from OpenBSD:
MFC:
Fix by dhartmei@
change pf_route() loop detection: introduce a counter (number of times
a packet is routed already) in the mbuf tag, allow at most four times.
Fixes some legitimate cases broken by the previous change.
Robert Watson [Sat, 17 Jul 2004 17:12:15 +0000 (17:12 +0000)]
Add a simple tool to bind netatalk sockets and perform send operations.
This isn't a classic regression test in that it doesn't have a notion of
pass fail, it's more of an exercise tool. It attempts to exercise
unbound, bound, unconnected, and connected variations on SOCK_DGRAM
sockets.
Re-implement this file, including copyright notice. Keep David Xu as
copyright owner. Typical bugs fixed by this are:
o various style(9) bugs,
o #ifdef'd out code,
o lack of comments,
o missing const,
o introduction of obsolete functions,
o missing __BEGIN_DECLS & __END_DECLS,
The major flaw in this version, that was also present in the previous
version is the lack of man page. Minor flaws undoubtedly still exist.
Robert Watson [Sat, 17 Jul 2004 17:01:25 +0000 (17:01 +0000)]
gcc now objects to a default label without any contents. Because I want
to have a comment present in the default case, add a 'break' to each
default case that previously had no actual statements.
Robert Watson [Sat, 17 Jul 2004 16:56:46 +0000 (16:56 +0000)]
Add simple regression test to detect leakage of file descriptors when
accept() returns EAGAIN on a non-blocking listen socket. This is the
tool I used to check that such a bug was resolved when merging accept()
locking.
Fix minor namespace pollution: The prototypes for f{dim,max,min}(),
nearbyint(), round() and trunc() shouldn't be visible when compiling with
-D_XOPEN_SOURCE=500.
Peter Grehan [Sat, 17 Jul 2004 07:26:32 +0000 (07:26 +0000)]
Resurrect kld support. Support ADDR16_HA/LA relocations, and sync
the icache on module load. Requires "-mlongcall" support, in gcc >= 3.3
but needs a bugfix to support gcc arith builtins.
Tim Kientzle [Sat, 17 Jul 2004 06:03:47 +0000 (06:03 +0000)]
Make bsdtar the default system tar. This makes /usr/bin/tar a symlink
pointing to /usr/bin/bsdtar by default. To make it point to /usr/bin/gtar,
you can define WITH_GTAR.
Max Laier [Sat, 17 Jul 2004 05:10:06 +0000 (05:10 +0000)]
Define semantic of M_SKIP_FIREWALL more precisely, i.e. also pass associated
icmp_error() packets. While here retire PACKET_TAG_PF_GENERATED (which
served the same purpose) and use M_SKIP_FIREWALL in pf as well. This should
speed up things a bit as we get rid of the tag allocations.
Tim Kientzle [Sat, 17 Jul 2004 04:17:50 +0000 (04:17 +0000)]
Validate -o usage. Strictly speaking, -o only makes sense with -x,
of course, but I make an effort to accomodate GNU tar scripts that
use -o with -c (with a meaning that totally contradicts SUSv2) by
only issuing a benign warning message in that case.
Tim J. Robbins [Sat, 17 Jul 2004 04:15:27 +0000 (04:15 +0000)]
Mention in the BUGS section that write and wall bogusly use the sender's
LC_CTYPE setting instead of the receiver's when determining which
characters are printable.
Juli Mallett [Sat, 17 Jul 2004 02:40:13 +0000 (02:40 +0000)]
Make M_SKIP_FIREWALL a global (and semantic) flag, preventing anything from
using M_PROTO6 and possibly shooting someone's foot, as well as allowing the
firewall to be used in multiple passes, or with a packet classifier frontend,
that may need to explicitly allow a certain packet. Presently this is handled
in the ipfw_chk code as before, though I have run with it moved to upper
layers, and possibly it should apply to ipfilter and pf as well, though this
has not been investigated.
Brian Somers [Sat, 17 Jul 2004 01:07:53 +0000 (01:07 +0000)]
Support a ``set rad_alive N'' command to enable periodic RADIUS accounting
information being sent to the RADIUS server.
Logging of RADIUS accounting information moves to a ``set log [+-]radius''
level, along with the RADIUS alive info, and the version number is bumped
to 3.2 to reflect this.
Alfred Perlstein [Sat, 17 Jul 2004 00:26:31 +0000 (00:26 +0000)]
Give the most awesome example of how to parse the output of date
back into epoch time. Everytime I'm asked to do this by someone I
have to spend about ten minutes recreating the same command line.
So record it under examples.