Commit Graph

149321 Commits

Author SHA1 Message Date
Robert Watson
77dfcdc445 Rework global locks for interface list and index management, correcting
several critical bugs, including race conditions and lock order issues:

Replace the single rwlock, ifnet_lock, with two locks, an rwlock and an
sxlock.  Either can be held to stablize the lists and indexes, but both
are required to write.  This allows the list to be held stable in both
network interrupt contexts and sleepable user threads across sleeping
memory allocations or device driver interactions.  As before, writes to
the interface list must occur from sleepable contexts.

Reviewed by:	bz, julian
MFC after:	3 days
2009-08-23 20:40:19 +00:00
Ed Schouten
bfdaa52382 Allow pty(4) to be loaded as a kld.
Unfortunately, the wrappers that are present in pts(4) don't have the
mechanics to allow pty(4) to be unloaded safely, so I'm forcing this kld
to return EBUSY. This also means we have to enable some extra code in
pts(4) unconditionally.

Proposed by:	rwatson
2009-08-23 20:26:09 +00:00
Olivier Houchard
562c5c5bf0 No need to remove the same flag multiple times. 2009-08-23 19:54:36 +00:00
Doug Barton
6913541fe4 Prior to the dire warning about values of network_interfaces other than
AUTO the biggest mistake users made was leaving lo0 off the list. Since
lo0 is effectively mandatory, check for it and add it to the list if
it's not there.
2009-08-23 19:52:47 +00:00
Antoine Brodin
01318abc57 ObsoleteFiles.inc:
kthread_create(9) was resurrected as a mlink to kproc(9)
2009-08-23 18:28:58 +00:00
Ivan Voras
43ec3cc665 Remove (c) line.
Requested by:	pjd
Approved by:	gnn (mentor)
MFC after:	1 month
2009-08-23 18:15:13 +00:00
Hajimu UMEMOTO
d429d7201e - Add AS lookup functionality to traceroute6(8) as well.
- Support for IPv6 transport for AS lookup.
- Introduce $RA_SERVER to set whois server.
- Support for 4 byte ASN.
- ANSIfy function declaration in as.c.

Tested by:	IHANet folks.
2009-08-23 17:00:16 +00:00
Simon L. B. Nielsen
2f1ff7669c Merge DTLS fixes from vendor-crypto/openssl/dist:
- Fix memory consumption bug with "future epoch" DTLS records.
- Fix fragment handling memory leak.
- Do not access freed data structure.
- Fix DTLS fragment bug - out-of-sequence message handling which could
  result in NULL pointer dereference in
  dtls1_process_out_of_seq_message().

Note that this will not get FreeBSD Security Advisory as DTLS is
experimental in OpenSSL.

MFC after:	1 week
Security:	CVE-2009-1377 CVE-2009-1378 CVE-2009-1379 CVE-2009-1387
2009-08-23 16:29:47 +00:00
Sam Leffler
41fe1fab16 Enable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly
for it's unix domain socket.  Before this change wpa_cli would take
the first file in the directory that was not "." or "..".

Submitted by:	Brandon Gooch <jamesbrandongooch@gmail.com>
MFC after:	3 days
2009-08-23 16:04:10 +00:00
Robert Noland
e1ec1f53b1 Add GET_PARAM support for Z pipes.
This is needed for occulsion queries on rv530 chips.

MFC after:	2 weeks
2009-08-23 15:02:58 +00:00
Robert Noland
f588a0bda5 Add kernel support for Radeon R6/7xx 3D.
You will still need Mesa from git and possibly an updated DDX driver,
but this is working fairly well now.

MFC after:	2 weeks
2009-08-23 14:55:57 +00:00
Joseph Koshy
dd1259dafb Use a more appropriate choice of words.
Submitted by:	danfe
2009-08-23 14:48:25 +00:00
Simon L. B. Nielsen
f0c2a617df Import DTLS fix from upstream OpenSSL 0.9.8 branch:
Fix DTLS fragment bug - out-of-sequence message handling which could
result in NULL pointer dereference in
dtls1_process_out_of_seq_message().

Note that this will not get FreeBSD Security Advisory as DTLS is
experimental in OpenSSL.

Security:	CVE-2009-1387
Obtained from:	OpenSSL CVS
		http://cvs.openssl.org/chngview?cn=17958
2009-08-23 14:39:15 +00:00
Robert Noland
fe173b46fd Add a read only sysctl tracking the hw.drm.msi tunable.
MFC after:	2 weeks
2009-08-23 14:33:12 +00:00
Robert Noland
2418baa339 Clean up the handling of device minors
Submitted by:	Ed
MFC after:	2 weeks
2009-08-23 14:31:20 +00:00
Robert Noland
f21c255c2a Clean up the locking in drm_alloc_resource()
MFC after:	2 weeks
2009-08-23 14:27:46 +00:00
Simon L. B. Nielsen
58c74b7534 Import DTLS fix from upstream OpenSSL 0.9.8 branch:
Do not access freed data structure.

Note that this will not get FreeBSD Security Advisory as DTLS is
experimental in OpenSSL.

Security:	CVE-2009-1379
Obtained from:	OpenSSL CVS
		http://cvs.openssl.org/chngview?cn=18156
2009-08-23 14:15:28 +00:00
Simon L. B. Nielsen
f8f8fb827d Import DTLS fix from upstream OpenSSL 0.9.8 branch:
Fix fragment handling memory leak.

Note that this will not get FreeBSD Security Advisory as DTLS is
experimental in OpenSSL.

Security:	CVE-2009-1378
Obtained from:	OpenSSL CVS
		http://cvs.openssl.org/filediff?f=openssl/ssl/d1_both.c&v1=1.4.2.13&v2=1.4.2.15
2009-08-23 14:12:01 +00:00
Simon L. B. Nielsen
b7421a6928 Import DTLS fix from upstream OpenSSL 0.9.8 branch:
Fix memory consumption bug with "future epoch" DTLS records.

Note that this will not get FreeBSD Security Advisory as DTLS is
experimental in OpenSSL.

Security:	CVE-2009-1377
Obtained from:	OpenSSL CVS
		http://cvs.openssl.org/chngview?cn=18187
2009-08-23 13:58:25 +00:00
Konstantin Belousov
f2159cc790 Fix the conformance of poll(2) for sockets after r195423 by
returning POLLHUP instead of POLLIN for several cases. Now, the
tools/regression/poll results for FreeBSD are closer to that of the
Solaris and Linux.

Also, improve the POSIX conformance by explicitely clearing POLLOUT
when POLLHUP is reported in pollscan(), making the fix global.

Submitted by:	bde
Reviewed by:	rwatson
MFC after:	1 week
2009-08-23 12:44:15 +00:00
Ed Schouten
69eb6d71d0 Add support for diffs generated by Perforce.
It basically picks the filenames from the "====" line and strips off the
# revision number.
2009-08-23 12:23:24 +00:00
Pawel Jakub Dawidek
5d5535163a - Hide ZFS kernel threads under zfskern process.
- Use better (shorter) threads names:
	'zvol:worker zvol/tank/vol00' -> 'zvol tank/vol00'
	'vdev:worker da0' -> 'vdev da0'
2009-08-23 11:33:46 +00:00
Pawel Jakub Dawidek
4ec2b0e7ce Set priority of vdev_geom threads and zvol threads to PRIBIO. 2009-08-23 11:27:08 +00:00
Pawel Jakub Dawidek
1869987e42 - Give minclsyspri and maxclsyspri real values (consulted with kmacy).
- Honour 'pri' argument for thread_create().
2009-08-23 11:22:46 +00:00
Rui Paulo
3471c35ded Make dev.asmc.N.light.control writable by everyone.
Submitted by:	Patrick Lamaiziere <patfbsd at davenulle.org>
MFC after:	1 week
2009-08-23 09:58:06 +00:00
Rui Paulo
88579aa572 Constify prime numbers. 2009-08-23 09:55:06 +00:00
Julian Elischer
d3cef1d91e Fix another typo right next to the previous one, that amazingly, I did
not see before.

MFC after:	 1 week
2009-08-23 08:49:32 +00:00
Ed Schouten
5c67885a26 Add ttydisc_rint_simple().
I noticed several drivers in our tree don't actually care about parity
and framing, such as pts(4), snp(4) (and my partially finished console
driver). Instead of duplicating a lot of code, I think we'd better add a
utility function for those drivers to quickly process a buffer of input.

Also change pts(4) and snp(4) to use this function.
2009-08-23 08:04:40 +00:00
Julian Elischer
8f26c03fe6 Fix typo in comment that has been bugging me for days.
MFC after:	1 week
2009-08-23 07:59:28 +00:00
Julian Elischer
58cf5c84e0 Add claraifications to the kproc and kthread manpages and link
the kthread_create(9) man page to the kproc(9) page as it had migrated and
people looking for it may need a hand to find its new name.

MFC after:	1 week
2009-08-23 07:48:11 +00:00
Joseph Koshy
ef58215868 Use US spellings, fix typos. 2009-08-23 07:32:30 +00:00
Joseph Koshy
cbd3e3c8ad Fix typos. 2009-08-23 07:31:10 +00:00
Joseph Koshy
445f22cfe7 Fix a typo. 2009-08-23 07:30:12 +00:00
Joseph Koshy
a2cd12e7a0 Fix typos, use American English spellings. 2009-08-23 07:29:34 +00:00
Joseph Koshy
7dfdb5c882 Fix typos. 2009-08-23 07:24:39 +00:00
Ken Smith
a3579a8757 Update name of INDEX file as part of 8.0 -> 9.0 transition. 2009-08-23 06:30:14 +00:00
Joseph Koshy
abb0a58ed9 Correct typos. 2009-08-23 06:22:31 +00:00
Joseph Koshy
5dcb8c704e Correct grammar. 2009-08-23 06:19:02 +00:00
Doug Barton
3198bdba61 Fix the typo mentioned in the PR, and one additional.
Fix caps while I'm here.

PR:		conf/138087
Submitted by:	Chris Petrik <c.petrik.sosa@gmail.com>
2009-08-23 05:56:54 +00:00
Joseph Koshy
b53a052da8 Fix a typo.
Reported by:	John McCullough <jmccullo at cs.ucsd.edu>
2009-08-23 05:49:12 +00:00
Joseph Koshy
f20a61ffe6 Fix typos.
Reported by:	Harald Servat <redcrash at gmail dot com>
2009-08-23 05:47:33 +00:00
Doug Barton
86567e4164 Move is_wired_interface() from rc.d/wpa_supplicant into network.subr,
simplify it a bit, and make use of that method to determine if an
interface is a candidate for IPv6 rtsol rather than listing all of the
possible wireless interfaces that should _not_ get rtsol'ed.

This change is only relevant for 8.0+ unless the "wlan mandatory" code
gets ported back to RELENG_7.
2009-08-23 05:47:19 +00:00
Doug Barton
d05203a19f The svnversion string is only relevant when newvers.sh is called
during the kernel build process, the other places that call the script
do not make use of that information. So restrict execution of the
svnversion-related code to the kernel build context.
2009-08-23 05:45:38 +00:00
Doug Barton
c61ff19489 Add a script to create the /var/db/mergemaster.mtree file for new
releases so that when users subsequently update their source trees
they can make use of mergemaster's -U option.
2009-08-23 05:42:50 +00:00
Ken Smith
cf48cc9f69 Make head 9.0-CURRENT in preparation for lifting code freeze.
Approved by:	re (implicit)
2009-08-22 23:44:37 +00:00
Julian Elischer
c4b21cbe4a Fix ipfw's initialization functions to get the correct order of evaluation
to allow vnet and non vnet operation. Move some functions from ip_fw_pfil.c
to ip_fw2.c and mode to mostly using the SYSINIT and VNET_SYSINIT handlers
instead of the modevent handler. Correct some spelling errors in comments
in the affected code. Note this bug fixes a crash in NON VIMAGE kernels when
ipfw is unloaded.

This patch is a minimal patch for 8.0
I have a much larger patch that actually fixes the underlying problems
that will be applied after 8.0

Reviewed by:	zec@, rwatson@, bz@(earlier version)
Approved by:	re (rwatson)
MFC after:	Immediatly
2009-08-21 11:20:10 +00:00
Marko Zec
2b97862843 Bugfix: all requests for creating vnets via vimage -c were always
reported as failures, even if the actual library / system call
would succeed, because error message would be reported if the return
value from jail_setv() call was >= 0, and if not, then if that same
value was < 0, i.e. always.  The correct behavior is to abort (only)
if jail_setv() returns < 0.

Approved by:	re (rwatson), julian (mentor)
2009-08-21 11:13:56 +00:00
Julian Elischer
cd81cd3fd1 Don't allow access to the internals until it has all been set up.
Specifically, not until the per-vnet parts have been set up.

Submitted by:	kmacy@
Reviewed by:	julian@, zec@
Approved by:	re(rwatson)
MFC after:	immediately
2009-08-21 09:22:32 +00:00
John Baldwin
eb5a1e8f38 This patch fixes two bugs in sglist(9) and improves robustness of the API via
better semantics if a request to append an address range to an existing list
fails.
- When cloning an sglist, properly set the length in the new sglist instead of
  leaving the new list empty.
- Properly compute the amount of data added to an sglist via
  _sglist_append_buf().  This allows sglist_consume_uio() to properly update
  uio_resid.
- When a request to append an address range to a scatter/gather list fails,
  restore the sglist to the state it had at the start of the function call
  instead of resetting it to an empty list.

Requested by:	np (3)
Approved by:	re (kib)
2009-08-21 02:59:07 +00:00
Ken Smith
eb4d96a268 Fix a boot hang for hptrr(4) caused by changes introduced in r195534.
It is necessary to make sure cpi->transport is set for xpt_scan_bus() to
work properly.

Submitted by: Bernhard Schmidt (scb+freebsd-current <at> techwires
              <dot> net)
Reviewed by:  scottl
Approved by:  re (kib)
2009-08-21 01:00:15 +00:00