Clean up this new manual page. This delta includes content and
whitespace changes, which should not be a problem because this
is only the second revision of the file and translators are
unlikely to have gotten started yet.
Don't take a failure to stat a file to mean that it doesn't exist, as it may
be a dynamically created file, e.g. a tarball on servers that support sending
tarballs of directories.
Matt Jacob [Tue, 18 Jul 2000 07:05:37 +0000 (07:05 +0000)]
If debugging set, zero out an incoming response entry
when we're done reading it (makes checking things easier).
Before calling isp_notify_ack make sure we're at RUNSTATE-
elsewise we can be responding to LIPs or SCSI bus resets
before we've finished some of the wiring.
Matt Jacob [Tue, 18 Jul 2000 06:58:28 +0000 (06:58 +0000)]
Add a isp_target_putback_atio- we aren't using CCINCR at this time, so
we need a function that tells the Qlogic f/w that a target mode command
is done, so increase the resource count for that lun. Add in a timeout
function to kick the putback again if we fail to do it the first time (we
may not have the request queue space for ATIO push). Split the function
isp_handle_platform_ctio into two parts so that the timeout function for
the ATIO push or isp_handle_platform_ctio can inform CAM that the requested
CTIO(s) are now done.
Clean up (cough) residual handling. What we need for Fibre Channel
is to preserve the at_datalen field from the original incoming ATIO
so we can calculate a 'true' residual. Unfortunately, we're not
guaranteed to get that back from CAM. We'll *try* to find it hiding
in the periph_priv field (layering violation)- but if an ATIO was
passed in from user land- forget it. This means that we'll probably
get residuals wrong for Fibre Channel commands we're completing
with an error. It's too late to 4.1 release to fix this- too bad.
Luckily the only device we'd really care about this occurring on
is a tape device and they're still so rare as FC attached devices
that this can be considered an untested combination anyway.
Remove all CCINCR usage (resource autoreplenish). When we've proved
to ourself that things are working properly, we can add it back
in.
Make sure we propage 'suggested' sense data from the incoming ATIO
into the created system ATIO- and set sense_len appropriately.
Correctly propagate tag values.
Fall back to the model of generating (well, the functions in isp_pci.c
do the work) multiple CTIOs based upon what we get from XPT. Instead
of being able to pair Qlogic generated ATIOs with CAM ATIOs, and then
to pair CAM CTIOs with Qlogic CTIOs, we have to take the CTIO passed
to us from XPT, and if it implies that we have to generate extra
Qlogic CTIOs, so be it. This means that we have to wait until the
last CTIO in a sequence we generated completes before calling xpt_done.
Executive summary- target mode actually now pretty much works well
enough to tell folks about.
Peter Wemm [Tue, 18 Jul 2000 06:08:27 +0000 (06:08 +0000)]
Patch up some bogons in the resource_find() vs resource_find_hard()
interfaces. The original resource_find() returned a pointer to an internal
resource table entry. resource_find_hard() dereferences the actual
passed in value (oops!) - effectively trashing random memory due to
the pointer being passed in with a random initial value.
Matt Jacob [Tue, 18 Jul 2000 04:39:36 +0000 (04:39 +0000)]
Don't get stuck in a loop calling exit from an atexit routine. Clean
up cam_fill_ctio usage to passed atio flags. Clear periph_priv area
of new ctio so if the kernel is dumb enough to look at them (this is
a SECURITY hole) the panic will be obvious instead of subtle.
Rearrange / rewrite large portions of fetch() to take advantage of new
libfetch features (fetchRestartCalls, fetchXGet()).
Since it doesn't make much sense to have m_flag and r_flag set at the same
time, and it can actually cause trouble in some cases, die if they're both
set.
Set the SA_RESETHAND flag for SIGINT so that when we've caught one, we can
kill ourselves with a second SIGINT (thus notifying our parent of our tragic
fate) instead of just exiting.
These changes fix several problems that would show up when fetching ports,
as well as speeding up HTTP transfers quite a bit (at least for relatively
small files).
Most of these changes were prompted by an interaction problem with an HTTP
server called SWS-1.0, which exhibited two bugs, the first of which prevented
fetch from working around the second (the first was not sending content-type
in reply to HEAD requests, the second was sending garbage after the end of
the requested file).
Introduce fetchXGet*(), which combine the functionalities of fetchGet*() and
fetchStat*(). In most cases, either fetchGet*() or fetchXGet*() is a wrapper
around the other; in all cases, calling fetchGet*() is identical to calling
fetchXGet*() with the second argument set to NULL.
Don't forget to set file descriptor to -1 after closing it, since the code
outside the loop inspects it to determine whether or not we succeeded in
retrieving the requested document. This fixes a bug where fetchGetHTTP()
would return a FILE with an invalid file descriptor if it hit the redirect
limit without locating the requested document.
Introduce the (undocumented) variable fetchRestartCalls, which controls whether
or not interrupted system calls will be restarted. This fixes a bug where
fetch(1) would hang (potentially forever) if a server stopped responding,
because the signal handler would absorb the user's efforts to interrupt the
transfer.
John Baldwin [Mon, 17 Jul 2000 19:51:42 +0000 (19:51 +0000)]
- Don't try to free mboot.bootinst before it has been allocated. If, for
some reason, mboot.bootinst is not initialized to NULL at the beginning
of the program, then the last commit to this would try to free whatever
bogus address is in it.
- Restore the behavior of free()'ing the mboot.bootinst buffer after we
abuse it to determine the sector size of the disk (as clearly noted in
the comments). Properly fix the double free() bug by setting the pointer
to NULL after we free it.
John Baldwin [Mon, 17 Jul 2000 19:39:50 +0000 (19:39 +0000)]
Oops. Remove some debugging code used to display a hexdump of the sector
we just loaded from the disk. The code to call it was commented out, and
it easily fit into the extra sector, but remove it anyway as it is
unneeded.
Nick Hibma [Mon, 17 Jul 2000 19:28:29 +0000 (19:28 +0000)]
The modem driver for Communication Device Class, ACM compliant devices.
There is a number of devices that are compliant, of which the 3Com 5605 is
has been verified to work.
The driver is not perfect yet, but should be able to get you somewhere.
The driver was originally written by Lennart Augustsson, but Mike Smith
and Mike Meyer <mwm@mired.org> did the porting.
Bill Paul [Mon, 17 Jul 2000 19:27:41 +0000 (19:27 +0000)]
Add the PCI IDs for the Macronix 98727 and 98732 parts. These are
3.3volt PCI/cardbus chipsets similar to the 98715 (and they have
512-bit hash tables). Also update the man page to mention the 98727/98732
and the SOHOware SFA110A Rev B4 card with the 98715AEC-C chip.
John Polstra [Mon, 17 Jul 2000 17:18:13 +0000 (17:18 +0000)]
Fix a bug which could cause programs with user threads packages to
lock against themselves, causing infinite spinning. Brian Feldman
found this problem when testing with Mozilla and supplied the fix,
which I have revised slightly.
Here is the failure scenario. A thread calls dlopen() and acquires
the writer lock. While the thread still holds the lock, a signal
is delivered and caught. The signal handler tries to call a function
which hasn't been bound yet. It thus enters the dynamic linker
and tries to acquire the reader lock. Since the writer lock is
already held, it will spin forever in the signal handler. The
thread holding the lock won't be able to progress and release the
lock.
The solution is to block almost all signals while holding the
exclusive lock.
A similar problem could conceivably occur in the opposite order.
Namely, a thread is holding the reader lock and then a signal
handler calls dlopen() or dlclose() and spins waiting for the writer
lock. We deal with this administratively by proclaiming that signal
handlers aren't allowed to call dlopen() or dlclose(). Actually
we don't have to proclaim a thing, since signal handlers aren't
allowed to call any system functions except those which are explicitly
permitted.
Jonathan Lemon [Mon, 17 Jul 2000 17:06:04 +0000 (17:06 +0000)]
This is `liloboot', which creates a file which can be treated like a
Linux kernel image, and is designed to be dropped into a Linux system
and booted via LILO. Once booted, the user is greeted by the FreeBSD
loader. This still isn't quite complete, as the the root= specification
from LILO isn't currently passed to the loader yet.
Mark Murray [Mon, 17 Jul 2000 12:23:04 +0000 (12:23 +0000)]
Add randomness write functionality. This does absolutely nothing for
entropy estimation, but causes an immediate reseed after the input
(read in sizeof(u_int64_t) chunks) is "harvested".
This will be used in the reboot "reseeder", coming in another
commit. This can be used very effectively at any time you think
your randomness is compromised; something like
* Order options in the SYNOPSIS correctly.
* Re-order the list of options in teh DESCRIPTION as per
the SYNOPSIS.
* Move the description of exit conditions from the
DESCRIPTION section to a new DIAGNOSTICS section.
* Typo fix: "effect" -> "affect" when used as a verb.
* Clear the Nm macro as appropriate.
* Typo fix: "consider" -> "considers" for a singular subject.
* Use Nx instead of NetBSD.
Matt Jacob [Mon, 17 Jul 2000 01:45:51 +0000 (01:45 +0000)]
Preserve CAM_DIS_DISCONNECT as passed up from SIM (like
CAM_TAG_ACTION_VALID and CAM_DIR_MASK). Remove redundant
CAM_DEBUG line. Spiff up CAM_DEBUG printout for commands
and move the printout up to the top where we can see it,
even for the pending_ua/pending_ca cass. Add missing
newline in a CAM_DEBUG.
Matt Jacob [Mon, 17 Jul 2000 00:43:47 +0000 (00:43 +0000)]
Whoops- forgot to commit this other pearl from Justin- only set or
clear CAM_TAG_ACTION_VALID if this is an XPT_SCSI_IO CCB (otherwise,
the peripheral driver knows best...)..
Obtained from:gibbs@freebsd.org
Matt Jacob [Mon, 17 Jul 2000 00:34:52 +0000 (00:34 +0000)]
Roll back target mode f/w to 7.55- 7.65 hangs when presented with a
non-disconnecting command. Interestingly enough, of the other flavors
of the 7.65 f/w (the dual-id and multi-id flavor)- the dual-id doesn't
hang (they're also supposed to be the same except for supporting dual
or multi-id capture!), but other things are questionable as well.
Ben Smithurst [Sun, 16 Jul 2000 20:46:43 +0000 (20:46 +0000)]
1. "braces" -> "brackets" when referring to [ and ].
PR: 19894
Submitted by: Tony Finch <dot@dotat.at>
2. "brackets" -> "angle brackets" when referring to < and >.
3. Clean up the bit about creating the usage() message. After clarifying a
couple of points the sentence became rather long, and rather poor English, so
it was converted to a enumerated list instead.
PCCard entry cleanup:
- Remove unit numbers in config lines.
- Remove all of logger lines and add logstr lines for some cards. This
changes reduced file size from 84k to 45k.
- Use '/sbin/ifconfig $device delete' instead of /etc/pccard_ether_remove
which haven't merge from PAO yet.
- Cosmetic changes.
Nick Hibma [Sun, 16 Jul 2000 17:28:01 +0000 (17:28 +0000)]
And another buffer overflow. Maybe next time I should read the manpage for
strlen.
This one only occurs if there is exactly one element on the line without any
whitespace. This is however never a valid line, so not a big chance that
this would ever cause any problems.
s/IPSEC_IPV6FWD/IPSEC/. this avoids unexpected behavior on ipv6 fowarding.
(even if you ask for tunnel-mode encryption packets will go out in clear)
sync with kame.
Revert back to original mtree default behaviour to not follow symlinks, to be
compatible with other *BSD camp. Add -L option to follow symlinks, so remove
-P option which is now default. The next step will be to add -L to building
process.
David E. O'Brien [Sun, 16 Jul 2000 06:32:28 +0000 (06:32 +0000)]
Squeeze the BOOTMFS kernel image some more. The Alpha kernel was simply
over flowing its britches. So remove all ppbus bits except those for PLIP
(untested), and all USB bits as SRM does not know what USB is. Also remove
/dev/random as I don't think we need it just for whacking bits onto a disk.
Warner Losh [Sun, 16 Jul 2000 06:00:40 +0000 (06:00 +0000)]
Take jdp's excellent message to -current about the internat crypto
files and put it in my freebsd web area. Rewrite the entry in
UPDATING to point to it the message and hopefully not confuse people
like the old one did.
Peter Wemm [Sun, 16 Jul 2000 05:53:14 +0000 (05:53 +0000)]
Forced commit. This is to try and help folks that used the international
crypto repo and have slightly different files but with the same version.
cvsup in 'checkout mode' has no trouble with this, but cvs can get really
silly about it.
Simplify the F_GETOWN and F_SETOWN fcntl commands. The workaround
is not needed since the FreeBSD native implementation switched
from TIOC{G|S}PGRP to FIO{G|S}ETOWN (kern_descrip.c rev 1.55).
PR: 16946
Submitted by: Victor Salaman <salaman@teknos.com>