]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoWhoops, wrong flag.
Edward Tomasz Napierala [Thu, 6 Aug 2015 07:49:34 +0000 (07:49 +0000)]
Whoops, wrong flag.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoTweak mdconfig(8) manual page, in particular revise the EXAMPLES
Edward Tomasz Napierala [Thu, 6 Aug 2015 07:47:13 +0000 (07:47 +0000)]
Tweak mdconfig(8) manual page, in particular revise the EXAMPLES
section.  This removes stuff that doesn't really belong there,
and simplifies examples for the basic operations.

Reviewed by: wblock@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3198

8 years agoAdd file_open(): the underlying system call of openat().
Ed Schouten [Thu, 6 Aug 2015 06:47:28 +0000 (06:47 +0000)]
Add file_open(): the underlying system call of openat().

CloudABI purely operates on file descriptor rights (CAP_*). File
descriptor access modes (O_ACCMODE) are emulated on top of rights.

Instead of accepting the traditional flags argument, file_open() copies
in an fdstat_t object that contains the initial rights the descriptor
should have, but also file descriptor flags that should persist after
opening (APPEND, NONBLOCK, *SYNC). Only flags that don't persist (EXCL,
TRUNC, CREAT, DIRECTORY) are passed in as an argument.

file_open() first converts the rights, the persistent flags and the
non-persistent flags to fflags. It then calls into vn_open(). If
successful, it installs the file descriptor with the requested
rights, trimming off rights that don't apply to the type of
the file that has been opened.

Unlike kern_openat(), this function does not support /dev/fd/*. I can't
think of a reason why we need to support this for CloudABI.

Obtained from: https://github.com/NuxiNL/freebsd
Differential Revision: https://reviews.freebsd.org/D3235

8 years agoAdd recently added values of various flags and enumerations including
John Baldwin [Thu, 6 Aug 2015 01:49:18 +0000 (01:49 +0000)]
Add recently added values of various flags and enumerations including
kevent filters, kevent flags, flags to mmap, seek locations, fcntl
operations, file flags, socket domains, open flags, resource limits, and
pathconf values.

8 years agonfsclient: Protest loudly when GETATTR responses are invalid
Conrad Meyer [Wed, 5 Aug 2015 22:27:30 +0000 (22:27 +0000)]
nfsclient: Protest loudly when GETATTR responses are invalid

BROKEN NFS SERVER OR MIDDLEWARE: Certain WAN "accelerators" attempt to cache
NFS GETATTR traffic, but actually corrupt it (e.g., responding to requests
with attributes for totally different files).

Warn very verbosely when this is detected. Linux' NFS client has a similar
warning.

Adds a sysctl/tunable (vfs.nfs.fileid_maxwarnings) to configure the quantity
of warnings; default to 10. (Zero disables; -1 is unlimited.)

Adds a failpoint to aid in validating the warning / behavior with a
non-broken server. Use something like:

    sysctl 'debug.fail_point.nfscl_force_fileid_warning=10%return(1)'

Reviewed by: rmacklem
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3304

8 years agoPass SYNCHRONIZE CACHE command parameters to backends.
Alexander Motin [Wed, 5 Aug 2015 22:24:49 +0000 (22:24 +0000)]
Pass SYNCHRONIZE CACHE command parameters to backends.

At this point IMMED flag is translated to MNT_NOWAIT flag of VOP_FSYNC(),
hoping that file system implements that (ZFS seems doesn't).

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

8 years agoFix a bug which could make routed(8) daemon exit by sending a special RIP
Xin LI [Wed, 5 Aug 2015 22:04:56 +0000 (22:04 +0000)]
Fix a bug which could make routed(8) daemon exit by sending a special RIP
query from a remote machine, similar to SA-14:21.routed.

Submitted by: hrs

8 years agoFix shell injection vulnerability in patch(1) via ed(1) by
Xin LI [Wed, 5 Aug 2015 22:04:54 +0000 (22:04 +0000)]
Fix shell injection vulnerability in patch(1) via ed(1) by
tightening sanity check of the input. [1]

While I'm there also replace ed(1) with red(1) because we do
not need the unrestricted functionality. [2]

Obtained from: Bitrig [1], DragonFly [2]
Security: CVE-2015-1418 [1]

8 years agoRelax serialization of SYNCHRONIZE CACHE commands.
Alexander Motin [Wed, 5 Aug 2015 21:58:32 +0000 (21:58 +0000)]
Relax serialization of SYNCHRONIZE CACHE commands.

Before this change SYNCHRONIZE CACHE commands were executed exclusively,
as if they had ORDERED tag.  But looking through SCSI specs I've found
no any reason to be so strict.  For reads this ordering seems pointless.
For writes it looks less obvious, so I left ordering against preceeding
write commands, while following ones are no longer required to wait.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

8 years agofind: Fix segfault with very long path in -exec/-ok ... {} \;.
Jilles Tjoelker [Wed, 5 Aug 2015 21:33:30 +0000 (21:33 +0000)]
find: Fix segfault with very long path in -exec/-ok ... {} \;.

If the resulting argument is longer than MAXPATHLEN, realloc() was called to
extend the space, but the new pointer was not correctly stored.

Different from what OpenBSD has done, rewrite brace_subst() to calculate the
necessary space first and realloc() at most once.

As before, the e_len fields are not updated in case of a realloc.
Therefore, a following long argument will do another realloc.

PR: 201750
MFC after: 1 week

8 years agoAdd a hack-around to this fatal taskqueue running whilst the NIC
Adrian Chadd [Wed, 5 Aug 2015 21:22:25 +0000 (21:22 +0000)]
Add a hack-around to this fatal taskqueue running whilst the NIC
is detaching.

This mostly fixes a panic - the reset path shouldn't run whilst
the NIC is being torn down.

It's not locked, so it's "mostly" ok, but most of the rest of
the driver doesn't read sc->invalid with sensible locking. Grr.

The real solution is to cleanly tear down taskqueues in the detach/suspend
phase, but ..

8 years agoAdd a missing method - ath_hal_settsf64().
Adrian Chadd [Wed, 5 Aug 2015 21:16:12 +0000 (21:16 +0000)]
Add a missing method - ath_hal_settsf64().

This is required for TDMA slave mode.

8 years agoAdd regression tests for a bug reported in stable/10
Baptiste Daroussin [Wed, 5 Aug 2015 21:11:32 +0000 (21:11 +0000)]
Add regression tests for a bug reported in stable/10

While pw(8) on head is not affected it is worth adding more regression tests
ensuring this bug will not happen unnoticed in the futur

8 years agocxgbe(4): Update T5 and T4 firmwares bundled with the driver to 1.14.4.0. The
Navdeep Parhar [Wed, 5 Aug 2015 19:45:11 +0000 (19:45 +0000)]
cxgbe(4):  Update T5 and T4 firmwares bundled with the driver to 1.14.4.0.  The
changes in the firmwares since 1.11.27.0 are listed here (straight copy-paste
from the "Release Notes.txt" accompanying the Chelsio Unified Wire 2.11.1.0
release on the website).

22.1. T5 Firmware
+++++++++++++++++++++++++++++++++

Version : 1.14.4.0
Date    : 08/05/2015
================================================================================

FIXES
-----

BASE:
- Fixes a potential data path hang by properly programming PMTX congestion
  threshold settings.
- Fixes a potential initialization error when accessing a configuration file
  stored on the flash.
- Fixes a regression where SGE resources can be miss-sized if iWARP is disabled.

ETH:
- Fixes a timing issue that would prevent CR4 links from coming up with some
  switches.

FOFCoE:
- Defers fcoe linkdown mailbox command handling till LOGO is sent.
- Updates vlan prio for all outstanding IOs during dcbx update.

ENHANCEMENTS
------------

BASE:
- Adds support for PAUSE OFF watchdog.
- Reports devlog access information in PCIE_FW_PF register 7.

ETH:
- Enhances segmentation offload to include VxLAN and Geneve.
- Adds PTP support.
- Adds new interface to allow the driver to query the VI rss table base
  addresses.
- Allows the driver to program the SGE ingrext contxt CongDrop field.

OFLD:
- Adds new interface for the driver to specify offloaded connections TCP snd
  and rcv scale factors.

iSCSI:
- Adds support for iscsi segmentatation offload (ISO).
- Adds support for iscsi t10-dif offload.

FOiSCSI:
- Sets FORCE_BIT for cut through processing for FOiSCSI.

FOFCoE:
- Adds support for FCoE BB6.
- Improves WRITE performance.

================================================================================
================================================================================

Version : 1.13.32.0
Date    : 03/25/2015
================================================================================

FIXES
-----

BASE:
- Fixes FW_CAPS_CONFIG_CMD return value on error (was positive instead of
   negative)
- Fixes FW_PARAMS_PARAM_DEV_FLOWC_BUFFIFO_SZ indication (was wrong on certain
   adapter configurations)
- Fixes config file based PL_TIMEOUT register programming

ETH:
- Fixes a potential EO UDP SEG header corruption
- Fixes an issue where 1000Base-X was not enabled correctly when using QSA
   modules

OFLD:
- Fixes timeout issue with half-open connections
- Fixes FW_FLOWC_WR processing when state is set to finwait1

FOFCoE:
- Fixes fcoe xchg leaks in linkdown/peer down path
- Fixes cleanup in FCoE linkdown and fixed buf timer flowid abuse
- Fixes fw crash by clearing fcf flowc during bye

FOiSCSI:
- Don't create a new tcp socket if ERL0 attempt has timed out.

ENHANCEMENTS
------------

BASE:
- Adds support for VFs on PFs 4 to 7
- Adds support for QPs/CQs on any physical and virtual function

ETH:
- Stops sending LACP frames on loopback interface
- Adds an AUTOEQU indication to CPL_SGE_EGR_UPDATE
- Adds support for CR4 links (BEAN/AEC on 40G TwinAx cables)

OFLD:
- Improves default settings of LAN and CLUSTER TCP timer settings
- Sends Negative Advice CPLs to software

FOISCSI:
- Adds IPv6 support for foiscsi. Keeps backward compatibility with
   old foiscsi drivers which doesn't support ipv6.

FOFCoE:
- Added fcoe debug support in flowc dump

================================================================================
================================================================================

Version : 1.12.25.0
Date    : 10/22/2014
================================================================================

FIXES
-----

BASE:
- Improves precision of the Weight Round Robing Traffic Management Algorithm
- Fixes an issue where the link would intermittently fail to come up
- Fixes an issue where adapters with an external PHY couldn't run at 100Mbps
- Fixes an issue where active optical cables were not recognized
- Fixes link advertising issues on T520-BT (speed and pause frames) that would
  cause the link to negotiate unexpected settings
- Forces link restart when auto-negotiation is disabled
- Fix an issue where pause frames wouldn't be fully disabled even if requested

ETH:
- Fixes NVGRE Segmentation Offload network header generation.

DCBX:
- Fixes an issue where some settings were not being sent to the switch
  correctly
- Fixes an issue where back-to-back DCBX port updates could get overwritten by
  FW
- Fixes a firmware crash on DCBX APP information request before link up

FOiSCSI:
- Fixes abort task leak in tmf response handling
- Fixes TCP RST handling while in iSCSI ERL0
- Fixes a firmware crash on BYE without INIT

ENHANCEMENTS
-------------

BASE:
- Adds link partner settings reporting when available
- Adds QSA support (in conjunction with QSA VPD)
- Adds T520-BT LED support
- Reports NOTSUPPORTED for modules with an unhandled identifier

DCBX:
- Adds version reporting (indicating which version FW is trying to negotiate)
- Adds IEEE support
- Reports LLDP time outs

FOiSCSI:
- Add support for multiple iSCSI DDP client
- Sends DHCP renew request when lease expires

================================================================================

22.2. T4 Firmware
+++++++++++++++++

Version : 1.14.4.0
Date    : 08/05/2015
================================================================================

FIXES
-----

BASE:
- Fixes a potential initialization error when accessing a configuration file
  stored on the flash.
- Initialize PCIE_DBG_INDIR_REQ.Enable to 0, as hardware failed to do so and
  register dumps could result in errors.

ETH:
- Fixes an issue that sometimes prevented the link from coming up in CR adapters.

ENHANCEMENTS
------------

BASE:
- Adds support for PAUSE OFF watchdog.
- Reports devlog access information in PCIE_FW_PF register 7.

ETH:
- Adds new interface to allow the driver to query the VI rss table base
  addresses.

OFLD:
- Adds new interface for the driver to specify offloaded connections TCP snd
  and rcv scale factors.

================================================================================
================================================================================

Version : 1.13.32.0
Date    : 03/25/2015
================================================================================

FIXES
-----

BASE:
- Fixes FW_CAPS_CONFIG_CMD return value on error (was positive instead of
    negative)
- Fixes FW_PARAMS_PARAM_DEV_FLOWC_BUFFIFO_SZ indication (was wrong on certain
    adapter configurations)
- Fixes config file based PL_TIMEOUT register programming

ETH:
- Fixes a potential EO UDP SEG header corruption

OFLD:
- Fixes timeout issue with half-open connections
- Fixes FW_FLOWC_WR processing when state is set to finwait1

FOiSCSI:
- Don't create a new tcp socket if ERL0 attempt has timed out.

ENHANCEMENTS
------------

ETH:
- Stops sending LACP frames on loopback interface
- Adds an AUTOEQU indication to CPL_SGE_EGR_UPDATE

OFLD:
- Improves default settings of LAN and CLUSTER TCP timer settings
- Sends Negative Advice CPLs to software

================================================================================
================================================================================

Version : 1.12.25.0
Date    : 10/22/2014
================================================================================

FIXES
-----

BASE:
- Improves precision of the Weight Round Robing Traffic Management Algorithm
- Forces link restart when auto-negotiation is disabled
- Fix an issue where pause frames wouldn't be fully disabled even if requested

DCBX:
- Fixes an issue where some settings were not being sent to the switch
  correctly
- Fixes an issue where back-to-back DCBX port updates could get overwritten by
  FW
- Fixes a firmware crash on DCBX APP information request before link up

FOiSCSI:
- Fixes abort task leak in tmf response handling
- Fixes TCP RST handling while in iSCSI ERL0
- Fixes a firmware crash on BYE without INIT

ENHANCEMENTS
------------

BASE:
- Adds link partner settings reporting when available
- Firmware now reports NOTSUPPORTED for modules with an unhandled identifier

DCBX:
- Adds version reporting (indicating which version FW is trying to negotiate)
- Adds IEEE support
- Reports LLDP time outs

FOiSCSI:
- Adds support for multiple iSCSI DDP clients
- Sends DHCP renew request when lease expires

================================================================================

Obtained from: Chelsio Communications
MFC after: 2 weeks
Sponsored by: Chelsio Communications

8 years agoAdd TXOP enforce support to the AR9300 HAL.
Adrian Chadd [Wed, 5 Aug 2015 19:32:35 +0000 (19:32 +0000)]
Add TXOP enforce support to the AR9300 HAL.

This is required for (more) correct TDMA support.  Without it, the
code tries to calculate the required guard interval based on the
current rate, and since this is an 11n NIC and people try using
11n, it calls ath_hal_computetxtime() on an 11n rate which then
panics.

This doesn't fix TDMA slave mode on AR9300 - it just makes it
have one less bug.

Reported by: Berislav Purgar <bpurgar@gmail.com>

8 years agoRationalize BSD license on sys/*/include/in_cksum.h
Ed Maste [Wed, 5 Aug 2015 19:05:12 +0000 (19:05 +0000)]
Rationalize BSD license on sys/*/include/in_cksum.h

Remove the advertising clause from the Regents of the University of
California's license, per the letter dated July 22, 1999.

Update clause numbering.

8 years agoRemove empty directories left by r286332
Ed Maste [Wed, 5 Aug 2015 18:55:40 +0000 (18:55 +0000)]
Remove empty directories left by r286332

Reported by: garga

8 years agoRemove old GNU Binutils tools now provided by ELF Tool Chain
Ed Maste [Wed, 5 Aug 2015 18:30:00 +0000 (18:30 +0000)]
Remove old GNU Binutils tools now provided by ELF Tool Chain

Reviewed by: bapt, brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3238

8 years agoRework get_string() to make it more robust when fetching strings of unknown
John Baldwin [Wed, 5 Aug 2015 18:14:01 +0000 (18:14 +0000)]
Rework get_string() to make it more robust when fetching strings of unknown
length.  In particular, instead of blinding fetching 1k blocks, do an initial
fetch up to the end of the current page followed by page-sized fetches up to
the maximum size.  Previously if the 1k buffer crossed a page boundary and
the second page was not valid, the entire operation would fail.

8 years agoWhitespace fix: remove some spurious spaces before commas.
John Baldwin [Wed, 5 Aug 2015 18:10:46 +0000 (18:10 +0000)]
Whitespace fix: remove some spurious spaces before commas.

8 years agoMake rctl_enable rc variable actually work. To avoid breaking existing
Edward Tomasz Napierala [Wed, 5 Aug 2015 17:38:02 +0000 (17:38 +0000)]
Make rctl_enable rc variable actually work.  To avoid breaking existing
setups that worked before, flip the default to "YES".  Most people don't
have /etc/rctl.conf, so they won't be affected in any way.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix more style issues.
Jung-uk Kim [Wed, 5 Aug 2015 17:21:42 +0000 (17:21 +0000)]
Fix more style issues.

Submitted by: bde

8 years agoRationalize BSD license on sys/*/include/float.h
Ed Maste [Wed, 5 Aug 2015 17:05:35 +0000 (17:05 +0000)]
Rationalize BSD license on sys/*/include/float.h

Remove the advertising clause from the Regents of the University of
California's license, per the letter dated July 22, 1999.

Update clause numbering.

8 years agoCorrect the previous commit: remove the DECLARE_MODULE().
Ed Schouten [Wed, 5 Aug 2015 16:53:49 +0000 (16:53 +0000)]
Correct the previous commit: remove the DECLARE_MODULE().

It looks like a MODULE_VERSION() can also appear on its own -- there is
no need to use explicitly use DECLARE_MODULE(). Looking at other
modules, this seems common practice.

8 years agoAdd DECLARE_MODULE() to the "cloudabi" kernel module.
Ed Schouten [Wed, 5 Aug 2015 16:45:47 +0000 (16:45 +0000)]
Add DECLARE_MODULE() to the "cloudabi" kernel module.

This kernel module does not require any explicit initialization, but a
module declaration is needed to let the "cloudabi64" kernel module
automatically pull this in.

Obtained from: https://github.com/NuxiNL/freebsd

8 years agoMake fcntl(F_SETFL) work.
Ed Schouten [Wed, 5 Aug 2015 16:15:43 +0000 (16:15 +0000)]
Make fcntl(F_SETFL) work.

The stat_put() system call can be used to modify file descriptor
attributes, such as flags, but also Capsicum permission bits. Support
for changing Capsicum bits will be added as soon as its dependent
changes have been pushed through code review.

Obtained from: https://github.com/NuxiNL/freebsd

8 years agoFix `make depend` in sys/modules
Li-Wen Hsu [Wed, 5 Aug 2015 14:45:52 +0000 (14:45 +0000)]
Fix `make depend` in sys/modules

Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D3291

8 years agoIssue all reads of single XCOPY segment simultaneously.
Alexander Motin [Wed, 5 Aug 2015 13:46:15 +0000 (13:46 +0000)]
Issue all reads of single XCOPY segment simultaneously.

During vMotion and Clone VMware by default runs multiple sequential 4MB
XCOPY requests same time.  If CTL issues reads sequentially in 1MB chunks
for each XCOPY command, reads from different commands are not detected
as sequential by serseq option code and allowed to execute simultaneously.
Such read pattern confused ZFS prefetcher, causing suboptimal disk access.
Issuing all reads same time make serseq code work properly, serializing
reads both within each XCOPY command and between them.

My tests with ZFS pool of 14 disks in RAID10 shows prefetcher efficiency
improved from 37% to 99.7%, copying speed improved by 10-60%, average
read latency reduced twice on HDD layer and by five times on zvol layer.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

8 years agoRegenerate the system call table.
Ed Schouten [Wed, 5 Aug 2015 13:10:13 +0000 (13:10 +0000)]
Regenerate the system call table.

8 years agoImport the latest CloudABI system call definitions and table.
Ed Schouten [Wed, 5 Aug 2015 13:09:46 +0000 (13:09 +0000)]
Import the latest CloudABI system call definitions and table.

We're going to need these for next code I'm going to send out for
review: support for poll() and kqueue() on CloudABI.

8 years agoDisable SSE in libthr
Eric van Gyzen [Wed, 5 Aug 2015 12:53:55 +0000 (12:53 +0000)]
Disable SSE in libthr

Clang emits SSE instructions on amd64 in the common path of
pthread_mutex_unlock.  If the thread does not otherwise use SSE,
this usage incurs a context-switch of the FPU/SSE state, which
reduces the performance of multiple real-world applications by a
non-trivial amount (3-5% in one application).

Instead of this change, I experimented with eagerly switching the
FPU state at context-switch time.  This did not help.  Most of the
cost seems to be in the read/write of memory--as kib@ stated--and
not in the #NM handling.  I tested on machines with and without
XSAVEOPT.

One counter-argument to this change is that most applications already
use SIMD, and the number of applications and amount of SIMD usage
are only increasing.  This is absolutely true.  I agree that--in
general and in principle--this change is in the wrong direction.
However, there are applications that do not use enough SSE to offset
the extra context-switch cost.  SSE does not provide a clear benefit
in the current libthr code with the current compiler, but it does
provide a clear loss in some cases.  Therefore, disabling SSE in
libthr is a non-loss for most, and a gain for some.

I refrained from disabling SSE in libc--as was suggested--because
I can't make the above argument for libc.  It provides a wide variety
of code; each case should be analyzed separately.

https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html

Suggestions from: dim, jmg, rpaulo
Approved by: kib (mentor)
MFC after: 2 weeks
Sponsored by: Dell Inc.

8 years agoFix UP build after r286296, ensure that CPU_FOREACH() is defined.
Konstantin Belousov [Wed, 5 Aug 2015 10:50:33 +0000 (10:50 +0000)]
Fix UP build after r286296, ensure that CPU_FOREACH() is defined.

Sponsored by: The FreeBSD Foundation

8 years agoProperly sort the function declarations added in r286296
Jason A. Harmening [Wed, 5 Aug 2015 10:48:32 +0000 (10:48 +0000)]
Properly sort the function declarations added in r286296

Submitted by: alc
Approved by: kib (mentor)

8 years agoAdd the remaining pointer size independent CloudABI socket system calls.
Ed Schouten [Wed, 5 Aug 2015 08:18:05 +0000 (08:18 +0000)]
Add the remaining pointer size independent CloudABI socket system calls.

CloudABI uses a structure called cloudabi_sockstat_t. Think of it as
'struct stat' for sockets. It is used by functions such as
getsockname(), getpeername(), some of the getsockopt() values, etc.

This change implements the sock_stat_get() system call that returns a
copy of this structure. The accept() system call should also return a
full copy of this structure eventually, but for now we're only
interested in the peer address. Add a TODO() to make sure this is
patched up later on.

Differential Revision: https://reviews.freebsd.org/D3218

8 years agoAllow the creation of polling descriptors (kqueues) on CloudABI.
Ed Schouten [Wed, 5 Aug 2015 07:37:06 +0000 (07:37 +0000)]
Allow the creation of polling descriptors (kqueues) on CloudABI.

8 years agoAllow the creation of kqueues with a restricted set of Capsicum rights.
Ed Schouten [Wed, 5 Aug 2015 07:36:50 +0000 (07:36 +0000)]
Allow the creation of kqueues with a restricted set of Capsicum rights.

On CloudABI we want to create file descriptors with just the minimal set
of Capsicum rights in place. The reason for this is that it makes it
easier to obtain uniform behaviour across different operating systems.

By explicitly whitelisting the operations, we can return consistent
error codes, but also prevent applications from depending OS-specific
behaviour.

Extend kern_kqueue() to take an additional struct filecaps that is
passed on to falloc_caps(). Update the existing consumers to pass in
NULL.

Differential Revision: https://reviews.freebsd.org/D3259

8 years agoMake it possible to implement poll(2) on top of kqueue(2).
Ed Schouten [Wed, 5 Aug 2015 07:34:29 +0000 (07:34 +0000)]
Make it possible to implement poll(2) on top of kqueue(2).

It looks like EVFILT_READ and EVFILT_WRITE trigger under the same
conditions as poll()'s POLLRDNORM and POLLWRNORM as described by POSIX.
The only difference is that POLLRDNORM has to be triggered on regular
files unconditionally, whereas EVFILT_READ only triggers when not EOF.

Introduce a new flag, NOTE_FILE_POLL, that can be used to make
EVFILT_READ and EVFILT_WRITE behave identically to poll(). This flag
will be used by cloudlibc's poll() function.

Reviewed by: jmg
Differential Revision: https://reviews.freebsd.org/D3303

8 years agoSet f_file to -1/F_UNUSED when after closing when possible
Enji Cooper [Wed, 5 Aug 2015 03:17:06 +0000 (03:17 +0000)]
Set f_file to -1/F_UNUSED when after closing when possible

This will help ensure we don't trash file descriptors that get used later on
in the daemon

Found via internal Coverity scan

MFC after: 2 weeks
Discussed with: cem, ed, markj
Differential Revision: https://reviews.freebsd.org/D3081
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate the comment about handling old-style rc(5) scripts
Enji Cooper [Wed, 5 Aug 2015 03:03:57 +0000 (03:03 +0000)]
Update the comment about handling old-style rc(5) scripts

The old-style (*.sh) scripts in /etc/rc.d are explicitly ignored, whereas
other scripts ending in .sh are permitted

8 years agoRemove one more that crept in unnecessarily from previous commit.
Justin Hibbits [Wed, 5 Aug 2015 01:52:52 +0000 (01:52 +0000)]
Remove one more that crept in unnecessarily from previous commit.

8 years agoRemove some unnecessary includes.
Justin Hibbits [Wed, 5 Aug 2015 01:52:11 +0000 (01:52 +0000)]
Remove some unnecessary includes.

8 years agoAdd two new pmap functions:
Jason A. Harmening [Tue, 4 Aug 2015 19:46:13 +0000 (19:46 +0000)]
Add two new pmap functions:
vm_offset_t pmap_quick_enter_page(vm_page_t m)
void pmap_quick_remove_page(vm_offset_t kva)

These will create and destroy a temporary, CPU-local KVA mapping of a specified page.

Guarantees:
--Will not sleep and will not fail.
--Safe to call under a non-sleepable lock or from an ithread

Restrictions:
--Not guaranteed to be safe to call from an interrupt filter or under a spin mutex on all platforms
--Current implementation does not guarantee more than one page of mapping space across all platforms. MI code should not make nested calls to pmap_quick_enter_page.
--MI code should not perform locking while holding onto a mapping created by pmap_quick_enter_page

The idea is to use this in busdma, for bounce buffer copies as well as virtually-indexed cache maintenance on mips and arm.

NOTE: the non-i386, non-amd64 implementations of these functions still need review and testing.

Reviewed by: kib
Approved by: kib (mentor)
Differential Revision: http://reviews.freebsd.org/D3013

8 years agoBEAGLEBONE: remove dtrace from MODULES_EXTRA.
Rui Paulo [Tue, 4 Aug 2015 19:04:02 +0000 (19:04 +0000)]
BEAGLEBONE: remove dtrace from MODULES_EXTRA.

This config is already building all modules, so we don't need the
MODULES_EXTRA definition.  It was also causing problems to users who
rely on MODULES_OVERRIDE to do the right thing.

Discussed with: ian

8 years agoFix style(9) bugs.
Jung-uk Kim [Tue, 4 Aug 2015 18:59:54 +0000 (18:59 +0000)]
Fix style(9) bugs.

8 years agoMake IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec
John-Mark Gurney [Tue, 4 Aug 2015 17:47:11 +0000 (17:47 +0000)]
Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF...  IPsec
defines the keys differently than NIST does, so we have to muck with
key lengths and nonce/IVs to be standard compliant...

Remove the iv from secasvar as it was unused...

Add a counter protected by a mutex to ensure that the counter for GCM
and ICM will never be repeated..  This is a requirement for security..
I would use atomics, but we don't have a 64bit one on all platforms..

Fix a bug where IPsec was depending upon the OCF to ensure that the
blocksize was always at least 4 bytes to maintain alignment... Move
this logic into IPsec so changes to OCF won't break IPsec...

In one place, espx was always non-NULL, so don't test that it's
non-NULL before doing work..

minor style cleanups...

drop setting key and klen as they were not used...

Enforce that OCF won't pass invalid key lengths to AES that would
panic the machine...

This was has been tested by others too...  I tested this against
NetBSD 6.1.5 using mini-test suite in
https://github.com/jmgurney/ipseccfgs and the only things that don't
pass are keyed md5 and sha1, and 3des-deriv (setkey syntax error),
all other modes listed in setkey's man page...  The nice thing is
that NetBSD uses setkey, so same config files were used on both...

Reviewed by: gnn

8 years agoAdd support for Planex GW-NS300N.
Kevin Lo [Tue, 4 Aug 2015 15:04:28 +0000 (15:04 +0000)]
Add support for Planex GW-NS300N.

8 years agoxargs now takes -P0, creating as many concurrent processes as possible
Allan Jude [Tue, 4 Aug 2015 14:27:25 +0000 (14:27 +0000)]
xargs now takes -P0, creating as many concurrent processes as possible

PR: 199976
Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Reviewed by: mjg, bjk
Approved by: bapt (mentor)
MFC after: 1 month
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D2616

8 years agoGive large kernel stack to the initial thread . Otherwise, ZFS
Konstantin Belousov [Tue, 4 Aug 2015 13:50:52 +0000 (13:50 +0000)]
Give large kernel stack to the initial thread .  Otherwise, ZFS
overflows the stack during root mount in some configurations.

Tested by: Fabian Keil <freebsd-listen@fabiankeil.de> (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoEnsure the local MANIFEST is always used when verifying remote
Glen Barber [Tue, 4 Aug 2015 13:40:26 +0000 (13:40 +0000)]
Ensure the local MANIFEST is always used when verifying remote
distribution sets.

MFC after: immediately
Sponsored by: The FreeBSD Foundation

8 years agoCopy the fencing of the algorithm to do lock-less update and reading
Konstantin Belousov [Tue, 4 Aug 2015 12:33:51 +0000 (12:33 +0000)]
Copy the fencing of the algorithm to do lock-less update and reading
of the timehands, from the kern_tc.c implementation to vdso.  Add
comments giving hints where to look for the algorithm explanation.

To compensate the removal of rmb() in userspace binuptime(), add
explicit lfence instruction before rdtsc.  On i386, add usual
complications to detect SSE2 presence; assume that old CPUs which do
not implement SSE2 also execute rdtsc almost in order.

Reviewed by: alc, bde (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoFix panic triggered by code like this:
Edward Tomasz Napierala [Tue, 4 Aug 2015 10:40:08 +0000 (10:40 +0000)]
Fix panic triggered by code like this:

open("/dev/md0", O_EXEC);

Discussed with: kib@, mav@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3051

8 years agoAvoid calling into the random subsystem before it is initialized.
Hans Petter Selasky [Tue, 4 Aug 2015 09:45:10 +0000 (09:45 +0000)]
Avoid calling into the random subsystem before it is initialized.

Sponsored by: Mellanox Technologies

8 years agoMark vgonel() as static. It was already declared static earlier;
Edward Tomasz Napierala [Tue, 4 Aug 2015 08:51:56 +0000 (08:51 +0000)]
Mark vgonel() as static.  It was already declared static earlier;
no idea why compilers don't warn about this.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRevert r286236; vgonel() is a static function.
Edward Tomasz Napierala [Tue, 4 Aug 2015 08:16:18 +0000 (08:16 +0000)]
Revert r286236; vgonel() is a static function.

Sponsored by: The FreeBSD Foundation

8 years agoGet it closes to style(9).
Marcelo Araujo [Tue, 4 Aug 2015 07:04:36 +0000 (07:04 +0000)]
Get it closes to style(9).
Staticization usage() and printit().
Fix the usage of err(3).

Reviewed by: bde

8 years agoLet the CloudABI futex code use umtx_keys.
Ed Schouten [Tue, 4 Aug 2015 06:02:03 +0000 (06:02 +0000)]
Let the CloudABI futex code use umtx_keys.

The CloudABI kernel still passes all of the cloudlibc unit tests.

Reviewed by: vangyzen
Differential Revision: https://reviews.freebsd.org/D3286

8 years agoFix bad arithmetic in umtx_key_get() to compute object offset.
Ed Schouten [Tue, 4 Aug 2015 06:01:13 +0000 (06:01 +0000)]
Fix bad arithmetic in umtx_key_get() to compute object offset.

It looks like umtx_key_get() has the addition and subtraction the wrong
way around, meaning that it fails to match in certain cases. This causes
the cloudlibc unit tests to deadlock in certain cases.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3287

8 years agoRevert r286144 leaving the original fix to the buffer overflow.
Pedro F. Giffuni [Tue, 4 Aug 2015 02:56:31 +0000 (02:56 +0000)]
Revert r286144 leaving the original fix to the buffer overflow.

Some developers consider the new code unnecessarily obfuscated.
There was also a benign off-by-one.

Discussed with: bde, vangyzen, jmallett

8 years agoRemove the 3rd clause of BSD LICENSE.
Marcelo Araujo [Tue, 4 Aug 2015 02:41:14 +0000 (02:41 +0000)]
Remove the 3rd clause of BSD LICENSE.
Sync the code with the OpenBSD version.
Small style(9) fix up.

Differential Revision: D3212
Reviewed by: rodrigc, bapt
Obtained from: OpenBSD
Sponsored by: gandi.net

8 years agoRemove the 3rd clause of BSD LICENSE.
Marcelo Araujo [Tue, 4 Aug 2015 02:34:51 +0000 (02:34 +0000)]
Remove the 3rd clause of BSD LICENSE.
Sync the code with the OpenBSD version.

Differential Revision: D3213
Reviewed by: rodrigc, bapt
Obtained from: OpenBSD
Sponsored by: gandi.net

8 years agoAlways define __va_list for amd64 and restore pre-r232261 behavior for i386.
Jung-uk Kim [Tue, 4 Aug 2015 00:11:39 +0000 (00:11 +0000)]
Always define __va_list for amd64 and restore pre-r232261 behavior for i386.
Note it allows exotic compilers, e.g., TCC, to build with our stdio.h, etc.

PR: 201749
MFC after: 1 week

8 years agoRemove the mtx_sleep() from the kqueue f_event filter.
Luiz Otavio O Souza [Mon, 3 Aug 2015 22:14:45 +0000 (22:14 +0000)]
Remove the mtx_sleep() from the kqueue f_event filter.

The filter is called from the network hot path and must not sleep.

The filter runs with the descriptor lock held and does not manipulates the
buffers, so it is not necessary sleep when the hold buffer is in use.

Just ignore the hold buffer contents when it is being copied to user space
(when hold buffer in use is set).

This fix the "Sleeping thread owns a non-sleepable lock" panic when the
userland thread is too busy reading the packets from bpf(4).

PR: 200323
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agoAvoid calling strlen() where we can use the strspn() return value.
Ed Schouten [Mon, 3 Aug 2015 22:07:50 +0000 (22:07 +0000)]
Avoid calling strlen() where we can use the strspn() return value.

8 years agoClarify pw(8) manual w/respect to required arguments. Break long lines at
Devin Teske [Mon, 3 Aug 2015 21:19:31 +0000 (21:19 +0000)]
Clarify pw(8) manual w/respect to required arguments. Break long lines at
punctuation while here.

Differential Revision: https://reviews.freebsd.org/D2700
Reviewed by: wblock, bapt
MFC after: 3 days
X-MFC-to: stable/10

8 years agoAdd missing const keyword to function parameter.
Ed Schouten [Mon, 3 Aug 2015 21:11:33 +0000 (21:11 +0000)]
Add missing const keyword to function parameter.

The umtx_key_get() function does not dereference the address off the
userspace object. The pointer can safely be const.

8 years agokgdb uses td_oncpu to determine if a thread is running and should use
John Baldwin [Mon, 3 Aug 2015 20:43:36 +0000 (20:43 +0000)]
kgdb uses td_oncpu to determine if a thread is running and should use
a pcb from stoppcbs[] rather than the thread's PCB.  However, exited threads
retained td_oncpu from the last time they ran, and newborn threads had their
CPU fields cleared to zero during fork and thread creation since they are
in the set of fields zeroed when threads are setup.  To fix, explicitly
update the CPU fields for exiting threads in sched_throw() to reflect the
switch out and reset the CPU fields for new threads in sched_fork_thread()
to NOCPU.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3193

8 years agoRefinements to r281079's sequential access optimization: Prefetched pages,
Alan Cox [Mon, 3 Aug 2015 20:30:27 +0000 (20:30 +0000)]
Refinements to r281079's sequential access optimization: Prefetched pages,
which constitute the majority of the pages that are processed by
vm_fault_dontneed(), are already near the tail of the inactive queue.  Only
the pages at faulting virtual addresses are actually moved by
vm_page_advise(..., MADV_DONTNEED).  However, vm_page_advise(...,
MADV_DONTNEED) is simultaneously too aggressive and passive for the moved
pages.  It makes most of these pages too easily reclaimable, and at the same
time it leaves enough pages in the active queue to trigger pageouts by the
page daemon.  Instead, with this change, the pages at faulting virtual
addresses are moved to the tail of the inactive queue, where they are
relatively close to the pages prefetched by the same page fault.

Discussed with: jeff
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove never used file
Baptiste Daroussin [Mon, 3 Aug 2015 18:47:45 +0000 (18:47 +0000)]
Remove never used file

Obtained from: DragonFlyBSD

8 years agoAdd a KASSERT() to make sure we wont rotate the buffers twice (rotate the
Luiz Otavio O Souza [Mon, 3 Aug 2015 18:22:31 +0000 (18:22 +0000)]
Add a KASSERT() to make sure we wont rotate the buffers twice (rotate the
buffers while the hold buffer is in use).

Suggested by: ed, ghelmer
MFC with: r286142

8 years agoThe mbuf parameter to ip_output_pfil() must be an output parameter since
Mark Johnston [Mon, 3 Aug 2015 17:47:02 +0000 (17:47 +0000)]
The mbuf parameter to ip_output_pfil() must be an output parameter since
pfil(9) hooks may modify the chain.

X-MFC-With: r286028

8 years agoRemove a couple of unused fields from the FBT probe struct.
Mark Johnston [Mon, 3 Aug 2015 17:39:36 +0000 (17:39 +0000)]
Remove a couple of unused fields from the FBT probe struct.

8 years agoA misplaced #endif in ixgbe_ioctl() causes interface MTU to become
Sean Bruno [Mon, 3 Aug 2015 16:39:25 +0000 (16:39 +0000)]
A misplaced #endif in ixgbe_ioctl() causes interface MTU to become
zero when INET and INET6 are undefined.

PR: 162028
Differential Revision: https://reviews.freebsd.org/D3187
Submitted by: hoomanfazaeli@gmail.com pluknet
Reviewed by: erj hiren gelbius
MFC after: 2 weeks

8 years agoFix panic that would happen on forcibly unmounting devfs (note that
Edward Tomasz Napierala [Mon, 3 Aug 2015 16:35:18 +0000 (16:35 +0000)]
Fix panic that would happen on forcibly unmounting devfs (note that
as it is now, devfs ignores MNT_FORCE anyway, so it needs to be modified
to trigger the panic) with consumers still opened.

Note that this still results in a leak of r/w/e counters.  It seems
to be harmless, though.  If anyone knows a better way to approach
this - please tell.

Discussed with: kib@, mav@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3050

8 years agoDocument vgonel(9).
Edward Tomasz Napierala [Mon, 3 Aug 2015 16:30:47 +0000 (16:30 +0000)]
Document vgonel(9).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix a problem which made loader(8) load non-kld files twice.
Edward Tomasz Napierala [Mon, 3 Aug 2015 16:27:36 +0000 (16:27 +0000)]
Fix a problem which made loader(8) load non-kld files twice.

For example, without this patch, the following three lines
in /boot/loader.conf would result in /boot/root.img being preloaded
twice, and two md(4) devices - md0 and md1 - being created.

initmd_load="YES"
initmd_type="md_image"
initmd_name="/boot/root.img"

Reviewed by: marcel@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3204

8 years agoAdd missing exception number to EL0 sync. abort on ARM64
Zbigniew Bodek [Mon, 3 Aug 2015 14:58:46 +0000 (14:58 +0000)]
Add missing exception number to EL0 sync. abort on ARM64

When doing a data abort from userland it is possible to get
more than one data abort inside the same exception level.
Add an appropriate exception number to allow nesting of
data_abort handler for EL0.

Reviewed by:   andrew
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3276

8 years agoFix ipfw range deletion.
Alexander V. Chernikov [Mon, 3 Aug 2015 14:31:06 +0000 (14:31 +0000)]
Fix ipfw range deletion.

Spotted by: ian,julian

8 years agoAdd pmspvc device back to GENERIC. The issues with the device playing
Warner Losh [Mon, 3 Aug 2015 13:49:46 +0000 (13:49 +0000)]
Add pmspvc device back to GENERIC. The issues with the device playing
grabby hands with other driver's devices has been solved.

MFC After: 3 weeks

8 years agoLet CloudABI use the SV_CAPSICUM flag.
Ed Schouten [Mon, 3 Aug 2015 13:42:52 +0000 (13:42 +0000)]
Let CloudABI use the SV_CAPSICUM flag.

CloudABI processes will now start up in capabilities mode.

Reviewed by: kib

8 years agoAdd sysent flag to switch to capabilities mode on startup.
Ed Schouten [Mon, 3 Aug 2015 13:41:47 +0000 (13:41 +0000)]
Add sysent flag to switch to capabilities mode on startup.

CloudABI processes should run in capabilities mode automatically. There
is no need to switch manually (e.g., by calling cap_enter()). Add a
flag, SV_CAPSICUM, that can be used to call into cap_enter() during
execve().

Reviewed by: kib

8 years agoClear the IA32_MISC_ENABLE MSR bit, which limits the max CPUID
Konstantin Belousov [Mon, 3 Aug 2015 12:14:42 +0000 (12:14 +0000)]
Clear the IA32_MISC_ENABLE MSR bit, which limits the max CPUID
reported, on APs.  We already did this on BSP.

Otherwise, the userspace software which depends on the features
reported by the high CPUID levels is misbehaving.  In particular, AVX
detection is non-functional, depending on which CPU thread happens to
execute when doing CPUID.  Another victim is the libthr signal
handlers interposer, which needs to save full FPU extended state.

Reported and tested by: Andre Meiser <ortadur@web.de>
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoDecompose TCP INP_INFO lock to increase short-lived TCP connections scalability:
Julien Charbon [Mon, 3 Aug 2015 12:13:54 +0000 (12:13 +0000)]
Decompose TCP INP_INFO lock to increase short-lived TCP connections scalability:

- The existing TCP INP_INFO lock continues to protect the global inpcb list
  stability during full list traversal (e.g. tcp_pcblist()).

- A new INP_LIST lock protects inpcb list actual modifications (inp allocation
  and free) and inpcb global counters.

It allows to use TCP INP_INFO_RLOCK lock in critical paths (e.g. tcp_input())
and INP_INFO_WLOCK only in occasional operations that walk all connections.

PR: 183659
Differential Revision: https://reviews.freebsd.org/D2599
Reviewed by: jhb, adrian
Tested by: adrian, nitroboost-gmail.com
Sponsored by: Verisign, Inc.

8 years agoRework the way iSCSI initiator handles system shutdown. This fixes
Edward Tomasz Napierala [Mon, 3 Aug 2015 11:57:11 +0000 (11:57 +0000)]
Rework the way iSCSI initiator handles system shutdown. This fixes
hangs on shutdown with LUNs with mounted filesystems over a disconnected
iSCSI session.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3052

8 years agoPass the pcb to store the vfp state in to vfp_save_state. This fixes a bug
Andrew Turner [Mon, 3 Aug 2015 11:05:02 +0000 (11:05 +0000)]
Pass the pcb to store the vfp state in to vfp_save_state. This fixes a bug
in savectx where it will be used to store the current state however will
pass in a pcb when vfp_save_state expected a thread pointer.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoFix KSTACK_PAGES check in ZFS module
Steven Hartland [Mon, 3 Aug 2015 09:34:09 +0000 (09:34 +0000)]
Fix KSTACK_PAGES check in ZFS module

The check introduced by r285946 failed to add the dependency on
opt_kstack_pages.h which meant the default value for the platform instead
of the customised options KSTACK_PAGES=X was being tested.

Also wrap in #ifdef __FreeBSD__ for portability.

MFC after: 3 days
Sponsored by: Multiplay

8 years agoSet p_osrel to __FreeBSD_version on process startup.
Ed Schouten [Mon, 3 Aug 2015 07:29:57 +0000 (07:29 +0000)]
Set p_osrel to __FreeBSD_version on process startup.

Certain system calls have quirks applied to make them work as if called
on an older version of FreeBSD. As CloudABI executables don't have the
FreeBSD OS release number in the ELF header, this value is set to zero,
making the system calls fall back to typically historic, non-standard
behaviour.

Reviewed by: kib

8 years agoFix bugs spotted by gcc
Baptiste Daroussin [Mon, 3 Aug 2015 06:06:56 +0000 (06:06 +0000)]
Fix bugs spotted by gcc

Reported by: adrian

8 years agoActually set quiet to something.
Adrian Chadd [Mon, 3 Aug 2015 05:59:30 +0000 (05:59 +0000)]
Actually set quiet to something.

/usr/home/adrian/work/freebsd/head-embedded-2/src/usr.sbin/pw/pw_user.c: In function 'pw_user_next':
/usr/home/adrian/work/freebsd/head-embedded-2/src/usr.sbin/pw/pw_user.c:680: warning: statement with no effect

8 years agoMake image_copyout_zeroes() an interface function.
Marcel Moolenaar [Mon, 3 Aug 2015 01:24:48 +0000 (01:24 +0000)]
Make image_copyout_zeroes() an interface function.

8 years agoPass correct type of argument to ti_gpio_unmask_irq in ti_gpio_activate_resource
Oleksandr Tymoshenko [Mon, 3 Aug 2015 01:22:49 +0000 (01:22 +0000)]
Pass correct type of argument to ti_gpio_unmask_irq in ti_gpio_activate_resource

8 years agolooks like all archs either have clang or cdefs included before..
John-Mark Gurney [Sun, 2 Aug 2015 21:33:40 +0000 (21:33 +0000)]
looks like all archs either have clang or cdefs included before..
drop this include as unnecessary..

Requested by: bde

8 years agoAdd an example program (in Python) for the AMD Am79c900 (ILACC)
Marcel Moolenaar [Sun, 2 Aug 2015 21:24:03 +0000 (21:24 +0000)]
Add an example program (in Python) for the AMD Am79c900 (ILACC)
ethernet controller. The ethernet controller is emulated by VMware
Fusion (for example) and is a good device to demonstrate how to use
the bus space and busdma functions due to its simple programming.

The program sets up the DMA structures, sends a DHCP discover packet,
waits 2 seconds, and iterates over the receive ring for an offer.

8 years agoUse intmax_t rather than long long
Baptiste Daroussin [Sun, 2 Aug 2015 19:49:24 +0000 (19:49 +0000)]
Use intmax_t rather than long long

8 years agoConvert the year used for regression test fro 2043 to 2037
Baptiste Daroussin [Sun, 2 Aug 2015 18:20:36 +0000 (18:20 +0000)]
Convert the year used for regression test fro 2043 to 2037

This makes the regression tests pass on systems where time_t is 32bits

8 years agoDon't forget to check the vendor when probing. Also, there's no need
Warner Losh [Sun, 2 Aug 2015 16:26:41 +0000 (16:26 +0000)]
Don't forget to check the vendor when probing. Also, there's no need
to double check for if the card has probed before. In fact, there's no
reason to single check either. Simplify the code as a result.
$FreeBSD$ added to lxutil.c in a non-standard way to help keep the
diffs with upstream to a minimum.

Differential Revision: https://reviews.freebsd.org/D3263

8 years agoDon't take the port numbers for packets containing ABORT chunks from
Michael Tuexen [Sun, 2 Aug 2015 16:07:30 +0000 (16:07 +0000)]
Don't take the port numbers for packets containing ABORT chunks from
a freed mbuf. Just use them from the stcb.

MFC after: 3 days

8 years agoAdd a manual page for the cloudabi and cloudabi64 kernel modules.
Ed Schouten [Sun, 2 Aug 2015 14:56:30 +0000 (14:56 +0000)]
Add a manual page for the cloudabi and cloudabi64 kernel modules.

CloudABI has two separate kernel modules: cloudabi and cloudabi64. The
first module contains all the pointer size independent code, whereas
cloudabi64 contains the actual 64-bits specific system calls and the ELF
loader.

Reviewed by: wblock
Obtained from: https://github.com/NuxiNL/freebsd
Differential Revision: https://reviews.freebsd.org/D3258

8 years agoFix build on 32bits
Baptiste Daroussin [Sun, 2 Aug 2015 13:50:11 +0000 (13:50 +0000)]
Fix build on 32bits

8 years agoSplit some extra long lines
Baptiste Daroussin [Sun, 2 Aug 2015 13:33:17 +0000 (13:33 +0000)]
Split some extra long lines

8 years agoSplit some extra long lines
Baptiste Daroussin [Sun, 2 Aug 2015 13:32:23 +0000 (13:32 +0000)]
Split some extra long lines