Sigh, this shows just how much one can be conditioned my the environment:
Just because we for the last ten years have fought for every byte
in the boot code on i386, doesn't mean that other architectures could
not actually have space to spare there.
Peter Wemm [Fri, 9 May 2003 18:28:05 +0000 (18:28 +0000)]
Include the MXCSR initial values, based on the AMD docs. This file
should really be renamed to fpu.h and npx.c to fpu.c since its part of
the core architecture on amd64 systems, not an isa 'numeric processor
extension'.
Peter Wemm [Fri, 9 May 2003 18:26:06 +0000 (18:26 +0000)]
Turn syscons on now that it works, so that anybody trying to run this
can see something. Probing for keyboard still works for auto serial
console mode.
Scott Long [Fri, 9 May 2003 09:41:18 +0000 (09:41 +0000)]
The disc1 package set has overfilled the disc. Axe linux-netscape-navigator-4.8
to free up space. linux-netscape-communicator-4.8 remains and is a superset of
the former for those who are stuck are the 1990's =-)
Hiten Pandya [Fri, 9 May 2003 09:20:26 +0000 (09:20 +0000)]
Document the last field of the procfs 'status' node, which either
displays the 'hostname' of the jail, or a hyphen '-' to indicate
that the process is not jailed.
PR: docs/37470
Submitted by: Adrian Filipi-Martin <adrian@ubergeeks.com>
Approved and Reviewed by: des (mentor), re (bmah)
Robert Drehmel [Fri, 9 May 2003 09:11:27 +0000 (09:11 +0000)]
To reserve space for 65536 bits, allocate
65536 / (sizeof(int) * CHAR_BITS) `int's instead of
65536 / (sizeof(int) * CHAR_BITS) bytes to avoid a possible
segmentation fault if ports above 16383 are specified via the
-p option on a platform with 4 byte wide ints.
Approved by: re (bmah)
Reported by: Marco Wertejuk <wertejuk@mwcis.com>
Mike Silbersack [Fri, 9 May 2003 02:15:52 +0000 (02:15 +0000)]
Redefine M_FREELIST to be 0x8000; 0x4000 conflicted with two other
uses of m_flags in the kernel. (A future commit will move all
private m_flags users here so they're obvious without a great
deal of searching.)
This should fix the mbuf double-free panics those using ppp or
ipfw reset rules have been seeing since the double-free detection
code went in.
Robert Watson [Thu, 8 May 2003 19:49:42 +0000 (19:49 +0000)]
Rename MAC_MAX_POLICIES to MAC_MAX_SLOTS, since the variables and
constants in question refer to the number of label slots, not the
maximum number of policies that may be loaded. This should reduce
confusion regarding an element in the MAC sysctl MIB, as well as
make it more clear what the affect of changing the compile-time
constants is.
I goofed in rev 1.59 (a.out support axing) and missed getting FUNCTION_PROFILER
fully clean. This resulted in inserted garbage into the produced assembly code
when the gcc -pg and -fPIC options are used together.
PR: i386/50598
Submitted by: Don Lewis <truckman@freebsd.org>
Peter Wemm [Thu, 8 May 2003 08:25:51 +0000 (08:25 +0000)]
Oops. Turn T_PAGEFLT back into an interrupt gate. It is *critical*
that interrupts be disabled and remain disabled until %cr2 is read.
Otherwise we can preempt and another process can fault, and by the
time we read %cr2, we see a different processes fault address. This
Greatly Confuses vm_fault() (to say the least). The i386 port has
got this marked as a bug workaround for a Cyrix CPU, which is what
lead me astray. Its actually necessary for preemption, regardless
of whether Cyrix cpus had a bug or not.
Peter Wemm [Thu, 8 May 2003 06:39:31 +0000 (06:39 +0000)]
Set the binutils arch for as/nm correctly on the amd64 platform.
As far as binutils is concerned, the amd64 platform is still called
"x86-64"/"x86_64". Setting things from ${MACHINE_ARCH} breaks that.
Peter Wemm [Thu, 8 May 2003 06:25:03 +0000 (06:25 +0000)]
Fix an embarresing transcription error from i386 to amd64. Put the arguments
to sigprocmask(2) int the correct order. *blush*.
For sigsetjmp(), match up the pushq/popq in the non-savemask case.
Peter Wemm [Thu, 8 May 2003 03:19:37 +0000 (03:19 +0000)]
Tidy up modf.S and make it actually work. It wasn't extracting
the value out of ST(0) before copying it to %xmm0. Also remove bogus stack
frame and work in the red zone.
Rethink the way we count module references. Simply following
DT_NEEDED links is not flexible enough for cases where dynamically
loaded modules form a dependency cycle.
This should fix an infinite recursion problem encountered by Yahoo.
Greg Lehey [Thu, 8 May 2003 00:36:20 +0000 (00:36 +0000)]
ioctl VINUM_READCONFIG: Don't lock configuration here. vinum_scandisk
needs to do it anyway to handle the startup case. This is
part of a fix for the recently reported hangs.
Greg Lehey [Thu, 8 May 2003 00:33:57 +0000 (00:33 +0000)]
vinum_read: Don't lock configuration from userland. If vinum(8)
crashes, the config remains locked and causes all
subsequent start or read attempts to fail. This is part
of a fix for the recently reported hangs.
Tom Rhodes [Thu, 8 May 2003 00:14:48 +0000 (00:14 +0000)]
Fix some basic errors:
- Add a description of b0 / b1 fields.
- Do not use 'entry' to refer to both 'entry' and 'field'.
- Do not confuse people with heading 'Name' and entry 'Name'.
PR: 48104
Submitted by: Gary W. Swearingen <swear@attbi.com> (original version)
Approved by: re (blanket)
Peter Wemm [Thu, 8 May 2003 00:05:00 +0000 (00:05 +0000)]
Fix a preemption race. I was reenabling interrupts in the fast system
call handler before it was safe. It was possible for to lose context
and for something else to clobber the PCPU scratch variable. This
moves the interrupt enable *way* too late, but its better safe than
sorry for the moment.
Peter Wemm [Wed, 7 May 2003 23:49:24 +0000 (23:49 +0000)]
Turn off alloca.S - it cannot possibly work like this since on AMD64, gcc
doesn't use stack frames. It uses offsets relative to %rsp, not %rbp. So
we cannot just change %rsp like this.
Paul Saab [Wed, 7 May 2003 21:51:13 +0000 (21:51 +0000)]
- Change the full Asic revision defines to CHIPID to better since the
ASIC revision is really the major number of the CHIPID. Also store
the chipid, asic rev and chip revision in the softc for later use.
- The write twice to send producer index workaround only applies to
the 5700_BX chips, so only do it there.
Requested by: jdp
- Do not initalize the LED's to 0x00. The default configuration
the chip comes up in should yeild proper operation of the LED's.
Confirmed by: John Cagle <john.cagle@hp.com>
Hiten Pandya [Wed, 7 May 2003 19:37:51 +0000 (19:37 +0000)]
Bring the dumpon(8) man page closer to reality:
- dumpon utility has not used kern.dumpdev sysctl
since rev. 1.14 (sbin/dumpon/dumpon.c) when phk@
updated it to use the DIOCSKERNELDUMP ioctl [1]
- remove obsolete reference to sysctl(3)
While I am there, fix two style nits:
- use .Nm instead of `dumpon'
- change NOTES to IMPLEMENTATION NOTES, to bring
it in line with recommended section headings in
mdoc(7)
Original patch by: Martin Faxer <gmh003532brfmasthugget.se> [1]
PR: docs/39293
Approved and Reviewed by: des (mentor), re (scottl, bmah)
Kirk McKusick [Wed, 7 May 2003 18:27:09 +0000 (18:27 +0000)]
Dump is hard-wired to believe that it can read disks on
1024-byte boundaries. For many years this was a reasonable
assumption. However, in recent years we have begun seeing
devices with 2048-byte sectors. These devices return errors
when dump tries to read starting in the middle of a sector
or when it tries to read only the first half of a sector.
Rather than change the native block size used by dump (and
thus create an incompatible dump format), this fix checks
for transfer requests that start and/or end on a non-sector
boundary. When such a read is detected, the new code reads
the entire sector and copies out just the part that dump
needs.
Reviewed by: Poul-Henning Kamp <phk@critter.freebsd.dk>
Approved by: re (John Baldwin <jhb@FreeBSD.org>)
Sponsored by: DARPA & NAI Labs.
Robert Watson [Wed, 7 May 2003 17:49:24 +0000 (17:49 +0000)]
Clean up locking for the MAC Framework:
(1) Accept that we're now going to use mutexes, so don't attempt
to avoid treating them as mutexes. This cleans up locking
accessor function names some.
(2) Rename variables to _mtx, _cv, _count, simplifying the naming.
(3) Add a new form of the _busy() primitive that conditionally
makes the list busy: if there are entries on the list, bump
the busy count. If there are no entries, don't bump the busy
count. Return a boolean indicating whether or not the busy
count was bumped.
(4) Break mac_policy_list into two lists: one with the same name
holding dynamic policies, and a new list, mac_static_policy_list,
which holds policies loaded before mac_late and without the
unload flag set. The static list may be accessed without
holding the busy count, since it can't change at run-time.
(5) In general, prefer making the list busy conditionally, meaning
we pay only one mutex lock per entry point if all modules are
on the static list, rather than two (since we don't have to
lower the busy count when we're done with the framework). For
systems running just Biba or MLS, this will halve the mutex
accesses in the network stack, and may offer a substantial
performance benefits.
(6) Lay the groundwork for a dynamic-free kernel option which
eliminates all locking associated with dynamically loaded or
unloaded policies, for pre-configured systems requiring
maximum performance but less run-time flexibility.
These changes have been running for a few weeks on MAC development
branch systems.
Robert Watson [Wed, 7 May 2003 05:26:27 +0000 (05:26 +0000)]
Correct a bug introduced with reduced TCP state handling; make
sure that the MAC label on TCP responses during TIMEWAIT is
properly set from either the socket (if available), or the mbuf
that it's responding to.
Unfortunately, this is made somewhat difficult by the TCP code,
as tcp_twstart() calls tcp_twrespond() after discarding the socket
but without a reference to the mbuf that causes the "response".
Passing both the socket and the mbuf works arounds this--eventually
it might be good to make sure the mbuf always gets passed in in
"response" scenarios but working through this provided to
complicate things too much.
Robert Watson [Tue, 6 May 2003 20:34:04 +0000 (20:34 +0000)]
Trim a call to mac_create_mbuf_from_mbuf() since m_tag meta-data
copying for mbuf headers now works properly in m_dup_pkthdr(), so
we don't need to do an explicit copy.
Don't call timeout() in sis_tick(), this is done earlier by mii_tick(), and it
leads to a panic at unload time, as we own 2 instances of callout and
untimeout() only one.
Will I'm there, remove a call to callout_handler_init(), one is enough.
Doug Barton [Tue, 6 May 2003 01:10:33 +0000 (01:10 +0000)]
Allow users to configure stuff in /dev once again by re-doing the devfs
script to read /etc/devfs.conf, and take appropriate actions based on
what it finds there.
The (commented out) examples in the new devfs.conf file are taken in
part from the old rc.devfs script.
Fix age_old_log checking so that it will notice log files which were
rotated and then compressed with bzip2 instead of gzip. Otherwise,
any file which had a time-interval specified for 'when' and also
specified the 'J' flag would be rotated every time newsyslog was run.
(this is a quick-fix, trying to beat the code-freeze for 5.1-release)
Doug Barton [Mon, 5 May 2003 22:10:14 +0000 (22:10 +0000)]
* Add the nut port from the IANA list (for the nut port)
* Add the rndc port, by common usage (TCP only since rndc doesn't
use UDP, and the port is not officially assigned)
Doug Barton [Mon, 5 May 2003 21:37:43 +0000 (21:37 +0000)]
Add traditional BSD names (sio[0-3]) to the finger-friendly com[1-4]
entries so that you can do things like 'tip sio1' without having
to remember the DOS equivalent.
John Baldwin [Mon, 5 May 2003 21:12:36 +0000 (21:12 +0000)]
Remove TD_ON_RUNQ() from a check to make sure Giant is not held when
calling mi_switch(). The kernel would panic on an earlier KASSERT() in
mi_switch() if TD_ON_RUNQ() was true.