phk [Tue, 17 Dec 2002 19:13:03 +0000 (19:13 +0000)]
Don't cast a pointer to (intptr_t) and then on to (int) when we cannot
be sure that (int) is large enough. Instead cast only to (intptr_t) and
cast the switch/case values to (intptr_t) as well.
marcel [Tue, 17 Dec 2002 02:51:56 +0000 (02:51 +0000)]
Check that the dump device is large enough. Otherwise we could
end up with a dump offset that's smaller than the start of the
dump device and either clobber data in preceding partitions or
try to write beyond the end of the medium (unsigned wrap).
Implement legacy behaviour to never write to the first 64KB as
that is where metadata (ie disklabels) may reside.
mux [Tue, 17 Dec 2002 00:08:49 +0000 (00:08 +0000)]
Convert the xl(4) driver to the busdma API. This should make
it possible to use this driver under ia64, sparc64 (though
there may be endianness issues with this one) and other archs.
julian [Mon, 16 Dec 2002 23:04:54 +0000 (23:04 +0000)]
Don't dump core into a partition that is too small for it.
If we do, we usually wrote backwareds into the proceeding partititon
which is usually the root partition.
dillon [Mon, 16 Dec 2002 19:24:43 +0000 (19:24 +0000)]
Change the way ELF coredumps are handled. Instead of unconditionally
skipping read-only pages, which can result in valuable non-text-related
data not getting dumped, the ELF loader and the dynamic loader now mark
read-only text pages NOCORE and the coredump code only checks (primarily) for
complete inaccessibility of the page or NOCORE being set.
Certain applications which map large amounts of read-only data will
produce much larger cores. A new sysctl has been added,
debug.elf_legacy_coredump, which will revert to the old behavior.
This commit represents collaborative work by all parties involved.
The PR contains a program demonstrating the problem.
trhodes [Mon, 16 Dec 2002 17:40:17 +0000 (17:40 +0000)]
The HP DAT 40 tape drive should be able to handle variable block sizes.
But for some reason the block size is different when a different type of
tape is placed in the drive. This commit fixes that.
PR: 46209
Submitted by: Alex Wang <alex@alexwang.com>
Approved by: mjacob
robert [Mon, 16 Dec 2002 16:20:06 +0000 (16:20 +0000)]
Remove the hto(be|le)[slq] and (be|le)toh[slq] macros defined in
_KERNEL scope from "src/sys/sys/mchain.h".
Replace each occurrence of the above in _KERNEL scope with the
appropriate macro from the set of hto(be|le)(16|32|64) and
(be|le)toh(16|32|64) from "src/sys/sys/endian.h".
Tested by: tjr
Requested by: comment marked with XXX
des [Mon, 16 Dec 2002 14:22:59 +0000 (14:22 +0000)]
Ignore IEEE1284 descriptors when looking for bidirectional mode. We don't
really know how to talk IEEE1284, so attaching to that interface makes the
printer unusable.
cognet [Mon, 16 Dec 2002 13:38:22 +0000 (13:38 +0000)]
Fix the panic that occurs when kldunloading trm by using the correct
prototype for trm_detach and freeing all resources.
While I'm there, handle better errors in trm_attach and remove the
PCI_BASE_ADDR0 definition, since it's what PCIR_MAPS is used for.
sobomax [Sun, 15 Dec 2002 19:28:02 +0000 (19:28 +0000)]
Add a new `W' flag, that when used in conjunction with the `Z' flag or the
`J' flag means that newsyslog should wait for previously started compression
jobs to complete before starting a new one for this entry. When it is used
along with the `G' flag, in the case when several logfiles match the pattern
and should be compressed, the newsyslog will compress logs one by one,
ensuring that only one compression job is running at a time.
This prevents newsyslog(8) from overloading system by starting several
compression jobs on big files simultaneously.
Sponsored by: Porta Software Ltd
MFC after: 2 weeks
dillon [Sun, 15 Dec 2002 18:50:04 +0000 (18:50 +0000)]
Fix a refcount race with the vmspace structure. In order to prevent
resource starvation we clean-up as much of the vmspace structure as we
can when the last process using it exits. The rest of the structure
is cleaned up when it is reaped. But since exit1() decrements the ref
count it is possible for a double-free to occur if someone else, such as
the process swapout code, references and then dereferences the structure.
Additionally, the final cleanup of the structure should not occur until
the last process referencing it is reaped.
This commit solves the problem by introducing a secondary reference count,
calling 'vm_exitingcnt'. The normal reference count is decremented on exit
and vm_exitingcnt is incremented. vm_exitingcnt is decremented when the
process is reaped. When both vm_exitingcnt and vm_refcnt are 0, the
structure is freed for real.
keramida [Sat, 14 Dec 2002 23:58:49 +0000 (23:58 +0000)]
Make minimal changes to point the users to the Texinfo documentation
for more detailed information about sdiff(1). Hopefully this will
make it easier to find how `interactive merging' works with sdiff.
keramida [Sat, 14 Dec 2002 23:45:54 +0000 (23:45 +0000)]
NetBSD manpages use .Nm "" to typeset the `name' of the manpage, but
this doesn't work quite right with our groff. They have an older
groff version in the base system, but no real plans to update both
groff and manpages. Fix the .Nm usage locally in our manpages.
alc [Sat, 14 Dec 2002 22:25:35 +0000 (22:25 +0000)]
MFi386 revisions 1.375 and 1.376
Hold the page queues lock when calling pmap_unwire_pte_hold() or
pmap_remove_pte(). Use vm_page_sleep_if_busy() in
_pmap_unwire_pte_hold() so that the page queues lock is released
when sleeping.
dillon [Sat, 14 Dec 2002 21:00:17 +0000 (21:00 +0000)]
Change tcp.inflight_min from 1024 to a production default of 6144. Create
a sysctl for the stabilization value for the bandwidth delay product (inflight)
algorithm and document it.
phk [Sat, 14 Dec 2002 19:44:13 +0000 (19:44 +0000)]
Employ the unused bytes after the disklabel in the second sector. This makes
it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the
traditional 16 sectors.
Remove assorted now unneeded hackery.
UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably
not within our reach, ever.
iedowse [Sat, 14 Dec 2002 17:16:16 +0000 (17:16 +0000)]
Undo the adjustment of the total memory used by dirhash in the case
where allocating the dirhash structure fails. Fix a few typos in
comments and update copyright.
des [Sat, 14 Dec 2002 13:54:57 +0000 (13:54 +0000)]
Don't build auth-pam.c and auth2-pam.c, auth2-pam-freebsd.c is all we need.
Use pthreads for PAM if the platform supports it and the user asked for it
(by setting OPENSSH_USE_POSIX_THREADS)
des [Sat, 14 Dec 2002 13:52:39 +0000 (13:52 +0000)]
If possible, use pthreads instead of a child process for PAM.
Reimplement the necessary bits from auth_pam.c and auth2_pam.c so that
they share the PAM context used by the keyboard-interactive thread. If
a child process is used instead, they will (necessarily) use a separate
context.