]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMerge r252512 from src/gnu/usr.bin/patch into src/usr.bin/patch:
obrien [Wed, 3 Jul 2013 22:44:26 +0000 (22:44 +0000)]
Merge r252512 from src/gnu/usr.bin/patch into src/usr.bin/patch:

Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same.

The former makes a copy of stdin, but was not accurately putting the
content of stdin into a temp file.  This lead to the undercounting
the number of lines in hunks containing NUL characters when reading
from stdin.  Thus resulting in "unexpected end of file in patch" errors.

11 years agoMFp4 @229488:
pjd [Wed, 3 Jul 2013 22:23:25 +0000 (22:23 +0000)]
MFp4 @229488:

Sandbox unprivileged process using capability mode.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229487:
pjd [Wed, 3 Jul 2013 22:22:29 +0000 (22:22 +0000)]
MFp4 @229487:

Revoke all capability rights from STDIN and allow only for write to STDOUT and
STDERR. All those descriptors are redirected to /dev/null.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229486:
pjd [Wed, 3 Jul 2013 22:21:11 +0000 (22:21 +0000)]
MFp4 @229486:

Once PID is written to the pidfile, revoke all capability rights.
We just want to keep the pidfile open.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229485:
pjd [Wed, 3 Jul 2013 22:19:43 +0000 (22:19 +0000)]
MFp4 @229485:

Only allow to overwrite lease file.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229484:
pjd [Wed, 3 Jul 2013 22:18:40 +0000 (22:18 +0000)]
MFp4 @229484:

Limit routing socket so only poll(2) and read(2) are allowed (CAP_POLL_EVENT
and CAP_READ). This prevents unprivileged process from adding, removing or
modifying system routes.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229483:
pjd [Wed, 3 Jul 2013 22:17:29 +0000 (22:17 +0000)]
MFp4 @229483:

Limit communication pipe with privileged process to CAP_READ and CAP_WRITE.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229482:
pjd [Wed, 3 Jul 2013 22:16:02 +0000 (22:16 +0000)]
MFp4 @229482:

- Limit bpf descriptor in unprivileged process to CAP_POLL_EVENT, CAP_READ and
  allow for SIOCGIFFLAGS, SIOCGIFMEDIA ioctls.
- While here limit bpf descriptor in privileged process to only CAP_WRITE.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229481:
pjd [Wed, 3 Jul 2013 22:12:54 +0000 (22:12 +0000)]
MFp4 @229481:

Currently it was allowed to send any UDP packets from unprivileged process and
possibly any packets because /dev/bpf was open for writing.

Move sending packets to privileged process. Unprivileged process has no longer
access to not connected UDP socket and has only access to /dev/bpf in read-only
mode.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229480:
pjd [Wed, 3 Jul 2013 22:09:02 +0000 (22:09 +0000)]
MFp4 @229480:

Shutdown write direction of the routing socket. We only need to read from it.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229479:
pjd [Wed, 3 Jul 2013 22:07:55 +0000 (22:07 +0000)]
MFp4 @229479:

- Add new request (IMSG_SEND_PACKET) that will be handled by privileged process.
- Add $FreeBSD$.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229477:
pjd [Wed, 3 Jul 2013 22:05:36 +0000 (22:05 +0000)]
MFp4 @229477:

The gethostname(3) function won't work in capability mode, because reading
kern.hostname sysctl is not permitted there.  Cache hostname early and use
cached value later.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoRemove redundant white-spaces.
pjd [Wed, 3 Jul 2013 22:03:19 +0000 (22:03 +0000)]
Remove redundant white-spaces.

11 years agoMFp4 @229476,229478:
pjd [Wed, 3 Jul 2013 22:01:52 +0000 (22:01 +0000)]
MFp4 @229476,229478:

Make use of two fields: rfdesc and wfdesc to keep bpf descriptor open for
reading only in rfdesc and bpf descriptor open for writing only in wfdesc.
In the end they will be used by two different processes.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229474:
pjd [Wed, 3 Jul 2013 21:58:26 +0000 (21:58 +0000)]
MFp4 @229474:

iov_base field is 'void *' in FreeBSD, no need to cast.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229473:
pjd [Wed, 3 Jul 2013 21:57:24 +0000 (21:57 +0000)]
MFp4 @229473:

No caller checks send_packet() return value, so make it void.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229472:
pjd [Wed, 3 Jul 2013 21:53:54 +0000 (21:53 +0000)]
MFp4 @229472:

Use the same type for 'from' and 'to' argument in send_packet().

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229471:
pjd [Wed, 3 Jul 2013 21:49:10 +0000 (21:49 +0000)]
MFp4 @229471:

Remove unused argument from assemble_hw_header().

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4 @229470:
pjd [Wed, 3 Jul 2013 21:45:29 +0000 (21:45 +0000)]
MFp4 @229470:

Remove unused argument from send_packet().

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years agoMFp4: @229469:
pjd [Wed, 3 Jul 2013 21:41:35 +0000 (21:41 +0000)]
MFp4: @229469:

Garbage-collect dead prototypes.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation

11 years ago1) POSIX requires rand(3) return values to be in the [0, RAND_MAX] range,
ache [Wed, 3 Jul 2013 21:21:54 +0000 (21:21 +0000)]
1) POSIX requires rand(3) return values to be in the [0, RAND_MAX] range,
but ACM formula we use have internal state (and return value) in the
[1, 0x7ffffffe] range, so our RAND_MAX (0x7fffffff) is never reached
because it is off by one, zero is not reached too.

Correct both RAND_MAX and rand(3) return value, shifting last one
to the 0 by 1 subtracted, resulting POSIXed [0, 0x7ffffffd(=new RAND_MAX)]
range.

2) Add a checks for not overflowing on too big seeds. It may happens on
the machines, where sizeof(unsigned int) > 32 bits.

Reviewed by:    bde [1]
MFC after:      2 weeks

11 years agoSandbox rwhod(8) receiver process using capability mode and Capsicum
pjd [Wed, 3 Jul 2013 21:07:02 +0000 (21:07 +0000)]
Sandbox rwhod(8) receiver process using capability mode and Capsicum
capabilities.

rwhod(8) receiver can now only receive packages, write to /var/rwho/ directory
and log to syslog.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by: Google Summer of Code 2013
Reviewed by: pjd
MFC after: 1 month

11 years agoThe whole sending functionality was implemented within signal handler,
pjd [Wed, 3 Jul 2013 21:04:20 +0000 (21:04 +0000)]
The whole sending functionality was implemented within signal handler,
which is very bad idea. Split sending and receiving in two processes,
which fixes this problem and will help to sandbox rwhod.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by: Google Summer of Code 2013
Reviewed by: pjd
MFC after: 1 month

11 years agoStyle cleanups.
pjd [Wed, 3 Jul 2013 20:58:58 +0000 (20:58 +0000)]
Style cleanups.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by: Google Summer of Code 2013
Reviewed by: pjd
MFC after: 1 month

11 years agoFew more style nits.
pjd [Wed, 3 Jul 2013 20:44:47 +0000 (20:44 +0000)]
Few more style nits.

MFC after: 1 month

11 years agoSandbox rwho(1) using capability mode and Capsicum capabilities.
pjd [Wed, 3 Jul 2013 20:42:10 +0000 (20:42 +0000)]
Sandbox rwho(1) using capability mode and Capsicum capabilities.
rwho(1) gets only read-only access to /var/rwho/ directory.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by: Google Summer of Code 2013
Reviewed by: pjd
MFC after: 1 month

11 years agoIncrease the microcode max size to 16K to accomodate more recent Intel
rpaulo [Wed, 3 Jul 2013 20:29:15 +0000 (20:29 +0000)]
Increase the microcode max size to 16K to accomodate more recent Intel
firmware.

11 years agoStyle cleanups.
pjd [Wed, 3 Jul 2013 20:28:33 +0000 (20:28 +0000)]
Style cleanups.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
Sponsored by: Google Summer of Code 2013
Reviewed by: pjd
MFC after: 1 month

11 years agoAdd an entry for filemon.
peter [Wed, 3 Jul 2013 20:22:12 +0000 (20:22 +0000)]
Add an entry for filemon.

11 years agoMove static ZFS compile option to the other static file system options.
peter [Wed, 3 Jul 2013 20:21:39 +0000 (20:21 +0000)]
Move static ZFS compile option to the other static file system options.

11 years agoTypos in comments.
rpaulo [Wed, 3 Jul 2013 20:19:23 +0000 (20:19 +0000)]
Typos in comments.

11 years agoPull in r185446 from clang trunk:
dim [Wed, 3 Jul 2013 19:08:10 +0000 (19:08 +0000)]
Pull in r185446 from clang trunk:

  Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout.

Reported by: glebius

11 years agoAdd descriptions to the FILES list, fix some mdoc complaints, move the
wblock [Wed, 3 Jul 2013 18:53:36 +0000 (18:53 +0000)]
Add descriptions to the FILES list, fix some mdoc complaints, move the
"neither" entry out of the table in BOOTING.

Submitted by: joeld
Reviewed by: joeld
MFC after: 1 week

11 years agoCode cleanups.
tuexen [Wed, 3 Jul 2013 18:48:43 +0000 (18:48 +0000)]
Code cleanups.

MFC after: 3 days

11 years agoMake it clear that there are three separate internal locks.
peter [Wed, 3 Jul 2013 18:35:21 +0000 (18:35 +0000)]
Make it clear that there are three separate internal locks.

11 years agoAs a followup to r252547, propate const down the call stack.
peter [Wed, 3 Jul 2013 18:27:45 +0000 (18:27 +0000)]
As a followup to r252547, propate const down the call stack.

11 years agoAttempt to deal with a compile failure that shows up with gcc, which
peter [Wed, 3 Jul 2013 18:25:27 +0000 (18:25 +0000)]
Attempt to deal with a compile failure that shows up with gcc, which
has -Werror on.  Without this, yylex() is inconsistently or redundantly
defined.

11 years agoPort 0 needs to wait for ACK only if it issued the RESET.
davidcs [Wed, 3 Jul 2013 17:57:35 +0000 (17:57 +0000)]
Port 0 needs to wait for ACK only if it issued the RESET.

11 years agoCatch up with r238990. LLE_DELETED does not clobber everything else in
np [Wed, 3 Jul 2013 17:27:32 +0000 (17:27 +0000)]
Catch up with r238990.  LLE_DELETED does not clobber everything else in
la_flags since said revision.

11 years agoDon't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges. If
jhb [Wed, 3 Jul 2013 17:26:05 +0000 (17:26 +0000)]
Don't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges.  If
we are probing a PCI-PCI bridge it is because we found one by enumerating
the devices on a PCI bus, so the bridge is definitely present.  A few
BIOSes report incorrect status (_STA) for some bridges that claimed they
were not present when in fact they were.

While here, move this check earlier for Host-PCI bridges so attach fails
before doing any work that needs to be torn down.

PR: kern/91594
Tested by: Jack Vogel @ Intel
MFC after: 1 week

11 years agoFix NULL-deference kernel panic on attempt of destroying non-existing
mav [Wed, 3 Jul 2013 14:58:11 +0000 (14:58 +0000)]
Fix NULL-deference kernel panic on attempt of destroying non-existing
ramdisk-backed CTL LUN.

11 years agoRevert previous revision, local change that accidentally snuck in.
zeising [Wed, 3 Jul 2013 12:58:53 +0000 (12:58 +0000)]
Revert previous revision, local change that accidentally snuck in.

11 years agoRegenerate after r252561
zeising [Wed, 3 Jul 2013 12:53:06 +0000 (12:53 +0000)]
Regenerate after r252561

PR: docs/180025
Submitted by: Garrett Cooper <yaneurabeya@gmail.com>

11 years agoDocument WITHOUT_SVNLITE and WITH_SVN.
zeising [Wed, 3 Jul 2013 12:36:47 +0000 (12:36 +0000)]
Document WITHOUT_SVNLITE and WITH_SVN.

PR: docs/180025
Submitted by: Garrett Cooper <yaneurabeya@gmail.com>

11 years ago- Fix double frees/user after free.
davide [Wed, 3 Jul 2013 10:31:45 +0000 (10:31 +0000)]
- Fix double frees/user after free.
- Allocate using smb_rq_alloc() instead of inlining it.

Reported by: uqs
Found with: Coverity Scan

11 years agoFix a typo (s/error/errno/).
hrs [Wed, 3 Jul 2013 09:50:59 +0000 (09:50 +0000)]
Fix a typo (s/error/errno/).

11 years agoThere is no reason to disallow setting the password or account expiry
des [Wed, 3 Jul 2013 09:48:24 +0000 (09:48 +0000)]
There is no reason to disallow setting the password or account expiry
date to the current date.

MFC after: 3 days

11 years agoFix a compiler warning.
hrs [Wed, 3 Jul 2013 07:31:07 +0000 (07:31 +0000)]
Fix a compiler warning.

MFC after: 1 week

11 years agoReplace the #define for "iconv" so it is for the function name instead of
peter [Wed, 3 Jul 2013 07:03:19 +0000 (07:03 +0000)]
Replace the #define for "iconv" so it is for the function name instead of
a macro with parameters.  Remove a __DECONST hack and add consts instead
for gnu libiconv API compatability.  This makes it work with things like
devel/boost-libs that expects to use "iconv" as though it were a pointer.

11 years agohastResourceWorkerPid is read-only.
trociny [Wed, 3 Jul 2013 05:54:23 +0000 (05:54 +0000)]
hastResourceWorkerPid is read-only.

Submitted by: jilles
MFC after: 3 days

11 years agoA problem with the old NFS client where large writes to large files
rmacklem [Wed, 3 Jul 2013 00:19:03 +0000 (00:19 +0000)]
A problem with the old NFS client where large writes to large files
would sometimes result in a corrupted file was reported via email.
This problem appears to have been caused by r251719 (reverting
r251719 fixed the problem). Although I have not been able to
reproduce this problem, I suspect it is caused by another thread
increasing np->n_size after the mtx_unlock(&np->n_mtx) but before
the vnode_pager_setsize() call. Since the np->n_mtx mutex serializes
updates to np->n_size, doing the vnode_pager_setsize() with the
mutex locked appears to avoid the problem.
Unfortunately, vnode_pager_setsize() where the new size is smaller,
cannot be called with a mutex held.
This patch returns the semantics to be close to pre-r251719 (actually
pre-r248567, r248581, r248567 for the new client) such that the call to
vnode_pager_setsize() is only delayed until after the mutex is
unlocked when np->n_size is shrinking. Since the file is growing
when being written, I believe this will fix the corruption.
A better solution might be to replace the mutex with a sleep lock,
but that is a non-trivial conversion, so this fix is hoped to be
sufficient in the meantime.

Reported by: David G. Lawrence (dg@dglawrence.com)
Tested by: David G. Lawrence (to be done soon)
Reviewed by: kib
MFC after: 1 week

11 years agoMake better use of metadata area by avoiding using it for data blocks
mckusick [Tue, 2 Jul 2013 21:07:08 +0000 (21:07 +0000)]
Make better use of metadata area by avoiding using it for data blocks
that no should no longer immediately follow their indirect blocks.

MFC after: 2 weeks

11 years agoRemove extranious '.'
eadler [Tue, 2 Jul 2013 20:25:58 +0000 (20:25 +0000)]
Remove extranious '.'

Submitted by: swildner@DragonflyBSD.org

11 years agoWhen listing with -f, skip all memory disks that are not vnode-backed.
delphij [Tue, 2 Jul 2013 19:42:47 +0000 (19:42 +0000)]
When listing with -f, skip all memory disks that are not vnode-backed.

Noticed by: kevlo
MFC after: 3 days

11 years agoEnable VFP on Raspberry Pi. This has worked as of r251712.
andrew [Tue, 2 Jul 2013 19:35:04 +0000 (19:35 +0000)]
Enable VFP on Raspberry Pi. This has worked as of r251712.

11 years agoAdd a mib for worker process ID.
trociny [Tue, 2 Jul 2013 18:54:39 +0000 (18:54 +0000)]
Add a mib for worker process ID.

MFC after: 3 days

11 years agoStyle fix: spaces.
pfg [Tue, 2 Jul 2013 18:45:37 +0000 (18:45 +0000)]
Style fix: spaces.

Cleanup the incomplete revert.

Reported by: bde
MFC after: 4 weeks

11 years agoPlug a memory leak.
delphij [Tue, 2 Jul 2013 17:34:34 +0000 (17:34 +0000)]
Plug a memory leak.

11 years agoProperly handle input lines containing NUL characters such that pgets()
obrien [Tue, 2 Jul 2013 17:17:42 +0000 (17:17 +0000)]
Properly handle input lines containing NUL characters such that pgets()
accurately fills the read buffer.

Callers of pgets() still mis-process the buffer contents if the read line
contains NUL characters, but this at least makes pgets() accurate.

11 years agoMake it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same.
obrien [Tue, 2 Jul 2013 17:09:57 +0000 (17:09 +0000)]
Make it so that 'patch < FUBAR' and 'patch -i FUBAR' operate the same.

The former makes a copy of stdin, but was not accurately putting the
content of stdin into a temp file.  This lead to the undercounting
the number of lines in hunks containing NUL characters when reading
from stdin.  Thus resulting in "unexpected end of file in patch" errors.

11 years ago- Allow ND6_IFF_AUTO_LINKLOCAL for IFT_BRIDGE. An interface with IFT_BRIDGE
hrs [Tue, 2 Jul 2013 16:58:15 +0000 (16:58 +0000)]
- Allow ND6_IFF_AUTO_LINKLOCAL for IFT_BRIDGE.  An interface with IFT_BRIDGE
  is initialized with !ND6_IFF_AUTO_LINKLOCAL && !ND6_IFF_ACCEPT_RTADV
  regardless of net.inet6.ip6.accept_rtadv and net.inet6.ip6.auto_linklocal.
  To configure an autoconfigured link-local address (RFC 4862), the
  following rc.conf(5) configuration can be used:

   ifconfig_bridge0_ipv6="inet6 auto_linklocal"

- if_bridge(4) now removes IPv6 addresses on a member interface to be
  added when the parent interface or one of the existing member
  interfaces has an IPv6 address.  if_bridge(4) merges each link-local
  scope zone which the member interfaces form respectively, so it causes
  address scope violation.  Removal of the IPv6 addresses prevents it.

- if_lagg(4) now removes IPv6 addresses on a member interfaces
  unconditionally.

- Set reasonable flags to non-IPv6-capable interfaces. [*]

Submitted by: rpaulo [*]
MFC after: 1 week

11 years agoFix a panic when leaving MC group in a kernel with VIMAGE enabled.
hrs [Tue, 2 Jul 2013 16:39:12 +0000 (16:39 +0000)]
Fix a panic when leaving MC group in a kernel with VIMAGE enabled.
in_leavegroup() is called from an asynchronous task, and
igmp_change_state() requires that curvnet is set by the caller.

11 years agoExplicitly include <cstdarg> to fix compilation with libc++. It is implicitly
asomers [Tue, 2 Jul 2013 14:48:39 +0000 (14:48 +0000)]
Explicitly include <cstdarg> to fix compilation with libc++.  It is implicitly
included by libstdc++.

Reported By: Oliver Hartmann
Approved by: gibbs (co-mentor, implicit)

11 years agoWhen acquiring a lease, record the value of the BOOTP siaddr field
bms [Tue, 2 Jul 2013 13:24:37 +0000 (13:24 +0000)]
When acquiring a lease, record the value of the BOOTP siaddr field
contained in the DHCP offer, and write it out to the lease file
as an unquoted value of the "next-server" keyword. The value is ignored
when the lease is read back by dhclient, however other applications
are free to parse it.

The intent behind this change is to allow easier interoperability
with automated installation systems e.g. Cobbler, Foreman, Razor;
FreeBSD installation kernels can automatically probe the network
to discover deployment servers.  There are no plans to MFC this
change unless a backport is specifically requested.

The syntax of the "next-server <ip>" lease keyword is intended to be
identical to that used by the ISC DHCPD server in its configuration files.
The required defines are already present in dhclient but were unused before
this change. (Note: This is NOT the same as Option 66, tftp-server-name).

It has been exercised in a university protocol testbed environment, with
Cobbler and an mfsBSD image containing pc-sysinstall (driven by Cobbler
Cheetah templates). The SYSLINUX memdisk driver is used to boot mfsBSD.
Currently this approach requires that a dedicated system profile has
been created for the node where FreeBSD is to be deployed. If this
is not present, the pc-sysinstall wrapper will be unable to obtain
a node configuration. There is code in progress to allow mfsBSD images
to obtain the required hints from the memdisk environment by parsing
the MBFT ACPI chunk.  This is non-standard as it is not linked into
the platform's ACPI RSDT.

Reviewed by: des

11 years ago- Update newvers.sh to include svn revision in uname(1) if the
gjb [Tue, 2 Jul 2013 10:36:57 +0000 (10:36 +0000)]
- Update newvers.sh to include svn revision in uname(1) if the
  system has svnliteversion.
- If svnliteversion is not found, look for svnversion in /usr/bin
  and /usr/local/bin, since svnlite can be installed as svn if
  WITH_SVN is set.[1]
- Remove /bin from binary search paths.[1]

Discussed with: kib [1]
MFC after: 3 days
Approved by: kib (mentor)

11 years agoImport an implementation of the CAIA Delay-Gradient (CDG) congestion control
lstewart [Tue, 2 Jul 2013 08:44:56 +0000 (08:44 +0000)]
Import an implementation of the CAIA Delay-Gradient (CDG) congestion control
algorithm, which is based on the 2011 v0.1 patch release and described in the
paper "Revisiting TCP Congestion Control using Delay Gradients" by David Hayes
and Grenville Armitage. It is implemented as a kernel module compatible with the
modular congestion control framework.

CDG is a hybrid congestion control algorithm which reacts to both packet loss
and inferred queuing delay. It attempts to operate as a delay-based algorithm
where possible, but utilises heuristics to detect loss-based TCP cross traffic
and will compete effectively as required. CDG is therefore incrementally
deployable and suitable for use on shared networks.

In collaboration with: David Hayes <david.hayes at ieee.org> and
Grenville Armitage <garmitage at swin edu au>
MFC after: 4 days
Sponsored by: Cisco University Research Program and FreeBSD Foundation

11 years agoWork around an ARM EABI issue where clang would sometimes incorrectly align
andrew [Tue, 2 Jul 2013 08:04:41 +0000 (08:04 +0000)]
Work around an ARM EABI issue where clang would sometimes incorrectly align
the stack in a leaf function that uses TLS.

The issue is, when using TLS, the function is no longer a leaf as it calls
__aeabi_read_tp. With statically linked programs this is not an issue as
it doesn't make use of the stack, however with dynamically linked
applications we enter rtld which does use the stack and makes assumptions
about it's alignment.

This is only a temporary fix until a better patch can be made and submitted
upstream.

11 years agoFix receiving fd over unix socket broken in r247740.
mjg [Tue, 2 Jul 2013 07:36:04 +0000 (07:36 +0000)]
Fix receiving fd over unix socket broken in r247740.

If n fds were passed, it would receive the first one n times.

Reported by: Shawn Webb <lattera@gmail.com>, koobs, gleb
Tested by: koobs, gleb
Reviewed by: pjd

11 years agoAdd Planex MZK-UE150N.
hrs [Tue, 2 Jul 2013 07:35:57 +0000 (07:35 +0000)]
Add Planex MZK-UE150N.

Submitted by: Yusuke Tanaka
MFC after: 3 days

11 years agoFix indentation.
rpaulo [Tue, 2 Jul 2013 07:17:56 +0000 (07:17 +0000)]
Fix indentation.

Submitted by: jmallet

11 years agoAdd register definitions for the Wii IPC system.
rpaulo [Tue, 2 Jul 2013 06:59:37 +0000 (06:59 +0000)]
Add register definitions for the Wii IPC system.

11 years agoAdd RealTek 8192SU product IDs.
rpaulo [Tue, 2 Jul 2013 06:49:05 +0000 (06:49 +0000)]
Add RealTek 8192SU product IDs.

11 years agoFix up option parsing to allow a colon in the config section.
grehan [Mon, 1 Jul 2013 23:53:22 +0000 (23:53 +0000)]
Fix up option parsing to allow a colon in the config section.
Clean up some other unnecessary code.

Submitted by: Dinakar Medavaram    dinnu sun at gmail
Reviewed by: neel

11 years agoBe sure to destory the fasttrap cleanup mutex when unloading the fasttrap
markj [Mon, 1 Jul 2013 23:12:59 +0000 (23:12 +0000)]
Be sure to destory the fasttrap cleanup mutex when unloading the fasttrap
module. This should be MFCed with r250953.

11 years agoAdd a new gptboot(8) man page. Factor out the redundant information
wblock [Mon, 1 Jul 2013 22:38:36 +0000 (22:38 +0000)]
Add a new gptboot(8) man page.  Factor out the redundant information
in gpart(8) and boot(8), adding references to gptboot(8) in both.

Reviewed by: jhb, ae, pjd, Paul Schenkeveld <bsdcan@psconsult.nl>, david_a_bright@dell.com (portions), gjb
MFC after: 1 week

11 years agoWrap cxgbe declaration around MK_SOURCELESS_UCODE check
rmh [Mon, 1 Jul 2013 22:21:42 +0000 (22:21 +0000)]
Wrap cxgbe declaration around MK_SOURCELESS_UCODE check

11 years agoFix typo in vfs_mount(9) item.
delphij [Mon, 1 Jul 2013 21:58:08 +0000 (21:58 +0000)]
Fix typo in vfs_mount(9) item.

11 years agostyle(9) fixes, including the removal of page break characters. No functional
asomers [Mon, 1 Jul 2013 21:49:17 +0000 (21:49 +0000)]
style(9) fixes, including the removal of page break characters.  No functional
changes.

Approved by: gibbs (co-mentor)

11 years agoChange i_gen in UFS to an unsigned type.
pfg [Mon, 1 Jul 2013 21:43:40 +0000 (21:43 +0000)]
Change i_gen in UFS to an unsigned type.

Revert the simplification of the i_gen calculation.
It is still a good idea to avoid zero values and for the case
of old filesystems there is probably no advantage in using
the complete 32 bits anyways.

Discussed with: bde
MFC after: 4 weeks

11 years agoDocument the fact that an NFSv4 mount uses the host uuid to uniquely
rmacklem [Mon, 1 Jul 2013 21:41:12 +0000 (21:41 +0000)]
Document the fact that an NFSv4 mount uses the host uuid to uniquely
identify the client to the server. As such, NFSv4 mounts
will break if host_enable="NO" is specified.
This is a content change.

Suggested by: lars@netapp.com
MFC after: 3 days

11 years agoAdd a SIGINFO handler to devd. It will send useful statistics to syslog or
asomers [Mon, 1 Jul 2013 21:33:05 +0000 (21:33 +0000)]
Add a SIGINFO handler to devd.  It will send useful statistics to syslog or
stderr as appropriate.  Currently, the only statistic printed is the number of
events received.

Reviewed by: eadler
Approved by: gibbs (co-mentor)

11 years agoAdd syslog(3) support to devd(8).
asomers [Mon, 1 Jul 2013 21:20:17 +0000 (21:20 +0000)]
Add syslog(3) support to devd(8).

sbin/devd/devd.cc
        All output will now go to syslog(3) if devd is daemonized, or stderr
        if it's running in the foreground.

sbin/devd/devd.8
        Remove the "-D" flag.  Filtering messages by priority now
happens in the usual syslog way.  For performance reasons, a few
extra-verbose debugging statements are now conditional on the "-d" (do
not daemonize) flag.

etc/syslog.conf
etc/newsyslog.conf
        Direct messages from devd(8) to /var/log/devd.log, but leave it
        disabled by default

Reviewed by: eadler
Approved by: gibbs (co-mentor)
MFC after: never (removed a command-line option from devd)

11 years agoCorrect a typo in comment.
delphij [Mon, 1 Jul 2013 21:18:39 +0000 (21:18 +0000)]
Correct a typo in comment.

11 years agoA recent version of the oldnfs NFS client in head/current
rmacklem [Mon, 1 Jul 2013 21:16:19 +0000 (21:16 +0000)]
A recent version of the oldnfs NFS client in head/current
will crash when doing a large write, since m_get2() would
return NULL. This patch fixes the problem, since nfsm_uiotombuf()
will allocate additional mbufs, as required.

Reported by: sbruno
Tested by: sbruno
Discussed with: glebius

11 years agoIgnore guest PAT settings by default in EPT mappings.
grehan [Mon, 1 Jul 2013 20:05:43 +0000 (20:05 +0000)]
Ignore guest PAT settings by default in EPT mappings.
From experimentation, other hypervisors also do this.

Diagnosed by: tycho nightingale at pluribusnetworks com
Reviewed by: neel

11 years agoEnable SCTP, since it is also enabled on GENERIC and it works fine on
tuexen [Mon, 1 Jul 2013 18:58:59 +0000 (18:58 +0000)]
Enable SCTP, since it is also enabled on GENERIC and it works fine on
the Raspberry Pi.

Discussed with: rpaulo

11 years agoMake hastctl(1) ('list' command) output a worker pid.
trociny [Mon, 1 Jul 2013 18:41:07 +0000 (18:41 +0000)]
Make hastctl(1) ('list' command) output a worker pid.

Reviewed by: pjd
MFC after: 3 days

11 years agoRemove forced timeout of in-flight commands from mfi_timeout.
smh [Mon, 1 Jul 2013 17:57:22 +0000 (17:57 +0000)]
Remove forced timeout of in-flight commands from mfi_timeout.

While this prevents commands getting stuck forever there is no way to guarantee
that data from the command hasn't been committed to the device.

In addition older mfi firmware has a bug that would cause the controller to
frequently stall IO for over our timeout value, which when combined with
a forced timeout often resulted in panics in UFS; which would otherwise be
avoided when the command eventually completed if left alone.

For reference this timeout issue is resolved in Dell FW package 21.2.1-0000.
Fixed FW package version for none Dell controller will likely vary.

MFC after: 2 days

11 years agoCount the number of hits for a filter by default.
np [Mon, 1 Jul 2013 17:32:07 +0000 (17:32 +0000)]
Count the number of hits for a filter by default.

MFC after: 3 days

11 years agoAdd a sysctl to get the number of filters available.
np [Mon, 1 Jul 2013 17:31:04 +0000 (17:31 +0000)]
Add a sysctl to get the number of filters available.

sysctl dev.t4nex.<N>.nfilters
sysctl dev.t5nex.<N>.nfilters

MFC after: 3 days

11 years agoMove pos++ out of the complicated equation, introduced at r240780.
mav [Mon, 1 Jul 2013 17:23:13 +0000 (17:23 +0000)]
Move pos++ out of the complicated equation, introduced at r240780.
There is an oppinion that result of that equation is compiler-specific.

Submitted by: dt71@gmx.com, kientzle
Reviewed by: rmacklem
MFC after: 3 days

11 years agoChange i_gen in UFS to an unsigned type.
pfg [Mon, 1 Jul 2013 14:49:23 +0000 (14:49 +0000)]
Change i_gen in UFS to an unsigned type.

Further simplify the i_gen calculation for older disks.
Having a zero here is not really a problem and this is more
similar to what is done in newfs_random().

Reported by: Xin Li
MFC after: 4 weeks

11 years agoIf strdup failed, don't try and free the wrong thing.
peter [Mon, 1 Jul 2013 08:38:31 +0000 (08:38 +0000)]
If strdup failed, don't try and free the wrong thing.

11 years ago__weak_alias() doesn't exist on FreeBSD. Use __weak_reference();
peter [Mon, 1 Jul 2013 08:06:26 +0000 (08:06 +0000)]
__weak_alias() doesn't exist on FreeBSD.  Use __weak_reference();

Expose iconv functions as weak symbols as well as their internal
remapped #define names.  This is necessary for autoconf compatability -
on Linux it appears that #include <iconv.h> isn't a link time
prerequisite for their version that's built into glibc.

Initialize the pthread rwlock.  Note that upstream has three
separate locks.  The file-local static lock appears intentional.

I'm using this as a ports-compatible compile-time substitute for
converters/libiconv on one of my personal machines.

11 years agoIf you've compiled your base system with WITH_ICONV, then use it for svn
peter [Mon, 1 Jul 2013 07:07:35 +0000 (07:07 +0000)]
If you've compiled your base system with WITH_ICONV, then use it for svn
alongside the other consumers (bsdtar, csh etc).

The svnlite build gets upset when it hits non-ascii characters in
inconvenient places.

11 years agoUpdate to current configuration.
peter [Mon, 1 Jul 2013 07:00:12 +0000 (07:00 +0000)]
Update to current configuration.

11 years agoThe mbox driver is actually MP safe, so set the right flag in
rpaulo [Mon, 1 Jul 2013 06:33:35 +0000 (06:33 +0000)]
The mbox driver is actually MP safe, so set the right flag in
bus_setup_intr().

11 years agoDisable debugging.
rpaulo [Mon, 1 Jul 2013 06:32:56 +0000 (06:32 +0000)]
Disable debugging.

11 years agoUse the new FDT_FILE rpi.dts.
rpaulo [Mon, 1 Jul 2013 05:01:27 +0000 (05:01 +0000)]
Use the new FDT_FILE rpi.dts.

11 years agoSplit bcm2835-rpi-b.dts into bcm2835.dtsi and rpi.dts. This DTS actually works
rpaulo [Mon, 1 Jul 2013 05:01:01 +0000 (05:01 +0000)]
Split bcm2835-rpi-b.dts into bcm2835.dtsi and rpi.dts. This DTS actually works
on all R-Pi models because VideoCore binary patches it during boot.

Reviewed by: gonzo