Commit Graph

126961 Commits

Author SHA1 Message Date
emax
01d5e88001 Make op parameter to mux_keyboard() u_int instead of int.
This should fix sparc64 messages like

Sep 15 11:17:39 peahi kernel: WARNING pid 5477 (kbdcontrol): ioctl sign-extension ioctl ffffffff80244b45

PR:		sparc64/96798
MFC after:	1 week
2006-09-15 18:41:12 +00:00
pjd
556424a17a Add 'show geom [addr]' ddb(4) command, which prints entire GEOM topology if
no additional argument is given or details about the given GEOM object
(class, geom, provider or consumer).

Approved by:	phk
2006-09-15 16:36:45 +00:00
andre
e168227ed2 When doing TSO subtract hdrlen from TCP_MAXWIN to prevent ip->ip_len
from wrapping when we generate a maximally sized packet for later
segmentation.

Noticed by:	gallatin
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-09-15 16:08:09 +00:00
ru
8daf570879 Make it possible to set a larger MTU by attempting to set MTUs on all
trunk ports first.  If that succeeds, and we're inside our own bounds,
so be it.

Still not ideal -- adding a port after changing an MTU doesn't change
port's MTU, but a step in the right direction.

PR:		kern/95417
Submitted by:	Vladimir Ivanov <wawa AT yandex-team DOT ru>
MFC after:	3 days

I've slightly edited a patch to make the conditional logic positive
and remove (what I think was) a redundant ng_fec_init() call.
2006-09-15 16:06:27 +00:00
ru
7accf1bc73 SIOCSIFFLAGS doesn't require an argument in kernel land; instead, flags
are supposed to be set directly in ifnet already.  This change fixes a
panic when ng_eiface node is attached to ng_fec node and the latter is
shut down (ng_fec sets flags and then calls SIOCSIFFLAGS with a NULL
argument).

MFC after:	3 days
2006-09-15 15:53:09 +00:00
gallatin
4647503ce7 - Added TSO support. This entailed increasing the number of send descriptors
in the transmit busdma tag, so I moved the segment list off the
stack.

- Fixed transmit routine to ensure it doesn't read past the end
of an mbuf when parsing headers.

- Corrected handling of odd length segments.  Setting MXGEFW_FLAGS_ALIGN_ODD
is required only when offloading the checksum of that frame.

Sponsored by: Myricom Inc.
2006-09-15 15:41:28 +00:00
glebius
c9a02b4657 - Consistently use if_printf() only in interface methods: if_start(),
if_watchdog, etc., or in functions used only in these methods.
  In all other functions in the driver use device_printf().
- Use __func__ instead of typing function name.

Submitted by:	Alex Lyashkov <umka sevcity.net>
2006-09-15 15:16:12 +00:00
des
22cf0fa876 Reject user with names that are longer than OPIE is willing to deal with;
otherwise OPIE will happily truncate it.

Spotted by:	ghelmer
MFC after:	2 weeks
2006-09-15 13:42:38 +00:00
ru
e62cd4548c Initial memory allocation for fields was off-by-one.
PR:		bin/100443
MFC after:	3 days
2006-09-15 13:33:32 +00:00
ru
a2c9c25cbe Don't require a space between -[fv] and its argument.
PR:		bin/86514
MFC after:	3 days
2006-09-15 13:28:10 +00:00
ru
cc9d8c9568 Whitespace nits. 2006-09-15 11:01:23 +00:00
pjd
8277c8e2a4 Less magic.
MFC after:	3 days
2006-09-15 10:44:55 +00:00
glebius
aeb9aeaa73 Consistently use if_printf() only in interface methods: if_start,
if_ioctl, if_watchdog, etc, or in functions that are used by
these methods only. In all other cases use device_printf().

This also fixes several panics, when if_printf() is called before
softc->ifp was initialized.

Submitted by:	Alex Lyashkov <umka sevcity.net>
2006-09-15 10:40:54 +00:00
ru
6b78b3a81d Remove vestiges of GNU tar. 2006-09-15 08:04:23 +00:00
imp
35f71d316f A TARGET_CPU_DEFAULT of xscale for arm results in illegal instructions
during buildworld.  Comment it out for now.
2006-09-15 05:21:06 +00:00
sos
9e400dc518 If current_heads or current_sectors in the disk cap page are zero, dont try to use the current_ geometry.
This avoids a panic with BIOS'n that sets these to zero.
2006-09-14 19:12:29 +00:00
mohans
a569229408 Fix for a potential bug caught by Coverity. Pointed out to me by Kris Kennaway. 2006-09-14 17:57:02 +00:00
des
8ba1360ee0 Fix markup snafu.
Spotted by:	ru
2006-09-14 13:47:55 +00:00
ache
ce4ed61a69 Add missing #ifdef INET6 (can't be compiled) 2006-09-14 10:22:35 +00:00
ru
c58b7af845 Removed T/TCP bits. 2006-09-14 08:36:53 +00:00
imp
2ad94565b4 Remove redundant default vector
Submitted by: ru@
2006-09-14 08:21:20 +00:00
imp
ccf269aef7 Add cross debug support to arm.
Submitted by: cognet@
2006-09-14 07:51:52 +00:00
imp
b39fe59680 fix the build: add missing end of line cont character 2006-09-14 07:48:16 +00:00
imp
75f1f3b6a1 scripts for the arm port.
Submitted by: cognet@
Reviewed by: obrien and kan
2006-09-14 07:46:32 +00:00
imp
77431c17db Fix the build and minor cleanup. 2006-09-14 07:44:05 +00:00
imp
0be173e15e .end -> .endif 2006-09-14 07:02:17 +00:00
imp
01cb50b4e4 Architecture specific portions of gdb for arm.
Submitted by: cognet@
2006-09-14 06:49:34 +00:00
imp
9fed87cdab Config file for arm assembler 2006-09-14 06:39:07 +00:00
imp
68381de49c TARGET_BIG_ENDIAN isn't appropriate here. __ARMEB__ is sufficient and
besides, TARGET_BIG_ENDIAN isn't defined anyway.
2006-09-14 06:36:13 +00:00
charnier
5543d83186 initialize unitialized variables (WARNS=6) 2006-09-14 04:45:44 +00:00
jmg
140b3626da Only treat positive values as errors...
Pointed out by:	wsk
Message-ID: <45060FC4.2090308@gddsn.org.cn>
2006-09-14 03:47:59 +00:00
obrien
eb84049d81 When building WITHOUT_ASSERT_DEBUG, we need to disable -Werror as its easy
to see "warning: unused variable `foo'".
2006-09-13 23:27:21 +00:00
jhb
9dd4326763 Correct include path. 2006-09-13 21:11:13 +00:00
joel
4d276cbac6 Remove reference to T/TCP.
Reviewed by:	andre
2006-09-13 19:48:00 +00:00
jhb
f0700e1491 intpm(4) meet style(9). style(9) meet intpm(4). 2006-09-13 18:56:39 +00:00
mohans
21daa650a9 Fixes up the handling of shared vnode lock lookups in the NFS client,
adds a FS type specific flag indicating that the FS supports shared
vnode lock lookups, adds some logic in vfs_lookup.c to test this flag
and set lock flags appropriately.

- amd on 6.x is a non-starter (without this change). Using amd under
  heavy load results in a deadlock (with cascading vnode locks all the
  way to the root) very quickly.
- This change should also fix the more general problem of cascading
  vnode deadlocks when an NFS server goes down.

Ideally, we wouldn't need these changes, as enabling shared vnode lock
lookups globally would work. Unfortunately, UFS, for example isn't
ready for shared vnode lock lookups, crashing pretty quickly.

This change is the result of discussions with Stephan Uphoff (ups@).

Reviewed by:	ups@
2006-09-13 18:39:09 +00:00
joel
e751eb9832 Bump .Dd.
Noticed by:	danger
2006-09-13 18:34:32 +00:00
joel
e532d7ce17 Remove references to the pam(8) manual page. It does not exist.
Requested by:	novel
Discussed with:	brueffer, simon
2006-09-13 17:46:20 +00:00
scottl
ae1ca6fd73 Introduce a spinlock for synchronizing access to the video output hardware
in syscons.  This replaces a simple access semaphore that was assumed to be
protected by Giant but often was not.  If two threads that were otherwise
SMP-safe called printf at the same time, there was a high likelyhood that
the semaphore would get corrupted and result in a permanently frozen video
console.  This is similar to what is already done in the serial console
drivers.
2006-09-13 15:48:15 +00:00
csjp
3927aa4474 Back out one of the Giant removals from revision 1.272. Giant was not here to
protect the vnode, it was present to synchronize access to TTY session
information between exit(2) and the TTY code. While we are here, note that
Giant is required for TTY protection.

Clue from:	bde
Discussed with:	jhb
MFC after:	1 week
2006-09-13 15:47:53 +00:00
glebius
ef665c74ec Fix markup bug in last commit.
Submitted by:	ru
2006-09-13 15:47:26 +00:00
pjd
610c4b7a06 Fix synchronization in gmirror and graid3 which I broken. Synchronization
request can still have bio_to set to sc_provider (this is READ part of a
synchronization request) and in this case g_{mirror,raid3}_sync() wasn't
called as it should be.

MFC after:	1 week
2006-09-13 15:46:49 +00:00
glebius
2264a48ff4 Document net.inet.tcp.maxtcptw and net.inet.tcp.nolocaltimewait.
Wording by:	Devon O'Dell
2006-09-13 15:24:27 +00:00
andre
fc2dc7ce4e Remove unessary includes and follow common ordering style. 2006-09-13 13:21:17 +00:00
andre
b859d7a1c9 Rewrite of TCP syncookies to remove locking requirements and to enhance
functionality:

 - Remove a rwlock aquisition/release per generated syncookie.  Locking
   is now integrated with the bucket row locking of syncache itself and
   syncookies no longer add any additional lock overhead.
 - Syncookie secrets are different for and stored per syncache buck row.
   Secrets expire after 16 seconds and are reseeded on-demand.
 - The computational overhead for syncookie generation and verification
   is one MD5 hash computation as before.
 - Syncache can be turned off and run with syncookies only by setting the
   sysctl net.inet.tcp.syncookies_only=1.

This implementation extends the orginal idea and first implementation
of FreeBSD by using not only the initial sequence number field to store
information but also the timestamp field if present.  This way we can
keep track of the entire state we need to know to recreate the session in
its original form.  Almost all TCP speakers implement RFC1323 timestamps
these days.  For those that do not we still have to live with the known
shortcomings of the ISN only SYN cookies.  The use of the timestamp field
causes the timestamps to be randomized if syncookies are enabled.

The idea of SYN cookies is to encode and include all necessary information
about the connection setup state within the SYN-ACK we send back and thus
to get along without keeping any local state until the ACK to the SYN-ACK
arrives (if ever).  Everything we need to know should be available from
the information we encoded in the SYN-ACK.

A detailed description of the inner working of the syncookies mechanism
is included in the comments in tcp_syncache.c.

Reviewed by:	silby (slightly earlier version)
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-09-13 13:08:27 +00:00
ru
33d6440a5a - Change the example CFLAGS entry to match our default in sys.mk.
- Document that -fno-strict-aliasing is required for -O2.

Prodded by:	users of stable@
2006-09-13 10:20:56 +00:00
scottl
bee41c3ee3 Remove duplicated code. Declare functions non-static that shouldn't be
inlined.
2006-09-13 09:35:59 +00:00
rwatson
bd76450bdb dd a series of regression tests to validate that privilege requirements are
implemented properly for a number of kernel subsystems.  In general, they
try to exercise the privilege first as the root user, then as a test user,
in order to determine when privilege is being checked.

Currently, these tests do not compare inside/outside jail, and probably
should be enhanced to do that.

Sponsored by:	nCircle Network Security, Inc.
Obtained from:	TrustedBSD Project
2006-09-13 09:05:39 +00:00
pjd
166e57c29a Fix a lock leak in an error case.
Reported by:	netchild
Reviewed by:	rwatson
2006-09-13 06:58:40 +00:00
charnier
2318032d41 initialize variable (WARNS=6) 2006-09-13 05:06:12 +00:00