Commit Graph

109796 Commits

Author SHA1 Message Date
Poul-Henning Kamp
fdcef74733 Dump current status of battery as well.
The -i code doesn't really belong here in the first place I would think,
but keep it together for now.
2004-11-24 12:49:39 +00:00
Søren Schmidt
39c7a710c6 Return ATA register values in the request struct when ATAREQUEST returns. 2004-11-24 10:47:26 +00:00
Maxime Henrion
f89336da41 Fix a typo in an error message.
Spotted by:	ceri
2004-11-24 10:44:39 +00:00
Daniel Hartmeier
1a4a376387 fix a bug that leads to a crash when binat rules of the form
'binat from ... to ... -> (if)' are used, where the interface
is dynamic.

Discovered by:	kos(at)bastard(dot)net
Analyzed by:	Pyun YongHyeon
Approved by:	mlaier (mentor)
MFC after:	1 week
2004-11-24 00:43:34 +00:00
Robert Watson
de30ea131f In tcp_reass(), assert the inpcb lock on the passed tcpcb, since the
contents of the tcpcb are read and modified in volume.

In tcp_input(), replace th comparison with 0 with a comparison with
NULL.

At the 'findpcb', 'dropafterack', and 'dropwithreset' labels in
tcp_input(), assert 'headlocked'.  Try to improve consistency between
various assertions regarding headlocked to be more informative.

MFC after:	2 weeks
2004-11-23 23:41:20 +00:00
Robert Watson
6237419d5c Assign if_broadcastaddr to NULL not 0 in if_attach().
Printf() a warning if if_attachdomain() is called more than once on an
  interface to generate some noise on mailing lists when this occurs.

Fix up style in if_start(), where spaces crept in instead of tabs at
some point.

MFC after:	1 week
MFC note:	Not the printf().
2004-11-23 23:31:33 +00:00
Robert Watson
a13aca1a8e When printing a stack trace for a thread, also print the pid and tid.
When a series of traces is included in a bug report, this will make it
easier to tie the trace information back to ps or threads output,
each of which will show the pid or the tid, but usually not both.
2004-11-23 23:11:47 +00:00
Robert Watson
2afce774e7 When printing information on the current thread, such as when entering
DDB, also print the pid of the process if present.  Since much
debugging still centers around processes, having the pid is quite
helpful.
2004-11-23 23:07:12 +00:00
Garrett Wollman
0c4cafead9 Add a `-m month' flag to provide a more convenient interface for
displaying a calendar for a specific month of the current year than
`cal $(date +"%Y") month'.  A few minor code cleanups.  Set WARNS=1.
(This code is WARNS=5 clean except for "`O' modifier used with `%B'
strftime format", which is legal in FreeBSD but GCC doesn't know about.)

MFC after:	1 week
2004-11-23 22:57:17 +00:00
John Baldwin
2dacd5d401 - Remove some no longer used constants.
- Sort function prototypes.
2004-11-23 22:30:03 +00:00
John Baldwin
5e1ba6d4ae Rework the ACPI PCI link code.
- Use a new-bus device driver for the ACPI PCI link devices.  The devices
  are called pci_linkX.  The driver includes suspend/resume support so that
  the ACPI bridge drivers no longer have to poke the links to get them
  to handle suspend/resume.  Also, the code to handle which IRQs a link is
  routed to and choosing an IRQ when a link is not already routed is all
  contained in the link driver.  The PCI bridge drivers now ask the link
  driver which IRQ to use once they determine that a _PRT entry does not
  use a hardwired interrupt number.
- The new link driver includes support for multiple IRQ resources per
  link device as well as preserving any non-IRQ resources when adjusting
  the IRQ that a link is routed to.
- The entire approach to routing when using a link device is now
  link-centric rather than pci bus/device/pin specific.  Thus, when
  using a tunable to override the default IRQ settings, one now uses
  a single tunable to route an entire link rather than routing a single
  device that uses the link (which has great foot-shooting potential if
  the user tries to route the same link to two different IRQs using two
  different pci bus/device/pin hints).  For example, to adjust the IRQ
  that \_SB_.LNKA uses, one would set 'hw.pci.link.LNKA.irq=10' from the
  loader.
- As a side effect of having the link driver, unused link devices will now
  be disabled when they are probed.
- The algorithm for choosing an IRQ for a link that doesn't already have an
  IRQ assigned is now much closer to the one used in $PIR routing.  When a
  link is routed via an ISA IRQ, only known-good IRQs that the BIOS has
  already used are used for routing instead of using probabilities to
  guess at which IRQs are probably not used by an ISA device.  One change
  from $PIR is that the SCI is always considered a viable ISA IRQ, so that
  if the BIOS does not setup any IRQs the kernel will degenerate to routing
  all interrupts over the SCI.  For non ISA IRQs, interrupts are picked
  from the possible pool using a simplistic weighting algorithm.

Tested by:	ru, scottl, others on acpi@
Reviewed by:	njl
2004-11-23 22:26:44 +00:00
Robert Watson
436cac68e6 Correct a bug introduced in sys_pipe.c:1.179: in pipe_ioctl(),
release the pipe mutex before calling fsetown(), as fsetown()
may block.  The sigio code protects the pipe sigio data using
its own mutex, and the pipe reference count held by the caller
will prevent the pipe from being prematurely garbage-collected.

Discovered by:	imp
2004-11-23 22:15:08 +00:00
John Baldwin
3f40c36312 Fix a cpuid mismatch from the recent cpuid rototill in Alpha: boot_cpu_id
is a PAL ID, while PCPU_GET(cpuid) is a FreeBSD CPU ID.  The FreeBSD CPU
ID of the BSP is always zero, so use that to see which CPU should run the
full clock functions.
2004-11-23 22:11:53 +00:00
Maxime Henrion
d4d8b79704 Implement per-jail fstab(5) files. Here's a rc.conf sample using
this feature for a jail named foo :

jail_foo_mount_enable="YES"
jail_foo_fstab="/etc/fstab.foo"

The second line is actually useless, since the code defaults to
using "/etc/fstab.$jailname" as the fstab file if none is specified.

MFC after:	3 days
Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
2004-11-23 20:09:58 +00:00
Marcel Moolenaar
21321a3432 This file was repocopied to src/sys/boot/ia64/efi. 2004-11-23 18:55:24 +00:00
Robert Watson
cce83ffb5a tcp_timewait() performs multiple non-atomic reads on the tcptw
structure, so assert the inpcb lock associated with the tcptw.
Also assert the tcbinfo lock, as tcp_timewait() may call
tcp_twclose() or tcp_2msl_rest(), which require it.  Since
tcp_timewait() is already called with that lock from tcp_input(),
this doesn't change current locking, merely documents reasons for
it.

In tcp_twstart(), assert the tcbinfo lock, as tcp_timer_2msl_rest()
is called, which requires that lock.

In tcp_twclose(), assert the tcbinfo lock, as tcp_timer_2msl_stop()
is called, which requires that lock.

Document the locking strategy for the time wait queues in tcp_timer.c,
which consists of protecting the time wait queues in the same manner
as the tcbinfo structure (using the tcbinfo lock).

In tcp_timer_2msl_reset(), assert the tcbinfo lock, as the time wait
queues are modified.

In tcp_timer_2msl_stop(), assert the tcbinfo lock, as the time wait
queues may be modified.

In tcp_timer_2msl_tw(), assert the tcbinfo lock, as the time wait
queues may be modified.

MFC after:	2 weeks
2004-11-23 17:21:30 +00:00
Robert Watson
b42ff86e73 De-spl tcp_slowtimo; tcp_maxidle assignment is subject to possible
but unlikely races that could be corrected by having tcp_keepcnt
and tcp_keepintvl modifications go through handler functions via
sysctl, but probably is not worth doing.  Updates to multiple
sysctls within evaluation of a single addition are unlikely.

Annotate that tcp_canceltimers() is currently unused.

De-spl tcp_timer_delack().

De-spl tcp_timer_2msl().

MFC after:	2 weeks
2004-11-23 16:45:07 +00:00
Olivier Houchard
25a252899e Implement a dummy atomic_cmpset_32(). It should be safe to use it in rtld as
the signals are masked anyway.
2004-11-23 16:32:34 +00:00
Olivier Houchard
a27952c1a9 Enable interrupts as soon as the pending interrupts have been masked. 2004-11-23 16:31:16 +00:00
Olivier Houchard
6054abc495 Use ns8250. 2004-11-23 16:30:50 +00:00
Robert Watson
7258e91f0f Assert the inpcb lock in tcp_twstart(), which does both read-modify-write
on the tcpcb, but also calls into tcp_close() and tcp_twrespond().

Annotate that tcp_twrecycleable() requires the inpcb lock because it does
a series of non-atomic reads of the tcpcb, but is currently called
without the inpcb lock by the caller.  This is a bug.

Assert the inpcb lock in tcp_twclose() as it performs a read-modify-write
of the timewait structure/inpcb, and calls in_pcbdetach() which requires
the lock.

Assert the inpcb lock in tcp_twrespond(), as it performs multiple
non-atomic reads of the tcptw and inpcb structures, as well as calling
mac_create_mbuf_from_inpcb(), tcpip_fillheaders(), which require the
inpcb lock.

MFC after:	2 weeks
2004-11-23 16:23:13 +00:00
Robert Watson
8263bab34d Assert inpcb lock in tcp_quench(), tcp_drop_syn_sent(), tcp_mtudisc(),
and tcp_drop(), due to read-modify-write of TCP state variables.

MFC after:	2 weeks
2004-11-23 16:06:15 +00:00
Robert Watson
8438db0f59 Assert the tcbinfo write lock in tcp_new_isn(), as the tcbinfo lock
protects access to the ISN state variables.

Acquire the tcbinfo write lock in tcp_isn_tick() to synchronize
timer-driven isn bumping.

Staticize internal ISN variables since they're not used outside of
tcp_subr.c.

MFC after:	2 weeks
2004-11-23 15:59:43 +00:00
Gleb Smirnoff
a1cc90233c Add missed 'the'.
Submitted by:	ru
2004-11-23 12:54:44 +00:00
Gleb Smirnoff
75272f1cf7 Document new changes:
- how node listens to flow control messages
- how node sends flow control messages

Reviewed by:	ru
MFC after:	1 week
2004-11-23 12:27:09 +00:00
Pawel Jakub Dawidek
a17dd95f14 - Add missing Giant drop before acquiring the topology lock.
- Move DROP_GIANT()/PICKUP_GIANT() to g_gate_ioctl().
2004-11-23 11:18:26 +00:00
Simon L. B. Nielsen
e034d09527 Bump documentation date for last commit, before I get poked by ru
for forgetting it.
2004-11-23 10:56:45 +00:00
Simon L. B. Nielsen
bf54f484df Add Dell PERC 4e/Di and Dell PERC 4e/Si to the list of supported
devices.

Submitted by:	Muthu_T@Dell.com
MFC after:	3 days
2004-11-23 10:47:08 +00:00
Gleb Smirnoff
28b24b7b1a Netgraph flow control: change interface status when node receive
LINK_IS_UP/LINK_IS_DOWN messages.

Approved by:	julian (mentor), implicitly
MFC after:	1 week
2004-11-23 09:48:13 +00:00
Gleb Smirnoff
129353b81c Introduce new failure detection algorithm, called NG_ONE2MANY_FAIL_NOTIFY.
It means, that node listens to flow control messages from downstreams
and removes link from list of active links whenever a LINK_IS_DOWN message
is received. If LINK_IS_UP message is received, then links is put
back into list of active links.

Approved by:	julian (mentor), implicitly
MFC after:	1 week
2004-11-23 09:45:47 +00:00
Gleb Smirnoff
ea9a9044b1 o Use ng_timeout() instead of timeout(9).
o Implement some netgraph flow control:
- Whenever status of HDLC heartbeat from pear is timed out,
  send NGM_LINK_IS_DOWN message.
- If HDLC link changes status from down to up, send
  NGM_LINK_IS_UP message.

Approved by:	julian (mentor), implicitly
MFC after:	1 week
2004-11-23 09:30:27 +00:00
Ruslan Ermilov
d938e8d640 Hopefully fix the "aicasm" build-tool issue when using ${KERNSRCDIR}
different from ${.CURDIR}.

Reported by:	jhb
2004-11-23 09:09:47 +00:00
Marcel Moolenaar
7cb1eb1b27 Unhook the loader subdirectory. The ia64 EFI loader is now build
under ../ia64/efi.
2004-11-23 06:04:51 +00:00
Marcel Moolenaar
25cd518860 Hookup the efi subdirectory. 2004-11-23 06:03:03 +00:00
Marcel Moolenaar
9bf99aadf9 This file was repocopied from src/sys/boot/efi/loader.
Updated for the new build location.
2004-11-23 06:02:03 +00:00
Marcel Moolenaar
5b1f181a89 Visit the efi subdirectory before we visit the machine-specific
subdirectory so that the library built there can be used by the
machine specific boot code.
2004-11-23 05:52:00 +00:00
Marcel Moolenaar
f9f47c6e1c This file was repocopied from src/sys/boot/efi/arch/ia64. 2004-11-23 05:38:30 +00:00
Marcel Moolenaar
9c7d032c8b This file was repocopied from src/sys/boot/efi/loader. 2004-11-23 05:37:47 +00:00
Warner Losh
685e700261 It appears that 'kbd' device has never been used and isn't needed.
Build tests show that this isn't used for GENERIC or LINT, and nobody
seemed to know why they existed.
2004-11-23 00:00:43 +00:00
Olivier Houchard
df6f945b94 Add arm/mem.c. 2004-11-22 22:20:50 +00:00
Joerg Wunsch
466bc517d1 [Sorry, forgot to commit my source changes in my previous commit.]
Document all options and general usage.

Implement the -a option to bump the annotation_level.  This improves
the Emacs gud behaviour.  You can now supply the following function

(defun gud-gdb-massage-args (file args) (cons "-a" args))

(e.g. by evaluating it from the *scratch* buffer) and get the normal
jump to the source window when browsing the stack.

We should probably eventually supply our own kgdb submode to gud.el.
2004-11-22 16:08:19 +00:00
Joerg Wunsch
fa632bb17f Document all options and general usage.
Implement the -a option to bump the annotation_level.  This improves
the Emacs gud behaviour.  You can now supply the following function

(defun gud-gdb-massage-args (file args) (cons "-a" args))

(e.g. by evaluating it from the *scratch* buffer) and get the normal
jump to the source window when browsing the stack.

We should probably eventually supply our own kgdb submode to gud.el.
2004-11-22 16:07:28 +00:00
Hartmut Brandt
d96b4f0130 Get rid of the shell table sentinel. It isn't needed anymore because
JobMatchShell returns NULL when no shell name matches since revision 1.51.
2004-11-22 15:45:57 +00:00
Joerg Wunsch
05127e036e Fix the abuse of Ar macros for designating flag options, use Fl instead. 2004-11-22 15:43:46 +00:00
Robert Watson
ca127a3e80 Remove "Unlocked read" annotations associated with previously unlocked
use of socket buffer fields in the TCP input code.  These references
are now protected by use of the receive socket buffer lock.

MFC after:	1 week
2004-11-22 13:16:27 +00:00
Yaroslav Tykhiy
ebd83647a4 When looking for a virtual host to handle the connection,
stop the search on the first match for efficiency.

Submitted by:	Nick Leuta
2004-11-22 11:10:04 +00:00
Yaroslav Tykhiy
4cbc4ad644 Calling pam_chauthtok() isn't really needed since
an FTP user has no chance to change password anyway.

Submitted by:	Nick Leuta
2004-11-22 11:02:42 +00:00
Yaroslav Tykhiy
e897216f45 Don't log the chroot dir on every command since it's constant for a session.
Log it once at the beginning of the session instead.  OTOH, log wd each
time for the sake of better auditing and consistent log format.

Proposed by:	Nick Leuta <skynick -at- mail.sc.ru>
2004-11-22 10:48:29 +00:00
Yaroslav Tykhiy
7cdd3cb70b Always log remote IP.
PR:		bin/59773
2004-11-22 10:27:16 +00:00
Yaroslav Tykhiy
04683b2c35 Treat host name buffers consistently. 2004-11-22 10:16:43 +00:00