]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoRequire the embedded packet to contain 8 bytes after the IP header instead
tuexen [Sat, 30 May 2015 19:52:28 +0000 (19:52 +0000)]
Require the embedded packet to contain 8 bytes after the IP header instead
of only 4. This is guaranteed by RFC 792 and the verification of GRE, ICMP
and TCP packets use 8 bytes.

MFC after: 3 days

9 years agoRemove trailing whitespaces.
tuexen [Sat, 30 May 2015 19:48:40 +0000 (19:48 +0000)]
Remove trailing whitespaces.

9 years agoRemove libmandoc from bootstrap tools
bapt [Sat, 30 May 2015 19:30:23 +0000 (19:30 +0000)]
Remove libmandoc from bootstrap tools

9 years agoOnly push libohash once in bootstrap tools
bapt [Sat, 30 May 2015 19:29:19 +0000 (19:29 +0000)]
Only push libohash once in bootstrap tools

9 years agoRegenerate after r283777
bapt [Sat, 30 May 2015 17:46:11 +0000 (17:46 +0000)]
Regenerate after r283777

9 years agoSwitch to mandoc's version of makewhatis(8), whatis(1), apropos(1) utilities.
bapt [Sat, 30 May 2015 17:41:37 +0000 (17:41 +0000)]
Switch to mandoc's version of makewhatis(8), whatis(1), apropos(1) utilities.

This change among other things improve search capabilities over the manpages
allowing fine grain query.

A new build option WITHOUT_MANDOCDB has been added to keep the ancient version
of the database and the tools. The plan is to entirely remove this option before
11.0-RELEASE.

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

9 years agoActually check the DTS node value to enable the uart quirks.
loos [Sat, 30 May 2015 16:30:51 +0000 (16:30 +0000)]
Actually check the DTS node value to enable the uart quirks.

Without this fix, you cannot disable the quirks by setting it to 0, just
the presence of the FDT node was enough to enable it.

9 years agoDo not make libsqlite3 dependency chain only defined for kerberos, soon more
bapt [Sat, 30 May 2015 16:00:33 +0000 (16:00 +0000)]
Do not make libsqlite3 dependency chain only defined for kerberos, soon more
options would need libsqlite3 as well thus depends on this definitions

9 years agoUse SRCTOP when defining ROOTOBJDIR
sjg [Sat, 30 May 2015 15:13:18 +0000 (15:13 +0000)]
Use SRCTOP when defining ROOTOBJDIR

Excplicitly check rather than assume that .CURDIR is
a component of .OBJDIR
Otherwise check for OBJTOP and if that is a match use it.

9 years agoDefine SRCTOP in src.sys.mk
sjg [Sat, 30 May 2015 15:08:52 +0000 (15:08 +0000)]
Define SRCTOP in src.sys.mk

Because src.sys.mk should only ever be found in the src tree
we can use its position (.PARSEDIR) to set SRCTOP.

Reviewed by: bapt, imp

9 years agoig4 - Intel fourth gen integrated I2C SMBus driver.
grembo [Sat, 30 May 2015 12:17:18 +0000 (12:17 +0000)]
ig4 - Intel fourth gen integrated I2C SMBus driver.

Differential Revision: https://reviews.freebsd.org/D2372
Reviewed by: jhb, wblock, adrian
Approved by: jhb, wblock
Relnotes: yes

9 years agoDo not set d_fwsectors nor d_fwheads. Primarily because the values
marcel [Fri, 29 May 2015 20:50:41 +0000 (20:50 +0000)]
Do not set d_fwsectors nor d_fwheads. Primarily because the values
tend to be invalid. On a Beaglebone Black, we get 8192 sectors per
track and that causes major breakages.

Differential Revision: D2646
Reviewed by: ian@ imp@

9 years agoMake the NFS server use shared vnode locks for a few cases
rmacklem [Fri, 29 May 2015 20:22:53 +0000 (20:22 +0000)]
Make the NFS server use shared vnode locks for a few cases
that are allowed by the VFS/VOP interface instead of using
exclusive locks.

MFC after: 2 weeks

9 years agoRemoved unused special fork() implementations.
brooks [Fri, 29 May 2015 19:42:55 +0000 (19:42 +0000)]
Removed unused special fork() implementations.

The arm version hasn't been used in ages.

The mips version uses a valid, but pointless check of v1 and has been
unhooked from the build since r276630.

Differential Revision: https://reviews.freebsd.org/D2592
Reviewed by: emaste
Sponsored by: DARPA, AFRL

9 years agoWhen delivering a signal with default disposition to the thread,
kib [Fri, 29 May 2015 16:26:08 +0000 (16:26 +0000)]
When delivering a signal with default disposition to the thread,
tdsigwakeup() increases the priority of the low-priority threads, to
give them a chance to be terminated timely.  Also, kernel allows user
to signal kernel processes.  The combined effect is that signalling
idle process bump a priority of the selected delivery thread, which
starts eating CPU.

Check for the delivery thread be an idle thread and do not raise its
priority then.

The signal delivery to the kernel threads must be opt-in feature.
Kernel thread should explicitely declare the ability to handle signals
directed to it.  E.g., nfsd threads check for signal as an indication
of exit request.

Most threads do not handle signals at all, and queuing the signal to
them causes odd side-effects.  Most innocent consequence is the memory
leak due to queued ksiginfo, which is never deleted from the sigqueue.
Code to prevent even queuing signals to the kernel threads is trivial,
but it requires careful examination of each call to kproc/kthread
creation to decide should the signalling be allowed.  The commit is a
stop-gap measure which fixes the immediate case for now.

PR: 200493
Reported and tested by: trasz
Discussed with: trasz, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUse device_printf() instead of if_printf(). No functional changes.
glebius [Fri, 29 May 2015 14:35:16 +0000 (14:35 +0000)]
Use device_printf() instead of if_printf().  No functional changes.

9 years agoKill EoL whitespace.
maxim [Fri, 29 May 2015 14:03:07 +0000 (14:03 +0000)]
Kill EoL whitespace.

9 years agoarm64 added to CSCOPE_ARCHDIR.
maxim [Fri, 29 May 2015 14:02:37 +0000 (14:02 +0000)]
arm64 added to CSCOPE_ARCHDIR.

9 years agoRemove several write-only variables, all reported by the gcc 4.9
kib [Fri, 29 May 2015 13:24:17 +0000 (13:24 +0000)]
Remove several write-only variables, all reported by the gcc 4.9
buildkernel run.

Some of them were write-only under some kernel options, e.g. variables
keeping values only used by CTR() macros.  It costs nothing to the
code readability and correctness to eliminate the warnings in those
cases too by removing the local cached values used only for
single-access.

Review: https://reviews.freebsd.org/D2665
Reviewed by: rodrigc
Looked at by: bjk
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoMove RTM announces into generic code to be independent from Layer2 code.
ae [Fri, 29 May 2015 10:24:16 +0000 (10:24 +0000)]
Move RTM announces into generic code to be independent from Layer2 code.
This fixes bug introduced in 274988, when announces about new addresses
don't sent for tunneling interfaces.

Reported by: tuexen@
MFC after: 1 week

9 years agoRemove dead declaration
bapt [Fri, 29 May 2015 10:07:20 +0000 (10:07 +0000)]
Remove dead declaration

PR: 195928
MFC after: 2 days

9 years agoFix __fpclassifyl when double == long double. As with r283693 this is
andrew [Fri, 29 May 2015 09:26:10 +0000 (09:26 +0000)]
Fix __fpclassifyl when double == long double. As with r283693 this is
needed on ARM and PowerPC.

MFC after: 1 Week

9 years agoFix __isinfl on architectures where double == long double. This is the
andrew [Fri, 29 May 2015 09:23:20 +0000 (09:23 +0000)]
Fix __isinfl on architectures where double == long double. This is the
case on at least ARM and PowerPC.

MFC after: 1 week

9 years agoExplicitely enable queued invalidation completion interrupt when the
kib [Fri, 29 May 2015 09:17:59 +0000 (09:17 +0000)]
Explicitely enable queued invalidation completion interrupt when the
queue is started, not relying on the interrupt remaping method to
happen.  Also disable interrupts when shooting down the queue.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoRemove printf() noise...
tuexen [Fri, 29 May 2015 08:31:15 +0000 (08:31 +0000)]
Remove printf() noise...

MFC after: 3 days

9 years agoThe linux_common module only for 64bit Linuxulators.
dchagin [Fri, 29 May 2015 05:50:33 +0000 (05:50 +0000)]
The linux_common module only for 64bit Linuxulators.
Its my fault.

9 years agoMove linux64 and linux_common to it's right place and make them not
dchagin [Fri, 29 May 2015 05:46:58 +0000 (05:46 +0000)]
Move linux64 and linux_common to it's right place and make them not
depend on bhyve.

Submitted by: Oliver Pinter <oliver.pinter from hardenedbsd.org>

9 years agosfxge: do not use DEBUG_FLAGS to enable extra debug checks
arybchik [Fri, 29 May 2015 05:44:56 +0000 (05:44 +0000)]
sfxge: do not use DEBUG_FLAGS to enable extra debug checks

DEBUG_FLAGS are set to DEBUG option value when kernel is built.
For example, it is -g in GENERIC config to have debug symbols.
Also DEBUG_FLAGS are used to determine if ctfconvert should keep
debug symbols.
Since we redefined DEBUG_FLAGS, debug symbols were always missing.
ctfconvert complains about it during kernel build.
It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or
similar), we'll have no debug symbols and ctfconvert will complain.
If it incorrect to always have -g in our DEBUG_FLAGS, since debug
symbols presence should be controllable by kernel config.
So, just add disabled by default addition of -DDEBUG=1 to CFLAGS.

Reviewed by:    imp
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2666

9 years agoacpi_ibm: add per-model default events mask.
rpaulo [Fri, 29 May 2015 05:28:24 +0000 (05:28 +0000)]
acpi_ibm: add per-model default events mask.

Add support for the hotkeys on a Lenovo X1 3rd gen. This also enables
event reporting by default.

9 years agoExport 'BOARDNAME' when differs from the KERNCONF.
gjb [Fri, 29 May 2015 02:16:40 +0000 (02:16 +0000)]
Export 'BOARDNAME' when differs from the KERNCONF.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoSort configuration options for consistency with other boards.
gjb [Fri, 29 May 2015 02:15:05 +0000 (02:15 +0000)]
Sort configuration options for consistency with other boards.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoRevert r102953
brooks [Thu, 28 May 2015 22:06:05 +0000 (22:06 +0000)]
Revert r102953

The bitfile padding was always unallocated on real-world FreeBSD systems and
depended on the assumption that (abs(sizeof(long) - sizeof(char*)) <= 32).

Differential Revision: https://reviews.freebsd.org/D2667
Reviewed by: eadler
Sponsored by: DARPA, AFRL

9 years agoCreate a separate kobj interface for leaf-driver PCI IOV methods.
jhb [Thu, 28 May 2015 22:01:50 +0000 (22:01 +0000)]
Create a separate kobj interface for leaf-driver PCI IOV methods.

Leaf drivers should not import the PCI bus interface to add IOV handling.
Instead, move the IOV client methods to a separate kobj interface.

Differential Revision: https://reviews.freebsd.org/D2584
Reviewed by: rstone

9 years agoProvide VOP_GETPAGES_ASYNC() for extfs.
pfg [Thu, 28 May 2015 21:06:59 +0000 (21:06 +0000)]
Provide VOP_GETPAGES_ASYNC() for extfs.

Merge the filesystem specific part from r274914 to ext2fs.

I only did regular testing with the change but UFS and our ext2fs
are similar enough that the code should just work with the new
sendfile.

Discussed with: glebius

9 years agoReport the MTU consistently as specified in
tuexen [Thu, 28 May 2015 20:33:28 +0000 (20:33 +0000)]
Report the MTU consistently as specified in
https://tools.ietf.org/html/rfc6458
Thanks to Irene Ruengeler for helping me to fix this bug.
MFC after: 3 days

9 years agoTake source and destination address into account when determining
tuexen [Thu, 28 May 2015 19:28:08 +0000 (19:28 +0000)]
Take source and destination address into account when determining
the scope.
This fixes a problem when a client with a global address
connects to a server with a private address.
Thanks to Irene Ruengeler in helping me to find the issue.

MFC after: 3 days

9 years agoRetire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined.
tuexen [Thu, 28 May 2015 18:52:32 +0000 (18:52 +0000)]
Retire SCTP_DONT_DO_PRIVADDR_SCOPE which was never defined.

MFC after: 3 days

9 years agoFix a bug where messages would not be sent in SHUTDOWN_RECEIVED state.
tuexen [Thu, 28 May 2015 18:34:02 +0000 (18:34 +0000)]
Fix a bug where messages would not be sent in SHUTDOWN_RECEIVED state.
This problem was reported by Mark Bonnekessel and Markus Boese.
Thanks to Irene Ruengeler for helping me to fix the cause of
the problem. It can be tested with the following packetdrill script:

+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
+0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
// Check the handshake with an empty(!) cookie
+0.1 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
+0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=10000, os=1, is=1, tsn=0, STATE_COOKIE[len=4, val=...]]
+0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...]
+0.1 < sctp: COOKIE_ACK[flgs=0]
+0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
+0.0 write(3, ..., 1024) = 1024
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=0, sid=0, ssn=0, ppid=0]
+0.0 write(3, ..., 1024) = 1024 // Pending due to Nagle
+0.0 < sctp: SHUTDOWN[flgs=0, cum_tsn=0]
+0.0 > sctp: DATA[flgs=BE, len=1040, tsn=1, sid=0, ssn=1, ppid=0]
+0.0 < sctp: SACK[flgs=0, cum_tsn=1, a_rwnd=10000, gaps=[], dups=[]] // Do we need another SHUTDOWN here?
+0.0 > sctp: SHUTDOWN_ACK[flgs=0]
+0.0 < sctp: SHUTDOWN_COMPLETE[flgs=0]
+0.0 close(3) = 0

MFC after: 3 days

9 years agoThe wrong commit message was given with r283632. This is the correct message.
slm [Thu, 28 May 2015 18:24:22 +0000 (18:24 +0000)]
The wrong commit message was given with r283632.  This is the correct message.

- Updated all files with 2015 Avago copyright, and updated LSI's copyright
  dates.

- Changed all of the PCI device strings from LSI to Avago Technologies (LSI).

- Added a sysctl variable to control how StartStopUnit behavior works. User can
  select to spin down disks based on if disk is SSD or HDD.

- Inquiry data is required to tell if a disk will support SSU at shutdown or
  not. Due to the addition of mpssas_async, which gets Advanced Info but not
  Inquiry data, the setting of supports_SSU was moved to the
  mpssas_scsiio_complete function, which snoops for any Inquiry commands. And,
  since disks are shutdown as a target and not a LUN, this process was
  simplified by basing it on targets and not LUNs.

- Added a sysctl variable that sets the amount of time to retry after sending a
  failed SATA ID command. This helps with some bad disks and large disks that
  require a lot of time to spin up. Part of this change was to add a callout to
  handle timeouts with the SATA ID command. The callout function is called
  mpssas_ata_id_timeout(). (Fixes PR 191348)

- Changed the way resets work by allowing I/O to continue to devices that are
  not currently under a reset condition. This uses devq's instead of simq's and
  makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function
  called mpssas_prepare_tm().

- Some changes were made to reduce code duplication when getting a SAS address
  for a SATA disk.

- Fixed some formatting and whitespace.

- Bump version of mps driver to 9.255.01.00-fbsd

PR: 191348
Reviewed by: ken, scottl
Approved by: ken, scottl
MFC after: 1 week

9 years agoThe wrong commit message was given with r283632. To get the correct commit
slm [Thu, 28 May 2015 18:14:55 +0000 (18:14 +0000)]
The wrong commit message was given with r283632. To get the correct commit
message synced to the changes in r283632, those changes are now backed out.
Another commit will be done that is exactly the same as r283632 except it will
have to correct commit message.

Approved by: ken, scottl, asomers, gibbs

9 years agoUse macros for overhead in a consistent way. No functional change.
tuexen [Thu, 28 May 2015 17:57:56 +0000 (17:57 +0000)]
Use macros for overhead in a consistent way. No functional change.
Thanks to Irene Ruengeler for suggesting the change.

MFC after: 3 days

9 years agoFix non-deterministic delays when accessing a vcpu that was in "running" or
neel [Thu, 28 May 2015 17:37:01 +0000 (17:37 +0000)]
Fix non-deterministic delays when accessing a vcpu that was in "running" or
"sleeping" state. This is done by forcing the vcpu to transition to "idle"
by returning to userspace with an exit code of VM_EXITCODE_REQIDLE.

MFC after:      2 weeks

9 years agoSome more debug info cleanup.
tuexen [Thu, 28 May 2015 16:39:22 +0000 (16:39 +0000)]
Some more debug info cleanup.

MFC after: 3 days

9 years agoProvide an unambiguous description of the potential hazard in calling
pkelsey [Thu, 28 May 2015 16:18:41 +0000 (16:18 +0000)]
Provide an unambiguous description of the potential hazard in calling
pthread_setspecific(3) from a key destructor.

Reviewed by: jhb
Approved by: jmallett (mentor)
MFC after: 3 days

9 years agoFix and cleanup the debug information. This has no user-visible changes.
tuexen [Thu, 28 May 2015 16:00:23 +0000 (16:00 +0000)]
Fix and cleanup the debug information. This has no user-visible changes.
Thanks to Irene Ruengeler for proving a patch.

MFC after: 3 days

9 years agoAddress some compiler warnings. No functional change.
tuexen [Thu, 28 May 2015 14:24:21 +0000 (14:24 +0000)]
Address some compiler warnings. No functional change.

MFC after: 3 days

9 years agoTweak the description of when waitpid() doesn't return any status for a
jhb [Thu, 28 May 2015 13:56:19 +0000 (13:56 +0000)]
Tweak the description of when waitpid() doesn't return any status for a
non-blocking wait to avoid the word "empty".

Requested by: ngie

9 years agoSimilarly to other architecture, add the include for cpufunc.h which is
bz [Thu, 28 May 2015 12:33:21 +0000 (12:33 +0000)]
Similarly to other architecture, add the include for cpufunc.h which is
needed for pte.h by vmstat to resolve MIPS_CCA_UNCACHED.

9 years agoFollow-up r283636 with a fix to the other abuses of BUS_SPACE_MAXSIZE_32BIT.
scottl [Thu, 28 May 2015 08:00:11 +0000 (08:00 +0000)]
Follow-up r283636 with a fix to the other abuses of BUS_SPACE_MAXSIZE_32BIT.
It makes no sense to specify a segment size that's larger than the total
amount that you want to allocate.

9 years agoAdd CAP_FCNTL to the lease file capsicum rights, and limit to
pkelsey [Thu, 28 May 2015 05:38:07 +0000 (05:38 +0000)]
Add CAP_FCNTL to the lease file capsicum rights, and limit to
CAP_FCNTL_GETFL.  Without CAP_FCNTL_GETFL, the lease file truncation
in rewrite_client_leases() will fail to trim old data when rewriting
the file with a lesser amount of data.

Reviewed by: pjd, rwatson
Approved by: jmallett (mentor)
MFC after: 1 week

9 years agoTo avoid sleeping in firmware_get() with bwi mutex held, call
glebius [Wed, 27 May 2015 22:30:21 +0000 (22:30 +0000)]
To avoid sleeping in firmware_get() with bwi mutex held, call
bwi_mac_fw_alloc() at the device attach, not in the interface
init.

9 years agoIn bwi_mac_fw_alloc():
glebius [Wed, 27 May 2015 22:29:19 +0000 (22:29 +0000)]
In bwi_mac_fw_alloc():
- Use device_printf() instead of if_printf().
- Reduce cut and paste.

9 years agoSetup the interrupt handler after bwi_attach(). If IRQ is shared, interrupt
glebius [Wed, 27 May 2015 22:27:15 +0000 (22:27 +0000)]
Setup the interrupt handler after bwi_attach(). If IRQ is shared, interrupt
may come during bwi_attach().

9 years ago- Don't request BUS_DMA_ALLOCNOW for dma tags, that requires enormous
glebius [Wed, 27 May 2015 22:25:49 +0000 (22:25 +0000)]
- Don't request BUS_DMA_ALLOCNOW for dma tags, that requires enormous
  amount of memory.
- Don't request segsize of BUS_SPACE_MAXSIZE_32BIT, when maxsize is
  MCLBYTES.

With this change bwi_attach() can succeed on i386.

Submitted by: scottl

9 years agoMake the size of the hash tables used by the NFSv4 server tunable.
rmacklem [Wed, 27 May 2015 22:00:05 +0000 (22:00 +0000)]
Make the size of the hash tables used by the NFSv4 server tunable.
No appreciable change in performance was observed after increasing
the sizes of these tables and then testing with a single client.
However, there was an email that indicated high CPU overheads for
a heavily loaded NFSv4 and it is hoped that increasing the sizes
of the hash tables via these tunables might help.
The tables remain the same size by default.

Differential Revision: https://reviews.freebsd.org/D2596
MFC after: 2 weeks

9 years agoThis setting of stop_at_shutdown should have been removed with r279253
slm [Wed, 27 May 2015 20:37:34 +0000 (20:37 +0000)]
This setting of stop_at_shutdown should have been removed with r279253

Approved by: ken
MFC after: 1 week

9 years agoTrim spurious colon.
jhb [Wed, 27 May 2015 19:49:33 +0000 (19:49 +0000)]
Trim spurious colon.

9 years agoAdd missed {}.
kib [Wed, 27 May 2015 19:28:14 +0000 (19:28 +0000)]
Add missed {}.

Noted by: Morten Rodal <morten@rodal.no>
MFC after: 2 weeks

9 years agoExport a list of VM objects in the system via a sysctl. The list can be
jhb [Wed, 27 May 2015 18:11:05 +0000 (18:11 +0000)]
Export a list of VM objects in the system via a sysctl.  The list can be
examined via 'vmstat -o'.  It can be used to determine which files are
using physical pages of memory and how much each is using.

Differential Revision: https://reviews.freebsd.org/D2277
Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc. (forward porting to HEAD/10)

9 years agoBump __FreeBSD_version for the r283602, which changed dounmount() to
kib [Wed, 27 May 2015 18:07:32 +0000 (18:07 +0000)]
Bump __FreeBSD_version for the r283602, which changed dounmount() to
require referenced struct mount *.

Sponsored by: The FreeBSD Foundation

9 years agoAdd <sys/user.h> to the SYNOPSIS of the kinfo_get*() functions since these
jhb [Wed, 27 May 2015 17:51:06 +0000 (17:51 +0000)]
Add <sys/user.h> to the SYNOPSIS of the kinfo_get*() functions since these
functions all return types that are defined in that header.

MFC after: 1 week

9 years agoInvert the build date and svn revision to match the namimg
gjb [Wed, 27 May 2015 17:33:30 +0000 (17:33 +0000)]
Invert the build date and svn revision to match the namimg
convention that has been in use for a while.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoUpdate to ELF Tool Chain r3223
emaste [Wed, 27 May 2015 14:28:19 +0000 (14:28 +0000)]
Update to ELF Tool Chain r3223

Highlights (upstream revisions):
 - Fix SHT_GROUP handling in elfcopy/strip (3206 3220 3221)
 - Misc elfcopy / strip bug fixes (3215 3216 3217)
 - Many C++ demangler improvements (3199 3200 3201 3202 3203 3204 3205
   3208 3210 3211 3212)
 - Improve GNU binutils compatibility in elfcopy / strip (3213 3214)
 - Add -g option to readelf(1): dump contents of section groups (3219)
 - Add EM_IAMCU 32-bit Intel MCU (3198)

Also add a compat #define for building with older FreeBSD ELF headers.
The GRP_COMDAT flag was added to elf_common.h in r283110, but it's not
available during the bootstrap build.  It is also convenient to be able
to build on older hosts.

Thanks to antoine@ for tracking down issues through multiple exp-runs
and to kaiw@ for fixing.

PR: 198611 (exp-run), 200350
Sponsored by: The FreeBSD Foundation

9 years agoMove counter.h include into ieee80211_freebsd.h. Should fix build.
glebius [Wed, 27 May 2015 14:05:46 +0000 (14:05 +0000)]
Move counter.h include into ieee80211_freebsd.h. Should fix build.

Submitted by: Zilvinas Valinskas <zilvinas.valinskas gmail.com>

9 years agoUse the cpuset API more consistently:
jhb [Wed, 27 May 2015 13:54:37 +0000 (13:54 +0000)]
Use the cpuset API more consistently:
- Fetch the root set from cpuset_getaffinity() instead of assuming all CPUs
  from 0 to hw.ncpu are the root set.
- Use CPU_SETSIZE and CPU_FFS.
- The original notion of halted CPUs the manpage and code refers to is gone.
  Use the term "available" instead.

Differential Revision: https://reviews.freebsd.org/D2491
Reviewed by: emaste
MFC after: 1 week

9 years agoAdd SIOCGI2C ioctl support to the driver. Would work only on ConnectX-3
glebius [Wed, 27 May 2015 13:42:28 +0000 (13:42 +0000)]
Add SIOCGI2C ioctl support to the driver. Would work only on ConnectX-3
with fresh firmware. The low level code is based on code provided by
Mellanox.

Thanks to Mellanox and their distributor Must (http://mustcompany.ru)
for providing hardware.

In collaboration with: Andre Melkoumian <andre mellanox.com>
Reviewed by: hselasky
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoDocument recent p_flag2 additions.
pluknet [Wed, 27 May 2015 10:08:31 +0000 (10:08 +0000)]
Document recent p_flag2 additions.

9 years agoEnabled rewritten PCID support by default.
kib [Wed, 27 May 2015 09:50:18 +0000 (09:50 +0000)]
Enabled rewritten PCID support by default.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

9 years agoAfter r283600, NODELAY flag to inodedep_lookup() function is unused.
kib [Wed, 27 May 2015 09:49:04 +0000 (09:49 +0000)]
After r283600, NODELAY flag to inodedep_lookup() function is unused.
Eliminate it, and simplify code by removing the local dflags variable
always initialized to DEPALLOC.

Noted by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoRight now, dounmount() is called with unreferenced mount point.
kib [Wed, 27 May 2015 09:22:50 +0000 (09:22 +0000)]
Right now, dounmount() is called with unreferenced mount point.
Nothing stops a parallel unmount to suceed before the given call to
dounmount() checks and locks the covered vnode.  Prevent dounmount()
from acting on the freed (although type-stable) memory by changing the
interface to require the mount point to be referenced.  dounmount()
consumes the reference on return, regardless of the sucessfull or
erronous result.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoAdd V_MNTREF flag to the vn_start_write(9) and
kib [Wed, 27 May 2015 09:21:47 +0000 (09:21 +0000)]
Add V_MNTREF flag to the vn_start_write(9) and
vn_start_secondary_write(9) functions.  The flag indicates that the
caller already owns a reference on the mount point, and the functions
can consume it.  The reference is released by vn_finished_write(9) and
vn_finished_secondary_write(9) in due course.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoCurrently, softupdate code detects overstepping on the workitems
kib [Wed, 27 May 2015 09:20:42 +0000 (09:20 +0000)]
Currently, softupdate code detects overstepping on the workitems
limits in the code which is deep in the call stack, and owns several
critical system resources, like vnode locks.  Attempt to wait while
the per-mount softupdate thread cleans up the backlog may deadlock,
because the thread might need to lock the same vnode which is owned by
the waiting thread.

Instead of synchronously waiting for the worker, perform the worker'
tickle and pause until the backlog is cleaned, at the safe point
during return from kernel to usermode.  A new ast request to call
softdep_ast_cleanup() is created, the SU code now only checks the size
of queue and schedules ast.

There is no ast delivery for the kernel threads, so they are exempted
from the mechanism, except NFS daemon threads.  NFS server loop
explicitely checks for the request, and informs the schedule_cleanup()
that it is capable of handling the requests by the process P2_AST_SU
flag.  This is needed because nfsd may be the sole cause of the SU
workqueue overflow.  But, to not cause nsfd to spawn additional
threads just because we slow down existing workers, only tickle su
threads, without waiting for the backlog cleanup.

Reviewed by: jhb, mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agosfxge: mask ifmedia options (pauses) when looking for matching mode
arybchik [Wed, 27 May 2015 08:57:48 +0000 (08:57 +0000)]
sfxge: mask ifmedia options (pauses) when looking for matching mode

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2656

9 years agoFix a typo.
gjb [Tue, 26 May 2015 21:58:22 +0000 (21:58 +0000)]
Fix a typo.

Submitted by: ian
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoFix spelling mistake in comment.
gavin [Tue, 26 May 2015 21:50:53 +0000 (21:50 +0000)]
Fix spelling mistake in comment.

9 years agomemmem(3): empty little string matches the beginning of the big string
emaste [Tue, 26 May 2015 21:16:07 +0000 (21:16 +0000)]
memmem(3): empty little string matches the beginning of the big string

This function originated in glibc, and this matches their behaviour
(and NetBSD, OpenBSD, and musl).

An empty big string (arg "l") is handled by the existing
l_len < s_len test.

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

9 years agoUse SVNREVISION and BUILDDATE if passed into the make(1)
gjb [Tue, 26 May 2015 20:51:44 +0000 (20:51 +0000)]
Use SVNREVISION and BUILDDATE if passed into the make(1)
environment, fallback to trying to figure it out otherwise.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoPrint error message if autoload fails due to missing DTB blob, otherwise
gonzo [Tue, 26 May 2015 20:32:14 +0000 (20:32 +0000)]
Print error message if autoload fails due to missing DTB blob, otherwise
ubldr just falls back to loader prompt with no apparent reason

9 years agoImport new moduli from OpenBSD. Although there is no reason to distrust
des [Tue, 26 May 2015 19:46:41 +0000 (19:46 +0000)]
Import new moduli from OpenBSD.  Although there is no reason to distrust
the current set, it is good hygiene to change them once in a while.

MFC after: 1 week

9 years agoPrint leading zeroes of UFS2 fs_id like we do for UFS1.
ae [Tue, 26 May 2015 18:27:38 +0000 (18:27 +0000)]
Print leading zeroes of UFS2 fs_id like we do for UFS1.

PR: 156908
MFC after: 1 week

9 years agoReindent after r283575.
gjb [Tue, 26 May 2015 17:44:31 +0000 (17:44 +0000)]
Reindent after r283575.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoRemove duplicate exists() sanity check.
gjb [Tue, 26 May 2015 17:42:28 +0000 (17:42 +0000)]
Remove duplicate exists() sanity check.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoSet STAGE_TARGETS only if RELEASEDIR exists.
gjb [Tue, 26 May 2015 17:40:36 +0000 (17:40 +0000)]
Set STAGE_TARGETS only if RELEASEDIR exists.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoRemove a continuation on error, since the relevant behavior can
gjb [Tue, 26 May 2015 17:34:56 +0000 (17:34 +0000)]
Remove a continuation on error, since the relevant behavior can
only occur if a particular file exists.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoFix build WITHOUT_CDDL by unconditionnaly adding libproc and librtld_db
bapt [Tue, 26 May 2015 16:25:28 +0000 (16:25 +0000)]
Fix build WITHOUT_CDDL by unconditionnaly adding libproc and librtld_db
on supported arches to the prebuild libs

9 years agoMFi386: r283407
nyan [Tue, 26 May 2015 14:08:32 +0000 (14:08 +0000)]
MFi386: r283407
  Implement vdso - virtual dynamic shared object.

MFi386: r283474
  Rework signal code to allow using it by other modules, like linprocfs.

MFi386: r283506
  For objcopy, use --input-target and --output-target.

This fixes pc98 build.

9 years agoProvide ieee80211_get_counter() that sums up ieee802com
glebius [Tue, 26 May 2015 13:19:05 +0000 (13:19 +0000)]
Provide ieee80211_get_counter() that sums up ieee802com
errors to the errors of this vap interface.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoAdd two counters to ieee80211com, that will be used to count transmission
glebius [Tue, 26 May 2015 12:51:14 +0000 (12:51 +0000)]
Add two counters to ieee80211com, that will be used to count transmission
or receive errors that can't be associated with any vap.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoMake ieee80211broadcastaddr global, so that drivers or other
glebius [Tue, 26 May 2015 12:40:27 +0000 (12:40 +0000)]
Make ieee80211broadcastaddr global, so that drivers or other
code may use it and not paste.

9 years agoReduce diff before functional changes:
glebius [Tue, 26 May 2015 12:06:36 +0000 (12:06 +0000)]
Reduce diff before functional changes:
- Use ic_name instead of if_xname.
- Formatting cleanup.

9 years agoDo not allow a process to reap an orphan (a child currently being
jhb [Tue, 26 May 2015 10:29:37 +0000 (10:29 +0000)]
Do not allow a process to reap an orphan (a child currently being
traced by another process such as a debugger). The parent process does
need to check for matching orphan pids to avoid returning ECHILD if an
orphan has exited, but it should not return the exited status for the
child until after the debugger has detached from the orphan process
either explicitly or implicitly via wait().

Add two tests for for this case: one where the debugger is the direct
child (thus the parent has a non-empty children list) and one where
the debugger is not a direct child (so the only "child" of the parent
is the orphan).

Differential Revision: https://reviews.freebsd.org/D2644
Reviewed by: kib
MFC after: 2 weeks

9 years agoMigrate the scan iterator lock typedefs out into ieee80211_freebsd.h.
adrian [Tue, 26 May 2015 04:37:59 +0000 (04:37 +0000)]
Migrate the scan iterator lock typedefs out into ieee80211_freebsd.h.

This removes the final piece of freebsd-specific locking that snuck
into the tree - it's now all inside ieee80211_freebsd.h.

9 years agoMigrate the 802.11s locks out into ieee80211_freebsd.h, so they can be
adrian [Tue, 26 May 2015 04:25:11 +0000 (04:25 +0000)]
Migrate the 802.11s locks out into ieee80211_freebsd.h, so they can be
defined as platform specific bits.

This is to help make OS portability easier.

9 years agoMFuser/delphij/zfs-arc-rebase@r281754:
delphij [Tue, 26 May 2015 01:40:33 +0000 (01:40 +0000)]
MFuser/delphij/zfs-arc-rebase@r281754:

In r256613, taskqueue_enqueue_locked() have been modified to release the
task queue lock before returning.  In r276665, taskqueue_drain_all() will
call taskqueue_enqueue_locked() to insert the barrier task into the queue,
but did not reacquire the lock after it but later code expects the lock
still being held (e.g. TQ_SLEEP()).

The barrier task is special and if we release then reacquire the lock,
there would be a small race window where a high priority task could sneak
into the queue.  Looking more closely, the race seems to be tolerable but
is undesirable from semantics standpoint.

To solve this, in taskqueue_drain_tq_queue(), instead of directly calling
taskqueue_enqueue_locked(), insert the barrier task directly without
releasing the lock.

9 years agoRemove unused mutex and softc variables.
loos [Tue, 26 May 2015 01:30:09 +0000 (01:30 +0000)]
Remove unused mutex and softc variables.

9 years agoConsiders cases when NO_SHARED?=[no|NO] as dynamically linking
bapt [Tue, 26 May 2015 01:09:56 +0000 (01:09 +0000)]
Considers cases when NO_SHARED?=[no|NO] as dynamically linking

This reduces overlinking for parts of the build system where NO_SHARED is
set to no/NO

9 years agoEnsure that all arm kernel configs contain ALT_BREAK_TO_DEBUGGER and not
ian [Mon, 25 May 2015 23:27:13 +0000 (23:27 +0000)]
Ensure that all arm kernel configs contain ALT_BREAK_TO_DEBUGGER and not
BREAK_TO_DEBUGGER if they have a serial console (most do).  A burst of
serial line noise (such as unplugging a usb serial adapter) can look like
a break and drop a working system into the debugger.  The alt break sequence
(<CR>~^B) works fine on both serial and non-serial consoles.

9 years agoAdd KTR tracing for some MI ptrace events.
jhb [Mon, 25 May 2015 22:13:22 +0000 (22:13 +0000)]
Add KTR tracing for some MI ptrace events.

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

9 years agoWhen I merged the lemul branch I missied kib@'s r282708 commit.
dchagin [Mon, 25 May 2015 20:44:46 +0000 (20:44 +0000)]
When I merged the lemul branch I missied kib@'s r282708 commit.
This is not the final fix as I need properly cleanup thread resources
before other threads suicide.

Tested by: Ruslan Makhmatkhanov

9 years agontp is now again libreadline free, so only build libreadline for gdb
bapt [Mon, 25 May 2015 20:29:35 +0000 (20:29 +0000)]
ntp is now again libreadline free, so only build libreadline for gdb