David E. O'Brien [Sun, 25 Aug 2002 01:00:16 +0000 (01:00 +0000)]
Find remaining hardcoded gzip bits and change to bzip2 bits.
Mark with XXX so someone that cares about being able to handle either
bziped or gziped packages knows where the remaining nits are.
Alan Cox [Sun, 25 Aug 2002 00:22:31 +0000 (00:22 +0000)]
o Retire vm_page_zero_fill() and vm_page_zero_fill_area(). Ever since
pmap_zero_page() and pmap_zero_page_area() were modified to accept
a struct vm_page * instead of a physical address, vm_page_zero_fill()
and vm_page_zero_fill_area() have served no purpose.
Marcel Moolenaar [Sat, 24 Aug 2002 22:42:16 +0000 (22:42 +0000)]
Use 'p' as the partition specifier instead of 's'. We continue to use
's' for compatibility partitions (ie partitions with a BSD disklabel).
Partition numbers continue to start with 1.
Example /etc/fstab:
# Device Mountpoint FStype Options ...
/dev/da0p1 /efi msdos rw ...
/dev/da0p2 / ufs rw ...
/dev/da0p3 none swap sw ...
John Polstra [Sat, 24 Aug 2002 17:37:42 +0000 (17:37 +0000)]
Fix a bug in __ivaliduser_sa() which caused some rsh/rlogin attempts
to fail needlessly if a reverse DNS lookup of the IP address didn't
come up with a hostname. As a comment in the code clearly stated,
the "damn hostname" was looked up only for the purpose of netgroup
matching. But if that lookup failed, the function bailed out
immediately even though in many cases netgroup matching would not
be used.
This change marks the hostname as unknown but continues. Where
netgroup matching is performed, an unknown hostname is handled
conservatively. I.e., for "+@netgroup" (accept) entries an unknown
hostname never matches, and for "-@netgroup" (reject) entries an
unknown hostname always matches.
In the lines affected (only), I also fixed a few bogus casts. There
are others, and in fact this entire file would be a good candidate
for a cleanup sweep.
Reviewed by: imp (wearing his flourescent yellow Security Team cap)
MFC after: 2 days
Marcel Moolenaar [Sat, 24 Aug 2002 05:01:33 +0000 (05:01 +0000)]
Work around a GCC optimization bug on ia64: In link_elf_symbol_values(),
a pointer to a symbol is given and we have to find the containing symbol
table. We do this by bounds checking. For some strange reason (ie I
haven't found the root cause) the first test succeeded for said symbol,
implying that the symbol came from the .dynsym table. In reality however
the symbol actually resided in the .symtab table. Needless to say that
all that was returned was junk.
The upper bounds check was: (symptr - baseptr) < symtab_size
This has been rewritten to: symptr < (baseptr + symtab_size)
As a side-effect, slightly more optimal (and still correct :-) code can
be generated on ia64.
Peter Wemm [Fri, 23 Aug 2002 22:43:28 +0000 (22:43 +0000)]
Move the TAILQ_INIT(&td->td_selq) before the retry: label. Otherwise in
some circumstances when we get a select collision, we can end up with
cases where we do not clear some sip->si_thread on the way out, leading to
page faults in selwakeup(). This should solve the problem where postfix
can crash the kernel during select collisions.
Peter Wemm [Fri, 23 Aug 2002 21:45:59 +0000 (21:45 +0000)]
Ok, somebody please shoot me. The asm I wrote for the ranged IPI shootdown
was wrong. It only ever invalidated one page due to me getting the loop
terminator wrong. This explains the DISABLE_PG_G effect on SMP.
Orion Hodson [Fri, 23 Aug 2002 20:54:32 +0000 (20:54 +0000)]
Make sure channel buffer start is associated with channel, otherwise
getptr is broken. Noise reported by Thomas Draney <tmdraney@yahoo.com> who
also tested the patch.
Julian Elischer [Fri, 23 Aug 2002 20:13:22 +0000 (20:13 +0000)]
Add the complex state TDS_SUSP_SLP.
This state is to allow some experimentation and not YET used..
The theory is that a thread that is about to sleep is placed on the sleep
queue and then discovers it should suspend, and is placed on suspend queue.
(these are separate queues and it can be on both). It will not become runnable
until it has been removed from BOTH queues. i.e. a wakeup event
has occured AND the process has been unsuspended. If it were not on the sleep
queue when suspended, then the (possibly only) wakeup event might arrive and
not find any process to wake up. this would result in the thread
sleeping 'forever' when the suspension is lifted. This state will
transition to one of TDS_SLP or TDS_SUSPENDED, depending upon which
constraint is lifted first.
Mike Barcroft [Fri, 23 Aug 2002 20:04:49 +0000 (20:04 +0000)]
o Fix namespace issues in <sys/mman.h>.
o Move mode_t details from <sys/types.h> into <sys/_types.h>.
o Add primitives for sharing the mode_t and off_t typedefs.
o Add typedefs mode_t, off_t, and size_t to <sys/mman.h>.
Mike Barcroft [Fri, 23 Aug 2002 16:49:06 +0000 (16:49 +0000)]
Move several MI types from <machine/_types.h> to <sys/_types.h>.
These types are unlikely to ever become very MD. They include:
clockid_t, ct_rune_t, fflags_t, intrmask_t, mbstate_t, off_t, pid_t,
rune_t, socklen_t, timer_t, wchar_t, and wint_t.
While moving them, make a few adjustments (submitted by bde):
o __ct_rune_t needs to be precisely `int', not necessarily __int32_t,
since the arg type of the ctype functions is int.
o __rune_t, __wchar_t and __wint_t inherit this via a typedef of
__ct_rune_t.
o Some minor wording changes in the comment blocks for ct_rune_t and
mbstate_t.
Johan Karlsson [Fri, 23 Aug 2002 12:49:16 +0000 (12:49 +0000)]
Similar to bsd.subdir.mk, echo the name of the dir before
doing the cd. This is done for bootstrap-tools,
build-tools, cross-tools, and the libraries loop.
Orion Hodson [Fri, 23 Aug 2002 06:19:28 +0000 (06:19 +0000)]
s/AC97_MIX_PHONES/AC97_MIX_AUXOUT/ to match ac97r2.{2,3}.
Attempt to determine what function of AUX_OUT is: "True line level
out", "Headphone out", or "4-Channel out" and frig OSS mixer label
accordingly.
Addresses problem raised by Randy Bush on -multimedia of not being
able to hear audio on ich2 m/b which was eventually found to be
because the mixer monitor value was 0. On this h/w the label
"monitor" should now be presented as the marginally more intuitive
"ogain".
Marcel Moolenaar [Fri, 23 Aug 2002 03:47:50 +0000 (03:47 +0000)]
We cannot use an alloc with only inputs and/or locals. The kernel
assumes that the parameters are passed in output registers. Remove
the alloc entirely, but don't depend on the kernel not trashing
our registers.
Peter Wemm [Thu, 22 Aug 2002 20:43:07 +0000 (20:43 +0000)]
Instead of grabbing the userland a.out.h/link.h (or worse, from
/usr/include!), use sys/nlist_aout.h, machine/reloc.h, sys/imgact_aout.h
and sys/link_aout.h.
Peter Wemm [Thu, 22 Aug 2002 20:39:30 +0000 (20:39 +0000)]
Instead of nlist.h and link.h, use sys/nlist_aout.h and sys/link_elf.h
This avoids reaching out into userland sources (or worse: /usr/include!)
for building the kernel.
Peter Wemm [Thu, 22 Aug 2002 20:35:23 +0000 (20:35 +0000)]
Repo copy link.h to sys/link_elf.h and sys/link_aout.h since they are
shared with the kernel. This should make it easier to #include them both
at once as well as stop grabbing stuff from /usr/include.
Robert Watson [Thu, 22 Aug 2002 14:36:03 +0000 (14:36 +0000)]
Spell proprly properly:
failed to set signal flags proprly for ast()
failed to set signal flags proprly for ast()
failed to set signal flags proprly for ast()
failed to set signal flags proprly for ast()
Jeff Roberson [Thu, 22 Aug 2002 07:57:43 +0000 (07:57 +0000)]
- Closer inspection revealed a possible deadlock situation in vn_lock() that
was introduced by my last commit but not caught by stress testing. Fix
that and slightly restructure the code so that it is more readable.
Jeff Roberson [Thu, 22 Aug 2002 07:44:45 +0000 (07:44 +0000)]
- Make vn_lock() vget() and VOP_LOCK() all behave the same way WRT
LK_INTERLOCK. The interlock will never be held on return from these
functions even when there is an error. Errors typically only occur when
the XLOCK is held which means this isn't the vnode we want anyway. Almost
all users of these interfaces expected this behavior even though it was
not provided before.
Jeff Roberson [Thu, 22 Aug 2002 07:01:52 +0000 (07:01 +0000)]
(forced commit to get the correct log message)
- Remove unsafe and dead code from getnewvnode().
- Fixup vclean() so that it grabs the VOP_LOCK before calling VOP_GETATTR()
and grabs interlock afterwards.
Jeff Roberson [Thu, 22 Aug 2002 06:58:11 +0000 (06:58 +0000)]
- Fix interlock handling in vn_lock(). Previously, vn_lock() could return
with interlock held in error conditions when the caller did not specify
LK_INTERLOCK.
- Add several comments to vn_lock() describing the rational behind the code
flow since it was not immediately obvious.
Jeff Roberson [Thu, 22 Aug 2002 06:51:06 +0000 (06:51 +0000)]
- Fix interlock handling in vn_lock(). Previously, vn_lock() could return
with interlock held in error conditions when the caller did not specify
LK_INTERLOCK.
- Add several comments to vn_lock() describing the rational behind the code
flow since it was not immediately obvious.
Marcel Moolenaar [Thu, 22 Aug 2002 03:56:57 +0000 (03:56 +0000)]
Fix a nasty memory corruption bug caused by having a bogus pointer
for the DT_IA64_PLT_RESERVE dynamic table entry. When a shared object
does not have any PLT relocations, the linker apparently doesn't find
it necessary to actually reserve the space for the BOR (Bind On
Reference) entries as pointed to by the DTE. As a result, relocatable
data in the PLT was overwritten, causing some unexpected control flow
with annoyingly predictable outcome: coredump.
To reproduce:
% echo 'int main() { return 0; }' > foo.c
% cc -o foo foo.c -lxpg4