Commit graph

140232 commits

Author SHA1 Message Date
Alexander Motin b11e21ae80 According to in_pcb.h protocol binding information has double locking.
It allows access it while list travercing holding only global pcbinfo lock.
2008-07-27 20:30:34 +00:00
Alan Cox 35db2ce0dc Style fixes to several function definitions. 2008-07-27 18:18:50 +00:00
Alan Cox 91842e53a9 Enhance pmap_change_attr(). Use pmap_demote_pde() to demote a 2MB page
mapping to 4KB page mappings when the specified attribute change only
applies to a portion of the 2MB page.  Previously, in such cases,
pmap_change_attr() gave up and returned an error.

Submitted by:	Magesh Dhasayyan
2008-07-27 17:32:36 +00:00
Pawel Jakub Dawidek 5573021d78 Assert for exclusive vnode lock in vinactive(), vrecycle() and vgonel()
functions.

Reviewed by:	kib
2008-07-27 11:48:15 +00:00
Pawel Jakub Dawidek 610507ae00 - Move vp test for beeing NULL under IGNORE_LOCK().
- Check if panicstr isn't set, if it is ignore the lock. This helps to avoid
  confusion, because lockmgr is a no-op when panicstr isn't NULL, so
  asserting anything at this point doesn't make sense and can just race with
  other panic.

Discussed with:	kib
2008-07-27 11:46:42 +00:00
Julian Elischer 66e8505f4c Add the ability to add new addresses for interfacesto just one FIB
(Other more specific related options will follow)
This allows one to set multiple p2p links to the same place
and select which to use by having each in different FIBS.
2008-07-27 01:29:28 +00:00
Sam Leffler 693e312235 don't deauth a station because it sends a ps-poll w/ a bogus aid in it;
turns out some devices do this and since we otherwise validate the station
is associated and don't use the aid for anything being lenient here allows
them to function

Submitted by:	Chris Zimmermann
MFC after:	2 weeks
2008-07-26 23:50:27 +00:00
Alexander Motin e2ed8f3514 Increase UDBHASHSIZE from 16 to 128 items.
Previous value was chosen 10 years ago and not very effective now.
This change gives several percents speedup on 1000 L2TP mpd links.
2008-07-26 23:07:34 +00:00
Alexander Motin 0ca3b0967b According to in_pcb.h protocol binding information has double locking.
It allows access it while list travercing holding only global pcbinfo lock.
This relaxed locking noticably increses receive socket lookup performance.
2008-07-26 21:12:00 +00:00
Darren Reed 14fbef0c79 2020447 IPFilter's NAT can undo name server random port selection
(fix output port range, was a random number in [0,max-min]
	 (byteswapped on litle endian), instead of [min,max])

Submitted by:	darrenr
2008-07-26 19:46:00 +00:00
Warner Losh f1345f5393 Add a few clarifications to this man page. Also, add a table that
describes the minimum versions of each feature and each chipset type
supported by this driver.  Basically, unless you have a very modern
version of firmware on a Prism card, you won't be able to use these
cards for much on modern networks that have any kind of protection
enabled, except for the few WEP-only stranglers that appear at some
conferences...
2008-07-26 18:31:39 +00:00
Alexander Motin 9ed324c9a5 Add hash table lookup for a fully connected raw sockets.
This gives significant performance improvements when many raw sockets used.
Benchmarks of mpd handeling 1000 simultaneous PPTP connections show up to 50%
performance boost. With higher number of connections benefit becomes even
bigger. PopTop snd others should also get some benefits.
2008-07-26 17:32:15 +00:00
Simon L. B. Nielsen 1640935f0b - Fix mtree example so it works.
- Document --version.

Reviewed by:	kientzle
MFC after:	1 week
2008-07-26 17:22:40 +00:00
Warner Losh febcff0a3b Register the interrupt handler at the end of wi_attach rather than at
the beginning.  There's a race in the shared interrutp case.  If
another interrupt happens after the interrupt is setup, then we'd try
to lock an uninitialized mutex.  In addition, if we bailed out due to
a too old version of firmware, we'd leave the interrupt enabled with
all the fun that ensues....
2008-07-26 17:04:30 +00:00
Andrey A. Chernov b834665cd5 Return arc4_i = arc4_j = 0; line from previous backing out since
just found it in OpenBSD, see their sys/crypto/arc4.c, function
rc4_keysetup, line ctx->x = ctx->y = 0;

Obtained from:  OpenBSD
2008-07-26 16:42:45 +00:00
Andrey A. Chernov a08f0b20be Change arc4random to arc4random_uniform since modulo is not power of 2,
as OpenBSD does.

Obtained from:  OpenBSD
2008-07-26 15:46:39 +00:00
Andrey A. Chernov f90b161b21 Change 2 arc4random modulo operations to arc4random_uniform() as
OpenBSD does, since modulo is not power of 2.

Obtained from:  OpenBSD
2008-07-26 15:39:32 +00:00
Konstantin Belousov 89aa52d4db Note that snapshots may cause a panic on the full UFS filesystem.
Submitted by:	pho
MFC after:	3 days
2008-07-26 13:18:33 +00:00
Tom Rhodes be6b130476 Fill in a few sysctl descriptions.
Approved by:	rwatson
2008-07-26 00:55:35 +00:00
Tom Rhodes ad291f81da Fill in sysctl descriptions.
Approved by:	philip
2008-07-26 00:01:19 +00:00
Tom Rhodes c9fac982af Fill in BPF sysctl descriptions.
Reviewed by:	csjp
2008-07-25 23:58:09 +00:00
Tom Rhodes 7521cd74f6 Begin the sysctl descriptions with a capital letter.
Make some slight wording tweaks.
2008-07-25 23:54:07 +00:00
Brooks Davis d84c42924c Add support for a new login capability, cpumask which allows login
sessions to be pinned to cpus by login class.
2008-07-25 19:58:14 +00:00
Stanislav Sedov 32c5ce374b - Connect ds1339 to the build infrastructure.
Reviewed by:	raj
Approved by:	imp
2008-07-25 19:35:40 +00:00
Stanislav Sedov 8e3b2aab49 - Add driver for Dallas Semiconductor DS1339 RTC sitting
on I2C bus.

Reviewed by:	raj
Approved by:	imp
MFC after:	2 week
2008-07-25 19:34:44 +00:00
Andrey A. Chernov fff6495ea6 Per rwatson's request:
"If you don't get a review within a day or two, I would firmly recommend
backing out the changes"

back out all my changes as unreviewed by secteam@ yet.
2008-07-25 15:53:32 +00:00
Andrey A. Chernov 6a05bf3acf Per rwatson's request:
"If you don't get a review within a day or two, I would firmly recommend
backing out the changes"

back out all my changes, i.e. not comes from merging from OpenBSD as
unreviewed by secteam@ yet.
(OpenBSD changes stays in assumption they are reviewd by OpenBSD)

Yes, it means some old bugs returned, like not setted rs_stired = 1 in
arc4random_stir(3) causing double stirring.
2008-07-25 15:42:22 +00:00
Ed Schouten bea45cdda3 Move ttyinfo() into its own C file.
The ttyinfo() routine generates the fancy output when pressing ^T. Right
now it is stored in tty.c. In the MPSAFE TTY code it is already stored
in tty_info.c. To make integration of the MPSAFE TTY code a little
easier, take the same approach.

This makes the TTY code a little bit more readable, because having the
proc_*/thread_* routines in tty.c is very distractful.

Approved by:	philip (mentor)
2008-07-25 14:31:00 +00:00
Ed Schouten 4ab0b22f96 Remove <sgtty.h> now it has no practical usage.
When I turned sgtty into a binary-only interface (last month), I added
this explicit #error to the header file, to make sure nobody forgot to
remove the header file after updating world.

I think it is now a good moment to remove this header file.

Approved by:	philip (mentor)
2008-07-25 12:37:46 +00:00
Konstantin Belousov 58e8af1bf5 Call pargs_drop() unconditionally in do_execve(), the function correctly
handles the NULL argument.
Make pargs_free() static.

MFC after:	1 week
2008-07-25 11:55:32 +00:00
Konstantin Belousov 96f1567fa7 s/alredy/already/ in the comments and the log message. 2008-07-25 11:22:25 +00:00
Maxim Konovalov c5783846f6 o Trim whitespaces. 2008-07-25 09:30:53 +00:00
Maxim Konovalov 032e0bf850 o Fix grammar: see -> See. 2008-07-25 09:13:18 +00:00
Jeff Roberson d67023a155 - Provide kernelname as the name for process with P_KTHREAD set as
otherwise their textvp is NULL.

Reviewed by:	jkoshy
Sponsored by:	Nokia
2008-07-25 05:49:48 +00:00
Julian Elischer d12d2ae7a2 Fix cut-n-paste-o
Submitted by:	Kostik Belousov
2008-07-25 01:09:36 +00:00
Ivan Voras c7317f5bb0 Add tweak for AMD Geode "companion" chip, AMD CS5536, which is apparently
USB 2.0 capable but is shy and doesn't adwertise it much.

PR:		120017
Reviewed by:	imp
Approved by:	gnn (mentor)
MFC after:	2 weeks
2008-07-24 23:22:19 +00:00
Julian Elischer 7e4e65ffb3 Fix spelling error in comment 2008-07-24 19:05:58 +00:00
Julian Elischer c7d1bf0bd9 Note that setfib is not a terminal rule. 2008-07-24 18:39:36 +00:00
Julian Elischer c75a0d409a Switch to using the setfib syscall instead of a syscall(175,...) 2008-07-24 18:01:50 +00:00
Marius Strobl 85f57c4d48 Prefer the opt_global.h from KERNBUILDDIR if existent so we obtain all
macros that might be relevant.
2008-07-24 14:07:52 +00:00
Doug Rabson d3508f91ee Try again not to use a userspace pointer in the kernel when trying to record
the hostname which we need for NLM requests. The previous patch was incomplete.

PR:		125849
Pointy hat:	dfr
2008-07-24 14:02:03 +00:00
Doug Rabson db428b786c Don't use a userspace pointer in the kernel when trying to record the hostname
which we need for NLM requests.

PR:		125849
2008-07-24 13:42:28 +00:00
Darren Reed 52c7653383 2020447 IPFilter's NAT can undo name server random port selection
Approved by:	darrenr
MFC after:	1 week
Security:	CERT VU#521769
2008-07-24 12:35:05 +00:00
Ed Schouten 75ec42320d Don't include <sys/tty.h> in non-TTY drivers.
The kbd, kbdmux, ugen and uhid drivers included <sys/tty.h>, because
they needed clists, which have been moved to <sys/clist.h> some time
ago. In the MPSAFE TTY branch, <sys/tty.h> does not include
<sys/clist.h>, which means we have to teach these drivers to include
this header file directly.

Approved by:	philip (mentor, implicit)
2008-07-24 09:54:10 +00:00
Ed Schouten b377be43a5 Add TIOCPKT and TIOCSPTLCK to the Linuxolator.
We're very lucky, because the flags used by our TIOCPKT implementation
are the same as flags used by Linux. We can safely enable TIOCPKT,
assuming EXTPROC is not used.

TIOCSPTLCK is used by unlockpt(). Because we don't need unlockpt() in
our implementation, make this ioctl a no-op.

Approved by:	philip (mentor, implicit), rdivacky
Obtained from:	P4 (//depot/projects/mpsafetty/...)
2008-07-23 17:47:44 +00:00
Warner Losh c71665a590 Merge from p4:
Implement openssl config needed for mips.

Submitted by:	gonzo@
Reviewed by:	simon@
2008-07-23 17:38:33 +00:00
Roman Divacky 0864e2a4f1 Fix linux_alarm, the linux behaviour is to limit the
secs to INT_MAX when the passed in parameter is bigger
than INT_MAX.

Submitted by:	Dmitry Chagin <chagin.dmitry gmail com>
Approved by:	kib (mentor)
2008-07-23 17:19:02 +00:00
Dag-Erling Smørgrav a9337121a7 Remove a bunch of files we don't need to build OpenSSH. They are still
available in base/vendor-crypto/openssh/dist/.
2008-07-23 17:02:25 +00:00
Dag-Erling Smørgrav b39cb07cbc Remove debugging cruft. 2008-07-23 16:44:20 +00:00
Dag-Erling Smørgrav 75f31a5fe4 pjd@'s r180759 was intended to revert r180755 due to ipfilter breakage,
but removed too much, breaking the build in other places instead.  Now
that the ipfilter issue has been fixed (or hacked around), address the
second issue by restoring r180755, with one small change.  I don't feel
comfortable using assert(3) in a header that will be included in userland
code that may or may not already have an assertion mechanism in place,
so KASSERT() evaluates to a no-op in the !_KERNEL case.
2008-07-23 16:40:07 +00:00