Commit Graph

123881 Commits

Author SHA1 Message Date
Joe Marcus Clarke
a7a6dfbd14 Go with a different version of the previous patch so to preserve errno.
Approved by:	scottl (implicit)
2006-04-30 07:08:43 +00:00
Joe Marcus Clarke
8bc181f506 Fix a file descriptor leak in cam_lookup_pass() when the ioctl to find
the passthru device fails.

Approved by:	scottl
MFC after:	1 day
2006-04-30 07:02:40 +00:00
Scott Long
1b355c2dc7 Document sysinstall's limitation on operating on mounted disks. 2006-04-30 06:28:29 +00:00
Bruce Evans
43f2757a27 If DEBUG is defined, then fill numeric fields with asterisks instead of
spaces and numbers for temporary(?) debugging.
2006-04-30 05:54:21 +00:00
Hiroki Sato
e1300711b8 New release notes:
bfe(4) + >1GB RAM problem fixed.
2006-04-30 05:22:43 +00:00
Bruce Evans
a9a3dcd64f Remove trailing whitespace.
Submitted by:	Se=E1n Farley <sean-freebsd at farley dot org>
PR:		bin/81874
2006-04-30 04:47:23 +00:00
Bruce Evans
8aa22952a9 Show the load average in the tcp display (it was already shown, perhaps
not very usefully, in all other displays).  This was the original point
of the PR.

Move the load average up by 2 so that it starts in row 0 for all windows
(2 lines above it were wasted for all other windows except vmstat).
Move everything below it up by 2 or 3 (3 for icmp and icmp6 which had
an extra blank line due from not compensating for the foot-shooting in
note (3); only ip and ip6 compensated).  Reduce the magic numbers related
to this.

Notes by the submitter:
%%%
1. All the subwin() calls are identical using #define MAINWIN_ROW 3
    (systat.h).
2. The load average is at the top of the window.
3. Each display starts on the fourth line.  I made changes to those
    displays that shifted the start line (i.e., icmp).  This entailed a
    lot of changes within the comments at the top of those displays.
4. For ip6, I shifted the "Input next-header histogram" column down one
    row to separate it from "IPv6 Output".  I raised "bad scope packets"
    and "address selection failed" up one row to stay with "IPv6 Input"
    (valid?).  They were down one row to probably line up at the bottom,
    but I think they should stick with their fellow items in a column.
5. I condensed ifstat a bit.  It had a lot of empty rows.
%%%

Submitted by:	Se=E1n Farley <sean-freebsd at farley dot org>
PR:		bin/81874
2006-04-30 04:26:46 +00:00
Tom Rhodes
ef48b7b7e6 Reword a sentence modified in my previous commit. This new one is probably
better.

Hinted by:	ceri
2006-04-30 01:53:57 +00:00
Bruce Evans
4545c62547 Edit the interrupt name strings to shorten them. This is believed to
only affect amd64 and i386.  alpha uses "intr N" instead of "irqN" and
mostly has no device names.  ia64 uses only device names.

- Edit interrupt names once after they are read from the kernel and not
  every time they are displayed.
- Discard bogus trailing spaces so that the next step doesn't move things
  to oblivion.
- If an interrupt name starts with "irqN:" (as it usually does in on
  amd64 and i386), then move "irqN" to the end and strip ":", since we
  have no space for the ":" and don't want to start descriptions with
  "N" after stripping "irq" in the next step (since "N" would look like
  a count).  This step may need reworking for interrupt names containing
  several device names -- then moving the irq number to the end would
  lose it instead of losing some device names.
- Remove "irq" from an interrupt name if and only if the original name is
  too long to display.
2006-04-30 01:39:46 +00:00
Bruce Evans
18d3a03e13 Backed out rev.1.49 since it had buffer overruns and only worked
accidentally.

Read buffer overruns:
The size of the target array (TSOTTA == 10) is a wrong limit to use for
scanning the source string.

Write buffer overruns:
TSOTTA is also a wrong limit to use for copying to the target buffer,
since we want to add a NUL terminator afterwards.  TSOTTA was also 1
too small for holding both the desired number of visible characters
and the NUL.

Worked accidentally:
There is error in the algorithm that tends to result in the space saved
by stripping "irq" not actually being used, but some cases worked
accidentally provided "irqN" is near the end of the source string and
"N" is only 1 digit.

Starting with 5.mumble-CURRENT, "irqN" is at the beginning of the
string on all (?) arches that have it and the accidents don't happen.
E.g. on i386's, the keyboard irq is now named
"irq1: atkbd0<bogus blank padding>" by the kernel, and this name was
converted to "1: atkb" -- not only the device number but part of the
device name has been lost --, while before 5.mumble the kernel name
was "atkbd0 irq1" and systat accidentally preserved the irq number to
give "atkbd0 1".  The ":" in the string wastes precious space, and
stripping "irq" results in descriptions starting with numbers which
makes them look too much like counts.  This commit just fixes the last
problem.
2006-04-30 00:50:08 +00:00
Pawel Jakub Dawidek
643df192de vn_start_write()/vn_finished_write() is not needed here, because
vn_start_write() is always called earlier in the code path and calling
the function recursively may lead to a deadlock.

Confirmed by:	tegge
MFC after:	2 weeks
2006-04-29 21:57:38 +00:00
Bruce Evans
e76bdda079 Abbreviate long field descriptors at write time so that they don't get
clobbered at runtime:
    dirtybuf -> dtbuf
    desiredvnodes -> desvn
    numvnodes -> numvn
    freevnodes -> frevn
The vmstats column has only 5 characters available for descriptors, but up
to 13 were used.  The extras get clobbered at runtime by interrupt values
and/or descriptors on systems with more than 12 interrupt sources.
    %slo-z -> %sloz
This one is in the "extended" vmstats area and doesn't get clobbered now.

Removed stale documentation of desvn.

Changed a descriptor:
    tfree -> totfr
so that it is consistent with the abbreviations for other free counts
(daefr and prcfr) and thus almost decodeable.

Fixed missing documentation of tfree/totfr.  This and everything else
in the extended vmstats area is misdocumented as being in a certain
place in the vmstats column.
2006-04-29 21:30:23 +00:00
Gordon Tetlow
55a5ff0140 Add auto upgrade capability to mergemaster.
An mtree description of all non-zero files that make
distribution installs (only size and md5) is built from the
temproot.  When the user completes a mergemaster run, the
mtree description file gets installed into /var/db for
safe-keeping.

When the user then decides to do a subsequent upgrade (with
the -U flag), the existing mtree description from /var/db
is called into service looking for files that are different in
DESTDIR. This is stashed away until a file that would normally
end up prompting the user to look at changes is encountered.
Since there are no user modified changes, the new file is
installed without bothering the user.

Looked at by:	dougb
MFC after:	6 weeks
2006-04-29 18:21:43 +00:00
Yoshihiro Takahashi
deff04b4f7 Fix the acpi.ko path for boot.flp.
PR:		misc/96466
Submitted by:	Nobuyuki Koganemaru
MFC after:	1 day
2006-04-29 14:03:17 +00:00
Stefan Farfeleder
692f35fd4c POSIX demands that set's output (when invoked without arguments) should be
sorted.  Sort the variables before printing.

PR:	96415
2006-04-29 12:57:53 +00:00
Matteo Riondato
50e31cbac8 Add curses ACS line graphics support for iso15 fonts
Now ncurses-based programs such as sysinstall and mc will display the
correct font for graphical lines instead of "-" and "+" characters.

Correct two special characters for cons25l1 in termcap: use real
arrows instead of ">>" and "<<".
Add a lot of additional symbols for line drawing which are taken from
the CP437 font.
Almost all of the ACS symbols are now implemented.

PR: conf/90082
Submitted by: Oliver Fromme <olli@secnetix.de>
MFC after:	1 week
2006-04-29 12:34:19 +00:00
Stefan Farfeleder
896229d920 Check the buffer size when copying the line returned by el_gets() into our
own buffer.  Interactively typing in long lines (>1023 characters)
previously overflowed the buffer.  Unlike the NetBSD people I don't see the
need to subtract 8 from BUFSIZ, so I just used BUFSIZ-1.

Obtained from:	NetBSD
PR:		91110
2006-04-29 10:29:10 +00:00
Kris Kennaway
cef31ff7d9 Lock giant when assigning ni_vp and keep vfslocked state valid.
Committed for:	jeff
2006-04-29 07:13:49 +00:00
Hajimu UMEMOTO
bda1fb2baf Oops, services should be compat by default for backward compatibility. 2006-04-29 06:39:07 +00:00
Andrew Thompson
7f87a57ca3 Add support for fragmenting ipv4 packets.
The packet filter may reassemble the ip fragments and return a packet that is
larger than the MTU of the sending interface. There is no check for DF or icmp
replies as we can only get a large packet to fragment by reassembling a
previous fragment, and this only happens after a call to pfil(9).

Obtained from:	OpenBSD (mostly)
Glanced at by:	mlaier
MFC after:	1 month
2006-04-29 05:37:25 +00:00
Hajimu UMEMOTO
de4bee5922 Add newly supported databases such as services, protocols and rpc
into generated nsswitch.conf.
2006-04-29 04:49:19 +00:00
Hajimu UMEMOTO
0e3a96aae0 English grammar fix in comment.
Submitted by:	keramida
2006-04-29 04:26:16 +00:00
Tom Rhodes
2fb5ab2f0c Follow FreeBSD mdoc(7) conventions:
- Remove hard sentence breaks;
- Avoid using double negatives or "sexist" language;
- Expand contractions;
- Remove a blank line;
- Some grammar changes.

Usually we do not "hard code" requests to submit bugs to the author, but
I will leave this go for now.
2006-04-29 01:34:03 +00:00
Andrew Thompson
93b23a8b16 Correct sentence, forwarding non IP packets is now an option. 2006-04-29 01:19:08 +00:00
Alan Cox
e9ba21a5bb Eliminate unnecessary, recursive acquisitions and releases of the page
queues lock by free_pv_entry() and pmap_remove_pages().

Reduce the scope of the page queues lock in pmap_remove_pages().
2006-04-29 00:59:15 +00:00
Giorgos Keramidas
b1cc10206c Typo. 2006-04-29 00:43:23 +00:00
Giorgos Keramidas
f4006aff16 Fix a couple of typos and other minor nits
Reviewed by:	rwatson
2006-04-28 23:21:36 +00:00
Giorgos Keramidas
9dc894b630 Minor improvements after last revision.
Reviewed by:	thompsa
2006-04-28 22:37:16 +00:00
Pawel Jakub Dawidek
122410eea2 vn_start_write() is called only when v_type != VCHR, so corresponding
vn_finished_write() should also be called only then.

BTW. I fixed two functions here: vn_rdwr() and vn_write(). The latter seems
to be unused.

MFC after:	3 weeks
2006-04-28 21:54:05 +00:00
Maxim Konovalov
64e16bf0e1 o Borrow from if_bridge.4: note that the bridge interface need to be upped.
PR:		docs/94545
Submitted by:	thompsa
2006-04-28 21:45:08 +00:00
Robert Watson
3bf14fd5e9 Also check use_pty in the ptmx clone lookup; this means that when ptmx
support is turned off using the sysctl, we no longer even allow the
ptmx device to be looked up.

Foot provided by:	peter
2006-04-28 21:39:57 +00:00
Marcel Moolenaar
8f405ed335 Remove the puc-specific hacks. The puc(4) driver now properly uses
the rman(9) interface.
2006-04-28 21:23:09 +00:00
Marcel Moolenaar
64220a7e28 Rewrite of puc(4). Significant changes are:
o  Properly use rman(9) to manage resources. This eliminates the
   need to puc-specific hacks to rman. It also allows devinfo(8)
   to be used to find out the specific assignment of resources to
   serial/parallel ports.
o  Compress the PCI device "database" by optimizing for the common
   case and to use a procedural interface to handle the exceptions.
   The procedural interface also generalizes the need to setup the
   hardware (program chipsets, program clock frequencies).
o  Eliminate the need for PUC_FASTINTR. Serdev devices are fast by
   default and non-serdev devices are handled by the bus.
o  Use the serdev I/F to collect interrupt status and to handle
   interrupts across ports in priority order.
o  Sync the PCI device configuration to include devices found in
   NetBSD and not yet merged to FreeBSD.
o  Add support for Quatech 2, 4 and 8 port UARTs.
o  Add support for a couple dozen Timedia serial cards as found
   in Linux.
2006-04-28 21:21:53 +00:00
John Baldwin
f088002825 The nvidia binary blob sometimes defers tx completion notification to the
OS dependent layer.  Thus, the watchdog timer can go off when the tx
engine is working fine but the OS dependent layer just hasn't been called
to cleanup finished tx transactions.  To workaround this, when the watchdog
fires, poke the binary blob to force it to flush any pending tx
completions.  If this drops the pending tx count to zero then just return
without logging a message or resetting the chip.

This reportedly fixes the 'device timeout()' errors with at least several
NF4 nve(4) parts.

Submitted by:	Nathan Alexander Whitehorn <nathanw@uchicago.edu> (code)
Submitted by:	dg (inspiration for comment and explanation)
MFC after:	1 week
2006-04-28 20:08:16 +00:00
Robert Watson
8a1f412960 Fix typo.
MFC after:	1 month
Submitted by:	Antoine Brodin <antoine dot brodin@laposte dot net>
2006-04-28 19:43:44 +00:00
Sam Leffler
ee25b8df01 Ensure outbound data packets in hostap mode are delivered only to
stations that are associated by making ieee80211_find_txnode return
NULL when a unicast frame is to be delivered to an unassociated
station.  This will be handled differently in the future but for
now putting the check here allows all drivers to immediately do
the right thing.

Reviewed by:	avatar
MFC after:	1 week
2006-04-28 19:06:15 +00:00
Peter Wemm
7eeda22793 Interim fix for pmap problems I introduced with my last commit.
Remove the code to dyanmically change the pv_entry limits.  Go back
to a single fixed kva reservation for pv entries, like was done
before when using the uma zone.  Go back to never freeing pages
back to the free pool after they are no longer used, just like
before.

This stops the lock order reversal due to aquiring the kernel map
lock while pmap was locked.

This fixes the recursive panic if invariants are enabled.

The problem was that allocating/freeing kva causes vm_map_entry
nodes to be allocated/freed.  That can recurse back into pmap as
new pages are hooked up to kvm and hence all the problem.
Allocating/freeing kva indirectly allocate/frees memory.

So, by going back to a single fixed size kva block and an index,
we avoid the recursion panics and the LOR.

The problem is that now with a linear block of kva, we have no
mechanism to track holes once pages are freed.  UMA has the same
problem when using custom object for a zone and a fixed reservation
of kva.  Simple solutions like having a bitmap would work, but would
be very inefficient when there are hundreds of thousands of bits
in the map.  A first-free pointer is similarly flawed because pages
can be freed at random and the first-free pointer would be rewinding
huge amounts.  If we could allocate memory for tree strucures or
an external freelist, that would work.  Except we cannot allocate/free
memory here because we cannot allocate/free address space to use
it in.  Anyway, my change here reverts back to the UMA behavior of
not freeing pages for now, thereby avoiding holes in the map.

ups@ had a truely evil idea that I'll investigate.  It should allow
freeing unused pages again by giving us a no-cost way to track the
holes in the kva block.  But in the meantime,  this should get people
booting with witness and/or invariants again.

Footnote: amd64 doesn't have this problem because of the direct map
access method.  I'd done all my witness/invariants testing there.  I'd
never considered that the harmless-looking kmem_alloc/kmem_free calls
would cause such a problem and it didn't show up on the boot test.
2006-04-28 19:05:08 +00:00
Marcel Moolenaar
a31f91a061 Implement the ipend() method of the serdev I/F. 2006-04-28 18:29:23 +00:00
Christian Brueffer
8a2f9e6c0f Minor wording and formatting fixes. 2006-04-28 13:12:40 +00:00
Pawel Jakub Dawidek
84edb86df6 - Don't hold the device sx lock when going to sleep.
- Prevent possible live-lock in case of memory problems by freeing
  already completed requests first.

Reported and tested by:	markus, Bradley W. Dutton <brad-fbsd-stable@duttonbros.com>
MFC after:		1 day
2006-04-28 12:18:03 +00:00
Pawel Jakub Dawidek
a2fe5c6676 - Remove dead code.
- Comment possible event miss, which isn't critical, but probably can be
  fixed by replacing the event lock usage with the queue lock.

MFC after:	2 weeks
2006-04-28 12:13:49 +00:00
Hajimu UMEMOTO
06a99fe36f - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Sponsored by:	Google Summer of Code 2005
2006-04-28 12:03:38 +00:00
Pawel Jakub Dawidek
18486a5ee3 Be sure to not destroy device twice. This is not possible in theory, but
with this change there is even no theoretical race.

MFC after:	2 weeks
2006-04-28 11:52:45 +00:00
Andrew Thompson
25bcdd36e4 - use ath(4) in the wireless examples rather than the aging wi(4)
- make the packet filtering its own section and clarify a few points
 - note that the interfaces need to be upped [1]

PR:	docs/94545 [1]
2006-04-28 11:48:53 +00:00
Pawel Jakub Dawidek
a063667622 Be sure to not destroy device twice. This is not possible in theory, but
with this change there is even no theoretical race.

MFC after:	2 weeks
2006-04-28 11:47:28 +00:00
Christian Brueffer
0f0449ed87 Autogenerate hardware notes for rr232x(4). 2006-04-28 10:45:28 +00:00
Robert Watson
dba9e9ccbf Add a basic man page for the sysctl(9) macro interfaces. Previously man
pages existed only for the dynamic sysctl interfaces.  There's probably
more complete and accurate content, better advice, etc, that could be added
here.

Per scottl's suggest, add a small piece of moralizing text regarding the
fact that sysctl names quickly get embedded in system configuration files,
libraries, third party applications, and even books, so renaming and
removing names after they've been published is a tricky issue.

MFC after:	1 month
2006-04-28 10:45:27 +00:00
Scott Long
4905491fe3 Add a section about locking protocol for busdma. 2006-04-28 08:36:49 +00:00
Christian Brueffer
1f013205ec Oops, forgot to remove the old entry in the last revision. 2006-04-28 06:23:42 +00:00
Christian Brueffer
dff1951e61 Install rr232x.4 only on i386 and amd64. 2006-04-28 06:13:19 +00:00