]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoSimplify the code by using the new gr_add function
Baptiste Daroussin [Thu, 27 Dec 2012 14:35:06 +0000 (14:35 +0000)]
Simplify the code by using the new gr_add function

11 years agoNew gr_add function to provide a clean and safe method to append a new member
Baptiste Daroussin [Thu, 27 Dec 2012 14:30:19 +0000 (14:30 +0000)]
New gr_add function to provide a clean and safe method to append a new member
into an existing group.

Submitted by: db

11 years agoUse flopen(3) instead of open(2) + flock(2)
Baptiste Daroussin [Thu, 27 Dec 2012 14:09:50 +0000 (14:09 +0000)]
Use flopen(3) instead of open(2) + flock(2)

11 years agotest(1): Document == alias for =.
Jilles Tjoelker [Thu, 27 Dec 2012 13:21:37 +0000 (13:21 +0000)]
test(1): Document == alias for =.

Reviewed by: gjb
Requested by: gjb
MFC after: 1 week

11 years agoRemove an unused var.
Attilio Rao [Thu, 27 Dec 2012 12:53:46 +0000 (12:53 +0000)]
Remove an unused var.

Sponsored by: EMC / Isilon storage division
MFC after: 3 days

11 years agobr_prod_tail and br_cons_tail members are used as barrier to
Attilio Rao [Thu, 27 Dec 2012 12:36:58 +0000 (12:36 +0000)]
br_prod_tail and br_cons_tail members are used as barrier to
signal bug_ring ownership. However, instructions can be reordered
around members write leading to stale values for ie. br_prod_bufs.

Use correct memory barriers to ensure proper ordering of the
ownership tokens updates.

Sponsored by: EMC / Isilon storage division
MFC after: 2 weeks

11 years agouse nanosecond resolution, make sure gettimeofday
Luigi Rizzo [Thu, 27 Dec 2012 09:15:21 +0000 (09:15 +0000)]
use nanosecond resolution, make sure gettimeofday
is called at most every 100 packets.

11 years agoSome cleanups.
Michael Tuexen [Thu, 27 Dec 2012 08:10:58 +0000 (08:10 +0000)]
Some cleanups.

MFC after: 3 days

11 years agoMinor cleanups of debug messages.
Michael Tuexen [Thu, 27 Dec 2012 08:06:58 +0000 (08:06 +0000)]
Minor cleanups of debug messages.

MFC after: 3 days

11 years agoFix a copy and paste error.
Michael Tuexen [Thu, 27 Dec 2012 08:02:58 +0000 (08:02 +0000)]
Fix a copy and paste error.

MFC after: 3 days

11 years agoComments and fit to 80-columns.
Devin Teske [Thu, 27 Dec 2012 07:52:50 +0000 (07:52 +0000)]
Comments and fit to 80-columns.

11 years agoSimplify copying of group members by using memcpy
Baptiste Daroussin [Wed, 26 Dec 2012 23:16:24 +0000 (23:16 +0000)]
Simplify copying of group members by using memcpy

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

11 years agoFix off-by-one error in memory allocation: j entries, one new and a null
Baptiste Daroussin [Wed, 26 Dec 2012 23:14:33 +0000 (23:14 +0000)]
Fix off-by-one error in memory allocation: j entries, one new and a null
terminator is j + 2.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

11 years agoAdd the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
Mark Johnston [Wed, 26 Dec 2012 22:21:27 +0000 (22:21 +0000)]
Add the NO_SYNC_CACHE quirk for all Apple USB MSC devices, as they
typically do not handle the SYNCHRONIZE_CACHE command - they either
return an error or the firmware enters a reset loop.

Reviewed by: hselasky
Approved by: rstone (co-mentor)
MFC after: 2 weeks

11 years agoReset provider-specific fields when resending I/O request in low memory
Pawel Jakub Dawidek [Wed, 26 Dec 2012 20:07:47 +0000 (20:07 +0000)]
Reset provider-specific fields when resending I/O request in low memory
conditions. This fixes assertion which checks those fields when kernel is
compiled with DIAGNOSTIC.

Reported by: kib, pho
MFC after: 1 week

11 years agoUse DEVMETHOD_END, as suggested by hselasky@.
Raphael Kubo da Costa [Wed, 26 Dec 2012 19:14:21 +0000 (19:14 +0000)]
Use DEVMETHOD_END, as suggested by hselasky@.

Approved by: glebius

11 years agoUse the correct USB interface macros instead of USB_IF_CSI.
Raphael Kubo da Costa [Wed, 26 Dec 2012 19:12:31 +0000 (19:12 +0000)]
Use the correct USB interface macros instead of USB_IF_CSI.

As pointed out by hselasky@, USB_IF_CSI is the wrong macro here since we want
to declare the device's interface class, subclass and protocol, not class,
subclass and driver info.

Follow-up to r244704.

PR: kern/174707
Approved by: glebius
MFC after: 1 week

11 years agoIn case of the deletion of a user those whole database has to be regenerated,
Baptiste Daroussin [Wed, 26 Dec 2012 18:28:17 +0000 (18:28 +0000)]
In case of the deletion of a user those whole database has to be regenerated,
otherwise the user planned to be deleted remain in the pwd.db while removed from
the plain text password file.

11 years agoFix creating a user and adding it to a group
Baptiste Daroussin [Wed, 26 Dec 2012 18:14:45 +0000 (18:14 +0000)]
Fix creating a user and adding it to a group

Reported by: "Sam Fourman Jr." <sfourman@gmail.com>, dim

11 years agoFixup r244240: mp_ncpus will be 1 also in the !SMP and smp_disabled=1
Attilio Rao [Wed, 26 Dec 2012 15:20:32 +0000 (15:20 +0000)]
Fixup r244240: mp_ncpus will be 1 also in the !SMP and smp_disabled=1
case. There is no point in optimizing further the code and use a TRUE
litteral for a path that does heavyweight stuff anyway (like lock acq),
at the price of obfuscated code.

Use the appropriate check where necessary and remove a macro.

Sponsored by: EMC / Isilon storage division
MFC after: 3 days

11 years agoAdd vendor IDs for Broadcom USB dongles (BCM20702).
Gleb Smirnoff [Wed, 26 Dec 2012 15:10:20 +0000 (15:10 +0000)]
Add vendor IDs for Broadcom USB dongles (BCM20702).

PR: kern/174707
Submitted by: rakuco

11 years agoAlways initialize pattern_buf pointers to NULL, otherwise AMD64 machine
David Xu [Wed, 26 Dec 2012 13:07:17 +0000 (13:07 +0000)]
Always initialize pattern_buf pointers to NULL, otherwise AMD64 machine
panics with:
   free: address xxx(yyy) has not been allocated.
it can be triggered by hald.

11 years agoFix libproc test case to work with clang premature optimization
Sergey Kandaurov [Wed, 26 Dec 2012 05:11:48 +0000 (05:11 +0000)]
Fix libproc test case to work with clang premature optimization
observed with -O2 (used by default).
Avoid function inlining for t1_bkpt_t on which we set a breakpoint.
Otherwise the address of the function is never called thus the
breakpoint never triggers.

Reported by: zont
Reviewed by: rpaulo

11 years agoAttempt to clarify that for ZFS, all file systems under
Rick Macklem [Tue, 25 Dec 2012 22:47:49 +0000 (22:47 +0000)]
Attempt to clarify that for ZFS, all file systems under
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.

MFC after: 2 weeks

11 years agoAttempt to clarify that for ZFS, all file systems under
Rick Macklem [Tue, 25 Dec 2012 22:34:43 +0000 (22:34 +0000)]
Attempt to clarify that for ZFS, all file systems under
the NFSv4 root must be exported. This is because ZFS
checks exports itself.
This is a content change.

MFC after: 2 weeks

11 years agoUse correct size in snprintf.
Antoine Brodin [Tue, 25 Dec 2012 17:06:05 +0000 (17:06 +0000)]
Use correct size in snprintf.
Remove unused buffer.

PR: 174631
Submitted by: Henning Petersen
MFC after: 1 month

11 years ago Garbage collect carp_cksum().
Gleb Smirnoff [Tue, 25 Dec 2012 14:29:38 +0000 (14:29 +0000)]
  Garbage collect carp_cksum().

11 years agosh: Prefer strsignal() to accessing sys_siglist directly.
Jilles Tjoelker [Tue, 25 Dec 2012 14:17:09 +0000 (14:17 +0000)]
sh: Prefer strsignal() to accessing sys_siglist directly.

Accessing sys_siglist directly requires rtld to copy it from libc to the sh
executable's BSS. Also, strsignal() will put in the signal number for
unknown signals (FreeBSD-specific) so we need not do that ourselves.

Unfortunately, there is no function for sys_signame.

11 years ago Change net.inet.carp.demotion sysctl to add the supplied value
Gleb Smirnoff [Tue, 25 Dec 2012 14:08:13 +0000 (14:08 +0000)]
  Change net.inet.carp.demotion sysctl to add the supplied value
to the current demotion factor instead of assigning it.

  This allows external scripts to control demotion factor together
with kernel in a raceless manner.

11 years ago Fix sysctl_handle_int() usage. Either arg1 or arg2 should be supplied,
Gleb Smirnoff [Tue, 25 Dec 2012 13:55:21 +0000 (13:55 +0000)]
 Fix sysctl_handle_int() usage. Either arg1 or arg2 should be supplied,
and arg2 doesn't pass size of arg1.

11 years ago- Update manual pages accordingly to r244384 and r244385.
Andrey Zonov [Tue, 25 Dec 2012 13:43:01 +0000 (13:43 +0000)]
- Update manual pages accordingly to r244384 and r244385.

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

11 years ago The SIOCSIFFLAGS ioctl handler runs if_up()/if_down() that notify
Gleb Smirnoff [Tue, 25 Dec 2012 13:01:58 +0000 (13:01 +0000)]
  The SIOCSIFFLAGS ioctl handler runs if_up()/if_down() that notify
all interested parties in case if interface flag IFF_UP has changed.

  However, not only SIOCSIFFLAGS can raise the flag, but SIOCAIFADDR
and SIOCAIFADDR_IN6 can, too. The actual |= is done not in the protocol
code, but in code of interface drivers. To fix this historical layering
violation, we will check whether ifp->if_ioctl(SIOCSIFADDR) raised the
IFF_UP flag, and if it did, run the if_up() handler.

  This fixes configuring an address under CARP control on an interface
that was initially !IFF_UP.

P.S. I intentionally omitted handling the IFF_SMART flag. This flag was
never ever used in any driver since it was introduced, and since it
means another layering violation, it should be garbage collected instead
of pretended to be supported.

11 years agoAdd more debugging to help with diagnosis of program-flow when needed.
Devin Teske [Tue, 25 Dec 2012 10:47:45 +0000 (10:47 +0000)]
Add more debugging to help with diagnosis of program-flow when needed.

11 years agoRemove unnecessary duplicate initialization of the dialog(1) API (automatically
Devin Teske [Tue, 25 Dec 2012 09:30:25 +0000 (09:30 +0000)]
Remove unnecessary duplicate initialization of the dialog(1) API (automatically
bootstrapped on-include unless DIALOG_SELF_INITIALIZE is set to NO before-hand)

11 years agoFix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.
Andrew Turner [Tue, 25 Dec 2012 07:37:33 +0000 (07:37 +0000)]
Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.

* The __glibcxx_max macro came from GCC svn r138078, the last GPLv2
  revision of this file.
* I wrote the updated __glibcxx_min macro.

11 years agovarious connections to last commit
Luigi Rizzo [Tue, 25 Dec 2012 07:29:25 +0000 (07:29 +0000)]
various connections to last commit

11 years agoMinor style(9) changes:
Gleb Smirnoff [Mon, 24 Dec 2012 21:35:48 +0000 (21:35 +0000)]
Minor style(9) changes:
- Remove declaration in initializer.
- Add empty line between logical blocks.

11 years agoFix more regression issue after r244503.
Hans Petter Selasky [Mon, 24 Dec 2012 10:10:18 +0000 (10:10 +0000)]
Fix more regression issue after r244503.

usbd_transfer_setup() does not set a default length for USB transfers.
Only the number of frames is automatically setup.

MFC after: 1 week

11 years agosmall cleanup of the code, and add support for running multiple
Luigi Rizzo [Sun, 23 Dec 2012 23:03:45 +0000 (23:03 +0000)]
small cleanup of the code, and add support for running multiple
threads on each socket.

11 years agoDo not force a writer to the devfs file to drain the buffer writes.
Konstantin Belousov [Sun, 23 Dec 2012 22:43:27 +0000 (22:43 +0000)]
Do not force a writer to the devfs file to drain the buffer writes.

Requested and tested by: Ian Lepore <freebsd@damnhippie.dyndns.org>
MFC after: 2 weeks

11 years agoenable building picobsd with CC instead of CLANG
Luigi Rizzo [Sun, 23 Dec 2012 22:41:54 +0000 (22:41 +0000)]
enable building picobsd with CC instead of CLANG

11 years agoPull in r170096 from upstream clang trunk:
Andrew Turner [Sun, 23 Dec 2012 21:41:39 +0000 (21:41 +0000)]
Pull in r170096 from upstream clang trunk:

  Initial support for FreeBSD on ARM.

11 years agoRemove extraneous space and new-line.
Matthew Seaman [Sun, 23 Dec 2012 20:39:03 +0000 (20:39 +0000)]
Remove extraneous space and new-line.

Submitted by: pjd, gcooper
Approved by: bapt
MFC after: 2 weeks

11 years agoFix the Makefile so it can build gssd.c after r244604.
Rick Macklem [Sun, 23 Dec 2012 20:12:57 +0000 (20:12 +0000)]
Fix the Makefile so it can build gssd.c after r244604.

MFC after: 2 weeks

11 years agozfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead
Andriy Gapon [Sun, 23 Dec 2012 19:58:41 +0000 (19:58 +0000)]
zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead

To do: remove KM_ZERO declaration
Pointyhat to: avg (for mindlessly using the pseudo-flag)
MFC after: instantly (to fix stable/8 build)

11 years agoAdd parentheses to IP_FW_ARG_TABLEARG() definition.
Alexander V. Chernikov [Sun, 23 Dec 2012 18:35:42 +0000 (18:35 +0000)]
Add parentheses to IP_FW_ARG_TABLEARG() definition.

Suggested by: glebius
MFC with: r244633

11 years agoUse unified IP_FW_ARG_TABLEARG() macro for most tablearg checks.
Alexander V. Chernikov [Sun, 23 Dec 2012 16:28:18 +0000 (16:28 +0000)]
Use unified IP_FW_ARG_TABLEARG() macro for most tablearg checks.
Log real value instead of IP_FW_TABLEARG (65535) in ipfw_log().

Noticed by: Vitaliy Tokarenko <rphone@ukr.net>
MFC after: 2 weeks

11 years agoCorrect a series of errors in the hand-rolled locking for drace_debug.c:
Ryan Stone [Sun, 23 Dec 2012 15:50:37 +0000 (15:50 +0000)]
Correct a series of errors in the hand-rolled locking for drace_debug.c:

- Use spinlock_enter()/spinlock_exit() to prevent a thread holding a
  debug lock from being preempted to prevent other threads waiting
  on that lock from starvation.

- Handle the possibility of CPU migration in between the fetch of curcpu
  and the call to spinlock_enter() by saving curcpu in a local variable.

- Use memory barriers to prevent reordering of loads and stores of the
  data protected by the lock outside of the critical section

- Eliminate false sharing of the locks by moving them into the structures
  that they protect and aligning them to a cacheline boundary.

- Record the owning thread in the lock to make debugging future problems
  easier.

Reviewed by: rpaulo (initial version)
MFC after: 2 weeks

11 years agoUPDATING: add a note about the clang+zfs+i386 stack overflow issue
Andriy Gapon [Sun, 23 Dec 2012 13:04:04 +0000 (13:04 +0000)]
UPDATING: add a note about the clang+zfs+i386 stack overflow issue

11 years agoUpgrade our copy of llvm/clang to 3.2 release.
Dimitry Andric [Sun, 23 Dec 2012 13:04:00 +0000 (13:04 +0000)]
Upgrade our copy of llvm/clang to 3.2 release.

Release notes for llvm:
http://llvm.org/releases/3.2/docs/ReleaseNotes.html

Release notes for clang:
http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html

MFC after: 2 weeks

11 years agolock.9: fix incorrect descriptions of LK_SHARED and LK_DOWNGRADE behavior
Andriy Gapon [Sun, 23 Dec 2012 12:56:04 +0000 (12:56 +0000)]
lock.9: fix incorrect descriptions of LK_SHARED and LK_DOWNGRADE behavior

Reviewed by: attilio
MFC after: 5 days
X-MFC after: r243900

11 years agoThird time's the charm. pkg -N output needs to go to stderr.
Matthew Seaman [Sun, 23 Dec 2012 11:22:18 +0000 (11:22 +0000)]
Third time's the charm.  pkg -N output needs to go to stderr.

Approved by: bapt
MFC after: 2 weeks

11 years agoFix regression issue after r244503.
Hans Petter Selasky [Sun, 23 Dec 2012 10:21:01 +0000 (10:21 +0000)]
Fix regression issue after r244503.

MFC after: 1 week

11 years agoDocument the new gssd daemon options added by r244604.
Rick Macklem [Sat, 22 Dec 2012 23:34:28 +0000 (23:34 +0000)]
Document the new gssd daemon options added by r244604.
This is a content change.

MFC after: 2 weeks

11 years agoIt was reported via email that some sshds create kerberos
Rick Macklem [Sat, 22 Dec 2012 23:21:17 +0000 (23:21 +0000)]
It was reported via email that some sshds create kerberos
credential cache files with names other than /tmp/krb5cc_<uid>.
The gssd daemon does not know how to find these credential caches.
This patch implements a new option "-s" that does a search for
credential cache files, using roughly the same algorithm as the
gssd daemon for Linux uses. The gssd behaviour is only changed
if the new "-s" option is specified. It also implements two other
new options related to the "-s" option.

Reported by: Piete.Brooks at cl.cam.ac.uk, Herbert Poeckl
Tested by: Herbert Poeckl (admin at ist.tugraz.at), Illias A. Marinos
MFC after: 2 weeks

11 years agoMFV r244559:
Martin Matuska [Sat, 22 Dec 2012 21:32:12 +0000 (21:32 +0000)]
MFV r244559:
Update contrib/xz to version 5.0.4

MFC after: 2 weeks

11 years agoFix a bug in ld --gc-sections: it strips out .note sections, while it
Dimitry Andric [Sat, 22 Dec 2012 20:46:46 +0000 (20:46 +0000)]
Fix a bug in ld --gc-sections: it strips out .note sections, while it
should never do so.  This can cause global constructors and destructors
to not be executed at run-time, resulting in crashes and other strange
behaviour.

Reported by: rene
MFC after: 1 week

11 years agoPull in r170353 from upstream llvm trunk:
Dimitry Andric [Sat, 22 Dec 2012 20:16:21 +0000 (20:16 +0000)]
Pull in r170353 from upstream llvm trunk:

  Fix another SROA crasher, PR14601.

  This was a silly oversight, we weren't pruning allocas which were used
  by variable-length memory intrinsics from the set that could be widened
  and promoted as integers. Fix that.

This should fix the following assertion failure:

  Assertion failed: (CanSROA), function visitUsers, file
  /usr/src/lib/clang/libllvmscalaropts/../../../contrib/llvm/lib/Transforms/Scalar/SROA.cpp,
  line 2395.

Reported by: gerald

11 years agoSwitch from 'pkg -n' to 'pkg -N' as the test for pkgn activation
Matthew Seaman [Sat, 22 Dec 2012 15:13:16 +0000 (15:13 +0000)]
Switch from 'pkg -n' to 'pkg -N' as the test for pkgn activation
status. '-n' is already used extensively elsewhere in pkgng (to mean
'dry-run') and this reduces the potential confusion

Submitted by: eadler
Approved by: bapt
MFC after: 2 weeks

11 years agoVendor import of clang tags/RELEASE_32/final r170710 (effectively, 3.2
Dimitry Andric [Sat, 22 Dec 2012 15:00:54 +0000 (15:00 +0000)]
Vendor import of clang tags/RELEASE_32/final r170710 (effectively, 3.2
release):
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final@170710

11 years agoVendor import of llvm tags/RELEASE_32/final r170710 (effectively, 3.2
Dimitry Andric [Sat, 22 Dec 2012 14:58:30 +0000 (14:58 +0000)]
Vendor import of llvm tags/RELEASE_32/final r170710 (effectively, 3.2
release):
http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_32/final@170710

11 years agoMangle label names containing spaces, non-printable characters '%' or
Jaakko Heinonen [Sat, 22 Dec 2012 13:43:12 +0000 (13:43 +0000)]
Mangle label names containing spaces, non-printable characters '%' or
'"'.  Mangling is only done for label names read from file system
metadata. Encoding resembles URL encoding. For example, the space
character becomes %20.

Help by: kib
Discussed with: imp, kib, pjd

11 years agoReject spaces and double quotation marks in device names. devctl(4)
Jaakko Heinonen [Sat, 22 Dec 2012 13:33:28 +0000 (13:33 +0000)]
Reject spaces and double quotation marks in device names. devctl(4)
and devd(8) can't handle names with such characters properly.

PR: bin/144736, kern/161912
Discussed with: imp, kib, pjd

11 years agoFixup r240424: On entering KDB backends, the hijacked thread to run
Attilio Rao [Sat, 22 Dec 2012 09:37:34 +0000 (09:37 +0000)]
Fixup r240424: On entering KDB backends, the hijacked thread to run
interrupt context can still be idlethread. At that point, without the
panic condition, it can still happen that idlethread then will try to
acquire some locks to carry on some operations.

Skip the idlethread check on block/sleep lock operations when KDB is
active.

Reported by: jh
Tested by: jh
MFC after: 1 week

11 years agocxgbe(4): Add support for the T440-LP-CR card. This is the 4x10G low
Navdeep Parhar [Sat, 22 Dec 2012 07:47:07 +0000 (07:47 +0000)]
cxgbe(4): Add support for the T440-LP-CR card.  This is the 4x10G low
profile card with a QSFP+ transceiver.

MFC after: 3 days

11 years agoAdd the missing '$' from the LIBNETBSD variable
Andrew Turner [Sat, 22 Dec 2012 04:53:35 +0000 (04:53 +0000)]
Add the missing '$' from the LIBNETBSD variable

11 years agoMake struct fstate aligned to the same as an int as its pointer is cast to
Andrew Turner [Sat, 22 Dec 2012 04:11:59 +0000 (04:11 +0000)]
Make struct fstate aligned to the same as an int as its pointer is cast to
an int pointer in args.c. This fixes an issue with ARM where the struct
will be byte aligned but an int pointer must be 4 byte aligned.

11 years agoif_start() is being used here as a way of kick-starting the new queue
Adrian Chadd [Sat, 22 Dec 2012 01:17:49 +0000 (01:17 +0000)]
if_start() is being used here as a way of kick-starting the new queue
processing.  For if_transmit() style hardware drivers (which none publicly
exist yet, for wireless) they will need to still implement if_start()
but only to re-start the TX queue.

11 years agoRemove a use of if_start() - instead, use if_transmit() to dispatch the
Adrian Chadd [Sat, 22 Dec 2012 01:16:28 +0000 (01:16 +0000)]
Remove a use of if_start() - instead, use if_transmit() to dispatch the
frame.

11 years agoThe manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
Olivier Houchard [Sat, 22 Dec 2012 01:04:29 +0000 (01:04 +0000)]
The manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
allocate a map or mapping resources.  That seems to imply that any memory
allocations it does must use M_NOWAIT and check for NULL.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years agoThe VM_MEMATTR_ constants are enumerated, not a bitset. Compare accordingly.
Olivier Houchard [Sat, 22 Dec 2012 01:03:23 +0000 (01:03 +0000)]
The VM_MEMATTR_ constants are enumerated, not a bitset.  Compare accordingly.

Submitted by: Ian Lepore <freebsd@damnhippie.dyndns.org>

11 years ago - Reduce buffer size from LINE_MAX to PATH_MAX, there is no point to store
Xin LI [Fri, 21 Dec 2012 22:20:59 +0000 (22:20 +0000)]
 - Reduce buffer size from LINE_MAX to PATH_MAX, there is no point to store
   path longer than this.
 - Fix an unreached case of check against sizeof buf, which in turn leads
   to an off-by-one nul byte write on the stack.  The original condition
   can never be satisfied because the passed boundary is the maximum value
   that can be returned, so code was harmless.

MFC after: 1 month

11 years agoReduce stack usage in the USB audio driver by moving some large stack
Hans Petter Selasky [Fri, 21 Dec 2012 21:41:23 +0000 (21:41 +0000)]
Reduce stack usage in the USB audio driver by moving some large stack
elements to the USB audio softc structure. This fixes a double CPU
fault when attaching USB audio devices in 10-current for i386 at
least.

MFC after: 1 week

11 years agoSplit dialog(1)-based validators for hostname/netmask into two, providing
Devin Teske [Fri, 21 Dec 2012 21:33:47 +0000 (21:33 +0000)]
Split dialog(1)-based validators for hostname/netmask into two, providing
transparent validators that can be used free of dialog(1) where needed.

Syntax/return of the original dialog(1)-based validators remains unchanged.

11 years agoRemove unused include.
Devin Teske [Fri, 21 Dec 2012 21:03:34 +0000 (21:03 +0000)]
Remove unused include.

11 years agoAdd NetBSD's mtree to the tree and install it as nmtree as the first step
Brooks Davis [Fri, 21 Dec 2012 21:00:00 +0000 (21:00 +0000)]
Add NetBSD's mtree to the tree and install it as nmtree as the first step
towards replacing our mtree.

Sponsored by: DARPA, AFRL
Thanks to: cristos@NetBSD for reviewing and committing my patches
wiz@NetBSD for fixing typos in my patches

11 years agoUpdate vendor/xz from v5.0 branch to 5.0.4
Martin Matuska [Fri, 21 Dec 2012 20:47:57 +0000 (20:47 +0000)]
Update vendor/xz from v5.0 branch to 5.0.4

Git commit: 20778053a07eb90c159c1377ca8dc05a90fd530b

11 years agoChange axiom for initialization. Including script can disable (default)
Devin Teske [Fri, 21 Dec 2012 20:46:58 +0000 (20:46 +0000)]
Change axiom for initialization. Including script can disable (default)
automatic initialization by setting appropriate variable to particular value.

11 years agoAdd libnetbsd, a thin compatibility layer intended to allow a limited
Brooks Davis [Fri, 21 Dec 2012 20:37:38 +0000 (20:37 +0000)]
Add libnetbsd, a thin compatibility layer intended to allow a limited
set of NetBSD software to compile as part of the FreeBSD build with
little or no modifiction.  It is built as a static library and not
installed for general use.  Likewise, its header files are not
installed.

Sponsored by: DARPA, AFRL

11 years agoRemove erroneous use of "local" (not in a function).
Devin Teske [Fri, 21 Dec 2012 20:36:12 +0000 (20:36 +0000)]
Remove erroneous use of "local" (not in a function).

11 years agoNew f_show_info() function for dialog(1) --infobox using printf(1) syntax.
Devin Teske [Fri, 21 Dec 2012 20:29:28 +0000 (20:29 +0000)]
New f_show_info() function for dialog(1) --infobox using printf(1) syntax.

11 years agoUse f_show_help() where printf(1) syntax is desired.
Devin Teske [Fri, 21 Dec 2012 20:11:41 +0000 (20:11 +0000)]
Use f_show_help() where printf(1) syntax is desired.

11 years agoIn preparation for making 'pkg -n' the one true method of determining
Matthew Seaman [Fri, 21 Dec 2012 20:01:13 +0000 (20:01 +0000)]
In preparation for making 'pkg -n' the one true method of determining
whether a system has been configured to use pkgng, cause /usr/sbin/pkg
recognise a -n option and exit with a failure code when the pkg port
is not installed.

Approved by: bapt
MFC after: 2 weeks

11 years agocxgbe(4): must hold a write-lock on the table while allocating an L2
Navdeep Parhar [Fri, 21 Dec 2012 19:28:17 +0000 (19:28 +0000)]
cxgbe(4): must hold a write-lock on the table while allocating an L2
entry for switching.

MFC after: 3 days

11 years agoImprove the debugging abilities and clean up debug messages. In most cases,
Devin Teske [Fri, 21 Dec 2012 19:26:17 +0000 (19:26 +0000)]
Improve the debugging abilities and clean up debug messages. In most cases,
all one has to do is set the environment variable DEBUGGING to get the debug
messages to appear on the console.

11 years agoPut kthreads under curproc so they are attached to nvmecontrol rather
Jim Harris [Fri, 21 Dec 2012 19:13:48 +0000 (19:13 +0000)]
Put kthreads under curproc so they are attached to nvmecontrol rather
than pid 0.

Sponsored by: Intel

11 years agoAdd much-needed dialog(1) --inputbox function for simplifying the process of
Devin Teske [Fri, 21 Dec 2012 18:58:19 +0000 (18:58 +0000)]
Add much-needed dialog(1) --inputbox function for simplifying the process of
requesting input from the user.

11 years agoVendor import of pack_dev.* from NetBSD's mknod at 2012-12-21
Brooks Davis [Fri, 21 Dec 2012 17:08:01 +0000 (17:08 +0000)]
Vendor import of pack_dev.* from NetBSD's mknod at 2012-12-21

11 years agoVendor import of NetBSD's mtree at 2012-12-21
Brooks Davis [Fri, 21 Dec 2012 16:54:00 +0000 (16:54 +0000)]
Vendor import of NetBSD's mtree at 2012-12-21

11 years agoFix socket calls on error post-r243965.
Kevin Lo [Fri, 21 Dec 2012 15:54:13 +0000 (15:54 +0000)]
Fix socket calls on error post-r243965.

Submitted by: Garrett Cooper

11 years agoMove the 64-bit _setjmp to lib/libstand.
Rui Paulo [Fri, 21 Dec 2012 15:15:35 +0000 (15:15 +0000)]
Move the 64-bit _setjmp to lib/libstand.

11 years agoRegression issue:
Hans Petter Selasky [Fri, 21 Dec 2012 14:17:39 +0000 (14:17 +0000)]
Regression issue:
Use a boundary of zero, hence a PAGE_SIZE boundary
is implied by all memory allocations.

Background:
Busdma has problems to allocate more than PAGE_SIZE
bytes when the boundary is PAGE_SIZE bytes too.
Initially it was thought that a boundary of PAGE_SIZE
bytes will only affect loading of DMA memory, so that
segments get split correctly, but it also affects
allocation of DMA'able memory.

Solution:
USB can detect big segments and split them as required
by the USB code.

MFC after: 1 week
Reported by: gonzo

11 years agoFixup r218424: uio_yield() was scaling directly to userland priority.
Attilio Rao [Fri, 21 Dec 2012 13:14:12 +0000 (13:14 +0000)]
Fixup r218424: uio_yield() was scaling directly to userland priority.
When kern_yield() was introduced with the possibility to specify
a new priority, the behaviour changed by not lowering priority at all
in the consumers, making the yielding mechanism highly ineffective for
high priority kthreads like bufdaemon, syncer, vlrudaemon, etc.
There are no evidences that consumers could bear with such change in
semantic and this situation could finally lead to bugs similar to the
ones fixed in r244240.
Re-specify userland pri for kthreads involved.

Tested by: pho
Reviewed by: kib, mdf
MFC after: 1 week

11 years ago Comment fix: there is no ub_ptr, instead explain meaning of uz_count
Gleb Smirnoff [Fri, 21 Dec 2012 10:09:45 +0000 (10:09 +0000)]
  Comment fix: there is no ub_ptr, instead explain meaning of uz_count
field verbally.

11 years agoBuild a 64 bit version of the FICL library. This is need for a 64 bit
Rui Paulo [Fri, 21 Dec 2012 05:22:14 +0000 (05:22 +0000)]
Build a 64 bit version of the FICL library. This is need for a 64 bit
EFI bootloader (amd64 only for now).

This is not yet connected to the build.

11 years agoDivine the array size by using 'nitems(array)' instead of using magic numbers.
Neel Natu [Fri, 21 Dec 2012 04:44:40 +0000 (04:44 +0000)]
Divine the array size by using 'nitems(array)' instead of using magic numbers.

Suggested by: Garrett Cooper

11 years agoNote why fast frames is disabled for 802.11n NICs now.
Adrian Chadd [Fri, 21 Dec 2012 04:28:05 +0000 (04:28 +0000)]
Note why fast frames is disabled for 802.11n NICs now.

It actually works, but net80211 handles A-MPDU and Fast frames
incorrectly; it tries enabling both in some instances, with tragic
results.

11 years agoSort default option lists
Ed Maste [Fri, 21 Dec 2012 02:18:11 +0000 (02:18 +0000)]
Sort default option lists

11 years agoThe MPtable specification allows for an 8-bit "BUS ID" and "I/O APIC ID".
Neel Natu [Fri, 21 Dec 2012 01:31:56 +0000 (01:31 +0000)]
The MPtable specification allows for an 8-bit "BUS ID" and "I/O APIC ID".

Since the 'busses[]' and 'apics[]' arrays are indexed by these 8-bit IDs
make sure that they have enough space to accomodate up to 256 entries.

Submitted by: Ravi Shamanna
Obtained from: NetApp

11 years agoTeach acpidump to dump the DMA Remapping Reporting table (aka DMAR).
Neel Natu [Fri, 21 Dec 2012 01:19:48 +0000 (01:19 +0000)]
Teach acpidump to dump the DMA Remapping Reporting table (aka DMAR).

The DMAR table is documented in chapter 8 of the Intel VT-d specification.

Reviewed by: jhb
Obtained from: NetApp