199834 Commits

Author SHA1 Message Date
trasz
75c063e8b8 MFC r284582:
Fix off-by-one error in fstyp(8) and geom_label(4) that made them use
a single space (" ") as a CD9660 label name when no label was present.
Similar problem was also present in msdosfs label recognition.

Sponsored by:	The FreeBSD Foundation
2015-08-02 10:08:57 +00:00
trasz
529945ff14 MFC r285675:
Remove a comment in the wrong place.

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:39:41 +00:00
trasz
e0160cb48c MFC r285674:
Document suspend/resume notification in devd.conf(5).

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:37:47 +00:00
trasz
01cb83f877 MFC r285673:
Add CARP events description to devd.conf(5).

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:35:53 +00:00
trasz
e063ea3299 MFC r285873:
Update Capsicum and Mandatory Access Control manual pages
to no longer claim they are experimental.

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:34:03 +00:00
trasz
d141e091d1 MFC r285672:
fstyp(8) ships with 10.2.

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:30:43 +00:00
trasz
3d4ca78d92 MFC r285671:
uefisign(8) ships with 10.2.

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:28:51 +00:00
trasz
86038bfb06 MFC r285676:
Expand sysctl descriptions in iscsi(4) and ctl(4).

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:27:07 +00:00
trasz
d221c70b1c MFC r285251:
Fix markup.

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:25:05 +00:00
trasz
ac03bb573c MFC r285100:
Make ctl(4) appear in "man -k iscsi" results.

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:23:24 +00:00
trasz
43258d527f MFC r284682:
Expand sysctls descriptions for iscsi(4) and ctl(4).

Sponsored by:	The FreeBSD Foundation
2015-08-02 09:21:31 +00:00
trasz
dc9d89405e MFC r283286:
Start documenting ctl(4) sysctls.

Differential Revision:	The FreeBSD Foundation
2015-08-02 09:14:52 +00:00
brueffer
d8122e90be MFC: r286090
The kernel option and module are actually called pmspcv.
2015-08-02 07:25:05 +00:00
rmacklem
fee1840f08 MFC: r286046
This patch fixes a problem where, if the NFSv4 server has a previous
unconfirmed clientid structure for the same client on the last hash list,
this old entry would not be removed/deleted. I do not think this bug would have
caused serious problems, since the new entry would have been before the old one
on the list. This old entry would have eventually been scavenged/removed.
2015-08-01 22:56:42 +00:00
kib
28a0dfd5bd MFC r285878:
Revert r173708's modifications to vm_object_page_remove().
This fixes inconsistencies encountered by vm_object_unwire() or
by the buffer cache when the file is truncated.
2015-08-01 03:37:00 +00:00
rmacklem
501e413352 MFC: r285113
If a "principal" argument isn't provided for a Kerberized NFS mount,
the kernel would generate a bogus one with a ":/<path>" suffix.
This would only occur for the case where there was no explicit
"principal" argument and the getaddrinfo() call in mount_nfs.c failed to a
return a cannonical name for the server.
This patch fixes this unusual case.
2015-07-31 21:31:58 +00:00
gjb
ad05cf684a MFC r286131:
Pull pmspcv (pms(4)) from GENERIC.  It has PCI ID conflicts
 with ahd(4), mvs(4), and likely other drivers.

With hat:	re
Sponsored by:	The FreeBSD Foundation
2015-07-31 15:25:07 +00:00
garga
b0aaac698f MFC r285945, r285960:
Respect pf rule log option before log dropped packets with IP options or
dangerous v6 headers

Reviewed by:	gnn, eri
Approved by:	gnn, glebius
Obtained from:	pfSense
Sponsored by:	Netgate
Differential Revision:	https://reviews.freebsd.org/D3222
2015-07-31 12:02:44 +00:00
smh
3b7e178dff MFC: r285946 and r285947
Add warning about low KSTACK_PAGES for ZFS use.

Sponsored by:	Multiplay
2015-07-31 09:43:07 +00:00
kevlo
aeb145cca6 MFC r285669:
Since the IETF has redefined the meaning of the tos field to accommodate
a set of differentiated services, set IPTOS_PREC_* macros using
IPTOS_DSCP_* macro definitions.

While here, add IPTOS_DSCP_VA macro according to RFC 5865.

Differential Revision:	https://reviews.freebsd.org/D3119
Reviewed by:	gnn
2015-07-31 03:40:09 +00:00
kevlo
84e0e9dfe4 MFC r285623:
Fix typo in register definition.

Submitted by:	James Hung
Reviewed by:	sbruno
2015-07-31 03:35:27 +00:00
markj
25eb055781 MFC r285782:
Fix counter reads on platforms where sizeof(uint64_t) != sizeof(uint64_t *).

PR:	201700
2015-07-31 00:21:40 +00:00
bdrewery
21bbf44105 MFC r285972:
MFV r285970:

    Apply upstream changeset bf4f6ec64e:

    Fix issue 356: properly skip a sparse file entry in a tar file.

PR:		201506
Relnotes:	yes
2015-07-30 17:04:15 +00:00
gjb
d83a2c49a3 MFC r285999 (kp):
pf: Always initialise pf_fragment.fr_flags

  When we allocate the struct pf_fragment in pf_fillup_fragment() we
  forgot to initialise the fr_flags field. As a result we sometimes
  mistakenly thought the fragment to not be a buffered fragment.
  This resulted in panics because we'd end up freeing the pf_fragment
  but not removing it from V_pf_fragqueue (believing it to be part of
  V_pf_cachequeue).  The next time we iterated V_pf_fragqueue we'd use
  a freed object and panic.

  While here also fix a pf_fragment use after free in pf_normalize_ip().
  pf_reassemble() frees the pf_fragment, so we can't use it any more.

X-MFS-To:	releng/10.2
Sponsored by:	The FreeBSD Foundation
2015-07-30 16:06:13 +00:00
jamie
519cc2faa2 MFC r285420:
Run a shell in the jail when no command is specified.
  Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.
  Change the GET_USER_INFO macro into a function.

PR:		201300
Submitted by:	Willem Jan Withagen
2015-07-30 04:53:53 +00:00
marius
c3199153b4 MFC: r285843
- Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signaling
  uart_bus_attach() during its test that 20 iterations weren't sufficient
  for clearing all pending interrupts, assuming this means that hardware
  is broken and doesn't deassert interrupts. However, under pressure, 20
  iterations also can be insufficient for clearing all pending interrupts,
  leading to a panic as intr_event_handle() tries to schedule an interrupt
  handler not registered. Solve this by introducing a flag that is set in
  test mode and otherwise restores pre-r253161 behavior of uart_intr(). The
  approach of additionally registering uart_intr() as handler as suggested
  in PR 194979 is not taken as that in turn would abuse special pccard and
  pccbb handling code of intr_event_handle(). [1]
- Const'ify uart_driver_name.
- Fix some minor style bugs.

PR:		194979 [1]
Reviewed by:	marcel (earlier version)
2015-07-30 02:23:09 +00:00
marius
27f38bb436 MFC: r285839
o Revert the other functional half of r239864, i. e. the merge of r134227
  from x86 to use smp_ipi_mtx spin lock not only for smp_rendezvous_cpus()
  but also for the MD cache invalidation, TLB demapping and remote register
  reading IPIs due to the following reasons:
  - The cross-IPI SMP deadlock x86 otherwise is subject to can't happen on
    sparc64. That's because on sparc64, spin locks don't disable interrupts
    completely but only raise the processor interrupt level to PIL_TICK. This
    means that IPIs still get delivered and direct dispatch IPIs such as the
    cache invalidation etc. IPIs in question are still executed.
  - In smp_rendezvous_cpus(), smp_ipi_mtx is held not only while sending an
    IPI_RENDEZVOUS, but until all CPUs have processed smp_rendezvous_action().
    Consequently, smp_ipi_mtx may be locked for an extended amount of time as
    queued IPIs (as opposed to the direct ones) such as IPI_RENDEZVOUS are
    scheduled via a soft interrupt. Moreover, given that this soft interrupt
    is only delivered at PIL_RENDEZVOUS, processing of smp_rendezvous_action()
    on a target may be interrupted by f. e. a tick interrupt at PIL_TICK, in
    turn leading to the target in question trying to send an IPI by itself
    while IPI_RENDEZVOUS isn't fully handled, yet, and, thus, resulting in a
    deadlock.
o As mentioned in the commit message of r245850, on least some sun4u platforms
  concurrent sending of IPIs by different CPUs is fatal. Therefore, hold the
  reintroduced MD ipi_mtx also while delivering cross-traps via MI helpers,
  i. e. ipi_{all_but_self,cpu,selected}().
o Akin to x86, let the last CPU to process cpu_mp_bootstrap() set smp_started
  instead of the BSP in cpu_mp_unleash(). This ensures that all APs actually
  are started, when smp_started is no longer 0.
o In all MD and MI IPI helpers, check for smp_started == 1 rather than for
  smp_cpus > 1 or nothing at all. This avoids races during boot causing IPIs
  trying to be delivered to APs that in fact aren't up and running, yet.
  While at it, move setting of the cpu_ipi_{selected,single}() pointers to
  the appropriate delivery functions from mp_init() to cpu_mp_start() where
  it's better suited and allows to get rid of the global isjbus variable.
o Given that now concurrent IPI delivery no longer is possible, also nuke
  the delays before completely disabling interrupts again in the CPU-specific
  cross-trap delivery functions, previously giving other CPUs a window for
  sending IPIs on their part. Actually, we now should be able to entirely get
  rid of completely disabling interrupts in these functions. Such a change
  needs more testing, though.
o In {s,}tick_get_timecount_mp(), make the {s,}tick variable static. While not
  necessary for correctness, this avoids page faults when accessing the stack
  of a foreign CPU as {s,}tick now is locked into the TLBs as part of static
  kernel data. Hence, {s,}tick_get_timecount_mp() always execute as fast as
  possible, avoiding jitter.

PR:		201245
2015-07-30 02:06:29 +00:00
marius
eecea0503f MFC: r284447, r284552
Merge from NetBSD:
o rev. 1.10: Nuke trailing whitespace.
o rev. 1.15: Fix typo in comment.
o rev. 1.16: Add the following registers from IEEE 802.3-2009 Clause 22:
 - PSE control register (0x0b)
 - PSE status register (0x0c)
 - MMD access control register (0x0d)
 - MMD access address data register (0x0e)
o rev. 1.17 (comments only): The bit location of link ability is different
  between 1000Base-X and others (see Annex 28B.2 and 28D).
o rev. 1.18: Nuke dupe word.

Obtained from:	NetBSD
Sponsored by:	genua mbh
2015-07-30 00:28:27 +00:00
marius
528b5a9fee MFC: r281752
Make a comment reflect reality.
2015-07-30 00:24:21 +00:00
dim
eedcd78b1e Add updated llvm patch corresponding to r286033. 2015-07-29 19:27:57 +00:00
dim
6b61571bde Reapply r286007, modified to compile with pre-C++11 compilers:
Pull in r219009 from upstream llvm trunk (by Adam Nemet):

  [ISel] Keep matching state consistent when folding during X86 address match

  In the X86 backend, matching an address is initiated by the 'addr' complex
  pattern and its friends.  During this process we may reassociate and-of-shift
  into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the
  shift into the scale of the address.

  However as demonstrated by the testcase, this can trigger CSE of not only the
  shift and the AND which the code is prepared for but also the underlying load
  node.  In the testcase this node is sitting in the RecordedNode and MatchScope
  data structures of the matcher and becomes a deleted node upon CSE.  Returning
  from the complex pattern function, we try to access it again hitting an assert
  because the node is no longer a load even though this was checked before.

  Now obviously changing the DAG this late is bending the rules but I think it
  makes sense somewhat.  Outside of addresses we prefer and-of-shift because it
  may lead to smaller immediates (FoldMaskAndShiftToScale is an even better
  example because it create a non-canonical node).  We currently don't recognize
  addresses during DAGCombiner where arguably this canonicalization should be
  performed.  On the other hand, having this in the matcher allows us to cover
  all the cases where an address can be used in an instruction.

  I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for
  the new shift node in FoldMaskedShiftToScaledMask.  This RAUW is responsible
  for initiating the recursive CSE on users
  (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it
  is not strictly necessary since the shift is hooked into the visited user.  Of
  course it's safer to keep the DAG consistent at all times (e.g. for accurate
  number of uses, etc.).

  So rather than changing the fundamentals, I've decided to continue along the
  previous patches and detect the CSE.  This patch installs a very targeted
  DAGUpdateListener for the duration of a complex-pattern match and updates the
  matching state accordingly.  (Previous patches used HandleSDNode to detect the
  CSE but that's not practical here).  The listener is only installed on X86.

  I tested that there is no measurable overhead due to this while running
  through the spec2k BC files with llc.  The only thing we pay for is the
  creation of the listener.  The callback never ever triggers in spec2k since
  this is a corner case.

  Fixes rdar://problem/18206171

This fixes a possible crash in x86 code generation when compiling recent
llvm/clang trunk sources.

Direct commit to stable/10, since head already has llvm/clang 3.6.1,
which includes this fix.

Reported by:	jonathan, theraven
Upstream PR:	https://llvm.org/bugs/show_bug.cgi?id=24249
2015-07-29 19:25:28 +00:00
eri
3082d2efe1 MFC 285325
Correct issue presented in r285051 by properly initializing variable.

Differential Revision:	 https://reviews.freebsd.org/D3036
2015-07-29 17:50:14 +00:00
eri
b2cc8257fa MFC r285051
Avoid doing multiple route lookups for the same destination IP during forwarding.

Differential Revision:	https://reviews.freebsd.org/D2964
2015-07-29 17:46:16 +00:00
brueffer
cdb611ddfc MFC: r285859
Auto-generate hardware notes for pms(4).
2015-07-29 17:05:42 +00:00
brueffer
8da9d6c701 MFC: r285858, r286017
Add a basic manpage for the pms driver.
2015-07-29 16:40:48 +00:00
dim
e7468c5bc3 Revert r286007-r286009 for now, until I can figure out how to make the
fix compile with older gcc and libstdc++.
2015-07-29 14:07:29 +00:00
dim
0320ef6854 Add llvm patch corresponding to r286007. 2015-07-29 13:07:18 +00:00
dim
bd32a5b2ac Pull in r219009 from upstream llvm trunk (by Adam Nemet):
[ISel] Keep matching state consistent when folding during X86 address match

  In the X86 backend, matching an address is initiated by the 'addr' complex
  pattern and its friends.  During this process we may reassociate and-of-shift
  into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the
  shift into the scale of the address.

  However as demonstrated by the testcase, this can trigger CSE of not only the
  shift and the AND which the code is prepared for but also the underlying load
  node.  In the testcase this node is sitting in the RecordedNode and MatchScope
  data structures of the matcher and becomes a deleted node upon CSE.  Returning
  from the complex pattern function, we try to access it again hitting an assert
  because the node is no longer a load even though this was checked before.

  Now obviously changing the DAG this late is bending the rules but I think it
  makes sense somewhat.  Outside of addresses we prefer and-of-shift because it
  may lead to smaller immediates (FoldMaskAndShiftToScale is an even better
  example because it create a non-canonical node).  We currently don't recognize
  addresses during DAGCombiner where arguably this canonicalization should be
  performed.  On the other hand, having this in the matcher allows us to cover
  all the cases where an address can be used in an instruction.

  I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for
  the new shift node in FoldMaskedShiftToScaledMask.  This RAUW is responsible
  for initiating the recursive CSE on users
  (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it
  is not strictly necessary since the shift is hooked into the visited user.  Of
  course it's safer to keep the DAG consistent at all times (e.g. for accurate
  number of uses, etc.).

  So rather than changing the fundamentals, I've decided to continue along the
  previous patches and detect the CSE.  This patch installs a very targeted
  DAGUpdateListener for the duration of a complex-pattern match and updates the
  matching state accordingly.  (Previous patches used HandleSDNode to detect the
  CSE but that's not practical here).  The listener is only installed on X86.

  I tested that there is no measurable overhead due to this while running
  through the spec2k BC files with llc.  The only thing we pay for is the
  creation of the listener.  The callback never ever triggers in spec2k since
  this is a corner case.

  Fixes rdar://problem/18206171

This fixes a possible crash in x86 code generation when compiling recent
llvm/clang trunk sources.

Direct commit to stable/10, since head already has llvm/clang 3.6.1,
which includes this fix.

Reported by:	jonathan, theraven
Upstream PR:	https://llvm.org/bugs/show_bug.cgi?id=24249
2015-07-29 12:59:16 +00:00
glebius
cbda56cb99 Merge r285944: fix typo: delete nsn if we were the last reference. 2015-07-29 11:12:56 +00:00
gjb
855288edce Document SA-15:14 through SA-15:17.
Sponsored by:	The FreeBSD Foundation
2015-07-28 20:38:52 +00:00
delphij
d3ecbb9019 Fix patch(1) shell injection vulnerability. [SA-15:14]
Fix resource exhaustion in TCP reassembly. [SA-15:15]

Fix OpenSSH multiple vulnerabilities. [SA-15:16]
2015-07-28 19:58:44 +00:00
cem
87ad559404 MFC r285483: pipe_direct_write: Fix mismatched pipelock/unlock
If a signal is caught in pipelock, causing it to fail, pipe_direct_write
should not try to pipeunlock.

Approved by:	markj (mentor)
Sponsored by:	EMC / Isilon Storage Division
2015-07-28 18:37:23 +00:00
kib
07af41892f MFC r284956:
Do not calculate the stack's bottom address twice.
2015-07-28 17:12:41 +00:00
kib
3205c5b7b0 MFC r285039:
Remove asserts which might reference freed memory.
2015-07-28 17:08:32 +00:00
kib
9368084956 MFC r285173:
Document the locking context for the directly dispatched callouts.
Cross-reference timeout(9).
2015-07-28 17:06:13 +00:00
kib
8a59bb0b0a MFC r285134 (by mjg):
fd: de-k&r-ify functions + some whitespace fixes

MFC r285269:
Handle copyout for the fcntl(F_OGETLK) using oflock structure.
2015-07-28 16:39:36 +00:00
gjb
87b74142db Fix the description for r274486.
Submitted by:	glebius
Sponsored by:	The FreeBSD Foundation
2015-07-28 15:03:56 +00:00
emaste
c94b5252c8 MFC r285248: lldb: use .PATH to find man page instead of symlinking it 2015-07-28 12:46:37 +00:00
emaste
c18b3c3a79 MFC r285246: Avoid creating invalid UEFI device path
The UEFI loader on the 10.1 release install disk (disc1) modifies an
existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to
truncate the device path.  In doing so it creates an invalid device
path.

Perform the equivalent action without modification of structures
allocated by firmware.

PR:		197641
Submitted by:	Chris Ruffin <chris.ruffin at intel.com>
2015-07-28 12:45:08 +00:00
emaste
dfe95dcde5 MFC r201289: mfiutil: increase buffer size to accommodate sprintf string
PR:		201289
2015-07-28 12:40:41 +00:00