]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFully initialize the stack-allocated "struct sockaddr_in sa" structure.
kevlo [Fri, 7 Sep 2012 08:58:30 +0000 (08:58 +0000)]
Fully initialize the stack-allocated "struct sockaddr_in sa" structure.

11 years agoPrevent indent(1) from reformatting this comment, as it contains
gavin [Fri, 7 Sep 2012 08:18:06 +0000 (08:18 +0000)]
Prevent indent(1) from reformatting this comment, as it contains
a formatting-sensitive table.

11 years agoEliminate unnecessary NULL checks.
alc [Fri, 7 Sep 2012 06:12:28 +0000 (06:12 +0000)]
Eliminate unnecessary NULL checks.

11 years agoTidy up the output quite substantially, making it fit well within
adrian [Fri, 7 Sep 2012 06:02:40 +0000 (06:02 +0000)]
Tidy up the output quite substantially, making it fit well within
80 columns.

This makes it much easier to use in a shell script, to display a "top"
style output with live rate control data.

11 years agoMake this build again!
adrian [Fri, 7 Sep 2012 06:02:01 +0000 (06:02 +0000)]
Make this build again!

11 years agoWhen calling the C++ demangler, make sure to free the returned buffer,
rpaulo [Fri, 7 Sep 2012 02:38:07 +0000 (02:38 +0000)]
When calling the C++ demangler, make sure to free the returned buffer,
which might have been reallocated.

Pointed out by: stefanf

11 years agoEliminate an unused macro.
alc [Fri, 7 Sep 2012 01:33:25 +0000 (01:33 +0000)]
Eliminate an unused macro.

11 years agoEnsure that single-frame aggregate session frames are retransmitted
adrian [Fri, 7 Sep 2012 00:24:27 +0000 (00:24 +0000)]
Ensure that single-frame aggregate session frames are retransmitted
with the correct configuration.

Occasionally an aggregate TX would fail and the first frame would be
retransmitted as a non-AMPDU frame.  Since bfs_aggr=1 and bfs_nframes > 1
(from the previous AMPDU attempt), the aggr completion function would be
called and be very confused about what's going on.

Noticed by: Kim <w8hdkim@gmail.com>
PR: kern/171394

11 years agolibc/amd64: Do not export .cerror.
jilles [Thu, 6 Sep 2012 20:59:49 +0000 (20:59 +0000)]
libc/amd64: Do not export .cerror.

For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit
in the FBSDprivate_1.0 version. It looks like there is no reason for this
since it is not used from other libraries. Given that it cannot be accessed
from C and its strange calling convention, it is rather unlikely that other
things rely on it. Perhaps it is from a time when symbols could not be
hidden.

Most of the amd64 assembler code jumps to .cerror using the GOT. It can jump
to it directly now, as in non-PIC mode.

There are also some minor size optimizations to instructions but they yield
virtually no benefit in the size of libc.so.7 due to padding.

Reviewed by: kib

11 years agoDynamically allocate the S/G lists passed to callback routines rather than
jhb [Thu, 6 Sep 2012 20:16:59 +0000 (20:16 +0000)]
Dynamically allocate the S/G lists passed to callback routines rather than
allocating them on the stack of various bus_dmamap_load*() functions.  The
S/G lists are stored in the DMA tags.  This matches the implementation on
all other platforms.

Discussed with: scottl, gibbs
Tested by: stas (arm@)

11 years agoAvoid segfault if name is invalid. Basically, only
trhodes [Thu, 6 Sep 2012 20:15:44 +0000 (20:15 +0000)]
Avoid segfault if name is invalid.  Basically, only
check for CTL_USER if the sysctl fails with ENOENT.

PR: 169056
Reviewed by: jhb

11 years agoRemove trailing whitespace.
joel [Thu, 6 Sep 2012 19:26:59 +0000 (19:26 +0000)]
Remove trailing whitespace.

11 years agoRemove trailing whitespace.
joel [Thu, 6 Sep 2012 19:24:48 +0000 (19:24 +0000)]
Remove trailing whitespace.

11 years agoMinor mdoc fix.
joel [Thu, 6 Sep 2012 19:14:02 +0000 (19:14 +0000)]
Minor mdoc fix.

11 years agoRemove NetBSD compat shims for drivers originally shared with NetBSD/pc98.
jhb [Thu, 6 Sep 2012 18:53:33 +0000 (18:53 +0000)]
Remove NetBSD compat shims for drivers originally shared with NetBSD/pc98.
NetBSD/pc98 was never merged into the main NetBSD tree and is no longer
developed.  Adding locking to these drivers would have made the compat
shims hard to impossible to maintain, so remove the shims to ease
future changes.

These changes were verified by md5.  Some additional shims can be removed
that do affect the compiled results that I will probably do in another
round.

Approved by: nyan (tentatively)

11 years agoAdd a kernel module on pc98 for the ct(4) driver.
jhb [Thu, 6 Sep 2012 18:02:32 +0000 (18:02 +0000)]
Add a kernel module on pc98 for the ct(4) driver.

11 years agoThere is no need to release the pvh global lock around calls to
alc [Thu, 6 Sep 2012 16:26:04 +0000 (16:26 +0000)]
There is no need to release the pvh global lock around calls to
pmap_get_pv_entry().  In fact, some callers already held it around calls.
(In earlier versions, the same statements would apply to the page queues
lock.)

While I'm here tidy up the style of a few nearby statements and revise
some comments.

Tested by: Ian Lepore

11 years agoAdd TRIM support, enabled by default.
jpaetzel [Thu, 6 Sep 2012 14:59:53 +0000 (14:59 +0000)]
Add TRIM support, enabled by default.
Fix a bug installing components from a localPath.
Allow autosizing of any partition, not just the last partition.
Adjust how ZFS is laid out to work with Boot Environments.

Submitted by: kmoore
Obtained from: PC-BSD
MFC after: 3 days

11 years agoAdd Intel Ivy Bridge support to hwpmc(9).
fabient [Thu, 6 Sep 2012 13:54:01 +0000 (13:54 +0000)]
Add Intel Ivy Bridge support to hwpmc(9).
Update offcore RSP token for Sandy Bridge.
Note: No uncore support.

Will works on Family 6 Model 3a.

MFC after: 1 month
Tested by: bapt, grehan

11 years agoFix "Corrupted DWARF expression" from (k)gdb.
emaste [Thu, 6 Sep 2012 13:47:42 +0000 (13:47 +0000)]
Fix "Corrupted DWARF expression" from (k)gdb.

Google turned up Debian bug 405116, which describes the problem in
sufficient detail to identify the overflowing variables.

MFC after: 1 week

11 years agoMake r230454 more readable and vendor-like.
mm [Thu, 6 Sep 2012 13:43:48 +0000 (13:43 +0000)]
Make r230454 more readable and vendor-like.

PR: kern/171380
MFC after: 3 days

11 years agoGet rid of a gcc'ism.
tuexen [Thu, 6 Sep 2012 07:03:56 +0000 (07:03 +0000)]
Get rid of a gcc'ism.

MFC after: 10 days

11 years agoAdd support for demangling C++ symbols. This requires linking libproc with
rpaulo [Thu, 6 Sep 2012 03:19:48 +0000 (03:19 +0000)]
Add support for demangling C++ symbols. This requires linking libproc with
libc++rt/libsupc++.

Discussed with: theraven

11 years agoAdd missing braces
kevlo [Thu, 6 Sep 2012 02:07:58 +0000 (02:07 +0000)]
Add missing braces

Obtained from: DragonFly

11 years agoFix test cases to work with the latest version of the API.
rpaulo [Thu, 6 Sep 2012 01:24:18 +0000 (01:24 +0000)]
Fix test cases to work with the latest version of the API.

11 years agoTypo fix and minor word swap.
gjb [Wed, 5 Sep 2012 23:07:02 +0000 (23:07 +0000)]
Typo fix and minor word swap.

PR: 171356
Submitted by: bdrewery
MFC After: 3 days

11 years agolibc/i386: Do not export .cerror.
jilles [Wed, 5 Sep 2012 21:41:05 +0000 (21:41 +0000)]
libc/i386: Do not export .cerror.

For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit
in the FBSDprivate_1.0 version. It looks like there is no reason for this
since it is not used from other libraries. Given that it cannot be accessed
from C and its strange calling convention, it is rather unlikely that other
things rely on it. Perhaps it is from a time when symbols could not be
hidden.

Not exporting .cerror causes it to be jumped to directly instead of via the
PLT.

This change also takes advantage of .cerror's new status by not saving and
loading %ebx before jumping to it. (Therefore, .cerror now saves and loads
%ebx itself.) Where there was a conditional jump to a jump to .cerror, the
conditional jump has been changed to jump to .cerror directly (many modern
CPUs don't do static prediction and in any case it is not much of a benefit
anyway).

This change makes libc.so.7 a few kilobytes smaller.

Reviewed by: kib

11 years agoAdd #defines for the bits in the PCI Express SLOT registers. Names
gavin [Wed, 5 Sep 2012 19:01:39 +0000 (19:01 +0000)]
Add #defines for the bits in the PCI Express SLOT registers.  Names
have been chosen based on the bit names in the PCI Express Base
Specification 3.0, and to match the predominant style of the existing
bit definitions.

MFC after: 1 week

11 years agoUsing %p in a format string requires a void *.
tuexen [Wed, 5 Sep 2012 18:52:01 +0000 (18:52 +0000)]
Using %p in a format string requires a void *.

MFC after: 10 days

11 years ago- If the PCIe "SLOT" flag is set, include this in the capability output
gavin [Wed, 5 Sep 2012 18:27:45 +0000 (18:27 +0000)]
- If the PCIe "SLOT" flag is set, include this in the capability output
- Fix printing of PCIe interrupt number, the shift was incorrect.

MFC after: 1 week

11 years ago- Simplify VM code by using vmspace_wired_count() for counting wired
zont [Wed, 5 Sep 2012 18:19:54 +0000 (18:19 +0000)]
- Simplify VM code by using vmspace_wired_count() for counting wired
memory of a process.

Reviewed by: avg
Approved by: kib (mentor)
MFC after: 2 weeks

11 years agoAfter r240104, make sure the hpt27xx driver also compiles with clang,
dim [Wed, 5 Sep 2012 17:13:08 +0000 (17:13 +0000)]
After r240104, make sure the hpt27xx driver also compiles with clang,
when it is statically linked into the kernel.

MFC after: 2 weeks
X-MFC-With: r240104

11 years agoUpdate to a pruned 0.16.
marcel [Wed, 5 Sep 2012 16:01:08 +0000 (16:01 +0000)]
Update to a pruned 0.16.

11 years agoDon't hardcode paths to MFS_IMAGE in the kernel config. When they don't
brooks [Wed, 5 Sep 2012 15:55:51 +0000 (15:55 +0000)]
Don't hardcode paths to MFS_IMAGE in the kernel config.  When they don't
exist they don't cause "make tinderbox" to fail.

Reported by: jhb

11 years ago- Explicitly call twe_done() to poll the hardware when looping in
jhb [Wed, 5 Sep 2012 14:31:58 +0000 (14:31 +0000)]
- Explicitly call twe_done() to poll the hardware when looping in
  twe_start() to simulate the behavior on 4.x where the driver dropped
  spl to allow interrupts to run to free up space in the command
  queue.  Be careful to only poll if we are going to make at least
  one more attempt to queue the current command.  Also, when polling,
  be careful to not call twe_startio() to queue more commands to avoid
  recursion.
- Move the buffer for formatting AEN messages into the softc instead of
  using a single driver-wide static buffer.

Requested by: scottl (1)
Tested by: Mike Tancsa @ Sentex

11 years agoAdd support for new Intel on-CPU Bull Mountain random number
kib [Wed, 5 Sep 2012 13:18:51 +0000 (13:18 +0000)]
Add support for new Intel on-CPU Bull Mountain random number
generator, found on IvyBridge and supposedly later CPUs, accessible
with RDRAND instruction.

From the Intel whitepapers and articles about Bull Mountain, it seems
that we do not need to perform post-processing of RDRAND results, like
AES-encryption of the data with random IV and keys, which was done for
Padlock. Intel claims that sanitization is performed in hardware.

Make both Padlock and Bull Mountain random generators support code
covered by kernel config options, for the benefit of people who prefer
minimal kernels. Also add the tunables to disable hardware generator
even if detected.

Reviewed by: markm, secteam (simon)
Tested by: bapt, Michael Moll <kvedulv@kvedulv.de>
MFC after: 3 weeks

11 years agoWhitespace cleanup.
des [Wed, 5 Sep 2012 12:24:50 +0000 (12:24 +0000)]
Whitespace cleanup.

11 years agoMerge recent vendor changes and sync code:
mm [Wed, 5 Sep 2012 12:02:09 +0000 (12:02 +0000)]
Merge recent vendor changes and sync code:
1862 incremental zfs receive fails for sparse file > 8PB
3112 ztest does not honor ZFS_DEBUG
3122 zfs destroy filesystem should prefetch blocks
3129 'zpool reopen' restarts resilvers
3130 ztest failure: Assertion failed:
       0 == dmu_objset_destroy(name, B_FALSE) (0x0 == 0x10)

References:
  https://www.illumos.org/issues/1862
  https://www.illumos.org/issues/3112
  https://www.illumos.org/issues/3122
  https://www.illumos.org/issues/3129
  https://www.illumos.org/issues/3130

Obtained from: illumos (vendor/illumos, vendor/illumos-sys)
MFC after: 2 weeks

11 years agoWhen WIFCONTINUED was added, the number of "first" macros grew from
jhb [Wed, 5 Sep 2012 11:55:53 +0000 (11:55 +0000)]
When WIFCONTINUED was added, the number of "first" macros grew from
three to four.

MFC after: 1 week

11 years agoOnly stop the BXE controller if it was first started. Stopping
silby [Wed, 5 Sep 2012 06:51:28 +0000 (06:51 +0000)]
Only stop the BXE controller if it was first started.  Stopping
an uninitialized controller can cause IPMI bus errors on some
systems.

Reviewed by: yongari
Obtained from: McAfee, Inc.
MFC after: 2 weeks

11 years agoRename {_,}pmap_unwire_pte_hold() to {_,}pmap_unwire_ptp() and update the
alc [Wed, 5 Sep 2012 06:02:54 +0000 (06:02 +0000)]
Rename {_,}pmap_unwire_pte_hold() to {_,}pmap_unwire_ptp() and update the
comment describing them.  Both the function names and the comment had grown
stale.  Quite some time has passed since these pmap implementations last
used the page's hold count to track the number of valid mapping within a
page table page.  Also, returning TRUE from pmap_unwire_ptp() rather than
_pmap_unwire_ptp() eliminates a few instructions from callers like
pmap_enter_quick_locked() where pmap_unwire_ptp()'s return value is used
directly by a conditional statement.

11 years agoAdd headers created by running configure.
marcel [Tue, 4 Sep 2012 23:27:07 +0000 (23:27 +0000)]
Add headers created by running configure.

11 years agoMerge ATF 0.16 from vendor/atf/dist.
marcel [Tue, 4 Sep 2012 23:16:58 +0000 (23:16 +0000)]
Merge ATF 0.16 from vendor/atf/dist.

Provenance: http://code.google.com/p/kyua
Discussed with: gibbs, gnn, keramida, mdf, mlaier,
Discussed with: Garrett Cooper

11 years agoStyle fixes.
ray [Tue, 4 Sep 2012 23:16:55 +0000 (23:16 +0000)]
Style fixes.

Suggested by:   mdf
Approved by: adrian (menthor)

11 years agoSupport another uchcom(4) device.
gavin [Tue, 4 Sep 2012 23:13:24 +0000 (23:13 +0000)]
Support another uchcom(4) device.

MFC after: 1 week

11 years agoImport ATF version 0,16
marcel [Tue, 4 Sep 2012 23:07:32 +0000 (23:07 +0000)]
Import ATF version 0,16

Discussed with: gibbs, gnn, keramida, mdf, mlaier,
Discussed with: Garrett Cooper

11 years agoUse the consistenly the size of a variable. This helps to keep the code
tuexen [Tue, 4 Sep 2012 22:45:00 +0000 (22:45 +0000)]
Use the consistenly the size of a variable. This helps to keep the code
simpler for the userland implementation.

MFC after: 3 days

11 years agoWhitespace change.
tuexen [Tue, 4 Sep 2012 22:40:49 +0000 (22:40 +0000)]
Whitespace change.

MFC after: 3 days

11 years agoNo memory barrier is required. This was pointed out by kib@ a while ago,
des [Tue, 4 Sep 2012 22:19:33 +0000 (22:19 +0000)]
No memory barrier is required.  This was pointed out by kib@ a while ago,
but I got distracted by other matters.

(for real this time)

11 years agoFix the build broken by r240099.
melifaro [Tue, 4 Sep 2012 22:17:33 +0000 (22:17 +0000)]
Fix the build broken by r240099.
Hide link_pfil_hook under _KERNEL macro.

MFC after:    3 weeks

11 years agoBump dates.
des [Tue, 4 Sep 2012 22:03:16 +0000 (22:03 +0000)]
Bump dates.

Reminded by: bz@

11 years agoAdd a configtest command.
des [Tue, 4 Sep 2012 21:56:16 +0000 (21:56 +0000)]
Add a configtest command.

Submitted by: gjb@
MFC after: 1 week

11 years ago* Rather than run the same 'ps' command twice, add 'kenv' which often
obrien [Tue, 4 Sep 2012 21:47:09 +0000 (21:47 +0000)]
* Rather than run the same 'ps' command twice, add 'kenv' which often
  gives machine unique values from the firmware.
* The kernel is more likely to be unique than /bin/ls (but no need to
  stuff many megabytes into /dev/random, so hash it).
* Change ordering to give larger variance across reboots to reduce
  predictability.

11 years agoAdd a prominent warning about these functions' unsuitability for
des [Tue, 4 Sep 2012 21:40:53 +0000 (21:40 +0000)]
Add a prominent warning about these functions' unsuitability for
cryptographic purposes, and recommend using arc4random(3) instead.

11 years agoRevert previous commit, which was performed in the wrong tree.
des [Tue, 4 Sep 2012 21:06:53 +0000 (21:06 +0000)]
Revert previous commit, which was performed in the wrong tree.

11 years agoAdd hpt27xx to GENERIC kernel for amd64 and i386 systems.
delphij [Tue, 4 Sep 2012 21:02:57 +0000 (21:02 +0000)]
Add hpt27xx to GENERIC kernel for amd64 and i386 systems.

MFC after: 2 weeks

11 years agoFailure to open netmap device is unrecoverable.
emaste [Tue, 4 Sep 2012 20:51:25 +0000 (20:51 +0000)]
Failure to open netmap device is unrecoverable.

There's no reason to "fail later" since there's nothing this tool can do in
netmap mode without /dev/netmap open.

11 years agoAdd a reasonable error message telling the caller to specify a program
gnn [Tue, 4 Sep 2012 20:14:37 +0000 (20:14 +0000)]
Add a reasonable error message telling the caller to specify a program
to be executed under hwpmc.  If there is no program to run then
exit.

11 years agoIntroduce new link-layer PFIL hook V_link_pfil_hook.
melifaro [Tue, 4 Sep 2012 19:43:26 +0000 (19:43 +0000)]
Introduce new link-layer PFIL hook V_link_pfil_hook.
Merge ether_ipfw_chk() and part of bridge_pfil() into
unified ipfw_check_frame() function called by PFIL.
This change was suggested by rwatson? @ DevSummit.

Remove ipfw headers from ether/bridge code since they are unneeded now.

Note this thange introduce some (temporary) performance penalty since
PFIL read lock has to be acquired for every link-level packet.

MFC after:     3 weeks

11 years agoFix duplicate entries for mwl(4):
jhb [Tue, 4 Sep 2012 19:19:36 +0000 (19:19 +0000)]
Fix duplicate entries for mwl(4):
- Move mwlfw from {amd64,i386}/conf/NOTES to sys/conf/NOTES (mwl(4) is
  already present in sys/conf/NOTES).
- Remove duplicate mwl(4) entries from {amd64,i386}/conf/NOTES.
- While here, add a description to the sfxge line in amd64/conf/NOTES.

11 years agoNo memory barrier is required. This was pointed out by kib@ a while ago,
des [Tue, 4 Sep 2012 19:04:02 +0000 (19:04 +0000)]
No memory barrier is required.  This was pointed out by kib@ a while ago,
but I got distracted by other matters.

11 years ago1. Use install -d to create the entropy_dir if missing so that we can do it
dougb [Tue, 4 Sep 2012 16:00:51 +0000 (16:00 +0000)]
1. Use install -d to create the entropy_dir if missing so that we can do it
   all in one command, with no permissions race.
2. Simplify the rotation logic by cd'ing into the directory, with a test
   to make sure that it succeeds.
3. Remove any files numbered higher than entropy_save_num. This helps when
   the user reduces the number, and may be useful for other purposes down
   the road.
4. Simplify the rotation logic by first testing the common case (it's a
   regular file) then testing if something else exists with the same name
   using elif. Also switch from using jot to simpler countdown format.
5. Fix logger lines and error messages to be more consistent, and wrap the
   code more consistently in the 80 column range. The "not a regular file"
   error message was mistakenly wrapped entirely in "quotes" which caused
   logger to include line-wrapping whitespace. Change that to wrap only
   the variables in quotes, which is both consistent and works better.
6. Update copyright to reflect the fact that changes were made this year.

Parts of 2-4 were taken from etc/periodic/daily/310.accounting

11 years agoExplicitly mention that "cp -p" copies ACLs.
trasz [Tue, 4 Sep 2012 12:27:23 +0000 (12:27 +0000)]
Explicitly mention that "cp -p" copies ACLs.

PR: docs/168962
MFC after: 1 month

11 years agoFix an error in setfacl(1) that manifested like this:
trasz [Tue, 4 Sep 2012 12:19:34 +0000 (12:19 +0000)]
Fix an error in setfacl(1) that manifested like this:

# setfacl -m u:trasz:rwx x
# setfacl -m u:root:rwx x
# getfacl x
# file: x
# owner: root
# group: wheel
user::rw-
user:root:rwx
user:trasz:rwx
group::r--
mask::rwx
other::r--
# setfacl -m u:root:rwx x
setfacl: x: acl_calc_mask() failed: Invalid argument
setfacl: x: failed to set ACL mask

For NFSv4 ACLs, this sort of situation would result in duplicated
entries.

MFC after: 1 month

11 years ago- Move jenkins.h to jenkins_hash.c
glebius [Tue, 4 Sep 2012 12:07:33 +0000 (12:07 +0000)]
- Move jenkins.h to jenkins_hash.c
- Provide missing function that can do hashing of arbitrary sized buffer.
- Refetch lookup3.c and do only minimal edits to it, so that diff between
  our jenkins_hash.c and lookup3.c is minimal.
- Add declarations for jenkins_hash(), jenkins_hash32() to sys/hash.h.
- Document these functions in hash(9)

Obtained from: http://burtleburtle.net/bob/c/lookup3.c

11 years agoIn getfacl(1) manual page, mention where to read about the ACL syntax.
trasz [Tue, 4 Sep 2012 12:02:23 +0000 (12:02 +0000)]
In getfacl(1) manual page, mention where to read about the ACL syntax.
PR submitter suggested adding it to acl(3) instead, but I don't think
pointing ordinary users at section 3 is a good idea.

PR: docs/162380
MFC after: 1 month

11 years agoMake "setfacl -bd" an alias for "setfacl -k". Previously it would crash
trasz [Tue, 4 Sep 2012 11:50:13 +0000 (11:50 +0000)]
Make "setfacl -bd" an alias for "setfacl -k".  Previously it would crash
on assert.

PR: bin/165807
MFC after: 1 month

11 years agoMake setfacl(1) behave properly in situations like "setfacl -kd".
trasz [Tue, 4 Sep 2012 11:43:00 +0000 (11:43 +0000)]
Make setfacl(1) behave properly in situations like "setfacl -kd".

MFC after: 1 month

11 years agoRemove unneeded ipfw headers introduced in r213447 from Infiniband code.
melifaro [Tue, 4 Sep 2012 10:56:30 +0000 (10:56 +0000)]
Remove unneeded ipfw headers introduced in r213447 from Infiniband code.

MFC after:     2 weeks

11 years agoFree memory allocated by procstat_getfiles(), which may make difference
trociny [Tue, 4 Sep 2012 05:54:43 +0000 (05:54 +0000)]
Free memory allocated by procstat_getfiles(), which may make difference
when procstat(1) is run with -a option.

Submitted by: Daniel Dettlaff <dmilith gmail com>
MFC after: 1 week

11 years agoAdd __BEGIN_DECLS and __END_DECLS to make libprocstat more C++-friendly.
trociny [Tue, 4 Sep 2012 05:51:50 +0000 (05:51 +0000)]
Add __BEGIN_DECLS and __END_DECLS to make libprocstat more C++-friendly.

Submitted by: Daniel Dettlaff <dmilith gmail com>
MFC after: 1 week

11 years agoUpdate arcmsr(4) to vendor version 1.20.00.25.
delphij [Tue, 4 Sep 2012 05:15:54 +0000 (05:15 +0000)]
Update arcmsr(4) to vendor version 1.20.00.25.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: Ching-Lung Huang <ching2048 areca com tw>
MFC after: 2 weeks

11 years agoAdd required USB AUDIO v2.0 structure definitions.
hselasky [Mon, 3 Sep 2012 19:17:25 +0000 (19:17 +0000)]
Add required USB AUDIO v2.0 structure definitions.

PR: misc/171254

11 years agoFix 'distributeworld' target when WITHOUT_GAMES is set.
gjb [Mon, 3 Sep 2012 18:17:21 +0000 (18:17 +0000)]
Fix 'distributeworld' target when WITHOUT_GAMES is set.

Reviewed by: des
Approved by: des
MFC after: 3 days
X-MFC-To: 9-only

11 years agoFix compact form of "synchronize" permission in setfacl(1) manual page - it
trasz [Mon, 3 Sep 2012 17:26:20 +0000 (17:26 +0000)]
Fix compact form of "synchronize" permission in setfacl(1) manual page - it
should be "s", not "S".

PR: docs/162380
MFC after: 2 weeks

11 years agoUpgrade OpenSSH to 6.1p1.
des [Mon, 3 Sep 2012 16:51:41 +0000 (16:51 +0000)]
Upgrade OpenSSH to 6.1p1.

11 years agoAdd more DWC OTG register definitions.
hselasky [Mon, 3 Sep 2012 15:22:02 +0000 (15:22 +0000)]
Add more DWC OTG register definitions.

Submitted by: Nick Hudson

11 years agoProvide a sysctl switch that allows to install ARP entries
glebius [Mon, 3 Sep 2012 14:29:28 +0000 (14:29 +0000)]
Provide a sysctl switch that allows to install ARP entries
with multicast bit set. FreeBSD refuses to install such
entries since 9.0, and this broke installations running
Microsoft NLB, which are violating standards.

Tested by: Tarasov Oleg <oleg_tarasov sg-tea.com>

11 years agoExplicitly document all variables in the net.link.ether.inet MIB.
glebius [Mon, 3 Sep 2012 14:16:16 +0000 (14:16 +0000)]
Explicitly document all variables in the net.link.ether.inet MIB.

11 years agoChange bridge(4) to use if_transmit for forwarding packets to underlying
glebius [Mon, 3 Sep 2012 10:08:20 +0000 (10:08 +0000)]
Change bridge(4) to use if_transmit for forwarding packets to underlying
interfaces instead of queueing.

Tested by: ray

11 years agoAdd missing braces.
ray [Mon, 3 Sep 2012 09:46:46 +0000 (09:46 +0000)]
Add missing braces.

Approved by: bschmidt (while mentor offline)
Pointed by:     gcooper
Pointy hat to:  ray

11 years ago- After r240026 sgrowsiz should be used in a safer maner.
zont [Mon, 3 Sep 2012 09:34:46 +0000 (09:34 +0000)]
- After r240026 sgrowsiz should be used in a safer maner.

Approved by: kib (mentor)
MCF after: 1 week

11 years ago- Mark some sysctls with CTLFLAG_TUN flag instead of CTLFLAG_RDTUN.
zont [Mon, 3 Sep 2012 09:26:56 +0000 (09:26 +0000)]
- Mark some sysctls with CTLFLAG_TUN flag instead of CTLFLAG_RDTUN.

Pointed out by: avg
Approved by: kib (mentor)
MFC after: 1 week

11 years agoAdd kern.hintmode sysctl variable to show current state of hints:
ray [Mon, 3 Sep 2012 08:52:05 +0000 (08:52 +0000)]
Add kern.hintmode sysctl variable to show current state of hints:
0 - loader hints in environment only;
1 - static hints only
2 - fallback mode (Dynamic KENV with fallback to kernel environment)
Add kern.hintmode write handler, accept only value 2. That will switch
static KENV to dynamic. So it will be possible to change device hints.

Approved by: adrian (mentor)

11 years agoCorrect an error in gxemul_disk_write(). It was issuing the command to
alc [Mon, 3 Sep 2012 02:32:00 +0000 (02:32 +0000)]
Correct an error in gxemul_disk_write().  It was issuing the command to
read from rather than write to the emulated disk.

Reviewed by: jmallett

11 years agoAdd myself to copyright sections, per CDDL license.
gjb [Mon, 3 Sep 2012 00:05:21 +0000 (00:05 +0000)]
Add myself to copyright sections, per CDDL license.

Requested by: mm

11 years agoRevert r240060: (Partial)
pfg [Sun, 2 Sep 2012 22:23:23 +0000 (22:23 +0000)]
Revert r240060: (Partial)

__BEGIN_DECLS and __END_DECLS in cdefs.h take care of the
__cplusplus mangling issues so most of the definitions
were redundant.

In the few places where they were not redundant we should
use BSD style instead of the guards used upstream.

Reported by: Yuri Pankov

11 years agoFix RPC headers for C++
pfg [Sun, 2 Sep 2012 21:04:40 +0000 (21:04 +0000)]
Fix RPC headers for C++

C++ mangling will cause trouble with variables like __rpc_xdr
in xdr.h so rename this to XDR.
While here add proper C++ guards to RPC headers.

PR: 137443
MFC after: 2 weeks

11 years agoMake sure we visit both symbol sections even if one of them doesn't
rpaulo [Sun, 2 Sep 2012 18:14:01 +0000 (18:14 +0000)]
Make sure we visit both symbol sections even if one of them doesn't
exist. This makes it possible to dtrace some C++ programs like devd.

11 years ago- Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz
zont [Sun, 2 Sep 2012 17:39:02 +0000 (17:39 +0000)]
- Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz
  and kern.sgrowsiz sysctls writable.

Approved by: kib (mentor)

11 years agoPartially revert r239959, after actually fixing most of the clang
dim [Sun, 2 Sep 2012 14:46:18 +0000 (14:46 +0000)]
Partially revert r239959, after actually fixing most of the clang
warnings in sys/gnu/fs/xfs.  The only warnings that still need to be
suppressed are those about array bound overruns of flexible array
members in xfs_dir2_{block,sf}.c, which are too expensive (in terms of
cascading code changes) to fix.

MFC after: 1 week
X-MFC-With: r239959

11 years agoFix a typo which results in RTT to be off by a factor of 10, if the RTT is
tuexen [Sun, 2 Sep 2012 12:37:30 +0000 (12:37 +0000)]
Fix a typo which results in RTT to be off by a factor of 10, if the RTT is
larger than 1 second.

MFC after: 3 days

11 years ago- Style(9) cleanup.
zont [Sun, 2 Sep 2012 11:03:18 +0000 (11:03 +0000)]
- Style(9) cleanup.

Approved by: kib (mentor)

11 years agoIn soreceive_generic() remove the optimization for the case when
trociny [Sun, 2 Sep 2012 07:33:52 +0000 (07:33 +0000)]
In soreceive_generic() remove the optimization for the case when
MSG_WAITALL is set, and it is possible to do the entire receive
operation at once if we block (resid <= hiwat). Actually it might make
the recv(2) with MSG_WAITALL flag get stuck when there is enough space
in the receiver buffer to satisfy the request but not enough to open
the window closed previously due to the buffer being full.

The issue can be reproduced using the following scenario:

On the sender side do 2 send(2) requests:

1) data of size much smaller than SOBUF_SIZE (e.g. SOBUF_SIZE / 10);
2) data of size equal to SOBUF_SIZE.

On the receiver side do 2 recv(2) requests with MSG_WAITALL flag set:

1) recv() data of SOBUF_SIZE / 10 size;
2) recv() data of SOBUF_SIZE size;

We totally fill the receiver buffer with one SOBUF_SIZE/10 size request
and partial SOBUF_SIZE request. When the first request is processed we
get SOBUF_SIZE/10 free space. It is just enough to receive the rest of
bytes for the second request, and soreceive_generic() blocks in the
part that is a subject of this change waiting for the rest. But the
window was closed when the buffer was filled and to avoid silly window
syndrome it opens only when available space is larger than sb_hiwat/4
or maxseg. So it is stuck and pending data is only sent via TCP window
probes.

Discussed with: kib (long ago)
MFC after: 2 weeks

11 years agoIn soreceive_generic() when checking if the type of mbuf has changed
trociny [Sun, 2 Sep 2012 07:29:37 +0000 (07:29 +0000)]
In soreceive_generic() when checking if the type of mbuf has changed
check it for MT_CONTROL type too, otherwise the assertion
"m->m_type == MT_DATA" below may be triggered by the following scenario:

- the sender sends some data (MT_DATA) and then a file descriptor
  (MT_CONTROL);
- the receiver calls recv(2) with a MSG_WAITALL asking for data larger
  than the receive buffer (uio_resid > hiwat).

MFC after: 2 week

11 years agoDisable strong signal diversity when enabling radar pulse detection
adrian [Sun, 2 Sep 2012 05:01:10 +0000 (05:01 +0000)]
Disable strong signal diversity when enabling radar pulse detection
for the AR5212 era NICs.

11 years agoAR5212 radar pulse fixes.
adrian [Sun, 2 Sep 2012 04:56:29 +0000 (04:56 +0000)]
AR5212 radar pulse fixes.

Fix the strong signal diversity capability setting - I had totally
messed up the indentation.

Set the default values to match what's in the .ini for now, rather than
what values I had previously gleaned from places.  This seems to work
quite well for the early AR5212 NICs I have.  Of course, later NICs
have different PHYs and the radar configuration is very card/board
dependent..

Tested:

 * ath1: AR5212 mac 5.3 RF5111 phy 4.1
   ath1: 2GHz radio: 0x0023; 5GHz radio: 0x0017

This detects 1, 5, 25, 50, 75, 100uS pulses reliably (with no interference.)

However, 10uS pulses don't detect reliably. That may be around the
transition between short and long pulses so some further tuning may
improve things.

11 years agoCalculate the new PTE value in pmap_enter() before acquiring any locks.
alc [Sun, 2 Sep 2012 04:39:07 +0000 (04:39 +0000)]
Calculate the new PTE value in pmap_enter() before acquiring any locks.

Move an assertion to the beginning of pmap_enter().

11 years agoFix a logic inversion in an assert to allow us to use dts files that
andrew [Sun, 2 Sep 2012 01:48:47 +0000 (01:48 +0000)]
Fix a logic inversion in an assert to allow us to use dts files that
include other files.

11 years ago Mark the ipfw interface type as not being ether. This fixes an issue
eadler [Sat, 1 Sep 2012 23:33:49 +0000 (23:33 +0000)]
Mark the ipfw interface type as not being ether. This fixes an issue
    where uuidgen tried to obtain a ipfw device's mac address which was
    always zero.

    PR: 170460
    Submitted by: wxs
    Reviewed by: bdrewery
    Reviewed by: delphij
    Approved by: cperciva
    MFC after: 1 week