]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

11 years agoDon't assume that UFS on-disk format of a directory is the same as
gleb [Mon, 1 Jul 2013 04:06:40 +0000 (04:06 +0000)]
Don't assume that UFS on-disk format of a directory is the same as
defined by <sys/dirent.h>

Always start parsing at DIRBLKSIZ aligned offset, skip first entries if
uio_offset is not DIRBLKSIZ aligned. Return EINVAL if buffer is too
small for single entry.

Preallocate buffer for cookies. Cookies will be replaced with d_off
field in struct dirent at later point.

Skip entries with zero inode number.

Stop mangling dirent in ufs_extattr_iterate_directory().

Reviewed by: kib
Sponsored by: Google Summer Of Code 2011

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

Missed format specifier.

Reported by: mdf
MFC after: 4 weeks

11 years agoPlug up the lock lock leakage when exporting to a short buffer.
trociny [Mon, 1 Jul 2013 03:27:14 +0000 (03:27 +0000)]
Plug up the lock lock leakage when exporting to a short buffer.

Reported by: Alexander Leidinger
Submitted by: mjg
MFC after: 1 week

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

In UFS, i_gen is a random generated value and there is not way for
it to be negative. Actually, the value of i_gen is just used to
match bit patterns and it is of not consequence if the values are
signed or not.

Following other filesystems, set it to unsigned and use it as such,

Discussed by: mckusick
Reviewed by: mckusick (previous version)
MFC after: 4 weeks

11 years agoFix issues with zeroing and fetching the counters, on x86 and ppc64.
kib [Mon, 1 Jul 2013 02:48:27 +0000 (02:48 +0000)]
Fix issues with zeroing and fetching the counters, on x86 and ppc64.
Issues were noted by Bruce Evans and are present on all architectures.

On i386, a counter fetch should use atomic read of 64bit value,
otherwise carry from the increment on other CPU could be lost for the
given fetch, making error of 2^32.  If 64bit read (cmpxchg8b) is not
available on the machine, it cannot be SMP and it is enough to disable
preemption around read to avoid the split read.

On x86 the counter increment is not atomic on purpose, which makes it
possible for the store of the incremented result to override just
zeroed per-cpu slot.  The effect would be a counter going off by
arbitrary value after zeroing.  Perform the counter zeroing on the
same processor which does the increments, making the operations
mutually exclusive.  On i386, same as for the fetching, if the
cmpxchg8b is not available, machine is not SMP and we disable
preemption for zeroing.

PowerPC64 is treated the same as amd64.

For other architectures, the changes made to allow the compilation to
succeed, without fixing the issues with zeroing or fetching.  It
should be possible to handle them by using the 64bit loads and stores
atomic WRT preemption (assuming the architectures also converted from
using critical sections to proper asm).  If architecture does not
provide the facility, using global (spin) mutex would be non-optimal
but working solution.

Noted by:  bde
Sponsored by: The FreeBSD Foundation

11 years agoAdd INET6.
rpaulo [Sun, 30 Jun 2013 23:29:24 +0000 (23:29 +0000)]
Add INET6.

11 years agoEnable kernel-specific code for FreeBSD also on other systems that use
rmh [Sun, 30 Jun 2013 23:14:55 +0000 (23:14 +0000)]
Enable kernel-specific code for FreeBSD also on other systems that use
the kernel of FreeBSD.

Reviewed by: pjd

11 years agoWhen decoding SLEB128, make sure sign extension is performed for
kaiw [Sun, 30 Jun 2013 21:06:47 +0000 (21:06 +0000)]
When decoding SLEB128, make sure sign extension is performed for
64-bit integers.

MFC after: 3 days

11 years agolibc: Access _sigintr more efficiently.
jilles [Sun, 30 Jun 2013 20:51:15 +0000 (20:51 +0000)]
libc: Access _sigintr more efficiently.

The variable _sigintr is not exported via the version script; therefore,
tell the compiler that no indirection (to allow interposition) is needed.

11 years agokillall: add -q flag to suppress error message when no processes are matched
mjg [Sun, 30 Jun 2013 20:27:31 +0000 (20:27 +0000)]
killall: add -q flag to suppress error message when no processes are matched

Man-page text provided by wblock.

PR: bin/30542
Submitted by: Tony Finch <dot@dotat.at> (original version)
MFC after: 1 week

11 years agoReplace some spaces to tab.
ray [Sun, 30 Jun 2013 19:53:52 +0000 (19:53 +0000)]
Replace some spaces to tab.

11 years agoAdd "ether" and "link" to ifconfig_alias{es,N}.
hrs [Sun, 30 Jun 2013 19:52:45 +0000 (19:52 +0000)]
Add "ether" and "link" to ifconfig_alias{es,N}.

11 years agoDecrypt magic numbers - define names for fields of Generic Timer's CNTKCTL reg.
ray [Sun, 30 Jun 2013 19:52:41 +0000 (19:52 +0000)]
Decrypt magic numbers - define names for fields of Generic Timer's CNTKCTL reg.

Submitted by: Ruslan Bukin <br@bsdpad.com>

11 years agoIn generic_bs_map(), use kmem_alloc_nofault() instead of kmem_alloc(), as we
cognet [Sun, 30 Jun 2013 19:36:17 +0000 (19:36 +0000)]
In generic_bs_map(), use kmem_alloc_nofault() instead of kmem_alloc(), as we
only need virtual addresses.

Submitted by: alc

11 years agoGrammar tweaks for locking.9
bjk [Sun, 30 Jun 2013 19:33:07 +0000 (19:33 +0000)]
Grammar tweaks for locking.9

Reviewed by: jhb
Approved by: hrs (mentor)

11 years agoacct: create a special plimit object and set it for exiting processes
mjg [Sun, 30 Jun 2013 19:08:06 +0000 (19:08 +0000)]
acct: create a special plimit object and set it for exiting processes
instead of allocating new one each time

All limits are set to RLIM_INFINITY which sould be ok (even though we
care only about RLIMT_FSIZE in this case).

MFC after: 1 week

11 years agoCorrect some grammar.
schweikh [Sun, 30 Jun 2013 17:59:40 +0000 (17:59 +0000)]
Correct some grammar.

11 years agoUse && rather than ; when success of previous job matters.
sjg [Sun, 30 Jun 2013 15:00:07 +0000 (15:00 +0000)]
Use && rather than ; when success of previous job matters.

11 years agoacct: reduce code duplication by using acct_disable as cleanup for
mjg [Sun, 30 Jun 2013 13:17:37 +0000 (13:17 +0000)]
acct: reduce code duplication by using acct_disable as cleanup for
failed kproc_create

MFC after: 1 week

11 years agotruss: recognize O_DIRECTORY, O_EXEC, O_TTY_INIT and O_CLOEXEC
mjg [Sun, 30 Jun 2013 13:14:46 +0000 (13:14 +0000)]
truss: recognize O_DIRECTORY, O_EXEC, O_TTY_INIT and O_CLOEXEC

MFC after: 3 days

11 years agoMake atomic_fetch_add() and atomic_fetch_sub() work for pointers with GCC 4.2.
ed [Sun, 30 Jun 2013 10:38:20 +0000 (10:38 +0000)]
Make atomic_fetch_add() and atomic_fetch_sub() work for pointers with GCC 4.2.

According to the standard, atomic_fetch_*() has to behave identical to
regular arithmetic. This means that for pointer types, we have to apply
the stride when doing addition/subtraction.

The GCC documentation seems to imply this is done for __sync_*() as
well. Unfortunately, both tests and Googling seems to reveal this is not
really the case. Fix this by performing the multiplication with the
stride manually.

11 years agoConvert this piece of code to use C11 atomics.
ed [Sun, 30 Jun 2013 08:59:33 +0000 (08:59 +0000)]
Convert this piece of code to use C11 atomics.

As mentioned before, we should at least aim to have one piece of code in
both user space and kernel space that uses C11 atomics, to get some
coverage. This piece of code can be migrated trivially, so it's a good
candidate.

11 years agoMake various fixes to <stdatomic.h>.
ed [Sun, 30 Jun 2013 08:54:41 +0000 (08:54 +0000)]
Make various fixes to <stdatomic.h>.

- According to the standard, memory_order is a type. Use a typedef.

- atomic_*_fence() and atomic_flag_*() are described by the standard as
  functions. Use inline functions to implement them.

- Only expose the atomic_*_explicit() functions in kernel space. We
  should not use the short-hand functions, as they will always use
  memory_order_seq_cst.

11 years agoFix gssapi/gssapi_krb5.h after Heimdal 1.5.1 import.
hrs [Sun, 30 Jun 2013 07:46:22 +0000 (07:46 +0000)]
Fix gssapi/gssapi_krb5.h after Heimdal 1.5.1 import.

Reviewed by: dfr

11 years agoDo not display a warning message in a jail without AF_INET6 support.
hrs [Sun, 30 Jun 2013 07:37:31 +0000 (07:37 +0000)]
Do not display a warning message in a jail without AF_INET6 support.

MFC after: 3 days

11 years agoFix a typo.
rpaulo [Sun, 30 Jun 2013 06:05:32 +0000 (06:05 +0000)]
Fix a typo.

11 years agoFix the RSSI calculation.
rpaulo [Sun, 30 Jun 2013 06:04:00 +0000 (06:04 +0000)]
Fix the RSSI calculation.

11 years agoFix triggering false watchdog timeout as done in bce(4) when
yongari [Sun, 30 Jun 2013 05:56:13 +0000 (05:56 +0000)]
Fix triggering false watchdog timeout as done in bce(4) when
controller is in PAUSE state.

11 years agoFix the ni_txrate calculation.
rpaulo [Sun, 30 Jun 2013 05:25:24 +0000 (05:25 +0000)]
Fix the ni_txrate calculation.

11 years agoFix triggering false watchdog timeout when controller is in PAUSE
yongari [Sun, 30 Jun 2013 05:12:18 +0000 (05:12 +0000)]
Fix triggering false watchdog timeout when controller is in PAUSE
state.  Previously it used to check if controller has sent a
PAUSE frame to the remote peer.

Reported by: David Imhoff via Brad Smith <brad@OpenBSD.org>
Submitted by: davidch (initial version)
Reviewed by: davidch, David Imhoff <dimhoff_devel@xs4all.nl>

11 years agoFix a reference count bug in urtwn_ra_init().
rpaulo [Sun, 30 Jun 2013 05:10:33 +0000 (05:10 +0000)]
Fix a reference count bug in urtwn_ra_init().

11 years agoAdding myself to the calendar!
hiren [Sun, 30 Jun 2013 01:20:59 +0000 (01:20 +0000)]
Adding myself to the calendar!

Approved by: sbruno (mentor)

11 years agoFixing incorrect id for Intel Centrino Wireless-N 130.
hiren [Sun, 30 Jun 2013 01:05:24 +0000 (01:05 +0000)]
Fixing incorrect id for Intel Centrino Wireless-N 130.

PR:             kern/180094
Submitted by:   Cedric <cg@cgross.info>
Approved by:    sbruno (mentor)
MFC after:      3 weeks

11 years agoext2fs: Use the complete random() range in i_gen.
pfg [Sun, 30 Jun 2013 00:42:51 +0000 (00:42 +0000)]
ext2fs: Use the complete random() range in i_gen.

i_gen is unsigned in ext2fs so we can handle the complete
32 bits.

MFC after: 1 week

11 years agoArndale Board (by Insignal) kernel config file.
ray [Sat, 29 Jun 2013 23:58:16 +0000 (23:58 +0000)]
Arndale Board (by Insignal) kernel config file.
More info on the Wiki page https://wiki.freebsd.org/FreeBSD/arm/ArndaleBoard

Submitted by: Ruslan Bukin <br@bsdpad.com>
Reviewed by: gonzo

11 years ago- Fix IMAPx registers values calculation
gonzo [Sat, 29 Jun 2013 23:51:17 +0000 (23:51 +0000)]
- Fix IMAPx registers values calculation
- Initialize SMAPx registers too although they're unused in QEMU
- Do not pass IO/MEM resources to upper bus for activation, handle them locally.
    Previously ACTIVATE method of upper bus was no-op so nothing bad
    happened. But now FDT maps physaddr to vaddr and it causes
    troubles: fdtbus_activate_resource resource assumes that
    bustag/bushandle are already set which in this case is wrong.

11 years agoTeach UART to attach Exynos/s3/s5 class driver.
ray [Sat, 29 Jun 2013 23:48:08 +0000 (23:48 +0000)]
Teach UART to attach Exynos/s3/s5 class driver.

Submitted by: Ruslan Bukin <br@bsdpad.com>
Reviewed by: gonzo

11 years agoEnable patth-through of IRQ30 and IRQ31 to PIC just as comment states
gonzo [Sat, 29 Jun 2013 23:40:44 +0000 (23:40 +0000)]
Enable patth-through of IRQ30 and IRQ31 to PIC just as comment states

11 years agostyle(9) fixes
smh [Sat, 29 Jun 2013 23:39:38 +0000 (23:39 +0000)]
style(9) fixes

MFC after: 2 days

11 years agoImport basic support for Samsung Exynos 5 support.
ray [Sat, 29 Jun 2013 23:39:05 +0000 (23:39 +0000)]
Import basic support for Samsung Exynos 5 support.

Submitted by: Ruslan Bukin <br@bsdpad.com>
Reviewed by: gonzo

11 years agoRemove invalid ASSERT which causes a panic on zfs renames when run with ASSERTS.
smh [Sat, 29 Jun 2013 23:15:45 +0000 (23:15 +0000)]
Remove invalid ASSERT which causes a panic on zfs renames when run with ASSERTS.
Removal was missed in merge of illumos 3464 (r248571)

MFC after: 2 days

11 years ago - Modify swapon(8) so that it uses most of geli(8) defaults for swap,
delphij [Sat, 29 Jun 2013 22:04:04 +0000 (22:04 +0000)]
 - Modify swapon(8) so that it uses most of geli(8) defaults for swap,
   which is presently: AES-XTS, no authentication.  Create provider
   with pagesize as sectorsize by default.
 - Rewrite parsing code for geli(8)-backed swap options, now options
   are required to be exact match, and unrecognized options will trigger
   a warning.
 - Don't initialize GELI device if it's already initialized.  This
   restores previous behavior.
 - Don't duplicate file descriptor when working with geli(8) and
   gbde(8) as there is no need to communicate with the utility other
   than exit status.
 - When calling swap_on_off_* routines, which_prog can only be SWAP_ON
   or SWAP_OFF.  Eliminate unneeded case branches by replacing switch
   with if's.
 - Plug a few memory leaks.

Reviewed by: hrs (but bugs are mine)
MFC after: 1 week
X-MFC-with: r252310, r252332, r252345

11 years agoMake libsupc++'s __cxa_call_terminate() prototype consistent with the
dim [Sat, 29 Jun 2013 20:17:14 +0000 (20:17 +0000)]
Make libsupc++'s __cxa_call_terminate() prototype consistent with the
definition.

Submitted by: dt71@gmx.com
MFC after: 3 days

11 years agoDon't let hastd use C11 atomics.
ed [Sat, 29 Jun 2013 20:13:39 +0000 (20:13 +0000)]
Don't let hastd use C11 atomics.

Due to possible concerns about the stability of C11 atomics, use our
existing atomics API instead.

Requested by: pjd

11 years agoDon't log anything if npkts == 0.
adrian [Sat, 29 Jun 2013 19:57:57 +0000 (19:57 +0000)]
Don't log anything if npkts == 0.

This occurs at RX DMA start, even though the RX FIFO has plenty of
space. I'll go figure out why, but this shouldn't cause people to
be spammed by these messages.

11 years agoIntroduce accessors for the ccb status word. Convert one (of many more)
scottl [Sat, 29 Jun 2013 17:48:59 +0000 (17:48 +0000)]
Introduce accessors for the ccb status word.  Convert one (of many more)
modules to use it, will convert the others once the appropriate shed
color is selected by consensus.

Obtained from: Netflix
MFC after: 3 days

11 years agoCheck the return value from ath_hal_malloc()
adrian [Sat, 29 Jun 2013 16:49:00 +0000 (16:49 +0000)]
Check the return value from ath_hal_malloc()

Reported by: uqs

11 years agoUnbreak "zfs jail" and "zfs unjail" (broken since r248571)
mm [Sat, 29 Jun 2013 16:45:37 +0000 (16:45 +0000)]
Unbreak "zfs jail" and "zfs unjail" (broken since r248571)

I missed to register zfs_ioc_jail and zfs_ioc_unjail as legacy ioctl's
with the new zfs_ioctl_register_legacy() function.

These operations do not modify pools or datasets so there is no need to
log them to pool history.

Reported by: Alexander Leidinger <ale@FreeBSD.org> and others on current@
MFC after: 3 days

11 years agomdoc: remove EOL whitespace.
joel [Sat, 29 Jun 2013 16:05:44 +0000 (16:05 +0000)]
mdoc: remove EOL whitespace.

11 years agoFix -Wunsequenced
kientzle [Sat, 29 Jun 2013 15:58:03 +0000 (15:58 +0000)]
Fix -Wunsequenced

Submitted by: dt71@gmx.com

11 years agoFix -Wunsequenced warning
kientzle [Sat, 29 Jun 2013 15:54:17 +0000 (15:54 +0000)]
Fix -Wunsequenced warning

Submitted by:   dt71@gmx.com

11 years agoFix -Wunsequenced warning
kientzle [Sat, 29 Jun 2013 15:52:48 +0000 (15:52 +0000)]
Fix -Wunsequenced warning

Submitted by: dt71@gmx.com

11 years agoFix -Wunsequenced warning.
kientzle [Sat, 29 Jun 2013 15:51:27 +0000 (15:51 +0000)]
Fix -Wunsequenced warning.

Submitted by: dt71@gmx.com

11 years agoFix a -Wunsequenced warning.
kientzle [Sat, 29 Jun 2013 15:49:26 +0000 (15:49 +0000)]
Fix a -Wunsequenced warning.

Submitted by: dt71@gmx.com

11 years agoEnable svnlite on armv6.
kientzle [Sat, 29 Jun 2013 15:31:23 +0000 (15:31 +0000)]
Enable svnlite on armv6.