]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoFix build.
glebius [Thu, 5 Sep 2013 13:53:25 +0000 (13:53 +0000)]
Fix build.

10 years agoFix build.
glebius [Thu, 5 Sep 2013 13:46:30 +0000 (13:46 +0000)]
Fix build.
counter.h requires systm.h

10 years agoThe vm_pageout_flush() functions sbusies pages in the passed pages
kib [Thu, 5 Sep 2013 12:56:08 +0000 (12:56 +0000)]
The vm_pageout_flush() functions sbusies pages in the passed pages
run.  After that, the pager put method is called, usually translated
to VOP_WRITE().  For the filesystems which use buffer cache,
bufwrite() sbusies the buffer pages again, waiting for the xbusy state
to drain.  The later is done in vfs_drain_busy_pages(), which is
called with the buffer pages already sbusied (by vm_pageout_flush()).

Since vfs_drain_busy_pages() can only wait for one page at the time,
and during the wait, the object lock is dropped, previous pages in the
buffer must be protected from other threads busying them.  Up to the
moment, it was done by xbusying the pages, that is incompatible with
the sbusy state in the new implementation of busy.  Switch to sbusy.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation

10 years agoThe vm_page_trysbusy() should not fail when shared busy counter or
kib [Thu, 5 Sep 2013 12:54:40 +0000 (12:54 +0000)]
The vm_page_trysbusy() should not fail when shared busy counter or
VPB_BIT_WAITERS flag were changed between reading of busy_lock and the
cas.  The vm_page_sbusy(), which is the only user of
vm_page_trysbusy() in the tree, panics on the failure, which in these
cases is transient and do not mean that the current page state
prevents sbusying.

Retry the operation inside vm_page_trysbusy() if cas failed, only
return a failure when VPB_BIT_SHARED is cleared.

Reported and tested by: pho
Reviewed by: attilio
Sponsored by: The FreeBSD Foundation

10 years agoauthpf needs /var/authpf to exist and be writable by group authpf.
des [Thu, 5 Sep 2013 12:35:23 +0000 (12:35 +0000)]
authpf needs /var/authpf to exist and be writable by group authpf.

10 years agoCorrect two comments.
hselasky [Thu, 5 Sep 2013 12:21:11 +0000 (12:21 +0000)]
Correct two comments.

10 years agoThe fget() function now takes pointer to cap_rights_t, so change 0 to NULL.
pjd [Thu, 5 Sep 2013 11:59:23 +0000 (11:59 +0000)]
The fget() function now takes pointer to cap_rights_t, so change 0 to NULL.

10 years agoHandle cases where capability rights are not provided.
pjd [Thu, 5 Sep 2013 11:58:12 +0000 (11:58 +0000)]
Handle cases where capability rights are not provided.

Reported by: kib

10 years agoFix !CAPABILITIES build.
glebius [Thu, 5 Sep 2013 10:24:09 +0000 (10:24 +0000)]
Fix !CAPABILITIES build.

10 years agoAdd support for DLINK DWA-127 Wireless Adapter
br [Thu, 5 Sep 2013 10:09:24 +0000 (10:09 +0000)]
Add support for DLINK DWA-127 Wireless Adapter

Approved by: cognet (mentor)

10 years agoRemove stub implementation.
ae [Thu, 5 Sep 2013 09:44:09 +0000 (09:44 +0000)]
Remove stub implementation.

MFC after: 1 week

10 years agoCorrect the logic broken in my last commit.
pjd [Thu, 5 Sep 2013 09:36:19 +0000 (09:36 +0000)]
Correct the logic broken in my last commit.

Reported by: tijl

10 years agoRemove unused code and sort variables declarations.
ae [Thu, 5 Sep 2013 08:12:36 +0000 (08:12 +0000)]
Remove unused code and sort variables declarations.

PR: kern/181822
MFC after: 1 week

10 years agoAdd more references.
mav [Thu, 5 Sep 2013 07:13:08 +0000 (07:13 +0000)]
Add more references.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

10 years agoFix file selection logic for the RCS/SCCS case, as was done for the simple
se [Thu, 5 Sep 2013 05:51:15 +0000 (05:51 +0000)]
Fix file selection logic for the RCS/SCCS case, as was done for the simple
file case before. Bump version because of the changed behavior, which now
matches the documentation.

Reviewed by: pfg

10 years agoRestore builds on architectures that don't support CAPABILITIES (mips).
sbruno [Thu, 5 Sep 2013 03:46:44 +0000 (03:46 +0000)]
Restore builds on architectures that don't support CAPABILITIES (mips).

10 years agoThis looks like a typo that breaks the build. Yell at me if this isn't the
sbruno [Thu, 5 Sep 2013 03:36:57 +0000 (03:36 +0000)]
This looks like a typo that breaks the build. Yell at me if this isn't the
intended declaration.

10 years agoFix the build.
jhibbits [Thu, 5 Sep 2013 01:13:26 +0000 (01:13 +0000)]
Fix the build.

10 years agoRemove fallback to fork(2) if pdfork(2) is not available. If the parent
pjd [Thu, 5 Sep 2013 01:05:48 +0000 (01:05 +0000)]
Remove fallback to fork(2) if pdfork(2) is not available. If the parent
process dies, the process descriptor will be closed and pdfork(2)ed child
will be killed, which is not the case when regular fork(2) is used.

The PROCDESC option is now part of the GENERIC kernel configuration, so we
can start depending on it.

Add UPDATING entry to inform that this option is now required and log
detailed instruction to syslog if pdfork(2) is not available:

The pdfork(2) system call is not available; recompile the kernel with options PROCDESC

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by: Google Summer of Code 2013

10 years agoAdd sysctl/tunables for various metaslab variables.
pjd [Thu, 5 Sep 2013 00:53:01 +0000 (00:53 +0000)]
Add sysctl/tunables for various metaslab variables.

10 years agoAdvise a full buildworld, because of the recent Capsicum changes.
pjd [Thu, 5 Sep 2013 00:52:16 +0000 (00:52 +0000)]
Advise a full buildworld, because of the recent Capsicum changes.

Sponsored by: The FreeBSD Foundation

10 years agoAdd missing '2'.
pjd [Thu, 5 Sep 2013 00:41:07 +0000 (00:41 +0000)]
Add missing '2'.

10 years agoRemove trailing comma.
pjd [Thu, 5 Sep 2013 00:38:53 +0000 (00:38 +0000)]
Remove trailing comma.

10 years agoStyle fixes.
pjd [Thu, 5 Sep 2013 00:19:30 +0000 (00:19 +0000)]
Style fixes.

10 years agoStyle fixes. Most fixes are about not treating integers and pointers as
pjd [Thu, 5 Sep 2013 00:17:38 +0000 (00:17 +0000)]
Style fixes. Most fixes are about not treating integers and pointers as
booleans.

10 years agoRegenerate after r255219.
pjd [Thu, 5 Sep 2013 00:11:59 +0000 (00:11 +0000)]
Regenerate after r255219.

Sponsored by: The FreeBSD Foundation

10 years agoChange the cap_rights_t type from uint64_t to a structure that we can extend
pjd [Thu, 5 Sep 2013 00:09:56 +0000 (00:09 +0000)]
Change the cap_rights_t type from uint64_t to a structure that we can extend
in the future in a backward compatible (API and ABI) way.

The cap_rights_t represents capability rights. We used to use one bit to
represent one right, but we are running out of spare bits. Currently the new
structure provides place for 114 rights (so 50 more than the previous
cap_rights_t), but it is possible to grow the structure to hold at least 285
rights, although we can make it even larger if 285 rights won't be enough.

The structure definition looks like this:

struct cap_rights {
uint64_t cr_rights[CAP_RIGHTS_VERSION + 2];
};

The initial CAP_RIGHTS_VERSION is 0.

The top two bits in the first element of the cr_rights[] array contain total
number of elements in the array - 2. This means if those two bits are equal to
0, we have 2 array elements.

The top two bits in all remaining array elements should be 0.
The next five bits in all array elements contain array index. Only one bit is
used and bit position in this five-bits range defines array index. This means
there can be at most five array elements in the future.

To define new right the CAPRIGHT() macro must be used. The macro takes two
arguments - an array index and a bit to set, eg.

#define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL)

We still support aliases that combine few rights, but the rights have to belong
to the same array element, eg:

#define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL)
#define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL)

#define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP)

There is new API to manage the new cap_rights_t structure:

cap_rights_t *cap_rights_init(cap_rights_t *rights, ...);
void cap_rights_set(cap_rights_t *rights, ...);
void cap_rights_clear(cap_rights_t *rights, ...);
bool cap_rights_is_set(const cap_rights_t *rights, ...);

bool cap_rights_is_valid(const cap_rights_t *rights);
void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);

Capability rights to the cap_rights_init(), cap_rights_set(),
cap_rights_clear() and cap_rights_is_set() functions are provided by
separating them with commas, eg:

cap_rights_t rights;

cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT);

There is no need to terminate the list of rights, as those functions are
actually macros that take care of the termination, eg:

#define cap_rights_set(rights, ...) \
__cap_rights_set((rights), __VA_ARGS__, 0ULL)
void __cap_rights_set(cap_rights_t *rights, ...);

Thanks to using one bit as an array index we can assert in those functions that
there are no two rights belonging to different array elements provided
together. For example this is illegal and will be detected, because CAP_LOOKUP
belongs to element 0 and CAP_PDKILL to element 1:

cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL);

Providing several rights that belongs to the same array's element this way is
correct, but is not advised. It should only be used for aliases definition.

This commit also breaks compatibility with some existing Capsicum system calls,
but I see no other way to do that. This should be fine as Capsicum is still
experimental and this change is not going to 9.x.

Sponsored by: The FreeBSD Foundation

10 years agoCorrect blkback handling of the BLKIF_OP_FLUSH_DISKCACHE opcode.
gibbs [Wed, 4 Sep 2013 23:32:49 +0000 (23:32 +0000)]
Correct blkback handling of the BLKIF_OP_FLUSH_DISKCACHE opcode.

Properly round-trip the "operation code" for client requests.

sys/dev/xen/blkback/blkback.c:
In xbb_dispatch_dev() when processing a flush request,
correctly set bio->bio_caller1 to the request list (not
bare request) for the operation, as is expected by the
completion handler xbb_bio_done().

In xbb_get_resources(), initialize "operation" in the
driver's internal request object from the client's "ring
request", so it is correct when used to populate the reply
when this operation completes.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs

10 years agoTidy up some loose ends in the PCID code:
kib [Wed, 4 Sep 2013 23:31:29 +0000 (23:31 +0000)]
Tidy up some loose ends in the PCID code:

- Restore the pre-PCID TLB shootdown handlers for whole address space
  and single page invalidation asm code, and assign the IPI handler to
  them when PCID is not supported or disabled.  Old handlers have
  linear control flow.  But, still use the common return sequence.

- Stop using pcpu for INVPCID descriptors in the invlrg handler.  It
  is enough to allocate descriptors on the stack.  As result, two
  SWAPGS instructions are shaved off from the code for Haswell+.

- Fix the reverted condition in invlrng for checking of the PCID
  support [1], also in invlrng check that pmap is kernel pmap before
  performing other tests.  For the kernel pmap, which provides global
  mappings, the INVLPG must be used for invalidation always.

- Save the pre-computed pmap' %CR3 register in the struct pmap.  This
  allows to remove several checks for pm_pcid validity when %CR3 is
  reloaded [2].

Noted by:   gibbs [1]
Discussed with: alc [2]
Tested by: pho, flo
Sponsored by: The FreeBSD Foundation

10 years agoCrashes have been observed for NFSv4.1 mounts when the system
rmacklem [Wed, 4 Sep 2013 22:47:56 +0000 (22:47 +0000)]
Crashes have been observed for NFSv4.1 mounts when the system
is being shut down which were caused by the nfscbd_pool being
destroyed before the backchannel is disabled. This patch is
believed to fix the problem, by simply avoiding ever destroying
the nfscbd_pool. Since the NFS client module cannot be unloaded,
this should not cause a memory leak.

MFC after: 2 weeks

10 years agosh: Make return return from the closest function or dot script.
jilles [Wed, 4 Sep 2013 22:10:16 +0000 (22:10 +0000)]
sh: Make return return from the closest function or dot script.

Formerly, return always returned from a function if it was called from a
function, even if there was a closer dot script. This was for compatibility
with the Bourne shell which only allowed returning from functions.

Other modern shells and POSIX return from the function or the dot script,
whichever is closest.

Git 1.8.4's rebase --continue depends on the POSIX behaviour.

Reported by: Christoph Mallon, avg

10 years agoAdd myself as a new committer and cognet as my mentor.
zbb [Wed, 4 Sep 2013 20:49:32 +0000 (20:49 +0000)]
Add myself as a new committer and cognet as my mentor.

Approved by: cognet (mentor)

10 years agoAdd 32-bit support for Gxemul's oldtestmips machine emulation
gonzo [Wed, 4 Sep 2013 20:34:36 +0000 (20:34 +0000)]
Add 32-bit support for Gxemul's oldtestmips machine emulation

Original work by: kan@

10 years agoAdd myself to the list of ports committers.
gnn [Wed, 4 Sep 2013 20:12:33 +0000 (20:12 +0000)]
Add myself to the list of ports committers.

Approved by: skreuzer (mentor)

10 years agoRevert r255152:
eadler [Wed, 4 Sep 2013 18:42:05 +0000 (18:42 +0000)]
Revert r255152:

It turns out that synaptics_support was turned off by default
because its probing method is too intrusive not because it was unstable.

Once this is fixed it should be enabled once again.

Reported by: delphij, jkim

10 years agoadd links for the various vmem functions...
jmg [Wed, 4 Sep 2013 17:48:41 +0000 (17:48 +0000)]
add links for the various vmem functions...

10 years agoMFP4 217312, 222008, 222052, 222053, 222673, 231484, 231491, 231565, 570643
brooks [Wed, 4 Sep 2013 17:19:21 +0000 (17:19 +0000)]
MFP4 217312, 222008, 222052, 222053, 222673, 231484, 231491, 231565, 570643

Rework the timeout code to use actual time rather than a DELAY() loop and
to use both typical and maximum to allow logging of timeout failures.
Also correct the erase timeout, it is specified in milliseconds not
microseconds like the other timeouts.  Do not invoke DELAY() between
status queries as this adds significant latency which in turn reduced
write performance substantially.

Sanity check timeout values from the hardware.

Implement support for buffered writes (only enabled on Intel/Sharp parts
for now).  This yields an order of magnitude speedup on the 64MB Intel
StrataFlash parts we use.

When making a copy of the block to modify, also keep a clean copy around
until we are ready to commit the block and use it to avoid unnecessary
erases.  In the non-buffer write case, also use it to avoid
unnecessary writes when the block has not been erased.  This yields a
significant speedup when doing things like zeroing a block.

Sponsored by: DARPA, AFRL
Reviewed by: imp (previous version)

10 years agoAdd a c++/v1/tr1 include directory containing symlinks to all of the standard
theraven [Wed, 4 Sep 2013 15:02:14 +0000 (15:02 +0000)]
Add a c++/v1/tr1 include directory containing symlinks to all of the standard
headrs.

Lots of third-party code expects to find C++03 headers under tr1 because that's
where GNU decided to hide them.  This should fix ports that expect them there.

MFC after: 1 week

10 years agoTrim a couple of panic messages.
jhb [Wed, 4 Sep 2013 11:52:28 +0000 (11:52 +0000)]
Trim a couple of panic messages.

10 years ago- Add myself as a src committer
br [Wed, 4 Sep 2013 11:28:47 +0000 (11:28 +0000)]
- Add myself as a src committer
- Note cognet is my mentor

Approved by: cognet (mentor)

10 years agoMake default cache size more modern.
glebius [Wed, 4 Sep 2013 10:17:50 +0000 (10:17 +0000)]
Make default cache size more modern.

Requested by: Slawa Olhovchenkov <slw zxy.spb.ru>

10 years agoFix hwpmc(4) for 32-bit PowerPC.
jhibbits [Wed, 4 Sep 2013 04:11:38 +0000 (04:11 +0000)]
Fix hwpmc(4) for 32-bit PowerPC.

10 years agoFor TOE connections, the window scale factor in CPL_PASS_ACCEPT_REQ is
np [Tue, 3 Sep 2013 23:34:04 +0000 (23:34 +0000)]
For TOE connections, the window scale factor in CPL_PASS_ACCEPT_REQ is
set to 15 to indicate that the peer did not send a window scale option
with its SYN.  Do not send a window scale option in the SYN|ACK reply
in that case.

10 years agoAdd options GEOM_PART_GPT and options MSDOSFS to the DIR-825
sbruno [Tue, 3 Sep 2013 22:33:06 +0000 (22:33 +0000)]
Add options GEOM_PART_GPT and options MSDOSFS to the DIR-825

Reviewed by: adrian@

10 years agoNewer versions of gcc define __INT64_C and __UINT64_C, so avoid
imp [Tue, 3 Sep 2013 22:04:55 +0000 (22:04 +0000)]
Newer versions of gcc define __INT64_C and __UINT64_C, so avoid
redefining them if gcc provides them.

10 years agoAdd support for the 'invpcid' instruction to binutils and DDB's
jhb [Tue, 3 Sep 2013 21:21:47 +0000 (21:21 +0000)]
Add support for the 'invpcid' instruction to binutils and DDB's
disassembler on amd64.

MFC after: 1 month

10 years agoRemove our hacked GNU patch.
pfg [Tue, 3 Sep 2013 20:03:10 +0000 (20:03 +0000)]
Remove our hacked GNU patch.

The old (2.1) GNU patch has outlived its days.  The major
local changes have been moved into the less restrictedly
licensed patch(1) we adopted in usr.bin/ .

A much newer version of GNU patch is available in the
ports tree (devel/patch).

Disconnect from the build and remove.

10 years agoRemove redundant field pr_sctp_on.
tuexen [Tue, 3 Sep 2013 19:31:59 +0000 (19:31 +0000)]
Remove redundant field pr_sctp_on.

MFC after: 1 week

10 years agoUse the fact that the AES-NI instructions can be pipelined to improve
jmg [Tue, 3 Sep 2013 18:31:23 +0000 (18:31 +0000)]
Use the fact that the AES-NI instructions can be pipelined to improve
performance... Use SSE2 instructions for calculating the XTS tweek
factor...  Let the compiler do more work and handle register allocation
by using intrinsics, now only the key schedule is in assembly...

Replace .byte hard coded instructions w/ the proper instructions now
that both clang and gcc support them...

On my machine, pulling the code to userland I saw performance go from
~150MB/sec to 2GB/sec in XTS mode.  GELI on GNOP saw a more modest
increase of about 3x due to other system overhead (geom and
opencrypto)...

These changes allow almost full disk io rate w/ geli...

Reviewed by: -current, -security
Thanks to: Mike Hamburg for the XTS tweek algorithm

10 years agoadd support to gcc for AES and PCLMUL intrinsics... This addes the
jmg [Tue, 3 Sep 2013 17:33:29 +0000 (17:33 +0000)]
add support to gcc for AES and PCLMUL intrinsics...  This addes the
-maes option, but not the -mpclmul option as I ran out of bits in
the 32 bit flags field...  You can -D__PCLMUL__ to get this, but it
won't be compatible w/ clang and modern gcc...

Reviewed by: -current, -toolchain

10 years agoConnect libexecinfo to the build
emaste [Tue, 3 Sep 2013 15:22:04 +0000 (15:22 +0000)]
Connect libexecinfo to the build

Sponsored by: DARPA, AFRL

10 years agosys/dev/xen/blkback/blkback.c:
gibbs [Tue, 3 Sep 2013 13:49:00 +0000 (13:49 +0000)]
sys/dev/xen/blkback/blkback.c:
Initialize the request id for requests in xbb_get_resources()
instead of its previous location in xbb_dispatch_io().  This
guarantees that all request types (e.g. BLKIF_OP_FLUSH_DISKCACHE)
have the front-end specified id recorded.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D

10 years agoInclude the calling context in the mail subject, if any.
jlh [Tue, 3 Sep 2013 13:40:24 +0000 (13:40 +0000)]
Include the calling context in the mail subject, if any.

More concretely, periodic security scripts defaults to being
called from daily ones -- daily context -- so the mail subject
will now be "${HOST} daily security run output" instead of
"{HOST} security run output".

If you switch the period of some security checks to weekly, you
will receive another email "${HOST} weekly security run output".

10 years agoAdd svn:keywords property
emaste [Tue, 3 Sep 2013 13:38:41 +0000 (13:38 +0000)]
Add svn:keywords property

10 years agoAdd $FreeBSD$ tag for user-facing header
emaste [Tue, 3 Sep 2013 13:36:23 +0000 (13:36 +0000)]
Add $FreeBSD$ tag for user-facing header

10 years agoDon't install private libexecinfo headers
emaste [Tue, 3 Sep 2013 13:31:43 +0000 (13:31 +0000)]
Don't install private libexecinfo headers

10 years agoFix 'make depend'
uqs [Tue, 3 Sep 2013 12:08:08 +0000 (12:08 +0000)]
Fix 'make depend'

10 years agoDocument SIGLIBRT in signal(3); take a stab at the signal description as
rwatson [Tue, 3 Sep 2013 08:19:06 +0000 (08:19 +0000)]
Document SIGLIBRT in signal(3); take a stab at the signal description as
the original committer didn't provide one.

MFC after: 3 days

10 years agoSince r254974, periodic scripts' period can be configured
jlh [Tue, 3 Sep 2013 07:51:06 +0000 (07:51 +0000)]
Since r254974, periodic scripts' period can be configured
independently.  There is no reason to leave their options
with the daily ones, so move them to their own section.

10 years agoSince r254974, periodic scripts' period can be configured
jlh [Tue, 3 Sep 2013 07:47:53 +0000 (07:47 +0000)]
Since r254974, periodic scripts' period can be configured
independently.  There is no reason to leave their options
with the daily ones, so move them to their own section.
Move periodic scripts' options into their own section.  Since r254974,

10 years agoComplete any pending Tx frames before attempting the next transmit
bryanv [Tue, 3 Sep 2013 02:28:31 +0000 (02:28 +0000)]
Complete any pending Tx frames before attempting the next transmit

Also complete pending frames in the watchdog function when the
EVENT_IDX feature was negotiated just in case the completion
interrupt was postponed.

10 years agoFix unintended compiler constant folding
bryanv [Tue, 3 Sep 2013 02:26:57 +0000 (02:26 +0000)]
Fix unintended compiler constant folding

Pointed out by: dim@

10 years agoEnable PMC interrupt handling, and fix a DTrace trap handling bug.
jhibbits [Tue, 3 Sep 2013 00:42:15 +0000 (00:42 +0000)]
Enable PMC interrupt handling, and fix a DTrace trap handling bug.

10 years agoRefactor PowerPC hwpmc(4) driver into generic and specific. More refactoring
jhibbits [Tue, 3 Sep 2013 00:34:18 +0000 (00:34 +0000)]
Refactor PowerPC hwpmc(4) driver into generic and specific.  More refactoring
will likely be done as more drivers are added, since AIM-compatible processors
have similar PMC configuration logic.

10 years agoCreate the default router last. This allows using an static
delphij [Mon, 2 Sep 2013 23:52:25 +0000 (23:52 +0000)]
Create the default router last.  This allows using an static
interface route for default routes, which seems to be common
among many dedicated hosting providers.

Reviewed by: hrs
MFC after: 2 weeks

10 years agoUse uint16_t instead of in_port_t for consistency with the SCTP code.
tuexen [Mon, 2 Sep 2013 23:27:53 +0000 (23:27 +0000)]
Use uint16_t instead of in_port_t for consistency with the SCTP code.

MFC after: 1 week

10 years agoWhitespace cleanup.
jhibbits [Mon, 2 Sep 2013 23:22:05 +0000 (23:22 +0000)]
Whitespace cleanup.

10 years agoAll changes affect only SCTP-AUTH:
tuexen [Mon, 2 Sep 2013 22:48:41 +0000 (22:48 +0000)]
All changes affect only SCTP-AUTH:
* Remove non working code related to SHA224.
* Remove support for non-standardised HMAC-IDs using SHA384 and SHA512.
* Prefer SHA256 over SHA1.
* Minor cleanup.

MFC after: 2 weeks

10 years agoBetter conformance to style(9) and organizational cleanup.
gibbs [Mon, 2 Sep 2013 22:22:56 +0000 (22:22 +0000)]
Better conformance to style(9) and organizational cleanup.
No functional changes.

sys/i386/xen/mp_machdep.c:
Remove extra newlines.

Group externs, forward delarations, local types, and pcpu data.

Wrap at 80 columns.

Use parens in return statements.

Tab indent members of array initializers.

MFC after: 2 weeks

10 years agosh: Fix race condition with signals and wait or set -T.
jilles [Mon, 2 Sep 2013 21:57:46 +0000 (21:57 +0000)]
sh: Fix race condition with signals and wait or set -T.

The change in r238888 was incomplete. It was still possible for a trapped
signal to arrive before the shell went to sleep (sigsuspend()) because a
check was missing or because the signal arrived before in_waitcmd was set.

On SMP, this bug sometimes caused the builtins/wait4.0 test to take 1 second
to execute; it then might or might not fail. On UP, the test almost always
failed.

10 years agoIgnore if the interface is not IPv6-capable.
hrs [Mon, 2 Sep 2013 20:44:19 +0000 (20:44 +0000)]
Ignore if the interface is not IPv6-capable.

Spotted by: rpaulo

10 years agosys/mouse.h: Move members introduced in r255153 to end of struct synapticshw
dumbbell [Mon, 2 Sep 2013 19:49:18 +0000 (19:49 +0000)]
sys/mouse.h: Move members introduced in r255153 to end of struct synapticshw

I didn't know this structure was public and didn't pay enough attention...

10 years agopsm: Add support for middle and extended buttons on Synaptics touchpads
dumbbell [Mon, 2 Sep 2013 19:15:20 +0000 (19:15 +0000)]
psm: Add support for middle and extended buttons on Synaptics touchpads

PR: kern/170834
Submitted by: Brandon Gooch <jamesbrandongooch@gmail.com>
Tested by: Artyom Mirgorodskiy <artyom.mirgorodsky@gmail.com>
MFC after: 1 month

10 years agosynaptics and trackpoint support are stable enough to be on by default.
eadler [Mon, 2 Sep 2013 18:25:18 +0000 (18:25 +0000)]
synaptics and trackpoint support are stable enough to be on by default.

Eventually both options should be removed.

Reviewed by: dumbbell

10 years agoRevert accidental commit.
rpaulo [Mon, 2 Sep 2013 17:07:46 +0000 (17:07 +0000)]
Revert accidental commit.

10 years agolibexecinfo compatibility with devel/libexecinfo port
emaste [Mon, 2 Sep 2013 12:37:33 +0000 (12:37 +0000)]
libexecinfo compatibility with devel/libexecinfo port

1. Match shlib number
2. Add libelf dependency

Suggested by: bapt[1]

10 years agoMake ELI destruction (including orphanization) less aggressive, making it
mav [Mon, 2 Sep 2013 10:44:54 +0000 (10:44 +0000)]
Make ELI destruction (including orphanization) less aggressive, making it
always wait for provider close.  Old algorithm was reported to cause NULL
dereference panic on attempt to close provider after softc destruction.
If not global workaroung in GEOM, that could even cause destruction with
requests still in flight.

10 years agoMerge 1.12 of pf_lb.c from OpenBSD, with some changes. Original commit:
glebius [Mon, 2 Sep 2013 10:14:25 +0000 (10:14 +0000)]
Merge 1.12 of pf_lb.c from OpenBSD, with some changes. Original commit:

  date: 2010/02/04 14:10:12;  author: sthen;  state: Exp;  lines: +24 -19;
  pf_get_sport() picks a random port from the port range specified in a
  nat rule. It should check to see if it's in-use (i.e. matches an existing
  PF state), if it is, it cycles sequentially through other ports until
  it finds a free one. However the check was being done with the state
  keys the wrong way round so it was never actually finding the state
  to be in-use.

  - switch the keys to correct this, avoiding random state collisions
  with nat. Fixes PR 6300 and problems reported by robert@ and viq.

  - check pf_get_sport() return code in pf_test(); if port allocation
  fails the packet should be dropped rather than sent out untranslated.

  Help/ok claudio@.

Some additional changes to 1.12:

- We also need to bzero() the key to zero padding, otherwise key
  won't match.
- Collapse two if blocks into one with ||, since both conditions
  lead to the same processing.
- Only naddr changes in the cycle, so move initialization of other
  fields above the cycle.
- s/u_intXX_t/uintXX_t/g

PR: kern/181690
Submitted by: Olivier Cochard-Labbé <olivier cochard.me>
Sponsored by: Nginx, Inc.

10 years agoConform to style(9). No functional changes.
gibbs [Sun, 1 Sep 2013 23:49:36 +0000 (23:49 +0000)]
Conform to style(9).  No functional changes.

sys/x86/xen/hvm.c:
Do not rely on implicit conversion to boolean in expressions
(e.g. use "if (rc != 0)" instead of "if (rc)".

Line continuations for functions are indented an additional
4 spaces.

Insert an empty line if the function has no local variables.

Prefer separate initializtion statements to initialzing
local variables in their declaration.

Braces that are not necessary may be left out.

MFC after: 2 weeks

10 years agoFix socket buffer timeouts precision using the new sbintime_t KPI instead
davide [Sun, 1 Sep 2013 23:34:53 +0000 (23:34 +0000)]
Fix socket buffer timeouts precision using the new sbintime_t KPI instead
of relying on the tvtohz() workaround. The latter has been introduced
lately by jhb@ (r254699) in order to have a fix that can be backported
to STABLE.

Reported by: Vitja Makarov <vitja.makarov at gmail dot com>
Reviewed by: jhb (earlier version)

10 years agoForced dismounts of NFS mounts can fail when thread(s) are stuck
rmacklem [Sun, 1 Sep 2013 23:02:59 +0000 (23:02 +0000)]
Forced dismounts of NFS mounts can fail when thread(s) are stuck
waiting for an RPC reply from the server while holding the mount
point busy (mnt_lockref incremented). This happens because dounmount()
msleep()s waiting for mnt_lockref to become 0, before calling
VFS_UNMOUNT(). This patch adds a new VFS operation called VFS_PURGE(),
which the NFS client implements as purging RPCs in progress. Making
this call before checking mnt_lockref fixes the problem, by ensuring
that the VOP_xxx() calls will fail and unbusy the mount point.

Reported by: sbruno
Reviewed by: kib
MFC after: 2 weeks

10 years agoUse single underscore for all parameters name and local variables in
davide [Sun, 1 Sep 2013 22:30:24 +0000 (22:30 +0000)]
Use single underscore for all parameters name and local variables in
bintime_* related functions. This commit completes what was already done
by theraven@ for bintime_shift, and just uses a single underscore instead
of two (which is a style bug according to Bruce). See r251855 for reference.

Reported by: theraven
Discussed with: bde
Reviewed by: bde

10 years agoComplete r250105. Do not zero fields if M_ZERO flag is specified to
davide [Sun, 1 Sep 2013 21:44:43 +0000 (21:44 +0000)]
Complete r250105. Do not zero fields if M_ZERO flag is specified to
malloc(9).

Reported by: pluknet, glebius

10 years agoFix build with gcc
eadler [Sun, 1 Sep 2013 20:22:52 +0000 (20:22 +0000)]
Fix build with gcc

Reported by: Michael Butler <imb@protected-networks.net>
Reviewed by: jilles

10 years agoInitial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 boards.
rpaulo [Sun, 1 Sep 2013 20:15:35 +0000 (20:15 +0000)]
Initial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 boards.

There are many drivers missing, but we can reach single user mode now.

Hardware graciously donated by Douglas Beattie.

10 years agosystem(): Restore behaviour for SIGINT and SIGQUIT.
jilles [Sun, 1 Sep 2013 19:59:54 +0000 (19:59 +0000)]
system(): Restore behaviour for SIGINT and SIGQUIT.

As mentioned in r16117 and the book "Advanced Programming in the Unix
Environment" by W. Richard Stevens, we should ignore SIGINT and SIGQUIT
before forking, since it is not guaranteed that the parent process starts
running soon enough.

To avoid calling sigaction() in the vforked child, instead block SIGINT and
SIGQUIT before vfork() and keep the sigaction() to ignore after vfork(). The
FreeBSD kernel discards ignored signals, even if they are blocked;
therefore, it is not necessary to unblock SIGINT and SIGQUIT earlier.

10 years agoAdd support for the BCM20702A0 chipset, ASUS USB-BT400.
eadler [Sun, 1 Sep 2013 19:27:32 +0000 (19:27 +0000)]
Add support for the BCM20702A0 chipset, ASUS USB-BT400.

PR: kern/181728
Submitted by: rakuco

10 years agoPay attention to errCheck!
sjg [Sun, 1 Sep 2013 18:59:09 +0000 (18:59 +0000)]
Pay attention to errCheck!

PR: 181715

10 years agoAdd debug trace points for freeze/release device queue.
mav [Sun, 1 Sep 2013 17:37:19 +0000 (17:37 +0000)]
Add debug trace points for freeze/release device queue.

10 years agopmap_protect() on MIPS does not need to acquire the pvh global lock.
alc [Sun, 1 Sep 2013 17:06:14 +0000 (17:06 +0000)]
pmap_protect() on MIPS does not need to acquire the pvh global lock.

10 years agoRegenerate after recent addition of FTDI and bluetooth device IDs.
ian [Sun, 1 Sep 2013 14:28:12 +0000 (14:28 +0000)]
Regenerate after recent addition of FTDI and bluetooth device IDs.

10 years agoAdd the device ID for a new flavor of FTDI serial adapter (model 232EX).
ian [Sun, 1 Sep 2013 14:15:31 +0000 (14:15 +0000)]
Add the device ID for a new flavor of FTDI serial adapter (model 232EX).

10 years agoFix a compiler warning about signed vs unsigned compare.
ian [Sun, 1 Sep 2013 14:06:57 +0000 (14:06 +0000)]
Fix a compiler warning about signed vs unsigned compare.

10 years agoMFC
markm [Sun, 1 Sep 2013 13:33:05 +0000 (13:33 +0000)]
MFC

10 years agoBring legacy CAM target implementation back into API/KPI-coherent and even
mav [Sun, 1 Sep 2013 13:01:59 +0000 (13:01 +0000)]
Bring legacy CAM target implementation back into API/KPI-coherent and even
functional state.  While CTL is much more superior target from all points,
there is no reason why this code should not work.

Tested with ahc(4) as target side HBA.

MFC after: 2 weeks

10 years agoFix SES_ENABLE_PASSTHROUGH kernel option, unexpectedly broken during driver
mav [Sun, 1 Sep 2013 12:18:44 +0000 (12:18 +0000)]
Fix SES_ENABLE_PASSTHROUGH kernel option, unexpectedly broken during driver
overhaul.

MFC after: 3 days

10 years agoFix targbh crash on XPT_IMMED_NOTIFY error during attach.
mav [Sun, 1 Sep 2013 11:50:37 +0000 (11:50 +0000)]
Fix targbh crash on XPT_IMMED_NOTIFY error during attach.

10 years agoFix the build with CTLFEDEBUG, broken by unmapped I/O support changes.
mav [Sun, 1 Sep 2013 10:11:00 +0000 (10:11 +0000)]
Fix the build with CTLFEDEBUG, broken by unmapped I/O support changes.

10 years agoImport multiqueue VirtIO net driver from my user/bryanv/vtnetmq branch
bryanv [Sun, 1 Sep 2013 04:33:47 +0000 (04:33 +0000)]
Import multiqueue VirtIO net driver from my user/bryanv/vtnetmq branch

This is a significant rewrite of much of the previous driver; lots of
misc. cleanup was also performed, and support for a few other minor
features was also added.

10 years agoSync VirtIO net device header file from recent Linux
bryanv [Sun, 1 Sep 2013 04:23:54 +0000 (04:23 +0000)]
Sync VirtIO net device header file from recent Linux