dougb [Sun, 6 Nov 2011 07:02:13 +0000 (07:02 +0000)]
MFC r226898:
Fix the text and attribution of the poem "Youth" by Samuel Ullman.
Our copy was a bastardization of the "older" (probably original?) and
shorter version of the poem; and the "newer" version that is better
known, and arguably more popular. Standardize on the latter.
obrien [Sun, 6 Nov 2011 02:10:40 +0000 (02:10 +0000)]
MFC: r226702
* Don't give the impression that this compiler is GPLv3.
(It is "well known" that GCC 4.2.2 is GPLv3.)
* Don't give the impression that this compiler isn't "trustable".
* Fix dependency nit.
kib [Sat, 5 Nov 2011 18:27:47 +0000 (18:27 +0000)]
MFC r226896:
Fix an implicit dependency between the MFI driver and CAM that had grown due
to an API change in CAM. It's once again possible to link a static kernel
with 'mfi' without requiring 'scbus' as well. Ditto for KLD loading.
MFC r226880:
Our geom withering function could take some time before geom with its
providers and consumers will be destroyed. Before take some actions
with a geom, check that it is not destroyed at the moment.
dim [Wed, 2 Nov 2011 18:55:26 +0000 (18:55 +0000)]
MFC r226951:
Pull in r143305 and r143312 from upstream clang trunk, so using "clang
-march=native" on AMD K10 family processors no longer errors out with
"unknown target CPU 'amdfam10'". This also enables use of SSE4A.
Reported by: David Marec <david.marec@davenulle.org>
Approved by: re (kib)
gavin [Wed, 2 Nov 2011 13:51:29 +0000 (13:51 +0000)]
Merge r226860 from head:
Update the example rules in devfs.conf to reflect the changes since
ATA_CAM. While here, add another example rule, as many applications
these days expect to find /dev/dvd instead.
qingli [Tue, 1 Nov 2011 22:22:46 +0000 (22:22 +0000)]
MFC 226710
The host-id/interface-id can have a specific value and is properly
masked out when adding a prefix route through the "route" command.
However, when deleting the route, simply changing the command keyword
from "add" to "delete" does not work. The failoure is observed in
both IPv4 and IPv6 route insertion. The patch makes the route command
behavior consistent between the "add" and the "delete" operation.
qingli [Tue, 1 Nov 2011 21:21:36 +0000 (21:21 +0000)]
MFC 226451
The IPv6 code was influx at the time of r196865 due to the L2/L3
separation rewrite changes. r196865 was committed to fix a scope
violation problem in the following test scenario:
qingli [Tue, 1 Nov 2011 18:29:06 +0000 (18:29 +0000)]
MFC 226713
Exclude host routes when checking for prefix coverage on multiple
interfaces. A host route has a NULL mask so check for that condition.
I have also been told by developers who customize the packet output
path with direct manipulation of the route entry (or the outgoing
interface to be specific). This patch checks for the route mask
explicitly to make sure custom code will not panic.
kib [Tue, 1 Nov 2011 15:41:55 +0000 (15:41 +0000)]
MFC r226688:
The use of VOP_ISLOCKED() without a check for the return values can cause
false positives. Replace the #ifdef block with the proper
ASSERT_VOP_UNLOCKED() assert.
kib [Tue, 1 Nov 2011 15:38:41 +0000 (15:38 +0000)]
MFC r226687:
The only possible error return from null_nodeget() is due to insmntque1
failure (the getnewvnode cannot return an error). In this case, the
null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK()
in the nullfs_mount() after null_nodeget() failure is wrong.
kib [Tue, 1 Nov 2011 15:34:52 +0000 (15:34 +0000)]
MFC r226686:
The covered vnode must be reloced if it was unlocked. Remove VOP_ISLOCKED
test because of this and also because it can lead to false positives.
marcel [Mon, 31 Oct 2011 03:47:23 +0000 (03:47 +0000)]
MFC r226647:
Add support for Boot Camp. The support is defined as follows:
o Detect when Boot Camp is enabled (i.e. the MBR mirrors the GPT).
o When Boot Camp is enabled, update the MBR whenever we write the GPT.
o Creation of a Boot Camp enabled GPT is not supported.
o Automatically disable Boot Camp when the GPT has been changed so that
there's either no EFI partition or no HFS+ partition.
o The first 4 partitions (by index) get mirrored in the MBR.
Requested by, discussed with and tested by: kris@pcbsd.org
Approved by: re (bz@, kib@)
mm [Sun, 30 Oct 2011 20:56:54 +0000 (20:56 +0000)]
MFC r226724, r226732:
MFC r226724:
Update copyright information in several ZFS files, as the clause 3.3
of the CDDL licence explicitly requires every Contributor to add
a copyright notice.
This also reflects the copyright notices for the changes recently
added by Illumos.
MFC r226732: [1]
Fix typo in copyright notice introduced in r226724
(missing character in e-mail adress)
marcel [Sat, 29 Oct 2011 16:38:04 +0000 (16:38 +0000)]
MFC r226673:
Don't terminate the interactive root mount prompt on mount failure.
This restores the previous behaviour. While here, match '?' and '.'
inputs exactly and improve the error message.
Requested by: avg@
Derived from a patch by: Arnaud Lacombe <lacombar@gmail.com>
Approved by: re (kib@)
hselasky [Sat, 29 Oct 2011 12:39:05 +0000 (12:39 +0000)]
MFC r226803:
Fix suspend and resume of non-super-speed USB devices
in the generic XHCI driver. There appears to be some minor
logic missing for this feature to work.
dim [Fri, 28 Oct 2011 21:08:39 +0000 (21:08 +0000)]
MFC r226633:
Upgrade our copy of llvm/clang to r142614, from upstream's release_30
branch. This brings us very close to the 3.0 release, which is expected
November 16, 2011.
kensmith [Wed, 26 Oct 2011 19:45:20 +0000 (19:45 +0000)]
MFC r226510,r226547:
Comment out sbp(4) because it appears to cause boot failure on some
systems. Add comment explaining why sbp(4) is commented out.
It was a mistake on my part to omit powerpc's GENERIC for r226510.
But when I noticed the mistake I checked with the powerpc maintainer
to see if I should correct the mistake Marcel said he'd prefer it be
left as-is.
Pseudo interfaces should go at SI_SUB_PSEUDO. However at least
pfsync also depends on pf to be initialized already so pf goes at
FIRST and the interfaces go at ANY.
Then the (VNET_)SYSINIT startups for pf stays at SI_SUB_PROTO_BEGIN
and for pfsync we move to the later SI_SUB_PROTO_IF.
This is not ideal either but at least an order that should work for
the moment and can be re-fined with the VIMAGE merge, once this will
actually work with more than one network stack.
Fix recursive pf locking leading to panics. Splatter PF_LOCK_ASSERT()s
to document where we are expecting to be called with a lock held to
more easily catch unnoticed code paths.
This does not neccessarily improve locking in pfsync, it just tries
to avoid the panics reported.
PR: kern/159390, kern/158873
Submitted by: pluknet (at least something that partly resembles
my patch ignoring other cleanup, which I only saw
too late on the 2nd PR)
Fix a race: we should update sc_len before dropping the pf lock, otherwise a
number of packets can be queued on sc, while we are in ip_output(), and then
we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to
writing beyond our mbuf cluster.
Fix from r226623 is not sufficient to close all races in pfsync(4).
The root of problem is re-locking at the end of pfsync_sendout().
Several functions are calling pfsync_sendout() holding pointers
to pf data on stack, and these functions expect this data to be
consistent.
To fix this, the following approach was taken:
- The pfsync_sendout() doesn't call ip_output() directly, but
enqueues the mbuf on sc->sc_ifp's interfaces queue, that
is currently unused. Then pfsync netisr is scheduled. PF_LOCK
isn't dropped in pfsync_sendout().
- The netisr runs through queue and ip_output()s packets
on it.
Apart from fixing race, this also decouples stack, fixing
potential issues, that may happen, when sending pfsync(4)
packets on input path.
- Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). Instead
of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail()
was scheduled.
This lead to instant 100% state leak after first bulk update
request.
- After above fix, it appeared that pfsync_bulk_update() lacks
locking. To fix this, sc_bulk_tmo callout was converted to an
mtx one. Eventually, all pf/pfsync callouts should be converted
to mtx version, since it isn't possible to stop or drain a
non-mtx callout without risk of race.
- Add comment that callout_stop() in pfsync_clone_destroy() lacks
locking. Since pfsync0 can't be destroyed (yet), let it be here.
Merge several fixes to bulk update processing from OpenBSD. Merged
revisions: 1.148, 1.149, 1.150. This makes number of states on
master/slave to be of a sane value.
rodrigc [Wed, 26 Oct 2011 17:04:26 +0000 (17:04 +0000)]
Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined. This sysctl can be queried by feature_present(3).
Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
If these utilities detect that ATA_CAM is enabled, then these utilities
will error out. These utilities are compatible with the old ATA
driver, but are incomptible with the new ATA_CAM driver. By erroring out,
we give end-users an idea as to what remedies to use, and reduce the need for them
to file PR's. For atacontrol, camcontrol must be used instead,
and for burncd, alternative utilties from the ports collection must be used
such as sysutils/cdrtools.
In future, maybe someone can re-write burncd to work with ATA_CAM,
but at least for now, we give a somewhat useful error message to end users.
PR: 160979
Reviewed by: jh, Arnaud Lacombe <lacombar at gmail dot com>
Approved by: re (kib)
Reported by: Joe Barbish <fbsd8 at a1poweruser dot com>
edwin [Wed, 26 Oct 2011 06:50:40 +0000 (06:50 +0000)]
MFC of r226752, r226771, tzdata2011m
Europe:
- Pridnestrovian Moldavian Republic (PMR, also known as
"Pridnestrovie") has abolished seasonal clock change (no transition
to the Winter Time).
- The recent change to the Ukranian time zone (Europe/Kiev) to
introduce permanent daylight saving time (similar to Russia) was
reverted.
South America:
- Bahia: The President signed a decree that includes Bahia in summer
time.
zone.tab:
- Add Europe/Tiraspol Pridnestrovie
Obtained from: ftp://ftp.iana.org/tz/releases/
Approved by: re (Kostik Belousov)
mckusick [Fri, 21 Oct 2011 22:12:24 +0000 (22:12 +0000)]
MFC: 226265
When unmounting a filesystem always wait for the vfs_busy lock to clear
so that if no vnodes in the filesystem are actively in use the unmount
will succeed rather than failing with EBUSY.
Reported by: Garrett Cooper
Reviewed by: Attilio Rao and Kostik Belousov
Tested by: Garrett Cooper
Approved by: re (kib)
PR: kern/161016
mckusick [Fri, 21 Oct 2011 22:07:52 +0000 (22:07 +0000)]
MFC 226266:
After creating a filesystem using newfs -j the time stamps are all
zero and thus report as having been made in January 1970. Apart
from looking a bit silly, it also triggers alarms from scripts
that detect weird time stamps. This update sets all 4 (or 3, in
the case of UFS1) time stamps to the current time when enabling
journaling during newfs or later when enabling it with tunefs.
Reported by: Hans Ottevanger <hans@beastielabs.net>
Approved by: re (kib)
trociny [Fri, 21 Oct 2011 05:37:40 +0000 (05:37 +0000)]
MFC r226403:
In r225809 the intention was to send VEOF only once if STDIN was not a
terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
keept sending VEOF.
Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
in bin/161526. Note, we still send VEOF at least once. Otherwise
commands like below would hang forever:
echo 1 |script /tmp/script.out cat
PR: bin/161526
Reported by: Adrian Wontroba <aw1@stade.co.uk>, Stefan Bethke <stb@lassitu.de>
Tested by: Stefan Bethke <stb@lassitu.de>
Approved by: re (kib)
delphij [Thu, 20 Oct 2011 20:31:09 +0000 (20:31 +0000)]
MFC r226483:
Fix a bug in sa_find_sizes() which could lead to panic:
When calculating space needed for SA_BONUS buffers,
hdrsize is always rounded up to next 8-aligned boundary.
However, in two places the round up was done against
sum of 'total' plus hdrsize. On the other hand,
hdrsize increments by 4 each time, which means in
certain conditions, we would end up returning with
will_spill == 0 and (total + hdrsize) larger than
full_space, leading to a failed assertion because
it's invalid for dmu_set_bonus.
Sponsored by: iXsystems, Inc.
Reviewed by: mm
Approved by: re (kib)
gabor [Thu, 20 Oct 2011 16:08:11 +0000 (16:08 +0000)]
MFC r226432, r226273:
- Use getprogname() instead of __progname
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon
- Fix counting of match limit (-m)
glebius [Thu, 20 Oct 2011 15:58:05 +0000 (15:58 +0000)]
MFhead 226401,226402:
Remove last remnants of classful addressing:
- Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
- Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
- fix bug when we were not forwarding to a host which matches classful
net address. For example router having 192.168.x.y/16 network attached,
would not forward traffic to 192.168.*.0, which are legal IPs in
CIDR world.
- For compatibility, leave autoguessing of mask based on class.
Reviewed by: andre, bz, rwatson
Add support for IPv4 /31 prefixes, as described in RFC3021.
To run a /31 network, participating hosts MUST drop support
for directed broadcasts, and treat the first and last addresses
on subnet as unicast. The broadcast address for the prefix
should be the link local broadcast address, INADDR_BROADCAST.
glebius [Thu, 20 Oct 2011 15:53:26 +0000 (15:53 +0000)]
MFhead r226338:
Restore functions in6_ifaddloop() and in6_ifremloop() that were
inlined by Qing Li in his big new-ARP commit. I am going to utilize
them in my newcarp work, and also these functions left declared
in in6_var.h for all the time they were absent.
kensmith [Tue, 18 Oct 2011 13:48:31 +0000 (13:48 +0000)]
MFC r226507:
> Escape the newline so we get a proper line continuation. Without this
> the text of the menu selections doesn't get displayed properly and it
> makes the installer appear to lock up for no obvious reason.
>
> Reviewed by: nwhitehorn
Insta-MFC being done because 9.0-RC1 builds are being held for this.
qingli [Mon, 17 Oct 2011 03:35:24 +0000 (03:35 +0000)]
MFC 226453
The code change made in r226040 was incomplete and resulted in
routes such as fe80::1%lo0 no being installed. This patch completes
the original intended fix.
rwatson [Sat, 15 Oct 2011 22:27:59 +0000 (22:27 +0000)]
Merge r226301 from head to stable/9:
Correct a bug in export of capability-related information from the sysctls
supporting procstat -f: properly provide capability rights information to
userspace. The bug resulted from a merge-o during upstreaming (or rather,
a failure to properly merge FreeBSD-side changed downstream).
qingli [Thu, 13 Oct 2011 08:26:23 +0000 (08:26 +0000)]
MFC 226114
Remove the reference held on the loopback route when the interface
address is being deleted. Only the last reference holder deletes the
loopback route. All other delete operations just clear the IFA_RTSELF
flag.
PR: kern/159601
Submitted by: pluknet
Reviewed by: discussed on net@
Approved by: re (kib)
qingli [Thu, 13 Oct 2011 03:21:48 +0000 (03:21 +0000)]
MFC 226040
The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
determine if a loopback route should be installed for an interface
IPv6 address. Another condition is the address must not belong to a
looopback interface.
qingli [Thu, 13 Oct 2011 00:44:24 +0000 (00:44 +0000)]
MFC 226224
All indirect routes will fail the rtcheck, except for a special host
route where the destination IP and the gateway IP is the same. This
special case handling is only meant for backward compatibility reason.
The last commit introduced a bug in the route check logic, where a
valid special case is treated as an error. This patch fixes that bug
along with some code cleanup.
Suggested by: glebius smirnoff
Reviewed by: kmacy, discussed with glebius smirnoff
Approved by: re (hrs)
qingli [Wed, 12 Oct 2011 21:02:58 +0000 (21:02 +0000)]
MFC 225947
A system may have multiple physical interfaces, all of which are on the
same prefix. Since a single route entry is installed for the prefix
(without RADIX_MPATH), incoming packets on the interfaces that are not
associated with the prefix route may trigger an error message about
unable to allocation LLE entry, and fails L2. This patch makes sure a
valid route is present in the system, and allow the aforementioned
condition to exist and treats as valid.
kib [Wed, 12 Oct 2011 20:08:25 +0000 (20:08 +0000)]
Handle page dirty mask with atomics.
MFC r225838:
Use the explicitly-sized types for the dirty and valid masks.
MFC r225840:
Use the trick of performing the atomic operation on the contained aligned
word to handle the dirty mask updates in vm_page_clear_dirty_mask().
MFC 225841
Remove locking of the vm page queues from several pmaps.
tuexen [Wed, 12 Oct 2011 15:29:50 +0000 (15:29 +0000)]
MFC 226252:
Use the most significant 6 bits of the dscp instead of the least
significant ones.
This has changed in the latest version of the socket API ID and
provides backwards compatibility and gets it in syn with the
usage of the IP_TOS socket option.
marius [Wed, 12 Oct 2011 15:02:06 +0000 (15:02 +0000)]
MFC r226118:
Sync with ahc(4)/ahd(4)/sym(4) etc:
Zero any sense not transferred by the device as the SCSI specification
mandates that any untransferred data should be assumed to be zero.
andre [Wed, 12 Oct 2011 11:34:14 +0000 (11:34 +0000)]
MFC r226105:
Add back the IP header length to the total packet length field on
raw IP sockets. It was deducted in ip_input() in preparation for
protocols interested only in the payload.
On raw sockets the IP header should be delivered as it at came in
from the network except for the byte order swaps in some fields.
edwin [Wed, 12 Oct 2011 11:08:09 +0000 (11:08 +0000)]
MFC of tzdata2011l, 226289
Changes in 2011i:
Africa
- Added South Sudan: Africa/Juba
Australasia:
- Samoa will go forward 24 hours at 30 December 2011 to better match
the day of the week with its neighbours.
Europe:
- Europe/Kaliningrad will have the timezone KALT.
North America:
- Updates to Metlakatla historical data
- Newfoundland, Labrador and Resolute will do something which I
can't figure out.
iso3166tab;
- Add SS for South Sudan.
Changes in 2011j:
- Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
- Samoa DST will end on 1 April 2012
Changes in 2011k:
- Gaza / West Bank goes back to standard time on 02 August 2011.
- West Bank went bac kto DST on 30 August 2011.
- Lots of changes in Minsk (GMT+3 without DST) and other Russian
regions. A new timezone has been created for them, FET: Further-eastern
European Time aka GMT+3.
- Add Asian/Hebron to the zone.tab file.
Changes in 2011l:
- West Bank came out of DST on 30 September 2011.
- Fiji will g oin DST on 23 October and out of it on 26 Februari
- State Bahia might go back to DST in 16 October 2011
Due to legal problems, ado and Paul Eggert have to temporary suspend
their work on the timezone database
(http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
been continued by volunteers on the tz community and the hosting
of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
Obtained from: ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/
Approved by: re (Kostik)
ed [Wed, 12 Oct 2011 09:28:09 +0000 (09:28 +0000)]
MFC r226099:
Tab should not blank cells.
It seems I was under the impression that a tab differs from a single
forward tabulation, namely that it blanks the underlying cells. This
seems not to be the case. They are identical.
This should fix applications like jove(1) that use tabs instead of
explicit cursor position setting.
Reported by: Brett Glass <brett lariat net>
MFC r226183:
Properly use the cursor to bound the position for CUP.
We must take the origin region into account when clamping the cursor
position.
tuexen [Wed, 12 Oct 2011 05:18:15 +0000 (05:18 +0000)]
MFC 226222:
Get struct sctp_net_route in tune with struct route.
struct route was changed in
http://svn.freebsd.org/changeset/base/225698
and since then SCTP support was broken.