dillon [Mon, 10 Jun 2002 21:15:50 +0000 (21:15 +0000)]
Correct a bug in the last commit. The whole point of creating a 'done:'
goto target was so the cache could be freed. So free the cache after
done: rather then before done: (!)
sobomax [Mon, 10 Jun 2002 19:25:21 +0000 (19:25 +0000)]
- Whitespace only: use return statement consistentlt (return (foo), not
return(foo)), kill extra blank names between function names;
- fix format string in printf(): devtoname() returns string, not pointer.
dillon [Mon, 10 Jun 2002 18:52:31 +0000 (18:52 +0000)]
In tracking down an installation seg fault with then openoffice port
Martin Blapp determined that the elf dynamic loader was at fault. In
particular, the loader uses alloca() to allocate a symbol cache on the
stack. Normally this would work just fine, but if the loader is called
from a threaded program and the object being loaded is fairly large the
alloca() can blow away the thread stack and effect other nearby thread
stacks as well. My testing showed that the symbol cache can be as large
as 250KBytes during the openoffice port build and install sequence. Martin
was able to work around the problem by disabling the symbol cache
(cache = NULL;). However, this solution is not adequate for commit because
it can cause an enormous cpu burden for applications which do a lot of
dynamic loading (e.g. like konqueror).
The solution is to use anonymous mmap() to temporarily allocate space to
hold the symbol cache. In testing I found that replacing the alloca()
with mmap() has no observable degredation in performance.
It should be noted that this bug does not necessarily cause an immediate
crash but can instead result in long term corruption and instability in
applications that load modules from threads. The bug is almost certainly
responsible for some of the instabilities found in konqueror, for example,
and possibly netscape too.
Sleuthing work by: Martin Blapp <mb@imp.ch>
X-MFC after: Before or after the 4.6 release depending on the release engineers
jmallett [Mon, 10 Jun 2002 09:03:49 +0000 (09:03 +0000)]
Add another example for using paste(1) since tjr seemed to want more examples
on IRC. This one is to create a colon seperated list of directories from
find(1), suitable for use in the shell's PATH.
alc [Mon, 10 Jun 2002 06:11:45 +0000 (06:11 +0000)]
o In vm_map_entry_create(), call uma_zalloc() with M_NOWAIT on system maps.
Submitted by: tegge
o Eliminate the "!mapentzone" check from vm_map_entry_create() and
vm_map_entry_dispose(). Reviewed by: tegge
o Fix white-space usage in vm_map_entry_create().
tjr [Mon, 10 Jun 2002 06:06:20 +0000 (06:06 +0000)]
Correctly handle global substitutions where the pattern is only "$", the
EOL anchor, when the last input line does not end in a newline character.
Picked up by the GNU sed test suite.
jmallett [Mon, 10 Jun 2002 05:03:20 +0000 (05:03 +0000)]
Note early appearence of some commands. These actually appeared in PWB, but
it seems we don't have a macro for that yet, so list them in the first UNIX
release since then that we have a .At for: v7.
iedowse [Mon, 10 Jun 2002 03:25:23 +0000 (03:25 +0000)]
Correct the logic for determining whether the per-CPU locks need
to be destroyed. This fixes a problem where destroying a UMA zone
would fail to destroy all zone mutexes.
alc [Sun, 9 Jun 2002 20:25:18 +0000 (20:25 +0000)]
o Add vm_map_wire() for wiring contiguous regions of either kernel
or user vm_maps. This implementation has two key benefits when compared
to vm_map_{user_,}pageable(): (1) it avoids a race condition through
the use of "in-transition" vm_map entries and (2) it eliminates lock
recursion on the vm_map.
Note: there is still an error case that requires clean up.
mike [Sun, 9 Jun 2002 19:39:18 +0000 (19:39 +0000)]
o Remove include of <sys/types.h>, it adds too much pollution;
instead, add typedefs of only gid_t, time_t, and uid_t.
o Remove an unneeded conditional that hid macros that are in the
implementation namespace and therefore don't need to be hidden when
_POSIX_SOURCE is defined.
o Adjust some conditionals for compatibility with X/Open and POSIX.
o Note missing functions getpwnam_r() and getpwuid_r().
Fix driver to re-enable sound output on AD1816 based cards caused by an
obviously bogous return value of ad1816chan_setformat().
PR: 37932
Submitted by: Martin Kaeske <Martin.Kaeske@Stud.TU-Ilmenau.DE>
Reviewed by: hm
MFC after: 10 days
keramida [Sun, 9 Jun 2002 04:15:40 +0000 (04:15 +0000)]
Replace <strings.h> with <string.h>. No functions from the former are
used in this file, and strlen() needs to be prototyped by the latter,
for this to compile without warnings.
jmallett [Sat, 8 Jun 2002 18:11:52 +0000 (18:11 +0000)]
Allow whitespace to act as a delimiter in the keywords list given to the -o,
again, but also allow it in the user-specified header, too. This is far more
backwards compatible and SUSv3-happy than allowing only comma to seperate the
keywords list.
jake [Sat, 8 Jun 2002 07:36:28 +0000 (07:36 +0000)]
Add code to drop to ddb when a process gets a fatal signal that usually
suggests kernel bugs (4, 10, 11). Add a sysctl debug.debugger_on_signal
which turns this on and off, default off.
alc [Sat, 8 Jun 2002 07:32:38 +0000 (07:32 +0000)]
o Remove an unnecessary call to vm_map_wakeup() from vm_map_unwire().
o Add a stub for vm_map_wire().
Note: the description of the previous commit had an error. The in-
transition flag actually blocks the deallocation of a vm_map_entry by
vm_map_delete() and vm_map_simplify_entry().
jake [Sat, 8 Jun 2002 07:10:28 +0000 (07:10 +0000)]
Fix bizarre SMP problems. The secondary cpus sometimes start up with junk
in their tlb which the prom doesn't clear out, so we have to do so manually
before mapping the kernel page table or the cpu can hang due various
conditions which cause undefined behaviour from the tlb.
matusita [Sat, 8 Jun 2002 03:15:50 +0000 (03:15 +0000)]
Explicitly set TARGET and TARGET_ARCH in a chroot sandbox.
In fact, these variable are set as environment variables since we run
"make TARGET=xxx TARGET_ARCH=xxx"; TARGET and TARGET_ARCH are declared
in the command line arguments. However, if you are not make(1) guy,
it is hard to understand that TARGET/TARGET_ARCH are appropriately set
in a chroot environment (as environment variables).
Now, the only environment variable need to be set explicitly is 'PATH'.
If we set PATH in /mk script, we can make pristine sandbox for release
build (i.e., "env -i /usr/sbin/chroot ${CHROOT} /mk" will work).
Valuable comments about this issue from: ru
Tested on (virtually): snapshots.jp.FreeBSD.org
MFC after: 2 weeks
obrien [Fri, 7 Jun 2002 18:55:42 +0000 (18:55 +0000)]
Install a "perl5.6.1" wrapper. I think this is going too far as now
/usr/src has to carefully watch the Perl port to keep this in sync.
But this is the only way I am allowed to fix the mozzila build
(and other USE_PERL5 ports).
alc [Fri, 7 Jun 2002 18:34:23 +0000 (18:34 +0000)]
o Add vm_map_unwire() for unwiring contiguous regions of either kernel
or user vm_maps. In accordance with the standards for munlock(2),
and in contrast to vm_map_user_pageable(), this implementation does not
allow holes in the specified region. This implementation uses the
"in transition" flag described below.
o Introduce a new flag, "in transition," to the vm_map_entry.
Eventually, vm_map_delete() and vm_map_simplify_entry() will respect
this flag by deallocating in-transition vm_map_entrys, allowing
the vm_map lock to be safely released in vm_map_unwire() and (the
forthcoming) vm_map_wire().
o Modify vm_map_simplify_entry() to respect the in-transition flag.
jhb [Fri, 7 Jun 2002 14:33:23 +0000 (14:33 +0000)]
According to Bruce, this file shouldn't have comments to describe what
options do. Comments should be in NOTES and having the comments in two
places usually means that one place will just bitrot. Thus, remove the
comment for KTRACE_REQUEST_POOL from the previous revision.
tjr [Fri, 7 Jun 2002 09:13:43 +0000 (09:13 +0000)]
style(9): don't initialise variables in their declaration, remove space
after function name, use __unused on unused parameters instead of
initialising them to bogus values.
tjr [Fri, 7 Jun 2002 07:08:06 +0000 (07:08 +0000)]
Contrary to what the comments said, rs -H did not recycle storage, it just
kept writing past the end of the buffer. Correct the code so that it
actually does recycle storage.
sobomax [Fri, 7 Jun 2002 06:02:35 +0000 (06:02 +0000)]
Disabling automatic --same-owner option when running as uid 0 along with
the --same-permissions was an overkill, so put it back. This is consistent
with what our old tar did.
jhb [Fri, 7 Jun 2002 05:47:35 +0000 (05:47 +0000)]
- Fixup / remove obsolete comments.
- ktrace no longer requires Giant so do ktrace syscall events before and
after acquiring and releasing Giant, respectively.
- For i386, ia32 syscalls on ia64, powerpc, and sparc64, get rid of the
goto bad hack and instead use the model on ia64 and alpha were we
skip the actual syscall invocation if error != 0. This fixes a bug
where if we the copyin() of the arguments failed for a syscall that
was not marked MP safe, we would try to release Giant when we had
not acquired it.