]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFix a panic during CAM EDT traversal.
ken [Fri, 7 Dec 2012 23:48:54 +0000 (23:48 +0000)]
Fix a panic during CAM EDT traversal.

The problem was a race condition between the EDT traversal used by
things like 'camcontrol devlist', and CAM peripheral driver
removal.

The EDT traversal code holds the CAM topology lock, and wants
to show devices that have been invalidated.  It acquires a
reference to the peripheral to make sure the peripheral it is
examining doesn't go away.

However, because the peripheral removal code in camperiphfree()
drops the CAM topology lock to call the peripheral's destructor
routine, we can run into a situation where the EDT traversal
increments the peripheral reference count after free process is
already in progress.  At that point, the reference count is
ignored, because it was 0 when we started the process.

Fix this race by setting a flag, CAM_PERIPH_FREE, that I previously
added and checked in xptperiphtraverse() and xptpdperiphtravsere(),
but failed to use.  If the EDT traversal code sees that flag,
it will know that the peripheral free process has already started,
and that it should not access that peripheral.

Also, fix an inconsistency in the locking between
xptpdperiphtraverse() and xptperiphtraverse().  They now both
hold the CAM topology lock while calling the peripheral traversal
function.

cam_xpt.c: Change xptperiphtraverse() to hold the CAM topology
lock across calls to the traversal function.

Take out the comment in xptpdperiphtraverse() that
referenced the locking inconsistency.

cam_periph.c: Set the CAM_PERIPH_FREE flag when we are in the
process of freeing a peripheral driver.

Sponsored by: Spectra Logic Corporation
MFC after: 1 week

11 years agoConfigure UMA warnings for the following zones:
pjd [Fri, 7 Dec 2012 22:30:30 +0000 (22:30 +0000)]
Configure UMA warnings for the following zones:
- unp_zone: kern.ipc.maxsockets limit reached
- socket_zone: kern.ipc.maxsockets limit reached
- zone_mbuf: kern.ipc.nmbufs limit reached
- zone_clust: kern.ipc.nmbclusters limit reached
- zone_jumbop: kern.ipc.nmbjumbop limit reached
- zone_jumbo9: kern.ipc.nmbjumbo9 limit reached
- zone_jumbo16: kern.ipc.nmbjumbo16 limit reached

Note that those warnings are printed not often than every five minutes and can
be globally turned off by setting sysctl/tunable vm.zone_warnings to 0.

Discussed on: arch
Obtained from: WHEEL Systems
MFC after: 2 weeks

11 years agoImplemented uma_zone_set_warning(9) function that sets a warning, which
pjd [Fri, 7 Dec 2012 22:27:13 +0000 (22:27 +0000)]
Implemented uma_zone_set_warning(9) function that sets a warning, which
will be printed once the given zone becomes full and cannot allocate an
item. The warning will not be printed more often than every five minutes.

All UMA warnings can be globally turned off by setting sysctl/tunable
vm.zone_warnings to 0.

Discussed on: arch
Obtained from: WHEEL Systems
MFC after: 2 weeks

11 years agoMake use of the fact that uma_zone_set_max(9) already returns actual limit set.
pjd [Fri, 7 Dec 2012 22:23:53 +0000 (22:23 +0000)]
Make use of the fact that uma_zone_set_max(9) already returns actual limit set.

11 years agoMore style cleanups.
pjd [Fri, 7 Dec 2012 22:22:04 +0000 (22:22 +0000)]
More style cleanups.

11 years agoStyle cleanups.
pjd [Fri, 7 Dec 2012 22:19:41 +0000 (22:19 +0000)]
Style cleanups.

11 years ago- Make socket_zone static - it is used only in this file.
pjd [Fri, 7 Dec 2012 22:15:51 +0000 (22:15 +0000)]
- Make socket_zone static - it is used only in this file.
- Update maxsockets on uma_zone_set_max().

Obtained from: WHEEL Systems

11 years agoStyle cleanups.
pjd [Fri, 7 Dec 2012 22:13:33 +0000 (22:13 +0000)]
Style cleanups.

11 years agoThere is no need anymore to include vm/uma.h after r241726.
pjd [Fri, 7 Dec 2012 22:05:42 +0000 (22:05 +0000)]
There is no need anymore to include vm/uma.h after r241726.

Obtained from: WHEEL Systems

11 years agoRe-disable GSSAPI, which does not build on several archs.
erwin [Fri, 7 Dec 2012 16:05:04 +0000 (16:05 +0000)]
Re-disable GSSAPI, which does not build on several archs.

Approved by: delphij (mentor)

11 years agoUpdate to 9.8.4-P1.
erwin [Fri, 7 Dec 2012 12:39:58 +0000 (12:39 +0000)]
Update to 9.8.4-P1.

Security Fixes

   Prevents named from aborting with a require assertion failure
   on servers with DNS64 enabled.  These crashes might occur as a
   result of  specific queries that are received.

New Features

*  Elliptic Curve Digital Signature Algorithm keys and signatures in
   DNSSEC are now supported per RFC 6605. [RT #21918]

Feature Changes

*  Improves OpenSSL error logging [RT #29932]

*  nslookup now returns a nonzero exit code when it is unable to get
   an answer.  [RT #29492]

Other critical bug fixes are included.

Approved by: delphij (mentor)
MFC after: 3 days
Security: CVE-2012-5688
Sponsored by: DK Hostmaster A/S

11 years agoAllow KASSERT to log instead of panic.
alfred [Fri, 7 Dec 2012 08:25:08 +0000 (08:25 +0000)]
Allow KASSERT to log instead of panic.

This is to allow debug images to be used without taking down the
system when non-fatal asserts are hit.

The following sysctls are added:

debug.kassert.warn_only: 1 = log, 0 = panic

debug.kassert.do_ktr: set to a ktr mask for logging via KTR

debug.kassert.do_log: 1 = log, 0 = quiet

debug.kassert.warnings: stats, number of kasserts hit

debug.kassert.log_panic_at:
  number of kasserts before we actually panic, 0 = never

debug.kassert.log_pps_limit: pps limit for log messages

debug.kassert.log_mute_at: stop warning after N kasserts, 0 = never stop

debug.kassert.kassert: set this sysctl to trigger a kassert

Discussed with: scottl, gnn, marcel
Sponsored by: iXsystems

11 years agoTypo in a comment.
rpaulo [Fri, 7 Dec 2012 07:08:39 +0000 (07:08 +0000)]
Typo in a comment.

11 years agoMake this work for 64 bit binaries.
rpaulo [Fri, 7 Dec 2012 07:02:39 +0000 (07:02 +0000)]
Make this work for 64 bit binaries.

11 years agoAdd XC900 SKU mapping.
adrian [Fri, 7 Dec 2012 06:38:30 +0000 (06:38 +0000)]
Add XC900 SKU mapping.

11 years agoAdd a new 900MHz GSM regulatory SKU for the Xagyl Communications XC900M.
adrian [Fri, 7 Dec 2012 06:34:46 +0000 (06:34 +0000)]
Add a new 900MHz GSM regulatory SKU for the Xagyl Communications XC900M.

The XC900M acts as a Ubiquiti XR9 (and I _think_ SR9) by default;
it uses the same 900MHz<->2.4GHz downconverter mapping.

However it has an alternative frequency mapping which squeezes in a couple
more half/quarter rate channels.  Since the default HAL doesn't support
fractional tuning (sub-1MHz) in 2.4GHz mode on the AR5413/AR5414, they
implement it using a jumper.

Datasheet: http://www.xagyl.com/download/XC900M_Datasheet.pdf

Thankyou to Xagyl Communications for the XC900M NICs and Edgar Martinez
for organising the donation.

Tested:

* XC900M <-> XC900M
* Ubiquiti XR9 <-> XC900M

TODO:

* Test against SR9 and GZ901 if possible (the IEEE channel<->frequency
  mapping may not match up, thanks to the slightly different channels
  involved)

11 years agoUse uint instead of int for flags exported via sysctl.
alfred [Fri, 7 Dec 2012 05:55:48 +0000 (05:55 +0000)]
Use uint instead of int for flags exported via sysctl.

11 years agoDocument pffinddomain().
kevlo [Fri, 7 Dec 2012 02:29:32 +0000 (02:29 +0000)]
Document pffinddomain().

Reviewed by: glebius

11 years agoDocument that socket(2) may fail with EAFNOSUPPORT if the family cannot
kevlo [Fri, 7 Dec 2012 02:26:08 +0000 (02:26 +0000)]
Document that socket(2) may fail with EAFNOSUPPORT if the family cannot
be found.

Reviewed by: glebius
Obtained from: NetBSD

11 years ago- according to POSIX, make socket(2) return EAFNOSUPPORT rather than
kevlo [Fri, 7 Dec 2012 02:22:48 +0000 (02:22 +0000)]
- according to POSIX, make socket(2) return EAFNOSUPPORT rather than
  EPROTONOSUPPORT if the address family is not supported.
- introduce pffinddomain() to find a domain by family and use it as
  appropriate.

Reviewed by: glebius

11 years agoFix build: reflect the increased field number.
delphij [Fri, 7 Dec 2012 01:36:53 +0000 (01:36 +0000)]
Fix build: reflect the increased field number.

11 years agoAdd amd64 implementations for 8-byte bus_space routines.
jimharris [Thu, 6 Dec 2012 22:33:31 +0000 (22:33 +0000)]
Add amd64 implementations for 8-byte bus_space routines.

Submitted by: Carl Delsey <carl.r.delsey@intel.com>
Discussed with: jhb, rwatson
Reviewed by: jimharris
MFC after: 1 week

11 years ago- Rewrite radius servers traversal algorithm.
sem [Thu, 6 Dec 2012 19:00:37 +0000 (19:00 +0000)]
- Rewrite radius servers traversal algorithm.
- Add functions for working with IPv6 attributes.

Approved by: ae

11 years agoAdd PCI device ID for 8-channel IDT NVMe controller, and clarify that the
jimharris [Thu, 6 Dec 2012 15:36:24 +0000 (15:36 +0000)]
Add PCI device ID for 8-channel IDT NVMe controller, and clarify that the
previously defined IDT PCI device ID was for a 32-channel controller.

Submitted by: Joe Golio <joseph.golio@isilon.com>

11 years ago Rule memory garbage collecting in new pf scans only states that are on
glebius [Thu, 6 Dec 2012 08:38:14 +0000 (08:38 +0000)]
  Rule memory garbage collecting in new pf scans only states that are on
id hash. If a state has been disconnected from id hash, its rule pointers
can no longer be dereferenced, and referenced memory can't be modified.
Thus, move rule statistics from pf_free_rule() to pf_unlink_rule() and
update them prior to releasing id hash slot lock.

Reported by: Ian FREISLICH <ianf cloudseed.co.za>

11 years agoClose possible races between state deletion and sent being sent out
glebius [Thu, 6 Dec 2012 08:32:28 +0000 (08:32 +0000)]
Close possible races between state deletion and sent being sent out
from pfsync:
- Call into pfsync_delete_state() holding the state lock.
- Set the state timeout to PFTM_UNLINKED after state has been moved
  to the PFSYNC_S_DEL queue in pfsync.

Reported by: Ian FREISLICH <ianf cloudseed.co.za>

11 years ago Remove extra PFSYNC_LOCK() in pfsync_bulk_update() which lead to lock
glebius [Thu, 6 Dec 2012 08:22:08 +0000 (08:22 +0000)]
  Remove extra PFSYNC_LOCK() in pfsync_bulk_update() which lead to lock
recursion.

Reported by: Ian FREISLICH <ianf cloudseed.co.za>

11 years ago Revert erroneous r242693. A state may have PFTM_UNLINKED being on the
glebius [Thu, 6 Dec 2012 08:15:06 +0000 (08:15 +0000)]
  Revert erroneous r242693. A state may have PFTM_UNLINKED being on the
PFSYNC_S_DEL queue of pfsync.

11 years agoEliminate superfluous code.
davidxu [Thu, 6 Dec 2012 06:29:08 +0000 (06:29 +0000)]
Eliminate superfluous code.

11 years agoAdd the Programmer Dvorak Keyboard Layout
eadler [Thu, 6 Dec 2012 01:44:19 +0000 (01:44 +0000)]
Add the Programmer Dvorak Keyboard Layout

PR: conf/173950
Submitted by: clutton <mbsd@isgroup.com.ua>
Approved by: cperciva

11 years agoChange the default to 'cru' for speed reasons.
eadler [Thu, 6 Dec 2012 01:31:34 +0000 (01:31 +0000)]
Change the default to 'cru' for speed reasons.

Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Reviewed by: imp, toolchain@
Approved by: cperciva
MFC after: 2 weeks

11 years agoClean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in
eadler [Thu, 6 Dec 2012 01:31:25 +0000 (01:31 +0000)]
Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in
share/mk/sys.mk instead.

This is part of a medium term project to permit deterministic builds of
FreeBSD.

Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Reviewed by: imp, toolchain@
Approved by: cperciva
MFC after: 2 weeks

11 years agoPrefer the use of initalizer lists to ctor assignment.
eadler [Thu, 6 Dec 2012 01:25:21 +0000 (01:25 +0000)]
Prefer the use of initalizer lists to ctor assignment.

Approved by: cperciva
MFC after: 2 weeks

11 years agoAvoid the creation of a temporary object by using the prefix operator
eadler [Thu, 6 Dec 2012 01:25:17 +0000 (01:25 +0000)]
Avoid the creation of a temporary object by using the prefix operator
for non-primitive types.

Approved by: cperciva
MFC after: 2 weeks

11 years agoConstify where possible
eadler [Thu, 6 Dec 2012 01:25:14 +0000 (01:25 +0000)]
Constify where possible

Approved by: cperciva
MFC after: 2 weeks

11 years agoFixup r243901:
attilio [Wed, 5 Dec 2012 22:32:12 +0000 (22:32 +0000)]
Fixup r243901:
- As the comment report, CALLOUT_LOCAL_ALLOC cannot be checked
  directly from the callout flags but might be checked by a cached
  value.  Hence, do so before to actually remove the callout, when
  needed, in softclock_call_cc().
- In softclock_call_cc() also add a comment in the waiting and deferred
  migration case explaining that the dereference should be safe
  because of the migration dereference invariants.

Additively:
- In softclock_call_cc(), for the deferred migration case, move all the
  accesses to callout structure after the comment stating the callout
  must not be destroyed.
- For consistency with this last tweak, use cached c_flags for the
  KASSERT() in the deferred migration case.  It is not strictly necessary
  but this way all the callout accesses happen after the above mentioned
  comment, improving consistency.

Pointy hat to: me
Sponsored by: Isilon Systems / EMC Corporation
Reviewed by: kib
MFC after: 2 weeks
X-MFC: 243901

11 years agoDon't write-back the cachelines if we really just want to invalidate them.
cognet [Wed, 5 Dec 2012 21:07:27 +0000 (21:07 +0000)]
Don't write-back the cachelines if we really just want to invalidate them.

Spotted out by: Ian Lepore <freebsd at damnhippie DOT dyndns dot org>

11 years agoFix an old bug in devd, where it uses std::sort() to sort the various
dim [Wed, 5 Dec 2012 20:50:40 +0000 (20:50 +0000)]
Fix an old bug in devd, where it uses std::sort() to sort the various
lists it reads from its configuration files on the priority field.

Because some items in the lists have the same priority, and std::sort()
is not stable, the exact order in which the items are enumerated does
not have to correspond to the order they appear in the configuration
files.

Apparently this was never noticed with libstdc++, but with libc++ it
could cause the "uhid" entry from /etc/devd/usb.conf to be used instead
of the "ums" entry (which is earlier in the file).  This caused the
problem described in the PR: the USB mouse module was never loaded, and
the other actions (such as starting moused) were not executed.

To fix the problem, make devd use std:stable_sort() instead.

Reported by: Jan Beich <jbeich@tormail.org>
PR: bin/172958
MFC after: 2 weeks

11 years agoremove redundant yyparse declarations
bapt [Wed, 5 Dec 2012 20:28:44 +0000 (20:28 +0000)]
remove redundant yyparse declarations

PR: conf/174079
Submitted by: Garrett Cooper <yanegomi@gmail.com>

11 years agoDon't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
jimharris [Wed, 5 Dec 2012 20:21:33 +0000 (20:21 +0000)]
Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.

Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.

While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed.  This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).

MFC after: 3 days

11 years ago- Move definition of V_deembed_scopeid to scope6_var.h.
hrs [Wed, 5 Dec 2012 19:45:24 +0000 (19:45 +0000)]
- Move definition of V_deembed_scopeid to scope6_var.h.
- Deembed scope id in L3 address in in6_lltable_dump().
- Simplify scope id recovery in rtsock routines.
- Remove embedded scope id handling in ndp(8) and route(8) completely.

11 years agoThe softclock_call_cc() is executing with the callout already removed
kib [Wed, 5 Dec 2012 19:02:22 +0000 (19:02 +0000)]
The softclock_call_cc() is executing with the callout already removed
from the callwheel. Calculate the cc->cc_next before removing the
callout, otherwise the code followed the invalid tailq links.  After
this, make softclock_call_cc() return void, since it always return
cc->cc_next, which is immediately available to the softclock()
anyway. This also allows to eliminate a label under #ifdef SMP.

Remove the assignment of cc->cc_next from callout_cc_del(), since the
function is called with the callout already removed from callwheel.

If cancelling the migration, also clear the CALLOUT_DFRMIGRATION flag.

Postpone the free of the timeout(9) allocated callouts after the
migration checks are done.

Add some more strict asserts about the state of the callout in
callout_call_cc().

Reviewed by: attilio
Reported and tested by: pho (previous version)
MFC after: 2 weeks

11 years agoCheck for lockmgr recursion in case of disown and downgrade and panic
attilio [Wed, 5 Dec 2012 15:11:01 +0000 (15:11 +0000)]
Check for lockmgr recursion in case of disown and downgrade and panic
also in !debugging kernel rather than having "undefined" behaviour.

Tested by: avg
MFC after: 1 week

11 years agoUse Bernard Baruch's full name.
eadler [Wed, 5 Dec 2012 13:57:00 +0000 (13:57 +0000)]
Use Bernard Baruch's full name.

The words "old than" seem to be quoted as "older than" by some sources,
so use the more likely and grammatically correct text.

PR: docs/173868
Submitted by: Chris Petrik <c.petrik.sosa@gmail.com>
Approved by: cperciva
MFC after: 1 week

11 years agoSimplify string duplication: use strdup instead of malloc + strcpy
eadler [Wed, 5 Dec 2012 13:56:56 +0000 (13:56 +0000)]
Simplify string duplication: use strdup instead of malloc + strcpy

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

11 years agoAvoid overflowing the file buffer
eadler [Wed, 5 Dec 2012 13:56:52 +0000 (13:56 +0000)]
Avoid overflowing the file buffer

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

11 years agoUse strdup instead of malloc + strcpy
eadler [Wed, 5 Dec 2012 13:56:49 +0000 (13:56 +0000)]
Use strdup instead of malloc + strcpy

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

11 years agoAvoid overflow of file buffer
eadler [Wed, 5 Dec 2012 13:56:46 +0000 (13:56 +0000)]
Avoid overflow of file buffer

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

11 years agoRemove useless check for NULL prior to free.
eadler [Wed, 5 Dec 2012 13:56:43 +0000 (13:56 +0000)]
Remove useless check for NULL prior to free.

Approved by: cperciva
MFC after: 2 weeks

11 years agoRemove hack to emulate effective uid and just use the EUID's name in the
eadler [Wed, 5 Dec 2012 13:56:39 +0000 (13:56 +0000)]
Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

Submitted by: gcooper
Approved by: cperciva
MFC after: 3 days

11 years agoRemove pointless check for the existence of /usr/bin/less which exists
eadler [Wed, 5 Dec 2012 13:56:36 +0000 (13:56 +0000)]
Remove pointless check for the existence of /usr/bin/less which exists
in all configurations.

Reviewed by: mjg
Approved by: cperciva
MFC after: 2 weeks

11 years agoAdd ability to mergemaster to permit the user to type
eadler [Wed, 5 Dec 2012 13:56:32 +0000 (13:56 +0000)]
Add ability to mergemaster to permit the user to type
the absolute path to PAGER if mergemaster can not find
the one already set.

Reviewed by: mjg
Approved by: cperciva
MFC after: 2 weeks

11 years agoConnect organization.dot to the build
eadler [Wed, 5 Dec 2012 13:05:24 +0000 (13:05 +0000)]
Connect organization.dot to the build

Approved by: cperciva
MFC after: 3 days

11 years agoVendor import of Bind 9.8.4-P1
erwin [Wed, 5 Dec 2012 13:00:54 +0000 (13:00 +0000)]
Vendor import of Bind 9.8.4-P1

Approved by: delphij (mentor)
Sponsored by: DK Hostmaster A/S

11 years agoVendor import of Bind 9.8.4
erwin [Wed, 5 Dec 2012 12:53:50 +0000 (12:53 +0000)]
Vendor import of Bind 9.8.4

Approved by: delphij (mentor)
Sponsored by: DK Hostmaster A/S

11 years agoif PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and
bapt [Wed, 5 Dec 2012 11:35:50 +0000 (11:35 +0000)]
if PACKAGESITE url scheme is not 'file://', always try to revolv SRV records and
use them if any. It allows the bootstrap to use directly pkg.FreeBSD.org instead
of pkgbeta.FreeBSD.org

MFC after: 1 month

11 years ago Mechanically substitute flags from historic mbuf allocator with
glebius [Wed, 5 Dec 2012 08:04:20 +0000 (08:04 +0000)]
  Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags within sys.

Exceptions:

- sys/contrib not touched
- sys/mbuf.h edited manually

11 years agoRemove dead code that clang refuses to compile.
rpaulo [Wed, 5 Dec 2012 04:22:53 +0000 (04:22 +0000)]
Remove dead code that clang refuses to compile.

11 years agoFix a race between kern_setitimer() and realitexpire(), where the
kib [Tue, 4 Dec 2012 20:49:39 +0000 (20:49 +0000)]
Fix a race between kern_setitimer() and realitexpire(), where the
callout is started before kern_setitimer() acquires process mutex, but
looses a race and kern_setitimer() gets the process mutex before the
callout.  Then, assuming that new specified struct itimerval has
it_interval zero, but it_value non-zero, the callout, after it starts
executing again, clears p->p_realtimer.it_value, but kern_setitimer()
already rescheduled the callout.

As the result of the race, both p_realtimer is zero, and the callout
is rescheduled. Then, in the exit1(), the exit code sees that it_value
is zero and does not even try to stop the callout. This allows the
struct proc to be reused and eventually the armed callout is
re-initialized.  The consequence is the corrupted callwheel tailq.

Use process mutex to interlock the callout start, which fixes the race.

Reported and tested by: pho
Reviewed by: jhb
MFC after: 2 weeks

11 years agoDo not allocate buffer of the 255 bytes length on the stack.
kib [Tue, 4 Dec 2012 20:49:04 +0000 (20:49 +0000)]
Do not allocate buffer of the 255 bytes length on the stack.

Reported and tested by: sig6247@gmail.com
MFC after: 1 week

11 years agoFix fallout from r243019, which broke parsing of shortened network
glebius [Tue, 4 Dec 2012 20:05:01 +0000 (20:05 +0000)]
Fix fallout from r243019, which broke parsing of shortened network
prefixes.

Reported and tested by: delphij

11 years ago- Fix LOR in sa6_recoverscope() in rt_msg2()[1].
hrs [Tue, 4 Dec 2012 17:12:23 +0000 (17:12 +0000)]
- Fix LOR in sa6_recoverscope() in rt_msg2()[1].
- Check V_deembed_scopeid before checking if sa_family == AF_INET6.
- Fix scope id handing in route(8)[2] and ifconfig(8).

Reported by: rpaulo[1], Mateusz Guzik[1], peter[2]

11 years agolibc: Use the new 'e' fopen() mode option to simplify fstab.c.
jilles [Tue, 4 Dec 2012 16:54:43 +0000 (16:54 +0000)]
libc: Use the new 'e' fopen() mode option to simplify fstab.c.

No functional change is intended.

11 years agoUse absolute path for /usr/libexec/ld-elf.so.1 symlink.
pjd [Tue, 4 Dec 2012 14:36:01 +0000 (14:36 +0000)]
Use absolute path for /usr/libexec/ld-elf.so.1 symlink.

Requested by: kan, kib

Use -h flags for chflags, so we won't remove 'schg' flag from system's
/libexec/ld-elf.so.1.

MFC after: 2 weeks

11 years agoFix typo.
kib [Tue, 4 Dec 2012 14:07:17 +0000 (14:07 +0000)]
Fix typo.

Submitted by: bjk
MFC after: 3 days

11 years agoDo not change entire BINDIR, it might be needed later, just change
pjd [Tue, 4 Dec 2012 12:51:33 +0000 (12:51 +0000)]
Do not change entire BINDIR, it might be needed later, just change
symlink target.

MFC after: 2 weeks

11 years agoChange /usr/libexec/ld-elf.so.1 to point at ../../libexec/ld-elf.so.1
pjd [Tue, 4 Dec 2012 12:39:26 +0000 (12:39 +0000)]
Change /usr/libexec/ld-elf.so.1 to point at ../../libexec/ld-elf.so.1
instead of /libexec/ld-elf.so.1. Below in the Makefile we execute
'chflags noschg ${DESTDIR}/usr/libexec/ld-elf.so.1', which follows
symlink and removes 'schg' flag from system's /libexec/ld-elf.so.1
instead of the one in DESTDIR. It is also more friendly to use
replative paths in symlink in case of jail/chroot environments.

Obtained from: WHEEL Systems
MFC after: 2 weeks

11 years agoFlush stdout after RTM_IFANNOUNCE message.
glebius [Tue, 4 Dec 2012 11:10:01 +0000 (11:10 +0000)]
Flush stdout after RTM_IFANNOUNCE message.

PR: bin/151600
Submitted by: Eric van Gyzen <eric vangyzen.net>

11 years agoNo need to be root when running with -t or -d.
glebius [Tue, 4 Dec 2012 10:24:50 +0000 (10:24 +0000)]
No need to be root when running with -t or -d.

11 years agoDocument that bind(2) can fail with EAFNOSUPPORT.
kevlo [Tue, 4 Dec 2012 09:53:09 +0000 (09:53 +0000)]
Document that bind(2) can fail with EAFNOSUPPORT.

Reviewed by: glebius

11 years agoMechanically substitute flags from historic mbuf allocator with
glebius [Tue, 4 Dec 2012 09:32:43 +0000 (09:32 +0000)]
Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.

11 years agoRemove superfluous paragraph macro.
joel [Tue, 4 Dec 2012 09:02:49 +0000 (09:02 +0000)]
Remove superfluous paragraph macro.

11 years agoRemove snapshots.jp.freebsd.org. It stopped working years ago.
joel [Tue, 4 Dec 2012 07:22:15 +0000 (07:22 +0000)]
Remove snapshots.jp.freebsd.org. It stopped working years ago.

Discussed with: hrs

11 years agoreplace bit shifting loop with 1<<fls(n), improve comments.
alfred [Tue, 4 Dec 2012 05:28:20 +0000 (05:28 +0000)]
replace bit shifting loop with 1<<fls(n), improve comments.

Reviewed by: davide

11 years ago- Move EXAMPLES descriptions to before the actual command
bdrewery [Tue, 4 Dec 2012 00:53:20 +0000 (00:53 +0000)]
- Move EXAMPLES descriptions to before the actual command
- Add mdoc macros for EXAMPLES

Reviewed by: eadler
Approved by: gjb
MFC after: 3 days

11 years agoFix typos in the previous commit.
jkim [Tue, 4 Dec 2012 00:44:31 +0000 (00:44 +0000)]
Fix typos in the previous commit.

11 years agoTidy up bsd.cpu.mk for X86 CPUs:
jkim [Tue, 4 Dec 2012 00:37:17 +0000 (00:37 +0000)]
Tidy up bsd.cpu.mk for X86 CPUs:

- Do not limit recent processors to "prescott" class for i386 target.  There
is no reason for this hack because clang is default now.  On top of that, it
will only grow indefinitely over time.
- Add more CPUTYPEs, i.e., "athlon-fx", "core-avx2", "atom", "penryn", and
"yonah".  Note "penryn" and "yonah" are intentionally undocumented because
they are not supported by gcc and marked deprecated by clang.
- Add more CPUTYPE aliases, i.e., "barcelona" (-> amdfam10), "westmere" and
"nehalem" (-> corei7).  Note these are intentionally undocumented because
they are not supported by (base) gcc and/or clang.  However, LLVM (backend)
seems to "know" the differences.  Most likely, they were deprecated with
other vendor code names and clang did not bother implementing them at all.
- Add i686 to MACHINE_CPU for "c3-2" (VIA Nehemiah).  Both gcc & clang treat
it like an i686-class processor.
- Add IDT "winchip2" and "winchip-c6" for completeness (undocumented).
- Order processors per make.conf example, i.e., CPU vendors and models.
- Tidy up make.conf example, i.e., remove "by gcc" (because we have aliases)
and remove "prescott" from AMD64 architecture (because it is not correct).

11 years agoDocument the interpretation of the negative value of ticks for
kib [Tue, 4 Dec 2012 00:32:12 +0000 (00:32 +0000)]
Document the interpretation of the negative value of ticks for
taskqueue_enqueue_timeout(9).

MFC after: 3 days

11 years agoMethodise the BT diversity configuration function; so the AR9285
adrian [Tue, 4 Dec 2012 00:02:46 +0000 (00:02 +0000)]
Methodise the BT diversity configuration function; so the AR9285
can correctly override it.

This was missed in the previous commit.

11 years agoOverride the BT coex parameter function for the AR9285.
adrian [Tue, 4 Dec 2012 00:01:42 +0000 (00:01 +0000)]
Override the BT coex parameter function for the AR9285.

11 years agoReformat/reindent.
adrian [Tue, 4 Dec 2012 00:01:24 +0000 (00:01 +0000)]
Reformat/reindent.

11 years agoAdd and tie in the AR5416 bluetooth coexistence methods into the HAL.
adrian [Mon, 3 Dec 2012 23:45:06 +0000 (23:45 +0000)]
Add and tie in the AR5416 bluetooth coexistence methods into the HAL.

11 years agoAdd the AR5416/AR9285 bluetooth coexistence code into the main kernel
adrian [Mon, 3 Dec 2012 23:43:23 +0000 (23:43 +0000)]
Add the AR5416/AR9285 bluetooth coexistence code into the main kernel
build.

11 years agoAdd the btcoex code into the module compilation.
adrian [Mon, 3 Dec 2012 23:38:08 +0000 (23:38 +0000)]
Add the btcoex code into the module compilation.

11 years agoInclude if_ath_alq.c, which only gets actually compiled if ATH_DEBUG_ALQ
adrian [Mon, 3 Dec 2012 23:36:03 +0000 (23:36 +0000)]
Include if_ath_alq.c, which only gets actually compiled if ATH_DEBUG_ALQ
is enabled.

11 years agoPrint the frame addresses for the backtraces on i386 and amd64. It
kib [Mon, 3 Dec 2012 22:16:51 +0000 (22:16 +0000)]
Print the frame addresses for the backtraces on i386 and amd64. It
allows both to inspect the frame sizes and to manually peek into the
frames from ddb, if needed.

Reviewed by: dim
MFC after: 2 weeks

11 years agoThe vnode_free_list_mtx is required unconditionally when iterating
kib [Mon, 3 Dec 2012 22:15:16 +0000 (22:15 +0000)]
The vnode_free_list_mtx is required unconditionally when iterating
over the active list. The mount interlock is not enough to guarantee
the validity of the tailq link pointers. The __mnt_vnode_next_active()
and __mnt_vnode_first_active() active lists iterators helper functions
did not provided the neccessary stability for the list, allowing the
iterators to pick garbage.

This was uncovered after the r243599 made the active list iterators
non-nop.

Since a vnode interlock is before the vnode_free_list_mtx, obtain the
vnode ilock in the non-blocking manner when under vnode_free_list_mtx,
and restart iteration after the yield if the lock attempt failed.

Assert that a vnode found on the list is active, and assert that the
helpers return the vnode with interlock owned.

Reported and tested by: pho
MFC after: 1 week

11 years agoNote that the manual page of less(1) says:
delphij [Mon, 3 Dec 2012 21:49:37 +0000 (21:49 +0000)]
Note that the manual page of less(1) says:

  Note  that  a preprocessor cannot output an empty file, since that
  is interpreted as meaning there is no replacement, and the  origi-
  nal file is used.  To avoid this, if LESSOPEN starts with two ver-
  tical bars, the exit status of the script becomes meaningful.   If
  the  exit  status is zero, the output is considered to be replace-
  ment text, even if it empty.  If the exit status is  nonzero,  any
  output  is ignored and the original file is used.  For compatibil-
  ity with previous versions of less, if LESSOPEN starts  with  only
  one vertical bar, the exit status of the preprocessor is ignored.

Use two pipe symbols for zless, so that zless'ing a compressed empty
file will give output rather than being interpreted as its compressed
form, which is typically a binary.

Thanks Mark Nudelman for pointing out this difference and the
suggested solution.

Reported by: Matthias Meyser <meyser xenet.de>
PR: bin/168839
MFC after: 2 weeks

11 years agoRemove the sysctl process_limit interface, after some
jfv [Mon, 3 Dec 2012 21:38:02 +0000 (21:38 +0000)]
Remove the sysctl process_limit interface, after some
thought I've decided its overkill,a simple tuneable for
each RX and TX limit, and then init sets the ring values
based on that, should be sufficient.

More importantly, fix a bug causing a panic, when changing
the define style to IXGBE_LEGACY_TX a taskqueue init was
inadvertently set #ifdef when it should be #ifndef.

11 years ago- Remove snapshots.se.freebsd.org [1]
joel [Mon, 3 Dec 2012 19:55:00 +0000 (19:55 +0000)]
- Remove snapshots.se.freebsd.org [1]
- Add ftp6.se.freebsd.org

Discussed with: brd [1]

11 years agoRemove fictitious support for 80386-class CPUs from bsd.cpu.mk and make(1).
jkim [Mon, 3 Dec 2012 19:27:31 +0000 (19:27 +0000)]
Remove fictitious support for 80386-class CPUs from bsd.cpu.mk and make(1).
It was removed from head more than 8 years ago (see r137784 and r137785).

Reviewed by: imp, delphij, dim

11 years agoUpgrade our copy of llvm/clang to r168974, from upstream's release_32
dim [Mon, 3 Dec 2012 19:24:08 +0000 (19:24 +0000)]
Upgrade our copy of llvm/clang to r168974, from upstream's release_32
branch.  This is effectively llvm/clang 3.2 RC2; the 3.2 release is
coming soon.

11 years agoMFV: less v456.
delphij [Mon, 3 Dec 2012 19:00:23 +0000 (19:00 +0000)]
MFV: less v456.

11 years agoUse SA_ZPL_CRTIME instead of SA_ZPL_CTIME for creation time.
delphij [Mon, 3 Dec 2012 04:25:37 +0000 (04:25 +0000)]
Use SA_ZPL_CRTIME instead of SA_ZPL_CTIME for creation time.

Submitted by: phil.stone at gmx.com
MFC after: 2 weeks

11 years agoFix make depend.
uqs [Sun, 2 Dec 2012 22:18:01 +0000 (22:18 +0000)]
Fix make depend.

11 years agoSpecifically point at the Handbook instructions for world updates in
rwatson [Sun, 2 Dec 2012 22:09:16 +0000 (22:09 +0000)]
Specifically point at the Handbook instructions for world updates in
UPDATING by URL.

As there has been some confusion over the need to run "mergemaster -p",
part of our standard upgrade procedure, following the recent addition of
an "auditdistd" user, add a note about it to UPDATING explicitly.

11 years agoFix bpf_if structure leak introduced in r235745.
melifaro [Sun, 2 Dec 2012 21:43:37 +0000 (21:43 +0000)]
Fix bpf_if structure leak introduced in r235745.
Move all such structures to delayed-free lists and
delete all matching on interface departure event.

MFC after: 1 week

11 years agoAdd auditdistd to the pre-install required uid check list.
peter [Sun, 2 Dec 2012 21:32:45 +0000 (21:32 +0000)]
Add auditdistd to the pre-install required uid check list.

11 years agoRun cscope with the -v parameter to make it more user-friendly.
rpaulo [Sun, 2 Dec 2012 20:51:24 +0000 (20:51 +0000)]
Run cscope with the -v parameter to make it more user-friendly.

11 years agoAdd more obsolete files.
antoine [Sun, 2 Dec 2012 18:57:02 +0000 (18:57 +0000)]
Add more obsolete files.