julian [Tue, 27 Feb 2001 16:39:54 +0000 (16:39 +0000)]
Do it right this time. Give it a better name and place
CVSrepo deletion of the previous attempt will be requested:
--original message--
Add the 'virtual nulmodem driver'
Particularly useful for debuging kernels using vmware.
If your name is Bruce evans and you are a WIZ at tty interfaces,
then you should probably rip this to shreds and offer lots of suggestions and
patches. I've been using this since 4.0-CURRENT and it's never caused
problems but I'm sure I got something wrong. This is similar to the pty/cty
device driver except that both sides are ttys. Even minor numbers
are side A and odd minor numbers are side B.
Work needs to be done regarding what happens to the other side when you
close a node.
to use with vmware, configure vmware to redirect COM2 out to side A of one
of these and boot a kernel with teh gdb remote port set to sio1.
AFTER dropping into the gdb kernel debugger in your test kernel,
fire up gdb with it's remote port pointing at the appropriate side B.
To catch all console output, you can boot the vmware kernel with a serial
console, (COM1) similarly redirected to a nulmodem, and use 'tip' to observe it.
This is practically unaltered since pre 4.0 days except for
changes made along the way needed to make it compile, so any suggestions
or offers of total rewrites will be listenned to :-)
ache [Tue, 27 Feb 2001 14:42:19 +0000 (14:42 +0000)]
Use formula with better random distribution for rand()
Even better formula from random() could not be intetgrated because rand_r()
supposed to store its state in the single variable (but table needed for
random() algorithm integration).
kris [Tue, 27 Feb 2001 11:21:47 +0000 (11:21 +0000)]
Add definitions and support for the AMD k6-2, Pentium MMX (i586/MMX),
and Pentium II, III and IV processors (p2, p3, p4), as well as 'mmx' and
'3dnow' MACHINE_CPU tags as appropriate. In the near future this will
be used to control various ports which have MMX/3dNow optimizations,
instead of the ad-hoc methods currently used.
billf [Tue, 27 Feb 2001 10:20:44 +0000 (10:20 +0000)]
The TCP header-specific section suffered a little bit of bitrot recently:
When we recieve a fragmented TCP packet (other than the first) we can't
extract header information (we don't have state to reference). In a rather
unelegant fashion we just move on and assume a non-match.
Recent additions to the TCP header-specific section of the code neglected
to add the logic to the fragment code so in those cases the match was
assumed to be positive and those parts of the rule (which should have
resulted in a non-match/continue) were instead skipped (which means
the processing of the rule continued even though it had already not
matched).
Fault can be spread out over Rich Steenbergen (tcpoptions) and myself
(tcp{seq,ack,win}).
rwatson sent me a patch that got me thinking about this whole situation
(but what I'm committing / this description is mine so don't blame him).
sobomax [Tue, 27 Feb 2001 09:00:18 +0000 (09:00 +0000)]
- Merge recently added into pkg_info(1) regex/glob matching functionality into
pkg_delete(1) as well;
- add a new `-a' option for pkg_delete(1) to delete all installed packages;
- add a new `-i' option for pkg_delete(1) to request simple rm(1)-like
interactive confirmation before attempting to delete each package.
cg [Tue, 27 Feb 2001 07:45:09 +0000 (07:45 +0000)]
add functions for sound drivers to use for locking and setting up interrupt
handlers. these are not yet used, but will allow compatibility for driver
modules from 5.x to 4.x.
peter [Tue, 27 Feb 2001 07:39:12 +0000 (07:39 +0000)]
"Document" the COMPAT_LINUX and IBCS2 ABI emulation support together
rather than in silly places like "VFS Cluster debugging". People
should really be using COMPAT_LINUX instead of the linux module on
dynamic systems like -current.
peter [Tue, 27 Feb 2001 01:05:25 +0000 (01:05 +0000)]
Disable the mutex locking calls. These do not work in their present form
as the code calls the usb stack (which can sleep) while holding the driver
lock. This leads to a deadlock.
mjacob [Tue, 27 Feb 2001 00:14:39 +0000 (00:14 +0000)]
Fix at2_entry_t to reflect what the firmware actually writes (instead
of just deriving from SCSI at_entry_t). In this case, there is no
'suggested sense' for FC cards.
jake [Mon, 26 Feb 2001 23:27:35 +0000 (23:27 +0000)]
Initialize native priority to PRI_MAX. It was usually 0 which made a
process's priority go through the roof when it released a (contested)
mutex. Only set the native priority in mtx_lock if hasn't already
been set.
wpaul [Mon, 26 Feb 2001 22:23:55 +0000 (22:23 +0000)]
Workaround to prevent VMware from melting down. The pseudo PCnet interface
in VMware reports 0x00000000 in the PCI subsystem ID register, but
0x10001000 when you read the mirror registers in I/O space. This causes
pcn_probe() to think it's found a card in 32-bit mode, and performing
a 32-bit I/O access makes on a 16-bit port makes VMware go boom. Special
case the 0x10001000 value until somebody at VMware grows a clue.
jlemon [Mon, 26 Feb 2001 21:33:55 +0000 (21:33 +0000)]
Use more aggressive retransmit timeouts for the initial SYN packet.
As we currently drop the connection after 4 retransmits + 2 ICMP errors,
this allows initial connection attempts to be dropped much faster.
jlemon [Mon, 26 Feb 2001 21:19:47 +0000 (21:19 +0000)]
Remove in_pcbnotify and use in_pcblookup_hash to find the cb directly.
For TCP, verify that the sequence number in the ICMP packet falls within
the tcp receive window before performing any actions indicated by the
icmp packet.
Clean up some layering violations (access to tcp internals from in_pcb)
jhb [Mon, 26 Feb 2001 20:36:56 +0000 (20:36 +0000)]
- Use a loop to read consecutive bytes from the embedded controller to
handle read and write requests for widths of multiple bytes. This
can be used to read 16-bit battery status registers for example.
- Remove some unused variables and #if 0'd debugging cruft.
- Don't complain about a GPE query that fails due to AE_NOT_FOUND if the
query method was _Q00.
jhb [Mon, 26 Feb 2001 20:32:18 +0000 (20:32 +0000)]
When ensuring the destination buffer is truncated for a string obtained
from a BIF, use the size of the destinatino buffer, not the length of the
string to determine where to put the nul char. As a side effect, the
old code would truncate the string by one character while it was possibly
overflowing the buffer.
asmodai [Mon, 26 Feb 2001 20:10:16 +0000 (20:10 +0000)]
Remove struct full_tcpiphdr{}.
This piece of code has not been referenced since it was put there
in 1995. Also done a codebased search on popular networking libraries
and third-party applications. This is an orphan.
non [Mon, 26 Feb 2001 12:26:29 +0000 (12:26 +0000)]
o Check the size of I/O window handed by parent bus.
o Allocate memory mapped by pcic even when not used for ncv.
This is for PC-Cards which needs offset, because I/O space should not be
used by other devices.
julian [Mon, 26 Feb 2001 09:55:02 +0000 (09:55 +0000)]
take major number 18 for the nmdm "nullmodem" back-to-back tty device.
Incredibally useful for debugging kernels using vmware.
Vmware com1 is diverted to one side, and gdb listens to the other side.
viola.. instant debugging sandbox on one system.
alfred [Mon, 26 Feb 2001 09:07:55 +0000 (09:07 +0000)]
Santize a size variable passed to kernel malloc.
Since we know there's always an upper bound we force that bound,
otherwise users can cause a panic via malloc getting hit with a
odd (huge or negative) amount of memory to allocate.
Tested by: kris
Pointed out by: Andrey Valyaev <dron@infosec.ru>
tanimura [Mon, 26 Feb 2001 07:36:24 +0000 (07:36 +0000)]
- Mutexify midi(4). The driver runs under the giant lock by default.
If you ever want to run midi(4) out of the giant lock, uncomment
MIDI_OUTOFGIANT in midi.h. Confirmed to work for csamidi with WITNESS
and INVARIANTS.
- midi_info, midi_open and seq_info are now tailqs, allowing arbitrary
numbers of devices to be configured.
- Do not send an active sensing message to reset midi modules.
- Clone /dev/sequencer*. /dev/sequencer0 and /dev/sequencer are generated
upon initialization.
jlemon [Mon, 26 Feb 2001 04:16:19 +0000 (04:16 +0000)]
Document various changes to kq:
- new EV_SET macro,
- NOTE_LOWAT option for low water marks on read/write filters,
- NOTE_REVOKE for filesystem unmounting (and revoke() calls)
- improved API for EVFILT_AIO
kris [Mon, 26 Feb 2001 03:41:13 +0000 (03:41 +0000)]
More IP option length validation.
Includes the following revisions from KAME (two of these were actually
committed previously but the CVS revisions weren't documented):
msmith [Sun, 25 Feb 2001 22:48:34 +0000 (22:48 +0000)]
Major update and bugfix for the 'mly' driver.
- Convert to a more efficient queueing implementation.
- Don't allocate command buffers on the fly; simply work from a
static pool.
- Add a control device interface, for later use.
- Handle controller overload better as a consequence of the
improved queue implementation.
- Add support for the XPT_GET_TRAN_SETTINGS ccb, and correctly
set the virtual SCSI channels up for multiple outstanding I/Os.
- Update copyrights for 2001.
- Some whitespace fixes to improve readability.
Due to a misunderstanding on my part, previous versions of the
driver were limited to a single outstanding I/O per virtual drive.
Needless to say, this update improves performance substantially.
kris [Sun, 25 Feb 2001 21:42:12 +0000 (21:42 +0000)]
Update the list of OpenSSL manpages (now contains many more describing
libssl, for example), and hide it behind a make.conf option,
WANT_OPENSSL_MANPAGES, instead of having it commented out. We still can't
install these by default because of clobbering of a number of system
manpages with the same name, but they're there for people who want them.
gj [Sun, 25 Feb 2001 19:52:42 +0000 (19:52 +0000)]
Use vsnprintf in logmsg() to avoid overflowing the array on the stack.
The problem was noted with an older model 3Com 3C589 which seems
to return more than 256 bytes of data.
These patches are the original work of Randell Jesup, and
I believe Matt Dillon, with additional work by Warner Losh.
Please let me know if I've left someone out.
Incorporated into this is the fix for PR bin/22727.
This patchset still has style issues and a possible problem on
large disks. However, it was a agreed to get these committed before
performing major surgery on them.
jlemon [Sun, 25 Feb 2001 15:17:24 +0000 (15:17 +0000)]
Do not delay a new ack if there already is a delayed ack pending on the
connection, but send it immediately. Prior to this change, it was possible
to delay a delayed-ack for multiple times, resulting in degraded TCP
behavior in certain corner cases.
non [Sun, 25 Feb 2001 12:40:30 +0000 (12:40 +0000)]
o Support AUTO SENSE correctly.
o Offset and period in synch messages and width negotiation should be
done for per target not per lun. Move these from *lun_info to
*targ_info.
o Change in handling XPT_RESET_DEV and XPT_GET_TRAN_SETTINGS .
o Change CAM_* xpt_done return values.
o Busy loop did not timeout. Change this to timeout as original NetBSD/pc98.
peter [Sun, 25 Feb 2001 07:51:19 +0000 (07:51 +0000)]
genassym.sh does not work with a.out because the sizes are rounded up
by the compiler. ie: char foo[0] comes out as 4 bytes on a.out, and
we depended on it coming out as 0 for the script version. :-(
Make double sure that genassym.o is built and nm'ed in elf mode.
(ia64 skipped since it is stuck on the linux toolchain and doesn't
understand the -elf switches)