]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC 315334: Decode arguments to chflagsat().
jhb [Wed, 24 May 2017 03:26:15 +0000 (03:26 +0000)]
MFC 315334: Decode arguments to chflagsat().

7 years agoMFC 315310: Spell "const" properly.
jhb [Wed, 24 May 2017 01:06:09 +0000 (01:06 +0000)]
MFC 315310: Spell "const" properly.

PR: 217797

7 years agoMFC 315283:
jhb [Wed, 24 May 2017 00:36:27 +0000 (00:36 +0000)]
MFC 315283:
Fix sysdecode_cap_rights which currently prints bogus capability rights.

PR: 217787

7 years agoMFC 310177: Enable EARLY_AP_STARTUP on amd64 and i386 kernels by default.
jhb [Wed, 24 May 2017 00:00:55 +0000 (00:00 +0000)]
MFC 310177: Enable EARLY_AP_STARTUP on amd64 and i386 kernels by default.

PR: 199321, 203682
Discussed with: re (kib)
Relnotes: yes

7 years agoMFC r316030, r317378: Add some useful examples to the sed man page.
brd [Tue, 23 May 2017 22:11:45 +0000 (22:11 +0000)]
MFC r316030, r317378: Add some useful examples to the sed man page.

Reviewed by: wblock, bcr
Differential Revision: https://reviews.freebsd.org/D9958

7 years agoMFC r309321:
mav [Tue, 23 May 2017 17:00:56 +0000 (17:00 +0000)]
MFC r309321:
Add `gmirror create` subcommand, alike to gstripe, gconcat, etc.

It is quite specific mode of operation without storing on-disk metadata.
It can be useful in some cases in combination with some external control
tools handling mirror creation and disks hot-plug.

Sponsored by: iXsystems, Inc.

7 years agoMove the SA entry to the tcpmd5 module addition.
gjb [Tue, 23 May 2017 15:04:29 +0000 (15:04 +0000)]
Move the SA entry to the tcpmd5 module addition.

Submitted by: ae
Sponsored by: The FreeBSD Foundation

7 years agoDocument the requirement for two SA entries, following the IPSEC
gjb [Tue, 23 May 2017 14:54:58 +0000 (14:54 +0000)]
Document the requirement for two SA entries, following the IPSEC
overhaul.

Submitted by: vangyzen
Sponsored by: The FreeBSD Foundation

7 years agomove p_sigqueue to the end of struct proc
badger [Tue, 23 May 2017 12:40:50 +0000 (12:40 +0000)]
move p_sigqueue to the end of struct proc

In order to preserve KBI in stable branches, replace the existing
p_sigqueue slot with padding and move the expanded (as of r315949)
p_sigqueue to the end of the struct.

This is a repeat of r317529 (which concerned td_sigqueue in struct
thread) for p_sigqueue in struct proc.

Virtualbox modules (and possibly others) are affected without this fix.

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

7 years agoMFC r318021,r318251:
mmel [Tue, 23 May 2017 12:03:59 +0000 (12:03 +0000)]
MFC r318021,r318251:

  r318021:
    Introduce pmap_remap_vm_attr(), it allows to remap one VM memattr class to
    another.
  r318251:
    Clarify usage rules for pmap_remap_vm_attr().  Not a functional change.

7 years agoMFC r317904:
trasz [Tue, 23 May 2017 08:11:55 +0000 (08:11 +0000)]
MFC r317904:

.Xr resizewin from stty(1) man page.

7 years agoMFC r318481:
trasz [Tue, 23 May 2017 08:10:35 +0000 (08:10 +0000)]
MFC r318481:

Language fixes.

7 years agoMFC r318138:
trasz [Tue, 23 May 2017 08:09:44 +0000 (08:09 +0000)]
MFC r318138:

Revert to pre-r318116 wording to not give the false impression
that setting the kernels' idea of terminal size is somehow an
alternative to environment variables.

7 years agoMFC r318116:
trasz [Tue, 23 May 2017 08:09:04 +0000 (08:09 +0000)]
MFC r318116:

Random updates to resizewin(1) man page.

7 years agoMFC r317935:
trasz [Tue, 23 May 2017 08:08:23 +0000 (08:08 +0000)]
MFC r317935:

Sort variable declarations; no functional changes.

7 years agoMFC rr317934:
trasz [Tue, 23 May 2017 08:07:39 +0000 (08:07 +0000)]
MFC rr317934:

Add resizewin -z. It makes resizewin not do anything if the terminal
size is already set to something other than zero. It's supposed to be
called from eg /etc/profile - it's not neccessary to query terminal
size when logging in over the network, because the protocol used already
takes care of this, but it's neccessary when logging over a serial line.

7 years agoMFC r317933:
trasz [Tue, 23 May 2017 08:06:00 +0000 (08:06 +0000)]
MFC r317933:

Use tcflush(3) instead of (nonstandard) TIOCFLUSH.

7 years agoMFC r317909:
trasz [Tue, 23 May 2017 08:04:36 +0000 (08:04 +0000)]
MFC r317909:

Make resizewin(1) discard the terminal queues, to lower the chance
for "unable to parse response" error which happens when youre typing
too fast for the machine you're running it on.

7 years agoMFC r317905:
trasz [Tue, 23 May 2017 08:02:21 +0000 (08:02 +0000)]
MFC r317905:

Rename a variable, hopefully fixing build after r317901.

7 years agoMFC r317901:
trasz [Tue, 23 May 2017 08:01:24 +0000 (08:01 +0000)]
MFC r317901:

Improve error reporting in resizewin(1).

7 years agoMFC r308474, r308691, r309203, r309365, r309703, r309898, r310720,
markj [Tue, 23 May 2017 07:27:30 +0000 (07:27 +0000)]
MFC r308474, r308691, r309203, r309365, r309703, r309898, r310720,
r308489, r308706:
Add PQ_LAUNDRY and remove PG_CACHED pages.

7 years agoMFC r318024,r318025:
mmel [Tue, 23 May 2017 07:21:26 +0000 (07:21 +0000)]
MFC r318024,r318025:

  r318024:
    Fix _Unwind_Backtrace symbol version for ARM.
  r318025:
    Revert accidentally changed std.armv6 in r318024.

7 years agoMFC: r318287
rmacklem [Mon, 22 May 2017 22:02:06 +0000 (22:02 +0000)]
MFC: r318287
Make nfscl_mtofh() return ENXIO when *nfhpp == NULL.

r317272 introduced a case where nfscl_mtofh() could return 0 when
*nfhpp is NULL. This patch makes it return ENXIO for this case.

7 years agoMFC: r317931
rmacklem [Mon, 22 May 2017 21:41:34 +0000 (21:41 +0000)]
MFC: r317931
Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts.

The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense
to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871
modified umount so that it doesn't remove any entry created by mount_nfs.

7 years agoMFC: r317906
rmacklem [Mon, 22 May 2017 19:34:37 +0000 (19:34 +0000)]
MFC: r317906
Fix the client side krpc from doing TCP reconnects for ERESTART from sosend().

When sosend() replies ERESTART in the client side krpc, it indicates that
the RPC message hasn't yet been sent and that the send queue is full or
locked while a signal is posted for the process.
Without this patch, this would result in a RPC_CANTSEND reply from
clnt_vc_call(), which would cause clnt_reconnect_call() to create a new
TCP transport connection. For most NFS servers, this wasn't a serious problem,
although it did imply retries of outstanding RPCs, which could possibly
have missed the DRC.
For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since
AmazonEFS often didn't retain the NFSv4.1 session and would reply with
NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which
requires open/lock state recovery.

Three options were considered to fix this:
- Return the ERESTART all the way up to the system call boundary and then
  have the system call redone. This is fraught with risk, due to convoluted
  code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it
  is still a work in prgress and may not be feasible.
- Set SB_NOINTR for the socket buffer. This fixes the problem, but makes
  the sosend() completely non interruptible, which kib@ considered
  inappropriate. It also would break forced dismount when a thread
  was blocked in sosend().
- Modify the retry loop in clnt_vc_call(), so that it loops for this case
  for up to 15sec. Testing showed that the sosend() usually succeeded by
  the 2nd retry. The extreme case observed was 111 loop iterations, or
  about 100msec of delay.
This third alternative is what is implemented in this patch, since the
change is:
- localized
- straightforward
- forced dismount is not broken by it.

This patch has been tested by cperciva@ extensively against AmazonEFS.

7 years agoMFC r318383
davidcs [Mon, 22 May 2017 19:28:38 +0000 (19:28 +0000)]
MFC r318383
 QL_DPRINT macro modfied to handle multiple args; print line#.

Submitted by:Shminderjit.Singh@cavium.com

7 years agoMFC r318382
davidcs [Mon, 22 May 2017 19:22:06 +0000 (19:22 +0000)]
MFC r318382
  1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for
     processing interrupts drops to around 1% for 100G and under 1% for
     other speeds.
  2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN
  3. remove unused mtx tx_lock
  4. bind taskqueue kernel thread to the appropriate cpu core
  5. when tx_ring is full, stop further transmits till at least 1/16th of
     the Tx Ring is empty. In our case 1K entries. Also if there are
     rx_pkts to process, put the taskqueue thread to sleep for 100ms,
     before enabling interrupts.
  6. Use rx_pkt_threshold of 128.

7 years agoMFC r305613 (gabor):
gjb [Mon, 22 May 2017 16:11:46 +0000 (16:11 +0000)]
MFC r305613 (gabor):
 Fix typo.

PR: 211245
Sponsored by: The FreeBSD Foundation

7 years agoMFC r307469 (imp):
gjb [Mon, 22 May 2017 16:07:17 +0000 (16:07 +0000)]
MFC r307469 (imp):
 Allow root_rw_mount to be both lower and upper case. Before, if it was
 upper case, you'd wind up with a read-only filesystem when you should
 sometimes.

PR: 213549
Sponsored by: The FreeBSD Foundation

7 years agoMFC r313955 (emaste):
gjb [Mon, 22 May 2017 15:51:17 +0000 (15:51 +0000)]
MFC r313955 (emaste):
 bsdgrep: document ignored option -u

 MSDOS and Windows GNU grep uses -u to mean "print byte offsets as if
 running on an UNIX system." The option has no effect on systems that
 do not use CRLF line endings.

PR: 171200
Sponsored by: The FreeBSD Foundation

7 years agoMFC r318189:
asomers [Mon, 22 May 2017 15:12:49 +0000 (15:12 +0000)]
MFC r318189:

vdev_geom may associate multiple vdevs per g_consumer

vdev_geom.c currently uses the g_consumer's private field to point to a
vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For
example, when you remove a disk, the vdev's status will change to REMOVED.
However, vdev_geom will sometimes attach multiple vdevs to the same GEOM
consumer. If this happens, then geom events will only be propagated to one
of the vdevs.

Fix this by storing a linked list of vdevs in g_consumer's private field.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

* g_consumer.private now stores a linked list of vdev pointers associated
  with the consumer instead of just a single vdev pointer.

* Change vdev_geom_set_physpath's signature to more closely match
  vdev_geom_set_rotation_rate

* Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed
  that we've already accessed the consumer by the time we get here.

* Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it
  in vdev_geom_open, after we know that the open has succeeded.

PR: 218634
Reviewed by: gibbs
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10391

7 years agoDocument r318576, efivar(8) addition.
gjb [Mon, 22 May 2017 13:56:34 +0000 (13:56 +0000)]
Document r318576, efivar(8) addition.

Sponsored by: The FreeBSD Foundation

7 years agoDocument r315514, if_ipsec(4) addition.
gjb [Mon, 22 May 2017 13:27:31 +0000 (13:27 +0000)]
Document r315514, if_ipsec(4) addition.

Submitted by: ae
Sponsored by: The FreeBSD Foundation

7 years agoFix typo: s/LDD/LLD/
gjb [Mon, 22 May 2017 13:15:59 +0000 (13:15 +0000)]
Fix typo: s/LDD/LLD/

Spotted by: vangyzen
Sponsored by: The FreeBSD Foundation

7 years agoDocument r309312, PCI passthrough enabled on Hyper-V VMs.
gjb [Mon, 22 May 2017 13:00:11 +0000 (13:00 +0000)]
Document r309312, PCI passthrough enabled on Hyper-V VMs.
Document r314091, hv_netvsc(4) SR-IOV/VF support.
Document r316272, Hyper-V Gen 2 support.
Document r317119, Hyper-V synthetic keyboard support.

Submitted by: sephe
Sponsored by: The FreeBSD Foundation

7 years agoDocument r318472, LDD enabled by default on arm64.
gjb [Mon, 22 May 2017 13:00:10 +0000 (13:00 +0000)]
Document r318472, LDD enabled by default on arm64.

Submitted by: andrew
Sponsored by: The FreeBSD Foundation

7 years agoMFC r318530:
mmel [Mon, 22 May 2017 12:35:31 +0000 (12:35 +0000)]
MFC r318530:

  Increase maximum text segment size.  LLVM binaries are huge...

7 years agoFix typo and grammar.
gjb [Mon, 22 May 2017 12:28:20 +0000 (12:28 +0000)]
Fix typo and grammar.

Submitted by: pfg
Sponsored by: The FreeBSD Foundation

7 years agoMFC:
n_hibma [Mon, 22 May 2017 10:28:17 +0000 (10:28 +0000)]
MFC:

------------------------------------------------------------------------
r317923 | n_hibma | 2017-05-07 23:11:28 +0200 (Sun, 07 May 2017) | 8 lines

Fix the output of very large rebind, renew and lease time options in
lease file.

Some routers set very large values for rebind time (Netgear) and these
are erroneously reported as negative in the leasefile. This was due to a
wrong printf format specification of %ld for an unsigned long on 32-bit
platforms.

------------------------------------------------------------------------
r317915 | n_hibma | 2017-05-07 21:59:37 +0200 (Sun, 07 May 2017) | 16 lines

Fix handling of large DHCP expiry values.

They would overflow a signed 32-bit time_t on 32 bit architectures. This
was taken care of, but a compiler optimisation makes this behave
erratically. This could be resolved by adding a -fwrapv flag, but
instead we can check the value before adding the current timestamp to
it.

In the lease file values are still wrong though:

option dhcp-rebinding-time -644245096;

PR: 218980

7 years agoMFC r318531:
hselasky [Mon, 22 May 2017 08:17:07 +0000 (08:17 +0000)]
MFC r318531:

mlx4: Use the CQ quota for SRIOV when creating completion EQs

When creating EQs to handle CQ completion events for the PF or for
VFs, we create enough EQE entries to handle completions for the max
number of CQs that can use that EQ.

When SRIOV is activated, the max number of CQs a VF (or the PF) can
obtain is its CQ quota (determined by the Hypervisor resource
tracker).  Therefore, when creating an EQ, the number of EQE entries
that the VF should request for that EQ is the CQ quota value (and not
the total number of CQs available in the firmware).

Under SRIOV, the PF, also must use its CQ quota, because the resource
tracker also controls how many CQs the PF can obtain.

Using the firmware total CQs instead of the CQ quota when creating EQs
resulted wasting MTT entries, due to allocating more EQEs than were
needed.

Sponsored by: Mellanox Technologies

7 years agoMFC r316103:
ngie [Mon, 22 May 2017 06:26:22 +0000 (06:26 +0000)]
MFC r316103:

Remove redundant declarations

They're already defined in libstand.h

7 years agoMFC r317594:
ngie [Mon, 22 May 2017 06:24:43 +0000 (06:24 +0000)]
MFC r317594:

usb(4): manpage cleanup

1. Wrap at <80 columns for readability when editing. Rewrap some lines
   prematurely wrapped to better fit in <80 columns and not waste
   vertical space.
2. Fix SEE ALSO sorting (sort by section first, then manpage name).
3. Tweak the compound device description slightly by adding soft stops
   via commas.

Sponsored by Dell EMC Isilon

7 years agoMFC r315775:
ngie [Mon, 22 May 2017 06:20:22 +0000 (06:20 +0000)]
MFC r315775:

Add a post-humous manpage for cd9660(5), the ISO-9660 file system

Describe (briefly) how to compile the filesystem into the kernel and
load as a module.

Reference cd9660(5) in mount(8) and mount_cd9660(8).

7 years agoRegenerate src.conf(5)
ngie [Mon, 22 May 2017 06:19:27 +0000 (06:19 +0000)]
Regenerate src.conf(5)

7 years agoRevert commit again to correct it
ngie [Mon, 22 May 2017 06:18:15 +0000 (06:18 +0000)]
Revert commit again to correct it

Obviously my brain's on autopilot tonight

7 years agoMFC r311135:
ngie [Mon, 22 May 2017 06:17:14 +0000 (06:17 +0000)]
MFC r311135:

Add documentation for MK_EFI added in r307243

7 years agoMFC r311135:
ngie [Mon, 22 May 2017 06:15:50 +0000 (06:15 +0000)]
MFC r311135:

Add documentation for MK_EFI added in r307243

7 years agoMFC r315766,r315768:
ngie [Mon, 22 May 2017 06:08:19 +0000 (06:08 +0000)]
MFC r315766,r315768:

r315766:

Note that tools/build/options/makeman automatically generated src.conf(5)

This (as a bonus) fixes mdoc warnings with src.conf(5) :)..

r315768:

Remove the .Pa portion I added to the .An macro in AUTHORS section

That doesn't work (mandoc complains about the macro being empty).

That's what I get for being clever and not verifying before committing
things again *sigh*.

Partyhat to: ngie

7 years agoMFC r315793:
ngie [Mon, 22 May 2017 06:07:09 +0000 (06:07 +0000)]
MFC r315793:

intro(3): fix markup

- Use `Em` with `.It` macro when referring to other libraries, instead of
  `Xr`.
- Use `.Em` instead of `.Xr` when referring to libraries.
- Remove commented out lines.

7 years agoMFC r317160:
ngie [Mon, 22 May 2017 06:05:35 +0000 (06:05 +0000)]
MFC r317160:

Clean up trailing whitespace

No functional changes

7 years agoMFC r317154:
ngie [Mon, 22 May 2017 06:03:51 +0000 (06:03 +0000)]
MFC r317154:

Print out the signal number on exit in terminate(..) if WARMSTART is compiled
into rpcbind.

The signal number can provide helpful diagnostic info.

Obtained from: Isilon OneFS

7 years agoMFC 318512
sephe [Mon, 22 May 2017 02:09:27 +0000 (02:09 +0000)]
MFC 318512

    net/vlan: Revert 305177

    Miss read the parentheses.

    Reported by:    oleg@
    Reviewed by:    hps@
    Sponsored by:   Microsoft

7 years agoMFC r317863:
bdrewery [Sat, 20 May 2017 17:09:27 +0000 (17:09 +0000)]
MFC r317863:

  Fix some "don't build" optimizations from r308599 not working due to a typo.

7 years agoMFC efivar(8) (by imp):
kib [Sat, 20 May 2017 16:12:44 +0000 (16:12 +0000)]
MFC efivar(8) (by imp):

List of revisions merged:
r307070
r307071
r307072
r307074
r307189
r307224
r307339
r307390
r307391
r309776
r314231
r314232
r314615
r314616
r314617
r314618
r314619
r314620
r314621
r314623
r314890
r314925
r314926
r314927
r314928
r315770
r315771

Discussed with: gjb (re), imp
Sponsored by: The FreeBSD Foundation

7 years agoMFC r314370,r318130,r318167:
jhibbits [Sat, 20 May 2017 05:12:32 +0000 (05:12 +0000)]
MFC r314370,r318130,r318167:

  DTrace related fixes for PowerPC.

  r314370:
    Unbreak kernel breakpoints, broken for ~4 years now
  r318130:
    Fix the encoded instruction for FBT traps on powerpc
  r318167:
    Fix stack tracing in dtrace for powerpc

7 years agoDocument r316613, C standard library has been updated to make use
gjb [Sat, 20 May 2017 01:04:19 +0000 (01:04 +0000)]
Document r316613, C standard library has been updated to make use
of reallocarray(3).
Document r318121, system libraries have been updated to make use
of reallocarray(3).
Document r315282, GNU __nonnull__ attribute have been replaced with
the more benign Clang nullability attributes.

Submitted by: pfg
Sponsored by: The FreeBSD Foundation

7 years agoDocument r316613, C standard library has been updated to make use
gjb [Sat, 20 May 2017 01:04:18 +0000 (01:04 +0000)]
Document r316613, C standard library has been updated to make use
of reallocarray(3).
Document r318121, system libraries have been updated to make use
of reallocarray(3).

Submitted by: pfg
Sponsored by: The FreeBSD Foundation

7 years agos/nullability attribute/nullability qualifier/
gjb [Sat, 20 May 2017 01:04:18 +0000 (01:04 +0000)]
s/nullability attribute/nullability qualifier/

Sponsored by: The FreeBSD Foundation

7 years agoMFC r318256:
kib [Sat, 20 May 2017 00:41:12 +0000 (00:41 +0000)]
MFC r318256:
Style.

7 years agoMFC 318360: Fix p_endcopy.
jhb [Fri, 19 May 2017 23:01:55 +0000 (23:01 +0000)]
MFC 318360: Fix p_endcopy.

For p_endcopy to work correctly, it must be the name of the next element
in struct proc after the end of the copy region, not the name of the
last element in the copy region.  Currently, the last element
(p_elf_flags) is not being copied.  In addition, the p_xexit and
p_xsig fields should not be copied on fork, so move them out of the
copy region.

Note that for stable/11 the fix is a bit simpler than in HEAD as it
merely consists of formally moving p_xexit and p_xsig out of the
copy region by shrinking the end of the copy region.

7 years agoDirect commit to fix the PC98 build.
markj [Fri, 19 May 2017 21:18:42 +0000 (21:18 +0000)]
Direct commit to fix the PC98 build.

7 years agoAdd missing 'driver' after manual page references where missing.
gjb [Fri, 19 May 2017 20:22:44 +0000 (20:22 +0000)]
Add missing 'driver' after manual page references where missing.

Spotted by: jhb
Sponsored by: The FreeBSD Foundation

7 years agoAdd a missing ')'.
gjb [Fri, 19 May 2017 20:20:17 +0000 (20:20 +0000)]
Add a missing ')'.

Spotted by: vangyzen
Sponsored by: The FreeBSD Foundation

7 years agoDocument r305476, OpenSSH blacklistd(8) support.
gjb [Fri, 19 May 2017 20:16:14 +0000 (20:16 +0000)]
Document r305476, OpenSSH blacklistd(8) support.
Wording fixes.
Expand what GARP means.

Submitted by: lidl
Sponsored by: The FreeBSD Foundation

7 years agoAdd a 'Userland Debugging' section.
gjb [Fri, 19 May 2017 20:11:35 +0000 (20:11 +0000)]
Add a 'Userland Debugging' section.
Document r306786, core dumps now include the process ID (PID) and
command line arguments.
Document r304499, ptrace(2) now supports events for vfork(2).

Submitted by: jhb
Sponsored by: The FreeBSD Foundation

7 years agoDocument r306520, PCI pass through with bhyve resets functions via
gjb [Fri, 19 May 2017 20:11:34 +0000 (20:11 +0000)]
Document r306520, PCI pass through with bhyve resets functions via
FLR.
Document r306471, PCI pass through with bhyve supports more dynamic
configurations.

Submitted by: jhb
Sponsored by: The FreeBSD Foundation

7 years agoDocument r306660, Virtual Function devices on T4 and T5 adapters.
gjb [Fri, 19 May 2017 20:11:33 +0000 (20:11 +0000)]
Document r306660, Virtual Function devices on T4 and T5 adapters.
Document r306661, TCP Offload Engine on Chelsio T4+ adapters.
Document r306664, cxgbev(4) addition.
Document r309560, several cxgbe(4) and cxgbev(4) updates.

Submitted by: jhb
Sponsored by: The FreeBSD Foundation

7 years agoDocument r312394, /dev/kmem no longer supports access via mmap().
gjb [Fri, 19 May 2017 20:11:32 +0000 (20:11 +0000)]
Document r312394, /dev/kmem no longer supports access via mmap().
Document r306533, devctl(8) now supports a "clear driver" command.

Submitted by: jhb
Sponsored by: The FreeBSD Foundation

7 years agoDocument r309258, max_align_t' is now defined for C11 compliance.
gjb [Fri, 19 May 2017 20:11:31 +0000 (20:11 +0000)]
Document r309258, max_align_t' is now defined for C11 compliance.

Submitted by: jhb
Sponsored by: The FreeBSD Foundation

7 years agoFurther clarify zfsbootcfg(8).
gjb [Fri, 19 May 2017 20:11:30 +0000 (20:11 +0000)]
Further clarify zfsbootcfg(8).
Move kvm_close(3) entry to 'Runtime Libraries and API'.
Move cloudabi(4) to the 'Kernel Modules' section.

Submitted by: jhb
Sponsored by: The FreeBSD Foundation

7 years agoUse literal tags around 'keep state'/'keep frags' to avoid (mis)placing
gjb [Fri, 19 May 2017 18:23:44 +0000 (18:23 +0000)]
Use literal tags around 'keep state'/'keep frags' to avoid (mis)placing
a comma.

In collaboration with: adamw
Sponsored by: The FreeBSD Foundation

7 years agoFix a few grammar and ambiguity nits.
gjb [Fri, 19 May 2017 18:07:28 +0000 (18:07 +0000)]
Fix a few grammar and ambiguity nits.

Submitted by: adamw
Sponsored by: The FreeBSD Foundation

7 years agoRemove an HREF from a section title.
gjb [Fri, 19 May 2017 16:22:26 +0000 (16:22 +0000)]
Remove an HREF from a section title.

Suggested by: asomers
Sponsored by: The FreeBSD Foundation

7 years agoDocument r317373, periodic(8) sleep consolidation.
gjb [Fri, 19 May 2017 16:15:00 +0000 (16:15 +0000)]
Document r317373, periodic(8) sleep consolidation.

Submitted by: asomers
Sponsored by: The FreeBSD Foundation

7 years agoCorrect a typo.
gjb [Fri, 19 May 2017 15:57:05 +0000 (15:57 +0000)]
Correct a typo.

Submitted by: vangyzen
Sponsored by: The FreeBSD Foundation

7 years agoMFC r317505:
hselasky [Fri, 19 May 2017 13:02:19 +0000 (13:02 +0000)]
MFC r317505:
Don't free uninitialized sysctl contexts in the mlx4en driver. This
can cause NULL pointer panics during failed device attach.

Differential Revision: https://reviews.freebsd.org/D8876
Sponsored by: Mellanox Technologies

7 years agoMFC r313555:
hselasky [Fri, 19 May 2017 12:51:13 +0000 (12:51 +0000)]
MFC r313555:
Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs.

Previously, the mlx4 driver queried the firmware in order to get the
number of supported EQs. Under SRIOV, since this was done before the
driver notified the firmware how many VFs it actually needs, the
firmware had to take into account a worst case scenario and always
allocated four EQs per VF, where one was used for events while the
others were used for completions. Now, when the firmware supports the
asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (-->
MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query
the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X
vectors per function. Moreover, when running in the new
firmware/driver mode, the limitation that the number of EQs should be
a power of two is lifted.

Obtained from: Linux (dual BSD/GPLv2 licensed)
Submitted by: Dexuan Cui @ microsoft . com
Differential Revision: https://reviews.freebsd.org/D8867
Sponsored by: Mellanox Technologies

7 years agoMFC r313556:
hselasky [Fri, 19 May 2017 12:35:23 +0000 (12:35 +0000)]
MFC r313556:
Change mlx4 QP allocation scheme.

When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV
fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7
unset.

The current ethernet driver code reserves a TX QP range with 256b
alignment.

This is wrong because if there are more than 64 TX QPs in use, QPNs >=
base + 65 will have bits 6/7 set.

This problem is not specific for the Ethernet driver, any entity that
tries to reserve more than 64 BF-enabled QPs should fail. Also, using
ranges is not necessary here and is wasteful.

The new mechanism introduced here will support reservation for "Eth
QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs
(when hypervisors support WC in VMs). The flow we use is:

1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation,
   and request "BF enabled QPs" if BF is supported for the function

2. In the ALLOC_RES FW command, change param1 to:
a. param1[23:0]  - number of QPs
b. param1[31-24] - flags controlling QPs reservation

Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits
6 and 7 unset in order to be used in Ethernet.

Bits 24-30 of the flags are currently reserved.

When a function tries to allocate a QP, it states the required
attributes for this QP. Those attributes are considered "best-effort".
If an attribute, such as Ethernet BF enabled QP, is a must-have
attribute, the function has to check that attribute is supported
before trying to do the allocation.

In a lower layer of the code, mlx4_qp_reserve_range masks out the bits
which are unsupported. If SRIOV is used, the PF validates those
attributes and masks out unsupported attributes as well. In order to
notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP
command. This command's mailbox is filled by the PF, which notifies
which QP allocation attributes it supports.

Obtained from: Linux (dual BSD/GPLv2 licensed)
Submitted by: Dexuan Cui @ microsoft . com
Differential Revision: https://reviews.freebsd.org/D8868
Sponsored by: Mellanox Technologies

7 years agoMFC r318243:
kib [Fri, 19 May 2017 09:04:18 +0000 (09:04 +0000)]
MFC r318243:
Do not wake up sleeping thread in reschedule_signals() if the signal
is blocked.  The spurious wakeup might result in spurious EINTR.

PR: 219228

7 years agoMFC r318150:
eugen [Fri, 19 May 2017 07:28:36 +0000 (07:28 +0000)]
MFC r318150:

Fix translation of transit PPtP/GRE connections for ipfw nat/natd "global" case.

PR: 218968
Approved by: ae, vsevolod (mentor)

7 years agoMFC r314693
rgrimes [Fri, 19 May 2017 02:12:10 +0000 (02:12 +0000)]
MFC r314693
  Change /etc/rmt symlink from absolute to relative path,
  correcting the mistake made in r6499

Approved by: grehan (mentor)

7 years agoMFC r317159: libstdc++: fix symbol version script for LLD
emaste [Fri, 19 May 2017 00:43:49 +0000 (00:43 +0000)]
MFC r317159: libstdc++: fix symbol version script for LLD

LLD is less tolerant of inconsistencies in the symbol version script.

- Add a ; on the last entry in a version block
- Remove duplicated symbols, retaining those in the earliest block

7 years agoMFC r318354 (by cem)
vangyzen [Fri, 19 May 2017 00:33:48 +0000 (00:33 +0000)]
MFC r318354 (by cem)

Correct page frame mask constant used in pmap_change_attr_locked

This was introduced in r290156.  It's present in 11.0, but not any 10.x
release unless someone decided to MFC it.

It affects ordinary pages right above the DMAP limit, which is effectively
system memory rounded up to a 1 GB (3rd level superpage) boundary (or up to
a minimum of 4 GB, on small systems).

Sponsored by: Dell EMC

7 years agoUpdate stable/11 from 11.0-STABLE to 11.1-PRERELEASE, marking the
gjb [Fri, 19 May 2017 00:00:38 +0000 (00:00 +0000)]
Update stable/11 from 11.0-STABLE to 11.1-PRERELEASE, marking the
official start of the code slush.

Set the default mdoc(7) version to 11.1, and update the clang(1)
TARGET_TRIPLE to reflect 11.1.  While here, add missing FreeBSD
major versions to mdoc(7).

Approved by:    re (implicit)
Sponsored by: The FreeBSD Foundation

7 years agoMFC: r317171, r317173, r317560, r317561, r318326
jkim [Thu, 18 May 2017 23:52:28 +0000 (23:52 +0000)]
MFC: r317171, r317173, r317560, r317561, r318326

Always clear borders when the terminal is flushed.

PR: 202288

7 years agoPersistently store NIC's hardware MAC address, and add a way to retrive it
rpokala [Thu, 18 May 2017 23:41:18 +0000 (23:41 +0000)]
Persistently store NIC's hardware MAC address, and add a way to retrive it

jhb pointed out that (struct ifnet) is part of the network driver KBI, and
thus the offsets of internal fields must not change. Therefore, move the new
"if_hw_addr" field to the end, and consume one of the "if_pspare"s; that's
what they're there for. The new field replaces the *last* element of that
array; that way, offsetof(if_pspare) and offsetof(if_ispare) are unchanged
compared to before r318397.

PR: 194386
Reviewed by: jhb
Pointyhat to: rpokala
Sponsored by: Panasas

7 years agoMFC r317811:
wulf [Thu, 18 May 2017 21:23:39 +0000 (21:23 +0000)]
MFC r317811:

Fix triple-finger taps reported as double-finger for Elan hw v.4 touchpads

Wait for all advertised head packets after status packet have been received.
This fixes rare but quite annoying issue in Elan hw v.4 touchpads support
when triple-finger taps are reported as double-finger taps under several
circumstances.

MFC r317812:

Reduce default tap_min_queue size for Elan touchpads

Elan hw v.4 touchpads often sends touchpad release packet right after
touchpad touch one. Most probably this happens due to PS/2 limited bandwith.
Reducing of tap_min_queue size to 1 makes multifinger tap detection
more reliable in this case.

MFC r317813:

Adjust Elantech palm width threshold to nearly match synaptics defaults

MFC r317814:

psm(4): reduce cursor jumping on palm detection

This is done with discarding pointer movements rather then mouse packets

MFC r317815:

Enable palm detection on two finger touches for multitouch trackpads.

MFC r317816:

Report 3-rd and 4-th fingers as first finger for Elan hw v.2 and v.3 as
Linux does. It should not affect gesture processing in current state as it
ignores finger coords on 3-finger tap detection but it should make evdev
reports looking more Linux-alike.

MFC r317817:

Set predefined logical touchpad sizes for several ancient Elan hw v.2
models. This change is based on Linux driver.
Determine logical trace size. It used for calculation of touch sizes
in surface units for MT-protocol type B evdev reports.

MFC r317818:

psm(4): Remove sys/libkern.h header inclusion

It is already included via sys/systm.h

MFC r317819:

Reduce synaptics touch sensitivity

Increase hw.psm.synaptics.min_pressure default value from 16 to 32
to nearly match Linux driver (30-35 hysteresis loop).
This makes libinput tap detection more reliable.

7 years agoMFC: r314345, r318276
marius [Thu, 18 May 2017 21:09:24 +0000 (21:09 +0000)]
MFC: r314345, r318276

- Add ID for NEC uPD720202 xHCI controller.
- Describe Intel Apollo Lake and Braswell USB 3.0 controllers.

7 years agoMFC: r318282
marius [Thu, 18 May 2017 21:00:50 +0000 (21:00 +0000)]
MFC: r318282

- Unlike as in the PCI case, when attached to ACPI, Intel Bay Trail
  and Braswell eMMC and SDXC controllers share the same IDs. Like in
  the PCI case, Braswell eMMC needs the SDHCI_QUIRK_DATA_TIMEOUT_1MHZ
  quirk (see r311794 for the corresponding change to the sdhci(4) PCI
  PCI front-end), though. However, due to the shared ACPI IDs, this
  is trickier to do.
- Intel Apollo Lake eMMC and SDXC controllers are affected by the
  APL18 ("Using 32-bit Addressing Mode With SD/eMMC Controller May
  Lead to Unpredictable System Behavior") silicon bug. When this
  erratum hits, typically both SDHCI and XHCI controllers wedge.
  According to Intel, using ADMA2 with 64-bit addressing and 96-bit
  descriptors serves as a workaround. Until such times when sdhci(4)
  has ADMA2 support, flag DMA as broken for affected interfaces.
  This turns out to work around the problem, too, at the cost of
  performance.
- In the sdhci(4) ACPI front-end, probe the Intel Apollo Lake eMMC
  and SDXC controllers, too.

7 years agoMFC: r315598
marius [Thu, 18 May 2017 20:46:20 +0000 (20:46 +0000)]
MFC: r315598

o Add support for eMMC DDR bus speed mode up to 52 MHz to sdhci(4)
  and mmc(4). Given that support for DDR52 is not denoted by SDHCI
  capability registers, availability of that timing is indicated by
  a new quirk SDHCI_QUIRK_MMC_DDR52 and only enabled for Intel SDHCI
  controllers so far.

  Compared to 50 MHz at SDR high speed typically yielding ~45 MB/s
  read throughput with the eMMC chips tested, read performance goes
  up to ~80 MB/s at DDR52.

  As a side-effect, this change also fixes communication with some
  eMMC devices at SDR high speed mode due to the signaling voltage
  and UHS bits in the SDHCI controller no longer being left in an
  inappropriate state.

o In sdhci(4), add two tunables hw.sdhci.quirk_clear as well as
  hw.sdhci.quirk_set, which (when hooked up in the front-end)
  allow to set/clear sdhci(4) quirks for debugging and testing
  purposes. However, especially for SDHCI controllers on the
  PCI bus which have no specific support code so far and, thus,
  are picked up as generic SDHCI controllers, hw.sdhci.quirk_set
  allows for setting the necessary quirks (if required).

o In mmc(4), check and handle the return values of some more
  function calls instead of assuming that everything went right.
  In case failures actually are not problematic, indicate that
  by casting the return value to void.

7 years agoMFC r317463:
trasz [Thu, 18 May 2017 20:45:09 +0000 (20:45 +0000)]
MFC r317463:

Add information about device nodes to man pages for USB serial drivers.

MFC r318016:

Fix mistake introduced to uart(4) man page in r317463.

MFC r318017:

Fix device paths for USB serial adapters: the formatting strings
contain "%u", differently from eg uart(4) which uses "%r".

7 years agoMFC r317460:
trasz [Thu, 18 May 2017 20:41:55 +0000 (20:41 +0000)]
MFC r317460:

Add some .Xrs to USB serial driver man pages.

7 years agoMFC r317517:
trasz [Thu, 18 May 2017 20:40:49 +0000 (20:40 +0000)]
MFC r317517:

Advertise kldxref(8) a little better.

7 years agoMFC r317803:
trasz [Thu, 18 May 2017 20:37:47 +0000 (20:37 +0000)]
MFC r317803:

Enable automounting of exFAT media.

With fstyp(8) being updated to detect exfat in base r312003, it seems
like a good time to add support for auto-mounting SDXC cards -- which
use exfat by default.

The user will need to locally compile and install sysutils/fusefs-exfat
for this to succeed; logs a message to that effect when not installed.

PR: 218743
Submitted by: eborisch+FreeBSD@gmail.com

7 years agoMFC r317459:
trasz [Thu, 18 May 2017 20:36:07 +0000 (20:36 +0000)]
MFC r317459:

Make fstyp(8) recognize exFAT even without the -u option.

While it's not directly mountable with mount(8), it's something that's
mountable - differently from GELI or zpools.

7 years agoMFC r317348:
trasz [Thu, 18 May 2017 20:34:25 +0000 (20:34 +0000)]
MFC r317348:

Make it possible to terminate "show lockedbufs" by pressing "q".

7 years agoMFC r317280:
trasz [Thu, 18 May 2017 20:32:12 +0000 (20:32 +0000)]
MFC r317280:

Add basic example to the cu(1) man page.  Srsly, folks, you don't
need to install minicom for this...

7 years agoMFC r317212:
trasz [Thu, 18 May 2017 20:31:09 +0000 (20:31 +0000)]
MFC r317212:

Mention GEOM_MOUNTVER.

7 years agoMFC r316941:
trasz [Thu, 18 May 2017 20:29:47 +0000 (20:29 +0000)]
MFC r316941:

Don't try to write out bufs that have already failed with ENXIO.
This fixes some panics after disconnecting mounted disks.

7 years agoMFC r317782,318181:
mm [Thu, 18 May 2017 19:47:43 +0000 (19:47 +0000)]
MFC r317782,318181:

MFC r317782 (mm):
  Sync libarchive with vendor

  Vendor changes (FreeBSD-related):
    PR 897: add test for ZIP archives with invalid EOCD headers
    PR 901: fix invalid renaming of sparse files
    OSS-Fuzz issue 497: remove fallback tree in LZX decoder
    OSS-Fuzz issue 527: rewrite expressions in lz4 filter
    OSS-Fuzz issue 577: fix integer overflow in cpio reader
    OSS-Fuzz issue 862: fix numerc parsing in mtree reader
    OSS-Fuzz issue 1097: fix undefined shift in rar reader
    cpio: various optimizations and memory leak fixes

MFC r318181 (ngie) (2):
  cpio/tests/test_option_lz4: fix a use after free in the failure case

Reported by: Coverity (2)
Sponsored by: Dell EMC Isilon (2)