]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC 303001: Add PTRACE_VFORK to trace vfork events.
jhb [Fri, 19 Aug 2016 20:17:57 +0000 (20:17 +0000)]
MFC 303001: Add PTRACE_VFORK to trace vfork events.

First, PL_FLAG_FORKED events now also set a PL_FLAG_VFORKED flag when
the new child was created via vfork() rather than fork().  Second, a
new PL_FLAG_VFORK_DONE event can now be enabled via the PTRACE_VFORK
event mask.  This new stop is reported after the vfork parent resumes
due to the child calling exit or exec.  Debuggers can use this stop to
reinsert breakpoints in the vfork parent process before it resumes.

7 years agoMFC r303354,303373,303404,304045,304192
bapt [Fri, 19 Aug 2016 19:26:16 +0000 (19:26 +0000)]
MFC r303354,303373,303404,304045,304192

Set date and time formats back to what they were before CLDR

While CLDR brings us a good and up to date source data to generate locales for
all databses we are using for locales, it is not the case of LC_TIME. Where it
does not defines the informations we need.

Put back all the date and time formats from the old locales.
Make it statically for now (in order to be able to merge it now into
11.0-RELEASE). The generation tools will be updated soon.

That gives us time to properly work on LC_TIME during the 12 timeframe.

While here fix abbreviated month for af_ZA (which are already fixed in CLDR
data upstream)

In locales where AP/PM was not defined before CLDR data, remove again the AP/PM
informations

For locales where AP/PM was defined before CLDR data, keep the CLDR information
which was properly translated.

r303354,303373 by kevlo
r303404,304192 by jkim

7 years agoMFC r304217:
bdrewery [Fri, 19 Aug 2016 17:03:14 +0000 (17:03 +0000)]
MFC r304217:

  Trim unneeded bootstrap after r301470 made 9.1 the minimum supported release.

7 years agoMFC r304008:
bdrewery [Fri, 19 Aug 2016 17:02:14 +0000 (17:02 +0000)]
MFC r304008:

  Avoid taking PROC_LOCK in syscalls if not being traced.

7 years agoMFC r304006:
bdrewery [Fri, 19 Aug 2016 17:01:13 +0000 (17:01 +0000)]
MFC r304006:

  Avoid showing the bootstrap make command for check-old, etc.

7 years agoMFC r304005:
bdrewery [Fri, 19 Aug 2016 16:59:01 +0000 (16:59 +0000)]
MFC r304005:

  PORTS_MODULES: Don't leak in CC/CXX/CPP.

7 years agoMFC r303929,r303930,r303931,r303932,r303933:
bdrewery [Fri, 19 Aug 2016 16:56:52 +0000 (16:56 +0000)]
MFC r303929,r303930,r303931,r303932,r303933:

  r303929:
    Fix -S with -b not atomically updating the destination file.
  r303930:
    Support -v for -l.
  r303931:
    Fix -S with -l not being atomic.
  r303932:
    Fix -b failure not restoring flags on the destination file.
  r303933:
    Squelch a false-positive Clang static analyzer warning.

7 years agoMFC r304152:
kp [Fri, 19 Aug 2016 11:31:30 +0000 (11:31 +0000)]
MFC r304152:

pf: Add missing byte-order swap to pf_match_addr_range

Without this, rules using address ranges (e.g. "10.1.1.1 - 10.1.1.5") did not
match addresses correctly on little-endian systems.

PR:       211796
Obtained from:    OpenBSD (sthen)

7 years agoMFC r304016:
kib [Fri, 19 Aug 2016 08:00:48 +0000 (08:00 +0000)]
MFC r304016:
Move defines common between rtld and libsysdecode into the header.

7 years agoMFC r304012:
kib [Fri, 19 Aug 2016 07:59:00 +0000 (07:59 +0000)]
MFC r304012:
Fill phdr and phsize for rtld object.

7 years agoMFC r304011:
kib [Fri, 19 Aug 2016 07:57:43 +0000 (07:57 +0000)]
MFC r304011:
Remove all remaining uses of TAILQ_FOREACH_FROM() from rtld-elf.

7 years agoMFC r303991:
kib [Fri, 19 Aug 2016 07:56:07 +0000 (07:56 +0000)]
MFC r303991:
Decode 32bit utrace records on the 64bit host.

7 years agoMFC r303990:
kib [Fri, 19 Aug 2016 07:48:32 +0000 (07:48 +0000)]
MFC r303990:
Remove unused prototypes.

7 years agoMFH (r304142): ensure stripe size is non-zero multiple of 4096
des [Fri, 19 Aug 2016 07:05:34 +0000 (07:05 +0000)]
MFH (r304142): ensure stripe size is non-zero multiple of 4096

PR: 211361

7 years agoMFC r304246
vangyzen [Thu, 18 Aug 2016 21:47:00 +0000 (21:47 +0000)]
MFC r304246

PCIe HotPlug: Detect bridges that are not really HotPlug capable

Some devices report that they have an MRL when they actually
do not.  Since they always report that the MRL is open, child
devices would be ignored.  Try to detect these devices and
ignore their claim of HotPlug support.  Specifically,
if there is an open MRL but the Data Link Layer is active,
the MRL is not real.

Revert r303645 to re-enable HotPlug support for slots with
power controllers, since it works correctly in my testing.

Start the DLL state-change timer if Presence /or/ MRL state changes,
along with other conditions.  Previously, we started the timer iff
Presence changed.  If there is an MRL, it must be closed for power
to be turned on, so Presence is unlikely to change on an MRL-close event.

Add a printf() of interesting registers on HotPlug interrupts and
commands (one from erj@).  These were very useful for debugging.
Guard them with bootverbose, since they're spam in normal operation.

In collaboration with: jhb
Relnotes: yes (re-enable HotPlug support for slots with power controllers)
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D7509

7 years agoMFC r302783:
badger [Thu, 18 Aug 2016 14:10:36 +0000 (14:10 +0000)]
MFC r302783:

  Add explicit detection of KVM hypervisor

  Set vm_guest to a new enum value (VM_GUEST_KVM) when kvm is detected and use
  vm_guest in conditionals testing for KVM.

  Also, fix a conditional checking if we're running in a VM which caught only
  the generic VM case, but not more specific VMs (KVM, VMWare, etc.).  (Spotted
  by: vangyzen).

  Sponsored by: Dell Inc.
  Approved by: vangyzen (mentor)

7 years agoMFC r304146:
tuexen [Thu, 18 Aug 2016 12:51:26 +0000 (12:51 +0000)]
MFC r304146:
Ensure that sctp_it_ctl.cur_it does not point to a free object (during
a small time window).
Thanks to Byron Campen for reporting the issue and
suggesting a fix.

7 years agoMFC r303009: Negotiate/disable TXCSUM_IPV6 same as TXCSUM.
mav [Thu, 18 Aug 2016 12:08:39 +0000 (12:08 +0000)]
MFC r303009: Negotiate/disable TXCSUM_IPV6 same as TXCSUM.

7 years agoMFC r302504, r302666, r302668, r302932, r302933:
mav [Thu, 18 Aug 2016 11:51:14 +0000 (11:51 +0000)]
MFC r302504, r302666, r302668, r302932, r302933:
Add emulation for Intel e1000 (e82545) network adapter.

The code was successfully tested with FreeBSD, Linux, Solaris and Windows
guests.  This interface is predictably slower (about 2x) then virtio-net,
but it is very helpful for guests not supporting virtio-net by default.

Thanks to Jeremiah Lott and Peter Grehan for doing original heavy lifting.

7 years agoMFC r302460: Add emulation for multiple (up to 16) MSI vectors for AHCI.
mav [Thu, 18 Aug 2016 11:49:49 +0000 (11:49 +0000)]
MFC r302460: Add emulation for multiple (up to 16) MSI vectors for AHCI.

It was useless before, but may improve performance now if multiple devices
are configured and guest supports this feature.

Sponsored by:   iXsystems, Inc.

7 years agoMFC r302459: Allow AHCI controller to support up to 32 arbitrary devices.
mav [Thu, 18 Aug 2016 11:49:16 +0000 (11:49 +0000)]
MFC r302459: Allow AHCI controller to support up to 32 arbitrary devices.

While old syntax is still supported, new syntax looks like this:

-s 3,ahci,hd:/dev/zvol/XXX,hd:/dev/zvol/YYY,cd:/storage/ZZZ.iso

Sponsored by:   iXsystems, Inc.

7 years agoMFC r304154
oleg [Thu, 18 Aug 2016 11:23:02 +0000 (11:23 +0000)]
MFC r304154

Fix command: ipfw set (enable|disable) N (where N > 4).

7 years agoMFC r302947: In AHCI_IRQ_MODE_AFTER mode do not clear interrupts below.
mav [Thu, 18 Aug 2016 11:15:35 +0000 (11:15 +0000)]
MFC r302947: In AHCI_IRQ_MODE_AFTER mode do not clear interrupts below.

This is probably a NOP change since IS register is not activery used for
interrupts below the shared, but it looked odd to clear interrupts we did
not handle.

7 years agoMFC r302946:
mav [Thu, 18 Aug 2016 11:14:57 +0000 (11:14 +0000)]
MFC r302946:
Do not consider the last interrupt shared if there are enough interrupts
for all channels.

7 years agoMFC r304374
ache [Thu, 18 Aug 2016 10:37:20 +0000 (10:37 +0000)]
MFC r304374

Fix TAB replaced with spaces in prev. commit.

7 years agoMFC r303554, r303561:
mav [Thu, 18 Aug 2016 09:39:51 +0000 (09:39 +0000)]
MFC r303554, r303561:
Block MSIX negotiation until SMP started and IRQ reshuffled.

7 years agoMFC r303553: Make MAC address generation more random.
mav [Thu, 18 Aug 2016 09:38:01 +0000 (09:38 +0000)]
MFC r303553: Make MAC address generation more random.

'ticks' approach does not work at boot time.

7 years agoMFC r303551: Fix infinite loops introduced at r303429.
mav [Thu, 18 Aug 2016 09:37:27 +0000 (09:37 +0000)]
MFC r303551: Fix infinite loops introduced at r303429.

7 years agoMFC r303514: Fix NTBT_QP_LINKS negotiation.
mav [Thu, 18 Aug 2016 09:36:45 +0000 (09:36 +0000)]
MFC r303514: Fix NTBT_QP_LINKS negotiation.

I believe it never worked correctly for more the one queue even in Linux.
This fixes case when one of consumer drivers is not loaded on one side,
but its queues still announced as ready if something else brought link up.

While there, remove some pointless NULL checks.

7 years agoMFC r303510: Clear scratchpad after MSIX negotiation to not leak garbage.
mav [Thu, 18 Aug 2016 09:36:06 +0000 (09:36 +0000)]
MFC r303510: Clear scratchpad after MSIX negotiation to not leak garbage.

7 years agoMFC r303494: Once more refactor KPI between ntb_transport(4) and if_ntb(4).
mav [Thu, 18 Aug 2016 09:35:31 +0000 (09:35 +0000)]
MFC r303494: Once more refactor KPI between ntb_transport(4) and if_ntb(4).

New design allows to attach multiple consumers to ntb_transport(4) instance.
Previous design obtained from Linux theoretically allowed that, but was not
practically usable (Linux also has only one consumer driver now).

7 years agoMFC r303429, r303437:
mav [Thu, 18 Aug 2016 09:34:39 +0000 (09:34 +0000)]
MFC r303429, r303437:
Once more refactor KPI between NTB hardware and consumers.

New design allows hardware resources to be split between several consumers.
For example, one BAR can be dedicated for remote memory access, while other
resources can be used for packet transport for virtual Ethernet interface.
And even without resource split, this code allows to specify which consumer
driver should attach the hardware.

From some points this makes the code even closer to Linux one, even though
Linux does not provide the described flexibility.

7 years agoMFC r302520: Replace NTB man page with more detailed and up to date.
mav [Thu, 18 Aug 2016 09:33:22 +0000 (09:33 +0000)]
MFC r302520: Replace NTB man page with more detailed and up to date.

Sponsored by:   iXsystems, Inc.

7 years agoMFC r303266: Postpone ntb_get_msix_info() till we need to negotiate MSIX.
mav [Thu, 18 Aug 2016 09:30:55 +0000 (09:30 +0000)]
MFC r303266: Postpone ntb_get_msix_info() till we need to negotiate MSIX.

Calling it earlier increases the window when MSIX info may change.
This change does not solve the problem completely, but seems logical.
Complete solution should probably include link reset in case of MSIX
remap to trigger new negotiation, but we have no way to get notified
about that now.

7 years agoMFC r302622 (by sephe): ntb: Fix LINT
mav [Thu, 18 Aug 2016 09:30:21 +0000 (09:30 +0000)]
MFC r302622 (by sephe): ntb: Fix LINT

7 years agoMFC r302531: Revert odd change, setting limit registers before base.
mav [Thu, 18 Aug 2016 09:29:35 +0000 (09:29 +0000)]
MFC r302531: Revert odd change, setting limit registers before base.

I don't know what errata is mentioned there, I was unable to find it, but
setting limit before the base simply does not work at all.  According to
specification attempt to set limit out of the present window range resets
it to zero, effectively disabling it.  And that is what I see in practice.

Fixing this properly disables access for remote side to our memory until
respective xlat is negotiated and set.  As I see, Linux does the same.

7 years agoMFC r302529: Remove callout_reset(link_work) from ntb_transport_attach().
mav [Thu, 18 Aug 2016 09:28:59 +0000 (09:28 +0000)]
MFC r302529: Remove callout_reset(link_work) from ntb_transport_attach().

At that point link is quite likely not established yet, so messing with
scratch registers is premature there.  Original commit message mentioned
code diff reduction from Linux, but this line is not present in Linux now.

7 years agoMFC r302530: Fix wrong copy/paste in r302510.
mav [Thu, 18 Aug 2016 09:28:26 +0000 (09:28 +0000)]
MFC r302530: Fix wrong copy/paste in r302510.

7 years agoMFC r302510:
mav [Thu, 18 Aug 2016 09:27:46 +0000 (09:27 +0000)]
MFC r302510:
Simplify MSIX MW BAR xlat setup, and don't forget to unlock its limit.

The last fixes SB01BASE_LOCKUP workaround after driver reload.

7 years agoMFC r302508: Disable SB01BASE_LOCKUP workaround when split BARs disabled.
mav [Thu, 18 Aug 2016 09:27:11 +0000 (09:27 +0000)]
MFC r302508: Disable SB01BASE_LOCKUP workaround when split BARs disabled.

For some reason hack with sending MSI-X interrupts by writing to remote
LAPIC memory works only for 32-bit BARs, that are available only if split
BARs mode is enabled in BIOS.  If it is not, complain loudly and fall back
to less efficient workaround.

7 years agoMFC r302499: Improve checksum "offload" support.
mav [Thu, 18 Aug 2016 09:26:21 +0000 (09:26 +0000)]
MFC r302499: Improve checksum "offload" support.

For compatibility reasons make driver not report any checksum offload by
default, since there is indeed none.  But if administrator knows that
interface is used only for local traffic, he can enable fake checksum
offload manually on both sides to save some CPU cycles, since the data
are already protected by CRC32 of PCIe link.

Sponsored by:   iXsystems, Inc.

7 years agoMFC r302496: Rewrite if_ntb to use modern interface KPIs and features.
mav [Thu, 18 Aug 2016 09:25:45 +0000 (09:25 +0000)]
MFC r302496: Rewrite if_ntb to use modern interface KPIs and features.

It includes: link state, if_transmit, buf_ring, multiple queues, bpf, etc.

Sponsored by:   iXsystems, Inc.

7 years agoMFC r302495: Improve memory allocation errors handling on receive.
mav [Thu, 18 Aug 2016 09:25:10 +0000 (09:25 +0000)]
MFC r302495: Improve memory allocation errors handling on receive.

7 years agoMFC r302494: Synchronize MTU code with Linux.
mav [Thu, 18 Aug 2016 09:24:36 +0000 (09:24 +0000)]
MFC r302494: Synchronize MTU code with Linux.

It is mandatory for transport compatibility.

7 years agoMFC r302493: Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.
mav [Thu, 18 Aug 2016 09:23:59 +0000 (09:23 +0000)]
MFC r302493: Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.

This allows at least first three doorbells to work very close to normal
hardware, properly signaling events to upper layers without spurious or
lost events.  Doorbells above the first three may still report spurious
events due to lack of reliable information, but they are rarely used.

7 years agoMFC r302492: Bring some more order into link and qp state handling.
mav [Thu, 18 Aug 2016 09:22:46 +0000 (09:22 +0000)]
MFC r302492: Bring some more order into link and qp state handling.

Do not touch scratchpad registers until link is reported up.
Mask and do not handle doorbell events until respective qp is up.

7 years agoMFC r302491: Switch ctx_lock from mutex to rmlock.
mav [Thu, 18 Aug 2016 09:22:11 +0000 (09:22 +0000)]
MFC r302491: Switch ctx_lock from mutex to rmlock.

It is odd idea to serialize different MSI-X vectors.  Use of rmlocks
here allows them to execute in parallel, but still protects ctx.
If upper layers require any additional serialization -- they can
do it by themselves.

7 years agoMFC r302490: Create separate RX taskqueue for each qp.
mav [Thu, 18 Aug 2016 09:21:36 +0000 (09:21 +0000)]
MFC r302490: Create separate RX taskqueue for each qp.

7 years agoMFC r302489: Remove rx_completion_task taskqueue.
mav [Thu, 18 Aug 2016 09:20:58 +0000 (09:20 +0000)]
MFC r302489: Remove rx_completion_task taskqueue.

It is not needed after RX lock removed in previous commit.

7 years agoMFC r302488: Remove unneeded RX lock, and make TX lock per-qp.
mav [Thu, 18 Aug 2016 09:20:25 +0000 (09:20 +0000)]
MFC r302488: Remove unneeded RX lock, and make TX lock per-qp.

7 years agoMFC r302487: Reduce code divergence from Linux, preparing for DMA support.
mav [Thu, 18 Aug 2016 09:19:50 +0000 (09:19 +0000)]
MFC r302487: Reduce code divergence from Linux, preparing for DMA support.

7 years agoMFC r302486: Fix operation with multiple qps.
mav [Thu, 18 Aug 2016 09:19:01 +0000 (09:19 +0000)]
MFC r302486: Fix operation with multiple qps.

7 years agoMFC r302484: NewBus'ify NTB subsystem.
mav [Thu, 18 Aug 2016 09:18:23 +0000 (09:18 +0000)]
MFC r302484: NewBus'ify NTB subsystem.

This follows NTB subsystem modularization in Linux, tuning it to FreeBSD
native NewBus interfaces.  This change allows to support different types
of hardware with different drivers, support multiple NTB instances in a
system, ntb_transport module use for needs other then if_ntb, etc.

Sponsored by:   iXsystems, Inc.

7 years agoMFC r302483: Remove some dead code found by Clang static analyzer.
mav [Thu, 18 Aug 2016 09:17:39 +0000 (09:17 +0000)]
MFC r302483: Remove some dead code found by Clang static analyzer.

7 years agoMFC r302482: Fix NTB_SDOORBELL_LOCKUP workaround.
mav [Thu, 18 Aug 2016 09:16:59 +0000 (09:16 +0000)]
MFC r302482: Fix NTB_SDOORBELL_LOCKUP workaround.

Since SBARxSZ register can be write-once, it can be unusable for disabling
the SBAR.  For such case also set SBARxBASE to zero to not intersect with
config BAR.

7 years agoMFC r303581
ache [Thu, 18 Aug 2016 08:52:55 +0000 (08:52 +0000)]
MFC r303581

Fix date

7 years agoMFC r303568
ache [Thu, 18 Aug 2016 08:47:06 +0000 (08:47 +0000)]
MFC r303568

Remove another vestige of scripted conversion

7 years agoMFC r303569
ache [Thu, 18 Aug 2016 08:36:24 +0000 (08:36 +0000)]
MFC r303569

Reflect CLDR timedef changes

7 years agoMFC r302937
ache [Thu, 18 Aug 2016 07:43:18 +0000 (07:43 +0000)]
MFC r302937

Path generation was not according to collate

Approved by:    jilles

7 years agoMFC r304149
sbruno [Thu, 18 Aug 2016 07:31:19 +0000 (07:31 +0000)]
MFC r304149

e1000:  Add support for Kaby Lake IDs

Fixup some errors when transitioning to/from low power states.

7 years agoMFC 303935
lwhsu [Wed, 17 Aug 2016 17:54:24 +0000 (17:54 +0000)]
MFC 303935

Only remove empty directories before packaging.

This preserves files are intentionally empty, most of them are in tests.txz

Reviewed by: bdrewery

7 years agoMFC r302943,r302944,r303004,r303010,r303011,r303013,r303014,r303074,
ache [Wed, 17 Aug 2016 09:34:56 +0000 (09:34 +0000)]
MFC r302943,r302944,r303004,r303010,r303011,r303013,r303014,r303074,
    r303088,r303142,r303208,r303210,r303530,r303536,r303564,r303565,
    r303706

In short:

1) All situations with glob(3) error return codes are well defined by
POSIX, so rewrite old sporadic errors processing to match those
definitions.

Including subcases:

Both C99 and POSIX directly prohibits any standard function to set errno
to 0. Breaking this rule in 2001 NetBSD hack was imported which attempts
to workaround very limited glob(3) return codes amount.
Use POSIX-compatible workaround now with E2BIG which can't comes from
other functions used instead of prohibited 0.

Process errors happpens in (*readdirfunc)() too, as POSIX requires.

Per POSIX GLOB_NOCHECK should return original pattern,
unmodified, if no matches found. But our code strips all '\'
returning it. Rewrite the code to allow to return original pattern.

GLOB_ERR and gl_errfunc are supposed to work only for real directories
per POSIX, so don't act on missing or plain files for ENOENT or ENOTDIR
(as TODO in the code suggested).
Remove the hack in the manpage describing how to skip ENOENT and ENOTDIR
in gl_errfunc, it is unneeded now.

Per POSIX GLOB_ERR must be considered even if gl_errfunc is not set,
old code skips it in that case.

2) For near MAXPATHLEN long pathes old glob(3) code can operate on
truncated results, prevent it in several places.

3) Results was not sorted according to collate as POSIX requires.

4) globtilde() forget to convert expanded user home dir from multibyte to
wide chars. Moreover, those chars are addded as not protected, so
can be treated as special chars.

5) Backward hack for EILSEQ in g_Ctoc() was not implemented, so all
pathes with illegal byte sequences are skipped as result, implement it now.

6) GLOB_BRACE was somehow broken. First it repeatedly calls glob0() in
globexp1() recursive calls, but glob0() was not supposed to be called
repeatedly in the original code. It finalize results by possible adding
original pattern for no match case, may return GLOB_NOMATCH error and
by sorting all things. Original pattern adding or GLOB_NOMATCH error
can happens each time glob0() called repeatedly, and sorting happens
for one item only, all things are never sorted. Second, f.e. "a{a"
pattern does not match "a{a" file but match "a" file instead.
Third, some errors (f.e. for limits or overflow) can be ignored
by GLOB_BRACE code because it forces return (0).

Add non-finalizing flag to glob0() and make globexp0() wrapper around
recursively called globexp1() to finalize things like glob0() does.
Reorganize braces code to work correctly.

7) Don't allow MB_CUR_MAX * strlen overallocation hits GLOB_LIMIT_STRING
(ARG_MAX) limit, use final string length, not malloced space for it.

7 years agoMFC r302497:
kp [Wed, 17 Aug 2016 09:23:40 +0000 (09:23 +0000)]
MFC r302497:

pf: Map hook returns onto the correct error values

pf returns PF_PASS, PF_DROP, ... in the netpfil hooks, but the hook callers
expect to get E<foo> error codes.
Map the returns values. A pass is 0 (everything is OK), anything else means
pf ate the packet, so return EACCES, which tells the stack not to emit an ICMP
error message.

PR:     207598

7 years agoMFC r303663:
kp [Wed, 17 Aug 2016 09:20:35 +0000 (09:20 +0000)]
MFC r303663:

pfctl: Allow TOS bits to be cleared

TOS value 0 is valid, so use 256 as an invalid value rather than zero.
This allows users to enforce TOS == 0 with pf.

Reported by:    Radek KrejĨa <radek.krejca@starnet.cz>

7 years agoMFC r302827
ache [Wed, 17 Aug 2016 09:12:02 +0000 (09:12 +0000)]
MFC r302827

Optimize [Cc]flag case: don't repeatedly add the last character of
string2 to squeeze cset when string2 reach its EOS state.

7 years agoMFC r302826
ache [Wed, 17 Aug 2016 09:10:22 +0000 (09:10 +0000)]
MFC r302826

Document incomplete support of [=equiv=] and collation for ranges.

7 years agoMFC r302831
ache [Wed, 17 Aug 2016 09:07:43 +0000 (09:07 +0000)]
MFC r302831

To mimic system glob, we definitely don't need manual upper/lower hack.
The author clearly disagree in the comment, so this patch will be not
submitted upstream.

7 years agoMFC r302824
ache [Wed, 17 Aug 2016 08:51:47 +0000 (08:51 +0000)]
MFC r302824

1) Eliminate possibility to call __*collate_range_cmp() with inclomplete
locale (which cause core dump) by removing whole 'table' argument
by which it passed.

2) Restore __collate_range_cmp() in __sccl().

3) Collating [a-z] range in regcomp() work only for single bytes locales
(we can't do it now for other ones). In previous code only first 256
wchars are considered and all others are just silently dropped from the
range.

7 years agoMFC r303094
ache [Wed, 17 Aug 2016 08:37:40 +0000 (08:37 +0000)]
MFC r303094

Continuation lines with comments badly affects gprof, it is excluded from
build on amd64 f.e.

7 years agoMFC r303916:
kib [Wed, 17 Aug 2016 07:15:50 +0000 (07:15 +0000)]
MFC r303916:
Convert another tmpfs assert into runtime check.

7 years agoMFC r303914:
kib [Wed, 17 Aug 2016 07:11:45 +0000 (07:11 +0000)]
MFC r303914:
Re-schedule signals after kthread exits.

7 years agoMFC r303913:
kib [Wed, 17 Aug 2016 07:07:24 +0000 (07:07 +0000)]
MFC r303913:
Unconditionally perform checks that FPU region was entered, when #NM
exception is caught in kernel mode.

7 years agoSimilar to r256297, disable assertions in llvm and clang for the
dim [Tue, 16 Aug 2016 18:56:56 +0000 (18:56 +0000)]
Similar to r256297, disable assertions in llvm and clang for the
stable/11 branch.  This reduces the size of the clang executable, and
improves its performance.  Also bump FREEBSD_CC_VERSION to make some
version number room for the branch.

7 years agoMFC r303974:
manu [Tue, 16 Aug 2016 09:12:45 +0000 (09:12 +0000)]
MFC r303974:
ename pcduino3b.dts to pcduino3.dts
The only difference between 3 and 3B is the size of the RJ45 port.
And now we have a uboot port that expect pcduino3.dts to be present.

Reported by: imp

7 years agoMFC r303728:
manu [Tue, 16 Aug 2016 09:10:18 +0000 (09:10 +0000)]
MFC r303728:
We need aw_nmi to be attached which needs GIC so attach a bit later.
Also the GPIOC doesn't need to be attach early

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D7082

7 years agoMFC r303145:
manu [Tue, 16 Aug 2016 09:08:44 +0000 (09:08 +0000)]
MFC r303145:
axp209 needs aw_nmi so attach a bit earlier

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D7081

7 years agoMFC r303144:
manu [Tue, 16 Aug 2016 09:06:23 +0000 (09:06 +0000)]
MFC r303144:
We need the GIC to be attached so attach later at BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D7080

7 years agoMFC r303830:
ngie [Tue, 16 Aug 2016 08:16:54 +0000 (08:16 +0000)]
MFC r303830:

Remove vestigal references to __alpha__

Replace alpha reference in getconf(1) with amd64 [*]

PR:   211300 [*]

7 years agoMFC r303423:
kib [Mon, 15 Aug 2016 21:33:20 +0000 (21:33 +0000)]
MFC r303423:
Force SIGSTOP to be the first signal reported after the attach.

7 years agoMFC 302900,302902,302921,303461,304009:
jhb [Mon, 15 Aug 2016 21:10:41 +0000 (21:10 +0000)]
MFC 302900,302902,302921,303461,304009:
Add a mask of optional ptrace() events.

302900:
Add a test for user signal delivery.

This test verifies we get the correct ptrace event details when a signal
is posted to a traced process from userland.

302902:
Add a mask of optional ptrace() events.

ptrace() now stores a mask of optional events in p_ptevents.  Currently
this mask is a single integer, but it can be expanded into an array of
integers in the future.

Two new ptrace requests can be used to manipulate the event mask:
PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK
sets the current event mask.

The current set of events include:
- PTRACE_EXEC: trace calls to execve().
- PTRACE_SCE: trace system call entries.
- PTRACE_SCX: trace syscam call exits.
- PTRACE_FORK: trace forks and auto-attach to new child processes.
- PTRACE_LWP: trace LWP events.

The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have
been replaced by PTRACE_SCE and PTRACE_SCX.  PTRACE_FORK replaces
P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS.

The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for
compatibility but now simply toggle corresponding flags in the
event mask.

While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both
modify the event mask and continue the traced process.

302921:
Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL.

303461:
Note that not all optional ptrace events use SIGTRAP.

New child processes attached due to PTRACE_FORK use SIGSTOP instead of
SIGTRAP.  All other ptrace events use SIGTRAP.

304009:
Remove description of P_FOLLOWFORK as this flag was removed.

7 years agoMFC r303836
rstone [Mon, 15 Aug 2016 15:23:45 +0000 (15:23 +0000)]
MFC r303836

  Don't enqueue NULL on a drbr

  In one corner case in the bxe TX path, a NULL mbuf could be enqueued onto
  a drbr queue.  This could case a KASSERT to fire with INVARIANTS enabled,
  or the processing of packets from the queue to be prematurely ended later
  on.

  Submitted by: Matt Joras (matt.joras AT isilon.com)
  Reviewed by:  davidcs
  Sponsored by: EMC / Isilon Storage Division
  Differential Revision:        https://reviews.freebsd.org/D7041

7 years agoMFC r303923:
ed [Mon, 15 Aug 2016 11:16:43 +0000 (11:16 +0000)]
MFC r303923:

  Make cpu_set_user_tls() work when called on the running thread.

  On all the other architectures, this function can also be called on the
  currently running thread. In this case, we shouldn't fix up the address
  in the PCB, but also patch up the register itself. Otherwise it will not
  become active and will simply become overwritten by the next switch.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D7437

7 years agoMFC r303964:
bdrewery [Mon, 15 Aug 2016 09:37:58 +0000 (09:37 +0000)]
MFC r303964:

  PROGS: Support INTERNALPROG.prog=yes to not install it.

7 years agoMFC r303934,r303937,r303942:
bdrewery [Mon, 15 Aug 2016 09:36:43 +0000 (09:36 +0000)]
MFC r303934,r303937,r303942:

  r303934:
    Support rmdir(2).
  r303937:
    Use proper argument length for rmdir(2) for r303934.
  r303942:
    Fix sorting in r303934.

7 years agoMFC r302838: 6513 partially filled holes lose birth time
avg [Mon, 15 Aug 2016 09:19:21 +0000 (09:19 +0000)]
MFC r302838: 6513 partially filled holes lose birth time

7 years agoMFC r302837: 6844 dnode_next_offset can detect fictional holes
avg [Mon, 15 Aug 2016 09:16:42 +0000 (09:16 +0000)]
MFC r302837: 6844 dnode_next_offset can detect fictional holes

7 years agoMFC r303870:
hselasky [Mon, 15 Aug 2016 09:07:26 +0000 (09:07 +0000)]
MFC r303870:
Fix for use after free.

Clear the device description to avoid use after free because the
bsddev is not destroyed when the mlx5en module is unloaded. Only when
the parent mlx5 module is unloaded the bsddev is destroyed. This fixes
a panic on listing sysctls which refer strings in the bsddev after the
mlx5en module has been unloaded.

Sponsored by: Mellanox Technologies

7 years agoMFC r302835: fix-up for configuration of AMD Family 10h processors
avg [Mon, 15 Aug 2016 09:04:13 +0000 (09:04 +0000)]
MFC r302835: fix-up for configuration of AMD Family 10h processors
borrowed from Linux

7 years agoMFC r302840: 6878 Add scrub completion info to "zpool history"
avg [Mon, 15 Aug 2016 09:01:59 +0000 (09:01 +0000)]
MFC r302840: 6878 Add scrub completion info to "zpool history"

7 years agoMFC r303765:
hselasky [Mon, 15 Aug 2016 08:58:55 +0000 (08:58 +0000)]
MFC r303765:
Keep a reference count on USB keyboard polling to allow recursive
cngrab() during a panic for example, similar to what the AT-keyboard
driver is doing.

Found by: Bruce Evans <brde@optusnet.com.au>

7 years agoMFC r303837:
hselasky [Mon, 15 Aug 2016 08:56:25 +0000 (08:56 +0000)]
MFC r303837:
Switch to the new block based LRO input function for the mlx5en
driver. This change significantly increases the overall RX aggregation
ratio for heavily loaded networks handling 10-80 thousand simultaneous
connections.

Remove the turbo LRO code and all references to it which has now been
superceeded by the tcp_lro_queue_mbuf() function.

Tested by: Netflix
Sponsored by: Mellanox Technologies

7 years agoMFC r302839: 6940 Cannot unlink directories when over quota
avg [Mon, 15 Aug 2016 08:54:09 +0000 (08:54 +0000)]
MFC r302839: 6940 Cannot unlink directories when over quota

7 years agoMFC r303086: 7164 zdb should be able to open the root dataset
avg [Mon, 15 Aug 2016 08:48:33 +0000 (08:48 +0000)]
MFC r303086: 7164 zdb should be able to open the root dataset

7 years agoMFC r303084: 6391 Override default SPA config location via environment
avg [Mon, 15 Aug 2016 08:45:13 +0000 (08:45 +0000)]
MFC r303084: 6391 Override default SPA config location via environment

7 years agoMFC: r303685
bapt [Sun, 14 Aug 2016 22:43:48 +0000 (22:43 +0000)]
MFC: r303685

truss: fix uninitialized trussinfo->curthread in add_threads()/enter_syscall

trussinfo->curthread must be initialized before calling enter_syscall(),
it is used by t->proc->abi->fetch_args().
Without that truss is segfaulting and the attached program also crash.

Submitted by: Nikita Kozlov (nikita@gandi.net)
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D7399

7 years agoMFC r302906:
ae [Sun, 14 Aug 2016 20:22:03 +0000 (20:22 +0000)]
MFC r302906:
  Add net.inet6.ip6.intr_queue_maxlen sysctl. It can be used to
  change netisr queue limit for IPv6 at runtime.

7 years agoMFC r303374:
ae [Sun, 14 Aug 2016 20:19:47 +0000 (20:19 +0000)]
MFC r303374:
  Due to dropped mbuf in netisr queue route(8) can fall into infinity
  loop of reading the rtsock's feed. When it used by some scripts,
  this leads to growing number of not finished route(8) instances and
  thus growing number of rtsock consumers. Add SIGALRM handler to prevent this.

7 years agoMFC r303786
markj [Sun, 14 Aug 2016 19:07:13 +0000 (19:07 +0000)]
MFC r303786
mthca: Add a wrapper for the firmware's DIAG_RPRT command.

7 years agoMFC r303243
markj [Sun, 14 Aug 2016 19:05:44 +0000 (19:05 +0000)]
MFC r303243
Update a comment in vm_page_advise() to match behaviour after r290529.

7 years agoMFC r303059
markj [Sun, 14 Aug 2016 19:03:33 +0000 (19:03 +0000)]
MFC r303059
Release the second critical section in uma_zfree_arg() slightly earlier.