]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoIt was reported via email that the cu_sent field used by the
Rick Macklem [Fri, 6 Sep 2013 02:34:34 +0000 (02:34 +0000)]
It was reported via email that the cu_sent field used by the
krpc client side UDP was observed as way out of range and
caused the rpc.lockd daemon to hang trying to do an RPC.
Inspection of the code found two places where the RPC request
is re-queued, but the value of cu_sent was not incremented.
Since cu_sent is always decremented when the RPC request is
dequeued, I think this could have caused cu_sent to go out of
range. This patch adds lines to increment cu_sent for these
two cases.

Reported by: dwhite@ixsystems.com
Discussed with: dwhite@ixsystems.com
MFC after: 2 weeks

11 years agoAlso align the 32-bit PowerPC stacks.
Nathan Whitehorn [Thu, 5 Sep 2013 23:28:50 +0000 (23:28 +0000)]
Also align the 32-bit PowerPC stacks.

11 years agoRemove contractions.
Carl Delsey [Thu, 5 Sep 2013 23:14:27 +0000 (23:14 +0000)]
Remove contractions.

Approved by: jimharris
Sponsored by: Intel

11 years agoOnly tear down interface and transport if they've been successfully setup.
Carl Delsey [Thu, 5 Sep 2013 23:12:58 +0000 (23:12 +0000)]
Only tear down interface and transport if they've been successfully setup.

Approved by: jimharris
Sponsored by: Intel

11 years agoWorkaround an issue with hardware by accessing remote device through mem
Carl Delsey [Thu, 5 Sep 2013 23:11:11 +0000 (23:11 +0000)]
Workaround an issue with hardware by accessing remote device through mem
window.

Approved by: jimharris
Sponsored by: Intel

11 years agoSimplify register access macros by removing one level of indirection.
Carl Delsey [Thu, 5 Sep 2013 23:08:22 +0000 (23:08 +0000)]
Simplify register access macros by removing one level of indirection.

Approved by: jimharris
Sponsored by: Intel

11 years agoCleaning up spacing and making hex value case consistent.
Carl Delsey [Thu, 5 Sep 2013 23:06:25 +0000 (23:06 +0000)]
Cleaning up spacing and making hex value case consistent.

Approved by: jimharris
Sponsored by: Intel

11 years agoImplement workaround for IvyTown 4K BAR size issue.
Carl Delsey [Thu, 5 Sep 2013 23:04:36 +0000 (23:04 +0000)]
Implement workaround for IvyTown 4K BAR size issue.

Approved by: jimharris
Sponsored by: Intel

11 years agoSimplifying bus alloc resource call since we only need the default values.
Carl Delsey [Thu, 5 Sep 2013 23:02:43 +0000 (23:02 +0000)]
Simplifying bus alloc resource call since we only need the default values.

Approved by: jimharris
Sponsored by: Intel

11 years agoAdd support for per device features and workarounds.
Carl Delsey [Thu, 5 Sep 2013 23:00:59 +0000 (23:00 +0000)]
Add support for per device features and workarounds.

Approved by: jimharris
Sponsored by: Intel

11 years agoAlign stacks of kernel threads correctly at 16-byte boundaries rather than
Nathan Whitehorn [Thu, 5 Sep 2013 23:00:24 +0000 (23:00 +0000)]
Align stacks of kernel threads correctly at 16-byte boundaries rather than
making sure they are all misaligned at +8 bytes. This fixes clang builds
of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which
will come later).

This commit from FreeBSD/powerpc64 with a clang-built kernel.

MFC after: 2 weeks

11 years agoRestructure the PCI bar initialization code in anticipation of upcoming
Carl Delsey [Thu, 5 Sep 2013 22:59:18 +0000 (22:59 +0000)]
Restructure the PCI bar initialization code in anticipation of upcoming
bug fixes.

Approved by: jimharris
Sponsored by: Intel

11 years agoFix name change from ntb_transport to if_ntb. A few places were
Carl Delsey [Thu, 5 Sep 2013 22:56:52 +0000 (22:56 +0000)]
Fix name change from ntb_transport to if_ntb. A few places were
overlooked.

Approved by: jimharris
Sponsored by: Intel

11 years agoFix a typo.
Carl Delsey [Thu, 5 Sep 2013 22:55:08 +0000 (22:55 +0000)]
Fix a typo.

Approved by: jimharris
Sponsored by: Intel

11 years agoThrow a bit to enable the link to come up on Xeon.
Carl Delsey [Thu, 5 Sep 2013 22:52:40 +0000 (22:52 +0000)]
Throw a bit to enable the link to come up on Xeon.

Approved by: jimharris
Sponsored by: Intel

11 years agoAdd some logging to ntb link up.
Carl Delsey [Thu, 5 Sep 2013 22:46:48 +0000 (22:46 +0000)]
Add some logging to ntb link up.

Approved by: jimharris
Sponsored by: Intel

11 years agoStyle clean-ups.
Hiroki Sato [Thu, 5 Sep 2013 21:19:16 +0000 (21:19 +0000)]
Style clean-ups.

Reviewed by: md5

11 years agoEnable "late" option when a file= option is specified in /etc/fstab.
Hiroki Sato [Thu, 5 Sep 2013 20:50:52 +0000 (20:50 +0000)]
Enable "late" option when a file= option is specified in /etc/fstab.
The file= option requires rw mount where the backing store exists but
it does not work because rc.d/swap runs before rc.d/fsck.
Reported by: wblock

11 years agowatch: Do not mess up the tty modes on early error.
Jilles Tjoelker [Thu, 5 Sep 2013 19:02:03 +0000 (19:02 +0000)]
watch: Do not mess up the tty modes on early error.

Record the initial state earlier, so it is always safe to restore it.

One way this happens is if watch(8) is started by a user that does not have
access to /dev/snp. The result is "staircase effect" during later commands.

PR: bin/153052
MFC after: 1 week

11 years agoFixing a small typo.
Hiren Panchasara [Thu, 5 Sep 2013 18:18:23 +0000 (18:18 +0000)]
Fixing a small typo.

Reviewed by: gjb
Approved by: sbruno (mentor)

11 years agoMinor printf nit to keep out clean
Sean Bruno [Thu, 5 Sep 2013 16:38:26 +0000 (16:38 +0000)]
Minor printf nit to keep out clean

11 years agoMerge bmake-20130904
Simon J. Gerraty [Thu, 5 Sep 2013 15:57:26 +0000 (15:57 +0000)]
Merge bmake-20130904

11 years agoImport bmake-20130904
Simon J. Gerraty [Thu, 5 Sep 2013 15:49:22 +0000 (15:49 +0000)]
Import bmake-20130904

11 years agoUse LIST_FOREACH_SAFE() instead of doing it by hand.
John Baldwin [Thu, 5 Sep 2013 14:26:37 +0000 (14:26 +0000)]
Use LIST_FOREACH_SAFE() instead of doing it by hand.

11 years agoUse an unsigned long when indexing into mfchashtbl[] and mf6ctable[]. This
John Baldwin [Thu, 5 Sep 2013 14:16:37 +0000 (14:16 +0000)]
Use an unsigned long when indexing into mfchashtbl[] and mf6ctable[].  This
matches the types used when computing hash indices and the type of the
maximum size of mfchashtbl[].

PR: kern/181821
Submitted by: Sven-Thorsten Dietrich <sven@vyatta.com> (IPv4)
MFC after: 1 week

11 years agoFix build.
Gleb Smirnoff [Thu, 5 Sep 2013 13:53:25 +0000 (13:53 +0000)]
Fix build.

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

11 years agoThe vm_pageout_flush() functions sbusies pages in the passed pages
Konstantin Belousov [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

11 years agoThe vm_page_trysbusy() should not fail when shared busy counter or
Konstantin Belousov [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

11 years agoauthpf needs /var/authpf to exist and be writable by group authpf.
Dag-Erling Smørgrav [Thu, 5 Sep 2013 12:35:23 +0000 (12:35 +0000)]
authpf needs /var/authpf to exist and be writable by group authpf.

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

11 years agoThe fget() function now takes pointer to cap_rights_t, so change 0 to NULL.
Pawel Jakub Dawidek [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.

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

Reported by: kib

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

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

Approved by: cognet (mentor)

11 years agoRemove stub implementation.
Andrey V. Elsukov [Thu, 5 Sep 2013 09:44:09 +0000 (09:44 +0000)]
Remove stub implementation.

MFC after: 1 week

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

Reported by: tijl

11 years agoRemove unused code and sort variables declarations.
Andrey V. Elsukov [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

11 years agoAdd more references.
Alexander Motin [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

11 years agoFix file selection logic for the RCS/SCCS case, as was done for the simple
Stefan Eßer [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

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

11 years agoThis looks like a typo that breaks the build. Yell at me if this isn't the
Sean Bruno [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.

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

11 years agoRemove fallback to fork(2) if pdfork(2) is not available. If the parent
Pawel Jakub Dawidek [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

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

11 years agoAdvise a full buildworld, because of the recent Capsicum changes.
Pawel Jakub Dawidek [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

11 years agoAdd missing '2'.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:41:07 +0000 (00:41 +0000)]
Add missing '2'.

11 years agoRemove trailing comma.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:38:53 +0000 (00:38 +0000)]
Remove trailing comma.

11 years agoStyle fixes.
Pawel Jakub Dawidek [Thu, 5 Sep 2013 00:19:30 +0000 (00:19 +0000)]
Style fixes.

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

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

Sponsored by: The FreeBSD Foundation

11 years agoChange the cap_rights_t type from uint64_t to a structure that we can extend
Pawel Jakub Dawidek [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

11 years agoCorrect blkback handling of the BLKIF_OP_FLUSH_DISKCACHE opcode.
Justin T. 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

11 years agoTidy up some loose ends in the PCID code:
Konstantin Belousov [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

11 years agoCrashes have been observed for NFSv4.1 mounts when the system
Rick Macklem [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

11 years agosh: Make return return from the closest function or dot script.
Jilles Tjoelker [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

11 years agoAdd myself as a new committer and cognet as my mentor.
Zbigniew Bodek [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)

11 years agoAdd 32-bit support for Gxemul's oldtestmips machine emulation
Oleksandr Tymoshenko [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@

11 years agoAdd myself to the list of ports committers.
George V. Neville-Neil [Wed, 4 Sep 2013 20:12:33 +0000 (20:12 +0000)]
Add myself to the list of ports committers.

Approved by: skreuzer (mentor)

11 years agoRevert r255152:
Eitan Adler [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

11 years agoadd links for the various vmem functions...
John-Mark Gurney [Wed, 4 Sep 2013 17:48:41 +0000 (17:48 +0000)]
add links for the various vmem functions...

11 years agoMFP4 217312, 222008, 222052, 222053, 222673, 231484, 231491, 231565, 570643
Brooks Davis [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)

11 years agoAdd a c++/v1/tr1 include directory containing symlinks to all of the standard
David Chisnall [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

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

11 years ago- Add myself as a src committer
Ruslan Bukin [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)

11 years agoMake default cache size more modern.
Gleb Smirnoff [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>

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

11 years agoFor TOE connections, the window scale factor in CPL_PASS_ACCEPT_REQ is
Navdeep Parhar [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.

11 years agoAdd options GEOM_PART_GPT and options MSDOSFS to the DIR-825
Sean Bruno [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@

11 years agoNewer versions of gcc define __INT64_C and __UINT64_C, so avoid
Warner Losh [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.

11 years agoAdd support for the 'invpcid' instruction to binutils and DDB's
John Baldwin [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

11 years agoRemove our hacked GNU patch.
Pedro F. Giffuni [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.

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

MFC after: 1 week

11 years agoUse the fact that the AES-NI instructions can be pipelined to improve
John-Mark Gurney [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

11 years agoadd support to gcc for AES and PCLMUL intrinsics... This addes the
John-Mark Gurney [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

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

Sponsored by: DARPA, AFRL

11 years agosys/dev/xen/blkback/blkback.c:
Justin T. 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

11 years agoInclude the calling context in the mail subject, if any.
Jeremie Le Hen [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".

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

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

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

11 years agoFix 'make depend'
Ulrich Spörlein [Tue, 3 Sep 2013 12:08:08 +0000 (12:08 +0000)]
Fix 'make depend'

11 years agoDocument SIGLIBRT in signal(3); take a stab at the signal description as
Robert Watson [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

11 years agoSince r254974, periodic scripts' period can be configured
Jeremie Le Hen [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.

11 years agoSince r254974, periodic scripts' period can be configured
Jeremie Le Hen [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,

11 years agoComplete any pending Tx frames before attempting the next transmit
Bryan Venteicher [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.

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

Pointed out by: dim@

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

11 years agoRefactor PowerPC hwpmc(4) driver into generic and specific. More refactoring
Justin Hibbits [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.

11 years agoCreate the default router last. This allows using an static
Xin LI [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

11 years agoUse uint16_t instead of in_port_t for consistency with the SCTP code.
Michael 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

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

11 years agoAll changes affect only SCTP-AUTH:
Michael 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

11 years agoBetter conformance to style(9) and organizational cleanup.
Justin T. 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

11 years agosh: Fix race condition with signals and wait or set -T.
Jilles Tjoelker [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.

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

Spotted by: rpaulo

11 years agosys/mouse.h: Move members introduced in r255153 to end of struct synapticshw
Jean-Sébastien Pédron [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...

11 years agopsm: Add support for middle and extended buttons on Synaptics touchpads
Jean-Sébastien Pédron [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

11 years agosynaptics and trackpoint support are stable enough to be on by default.
Eitan Adler [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

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