]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r312523:
ngie [Fri, 10 Feb 2017 07:55:39 +0000 (07:55 +0000)]
MFC r312523:

Add some basic -s flag testcases for cut(1)

The remaining functionality seems to be covered in one form or
another via the NetBSD ATF testcase.

7 years agoMFC r312418,r312422:
ngie [Fri, 10 Feb 2017 07:38:39 +0000 (07:38 +0000)]
MFC r312418,r312422:

r312418:

Conditionalize hyperv support in gettimeofday(2) based on MK_HYPERV

The effect at runtime is negligible as the hyperv timer isn't available
except when hyperv is loaded.

This is a prerequisite for conditionalizing the header build/install out
of the build

r312422:

Only conditionally add in hyperv support if we're building amd64

This unbreaks the build because the assembly is written for x64.

Pointyhat to: ngie

7 years agoMFC r312452-r312512:
ngie [Fri, 10 Feb 2017 07:32:40 +0000 (07:32 +0000)]
MFC r312452-r312512:

r312452-r312512:

- Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

  This simplifies pathing in make/displayed output

- Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc

7 years agoMerge r309649, r313048, r313083, r313104:
glebius [Fri, 10 Feb 2017 07:22:12 +0000 (07:22 +0000)]
Merge r309649, r313048, r313083, r313104:

  tcpdump 4.9.0

7 years agoMFC r306349:
ngie [Fri, 10 Feb 2017 06:31:31 +0000 (06:31 +0000)]
MFC r306349:
r306349 (by pfg):

hash(3): protect in-memory page when using cross-endianness.

When writing out pages in the "other endian" format, make a copy
instead of trashing the in-memory one.

Obtained from: NetBSD (CVS rev. 1.29)

7 years agoMFC r313401
vangyzen [Fri, 10 Feb 2017 05:14:19 +0000 (05:14 +0000)]
MFC r313401

Fix garbage IP addresses in UDP log_in_vain messages

If multiple threads emit a UDP log_in_vain message concurrently,
or indeed call inet_ntoa() for any other reason,
the IP addresses could be garbage due to concurrent usage of a
single string buffer inside inet_ntoa().  Use inet_ntoa_r() with
two stack buffers instead.

Relnotes: yes
Sponsored by: Dell EMC

7 years agoMFC r308430, r309782: libelftc: add elf{32,64}-trad{big,little}mips
emaste [Fri, 10 Feb 2017 02:27:48 +0000 (02:27 +0000)]
MFC r308430, r309782: libelftc: add elf{32,64}-trad{big,little}mips

7 years agoMFC r311946: readelf: add S390 relocation types
emaste [Fri, 10 Feb 2017 01:18:15 +0000 (01:18 +0000)]
MFC r311946: readelf: add S390 relocation types

From https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries.html

7 years agoMFC r313109:
kib [Thu, 9 Feb 2017 04:42:21 +0000 (04:42 +0000)]
MFC r313109:
Use ANSI definitions for some i386 functions.

7 years agoMFC r312791:
cy [Thu, 9 Feb 2017 02:08:42 +0000 (02:08 +0000)]
MFC r312791:

Use normal KNF cuddling of elses.

Reported by: bde

7 years agoMFC r311901:
markj [Thu, 9 Feb 2017 00:28:03 +0000 (00:28 +0000)]
MFC r311901:
Do not set BIO_DONE if the BIO specifies a completion handler.

7 years agoMFC r313180
vangyzen [Wed, 8 Feb 2017 20:08:38 +0000 (20:08 +0000)]
MFC r313180

PCIe HotPlug: remove tests for DL active link capability

As of r313097, the HotPlug code requires the link to support
reporting of the data-link status.  Remove tests for this capability
from code that can now assume its presence.

Sponsored by: Dell EMC

7 years agoRegen after r313450.
jhb [Wed, 8 Feb 2017 18:33:00 +0000 (18:33 +0000)]
Regen after r313450.

7 years agoMFC 310638:
jhb [Wed, 8 Feb 2017 18:32:35 +0000 (18:32 +0000)]
MFC 310638:
Rename the 'flags' argument to getfsstat() to 'mode' and validate it.

This argument is not a bitmask of flags, but only accepts a single value.
Fail with EINVAL if an invalid value is passed to 'flag'.  Rename the
'flags' argument to getmntinfo(3) to 'mode' as well to match.

This is a followup to r308088.

7 years agoMFC r312767: Partially workaround ASMedia HBA error recovery.
mav [Wed, 8 Feb 2017 16:06:19 +0000 (16:06 +0000)]
MFC r312767: Partially workaround ASMedia HBA error recovery.

Taking closer look on my ASM1062 I found that it has bunch of issues around
error recovery: reported wrong CCS, failed commands reported as completed,
READ LOG EXT times out after NCQ error.  This patch workarounds first two
problems, that were making ATAPI devices close to unusable on these HBAs.

7 years agoMFC r312750: Add Timeout and Protect mode page description from MMC-6.
mav [Wed, 8 Feb 2017 16:00:40 +0000 (16:00 +0000)]
MFC r312750: Add Timeout and Protect mode page description from MMC-6.

7 years agoMFC r312777, r312780:
cy [Wed, 8 Feb 2017 13:37:57 +0000 (13:37 +0000)]
MFC r312777, r312780:

Issue an error message when an incorrect flush argument is encountered
(and style fixup).

7 years agoMFC r312392:
ngie [Wed, 8 Feb 2017 08:34:59 +0000 (08:34 +0000)]
MFC r312392:

Use SRCTOP instead of .CURDIR-relative path in .PATH directive

7 years agoMFC 313097: Require Data Layer Active reporting for native PCI-e HotPlug.
jhb [Tue, 7 Feb 2017 22:40:38 +0000 (22:40 +0000)]
MFC 313097: Require Data Layer Active reporting for native PCI-e HotPlug.

Some PCI-e bridges report that they support HotPlug in the slot
capabilities but do not report support for Data Layer Active events
in the link capabilities register.  These bridges do not work correctly
when HotPlug is used.  Further, while the description of HotPlug in
the spec does not mention that DL active events are required, the
description of the link capabilities register says that DL active is
required for HotPlug.  Thanks to Dave Baukus for finding that language
in the spec.

PR: 211699

7 years agoMFC r312544
rstone [Tue, 7 Feb 2017 15:13:19 +0000 (15:13 +0000)]
MFC r312544

  Fix reference to free memory in ixgbe/if_media.c

  When ixgbe receives an interrupt indicating that a new optical module
  may have been inserted, it discards all of its current media types
  by calling ifmedia_removeall() and then creates a new set of media
  types for the supported media on the new module.  However,
  ifmedia_removeall() was maintaining a pointer to whatever the
  current media type was before the call to ifmedia_removealL().
  The result of this was that any attempt to read the current media
  type of the interface (e.g. via ifconfig) would return potentially
  garbage data from free memory (or if one were particularly unlucky
  on an architecture that does not malloc() from a direct map, page
  fault the kernel).

  Fix this by NULL'ing out the current media field in if_media.c,
  and have ixgbe update the current media type after recreating
  them.

  Submitted by: Matt Joras <matt.joras AT gmail DOT com>
  Reviewed by:  sbruno, erj
  MFC after:    1 week
  Sponsored by: Dell EMC Isilon
  Differential Revision:        https://reviews.freebsd.org/D9164

7 years agoMFC r313249:
kib [Tue, 7 Feb 2017 08:31:07 +0000 (08:31 +0000)]
MFC r313249:
Style, use tab after #define.

7 years agoMFC r313182:
ngie [Tue, 7 Feb 2017 05:44:13 +0000 (05:44 +0000)]
MFC r313182:

Fix typo in variable name (_REDUNDENT_LIB_DIRS -> _REDUNDANT_LIB_DIRS)

7 years agoMFC r312694: Make CTL ramdisk backend a real RAM disk.
mav [Tue, 7 Feb 2017 01:57:29 +0000 (01:57 +0000)]
MFC r312694: Make CTL ramdisk backend a real RAM disk.

If "capacity" LU option is set, ramdisk backend now implements featured
thin provisioned disk, storing data in malloc(9) allocated memory blocks
of pblocksize bytes (default PAGE_SIZE or 4KB).  Additionally ~0.2% of LU
size is used for indirection tree (bigger pblocksize reduce the overhead).
Backend supports all unmap and anchor operations.  If configured capacity
is overflowed, proper error conditions are reported.

If "capacity" LU option is not set, the backend operates mostly the same
as before without allocating real storage: writes go to nowhere, reads
return zeroes, reporting that all LBAs are unmapped.

This backend is still mostly oriented on testing and benchmarking (it is
still a volatile RAM disk), but now it should allow to run real FS tests,
not only simple dumb dd.

7 years agoMFC r312603: Add initial support for CTL module unloading.
mav [Tue, 7 Feb 2017 01:55:48 +0000 (01:55 +0000)]
MFC r312603: Add initial support for CTL module unloading.

It is only a first step and not perfect, but better then nothing.
The main blocker is CAM target frontend, that can not be unloaded,
since CAM does not have mechanism to unregister periph driver now.

7 years agoMFC r312348: Remove writing 'residual' field of struct ctl_scsiio.
mav [Tue, 7 Feb 2017 01:43:45 +0000 (01:43 +0000)]
MFC r312348: Remove writing 'residual' field of struct ctl_scsiio.

This field has no practical use and never readed.  Initiators already
receive respective residual size from frontends.  Removed field had
different semantics, which looks useless, and was never passed through
by any frontend.

While there, fix kern_data_resid field support in case of HA, missed in
r312291.

7 years agoMFC r312291, r312669:
mav [Tue, 7 Feb 2017 01:42:13 +0000 (01:42 +0000)]
MFC r312291, r312669:
Make CTL frontends report kern_data_resid for under-/overruns.

It seems like kern_data_resid was never really implemented.  This change
finally does it.  Now frontends update this field while transferring data,
while CTL/backends getting it can more flexibly handle the result.
At this point behavior should not change significantly, still reporting
errors on write overrun, but that may be changed later, if we decide so.

CAM target frontend still does not properly handle overruns due to CAM API
limitations.  We may need to add some fields to struct ccb_accept_tio to
pass information about initiator requested transfer size(s).

7 years agoMFC r312343: Improve error message on duplicate iSCSI port.
mav [Tue, 7 Feb 2017 01:38:48 +0000 (01:38 +0000)]
MFC r312343: Improve error message on duplicate iSCSI port.

7 years agoMFC r309369,310850,310853:
tsoome [Mon, 6 Feb 2017 22:03:07 +0000 (22:03 +0000)]
MFC r309369,310850,310853:

libstand: dosfs cstyle cleanup for return keyword.
dosfs support in libstand is broken since r298230

PR: 214423
Submitted by: Mikhail Kupchik
Reported by: Mikhail Kupchik
Approved by: imp (mentor)

7 years agoMFC r310845: boot2 will deadlock if extended keys are used on text input
tsoome [Mon, 6 Feb 2017 20:57:17 +0000 (20:57 +0000)]
MFC r310845: boot2 will deadlock if extended keys are used on text input

Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D8608

7 years agoMFC r312982:
cy [Mon, 6 Feb 2017 13:32:22 +0000 (13:32 +0000)]
MFC r312982:

Correct comment grammar and make it easier to understand.

7 years agoMFC r312663: When creating record file, use umask 077 instead of the default.
delphij [Mon, 6 Feb 2017 05:29:35 +0000 (05:29 +0000)]
MFC r312663: When creating record file, use umask 077 instead of the default.

7 years agoMFC r312664: Always initialize 'c'.
delphij [Mon, 6 Feb 2017 05:22:55 +0000 (05:22 +0000)]
MFC r312664: Always initialize 'c'.

7 years agoMFC r303802:
bcr [Sun, 5 Feb 2017 22:18:45 +0000 (22:18 +0000)]
MFC r303802:
Update with the members of the 9th core team.

7 years agoMFC r308583:
bcr [Sun, 5 Feb 2017 21:56:36 +0000 (21:56 +0000)]
MFC r308583:
Fix a broken link to the USB audio class specs.

PR: 214240
Submitted by: Tobias Kortkamp t@tobik.me

7 years agoMFC r310096: reaper: Make REAPER_KILL_SUBTREE actually work.
jilles [Sun, 5 Feb 2017 20:55:01 +0000 (20:55 +0000)]
MFC r310096: reaper: Make REAPER_KILL_SUBTREE actually work.

7 years agoMFC r312721: skel: Remove reference to deleted part in previous commit
jilles [Sun, 5 Feb 2017 14:25:31 +0000 (14:25 +0000)]
MFC r312721: skel: Remove reference to deleted part in previous commit
to this file.

7 years agoMFC r312954:
kib [Sun, 5 Feb 2017 00:39:44 +0000 (00:39 +0000)]
MFC r312954:
Do not leave stale 4K TLB entries on pde (superpage) removal or
protection change.

7 years agoMFC r311585:
ngie [Sat, 4 Feb 2017 17:26:28 +0000 (17:26 +0000)]
MFC r311585:

Conditionalize building libwrap support into sshd

Only build libwrap support into sshd if MK_TCP_WRAPPERS != no

This will unbreak the build if libwrap has been removed from the system

PR: 210141

7 years agoMFC r311174:
ngie [Sat, 4 Feb 2017 17:21:17 +0000 (17:21 +0000)]
MFC r311174:

Make /usr/lib/libbsnmptools.so.0 into an INTERRNALLIB

Although it increases the size of the bsnmp{get,set,walk} binaries by
four on my [amd64] system, it removes the need for producing .debug
files, profiled libraries, and for installing the library itself,
reducing the overall size use on disk by the utilities noted
previously.

Plus, it guards against ABI/API compatibility issues with the library
as it's only used internal to the tools themselves.

7 years agoMFC r311394:
ngie [Sat, 4 Feb 2017 17:18:49 +0000 (17:18 +0000)]
MFC r311394:

op_usm_users: don't deref uusers if it's NULL when SETting the value

Add an XXX comment to note that the conditional seems suspect given
how it's handled elsewhere in the SNMP_OP_SET case.

CID: 1008573

7 years agoMFC r312332,r312446,r312451:
ngie [Sat, 4 Feb 2017 17:17:38 +0000 (17:17 +0000)]
MFC r312332,r312446,r312451:

r312332:

Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of
unnecessarily long relative path .PATH values with make

r312446 (by emaste):

libc: remove reference to nonexistent lib/locale directory

As far as I can tell this was introduced in r72406 and updated in several
subsequent revisions, but the lib/locale directory it referenced never
existed.

r312451:

Replace dot-dot relative pathing with SRCTOP-relative paths where possible

This reduces build output, need for recalculating paths, and makes it clearer
which paths are relative to what areas in the source tree. The change in
performance over a locally mounted UFS filesystem was negligible in my testing,
but this may more positively impact other filesystems like NFS.

LIBC_SRCTOP was left alone so Juniper (and other users) can continue to
manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as
include Makefiles with custom options.

Discussed with: marcel, sjg

7 years agoMFC r311744,r312328,r312329,r312330:
ngie [Sat, 4 Feb 2017 17:10:19 +0000 (17:10 +0000)]
MFC r311744,r312328,r312329,r312330:

r311744:

Document bsd.snmpmod.mk from a high-level

r312328:

Add a make target (smilint) for running smilint tool against BMIBS

Running smilint against MIB definitions is useful in finding
functional problems with MIB definitions/descriptions.

This is inspired by the smilint targets defined in
usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile

Document all of the variables that are involved in running the
smilint target, as well as all of the prerequisites to running
it.

r312329:

Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328

r312330:

Add smilint target to subdir targets so "make smilint" here will run
the smilint target in subdirs

While here, convert a path that's .CURDIR relative to SRCTOP

7 years agoMFC r310467:
ngie [Sat, 4 Feb 2017 17:08:21 +0000 (17:08 +0000)]
MFC r310467:

Provide some guidance when dealing with sections and variables contained
within them

For example, using variables designated for %usm requires uncommenting
%usm section header

7 years agoMFC r303841,r312012,r312213:
ngie [Sat, 4 Feb 2017 17:06:51 +0000 (17:06 +0000)]
MFC r303841,r312012,r312213:

r303841 (by bdrewery):

Revert r298434 which should be fixed by r301287, r301394, and r301403.

PR: 208703, 208963

r312012:

fmaxmin_test still fails with clang 3.9.x.. bypass the test

PR: 208703

r312213:

Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check
of the clang version

This works around breakage on ^/stable/10 when running installworld from
a ^/stable/10 host where the test wouldn't be compiled on the first
go-around and would be missing when make installworld is run.

PR: 208703

7 years agoMFC r312114:
ngie [Sat, 4 Feb 2017 17:02:54 +0000 (17:02 +0000)]
MFC r312114:

Enable WARNS?= 6 across all of tests/sys

7 years agoMFC r312120:
ngie [Sat, 4 Feb 2017 17:01:53 +0000 (17:01 +0000)]
MFC r312120:

Fix warnings

- Staticize test_num
- Promote i to size_t to deal with -Wsign-compare issues

Tested with: clang, gcc, gcc49

7 years agoMFC r312110:
ngie [Sat, 4 Feb 2017 16:58:06 +0000 (16:58 +0000)]
MFC r312110:

Fix -Wsign-compare warnings

The loop index (i) doesn't need to be size_t as its comparison is signed

7 years agoMFC r312164:
ngie [Sat, 4 Feb 2017 16:56:51 +0000 (16:56 +0000)]
MFC r312164:

Fix -Wformat issue

Use %zu for printing out results from nitems, as it's size_t based

7 years agoMFC r311473:
ngie [Sat, 4 Feb 2017 16:55:46 +0000 (16:55 +0000)]
MFC r311473:

Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard

This will allow the code to stand by itself without libwrap

7 years agoMFC r311471:
ngie [Sat, 4 Feb 2017 16:54:44 +0000 (16:54 +0000)]
MFC r311471:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into sendmail.

7 years agoMFC r311469:
ngie [Sat, 4 Feb 2017 16:52:48 +0000 (16:52 +0000)]
MFC r311469:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into ypserv.

7 years agoMFC r311972:
ngie [Sat, 4 Feb 2017 16:49:50 +0000 (16:49 +0000)]
MFC r311972:

Add __BIT and __BITS macros from NetBSD to help support new testcases

7 years agoMFC r311925,r311968,r311969,r312102,r312108:
ngie [Sat, 4 Feb 2017 16:47:56 +0000 (16:47 +0000)]
MFC r311925,r311968,r311969,r312102,r312108:

r311925:

Import testcase updates with code contributed back to NetBSD

This also (inadvertently) contains an update to
contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases).

In collaboration with: christos@NetBSD.org

r311968:

Fix lib/libc/sys/access_test after r311925

sys/param.h needs to be #included in order for __FreeBSD_version to be checked

r311969:

Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile

This is to enable support in other testcases

Inspired by lib/msun/tests/Makefile .

r312102:

Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD

r312108:

Delete trailing whitespace and use __arraycount instead of nitems in contrib code

7 years agoMFC r312119,r312216,r312226:
ngie [Sat, 4 Feb 2017 16:02:48 +0000 (16:02 +0000)]
MFC r312119,r312216,r312226:

r312119:

encode_long, encode_timeval: mechanically replace `exp` with `exponent`

This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test,
which include math.h, which in turn defines exp(3)

Tested with: clang, gcc 4.2.1, gcc 4.9

r312216:

Revert r312119 and reword the intent to fix -Wshadow issues
between exp(3) and `exp` var.

The approach taken previously was not ideal for multiple
functional and stylistic reasons.

Add to existing sed call in Makefile to replace `exp` with
`exponent` instead.

Requested by: bde

r312226:

Fix typo in r312216

I meant to replace "exp" with "exponent", not "expected"

Pointyhat to: ngie

7 years agoMFC r311472:
ngie [Sat, 4 Feb 2017 16:00:19 +0000 (16:00 +0000)]
MFC r311472:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into amd(8).

7 years agoMFC r311470:
ngie [Sat, 4 Feb 2017 15:56:24 +0000 (15:56 +0000)]
MFC r311470:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into rpcbind.

7 years agoFreeBSD 11.0 release date added.
sevan [Sat, 4 Feb 2017 15:53:34 +0000 (15:53 +0000)]
FreeBSD 11.0 release date added.

7 years agoAdd NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
sevan [Sat, 4 Feb 2017 15:52:49 +0000 (15:52 +0000)]
Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
Ammend the position of NetBSD 6.0.2 release in the tree as it came
after OpenBSD[1] & DragonFlyBSD[2] release according to the release
information.
The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from
NetBSD CVS copy) and confirmed with history page[3]

[1] http://www.openbsd.org/53.html
[2] https://www.dragonflybsd.org/releases/
[3] http://netbsd.org/releases/formal.html#history

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8099

7 years agoOpenBSD 6.0 added.
sevan [Sat, 4 Feb 2017 15:51:45 +0000 (15:51 +0000)]
OpenBSD 6.0 added.

7 years agoDragonFly 4.6.0 release added.
sevan [Sat, 4 Feb 2017 15:50:47 +0000 (15:50 +0000)]
DragonFly 4.6.0 release added.

7 years agoMFC r312105,r312162:
ngie [Sat, 4 Feb 2017 15:49:50 +0000 (15:49 +0000)]
MFC r312105,r312162:

r312105:

Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS

This will allow inetd to stand by itself without libwrap.

Relnotes: yes

r312162:

Fix up r312105

- Only #include tcpd.h when LIBWRAP is true to avoid header include errors
- Only define whichaf when LIBWRAP is true to avoid -Wunused warning and
  to avoid issues with structs being defined that should only be defined
  when tcpd.h is included.

Pointyhat to: ngie

7 years agoFix the previous commit to the family tree file. It is too early
sevan [Sat, 4 Feb 2017 15:48:53 +0000 (15:48 +0000)]
Fix the previous commit to the family tree file.  It is too early
to list 11.0, and we do not list -CURRENT here.

Submitted by: maxim
Sponsored by: The FreeBSD Foundation

7 years agoMFC r311263:
ngie [Sat, 4 Feb 2017 15:45:39 +0000 (15:45 +0000)]
MFC r311263:

Use calloc instead of malloc with buffers in snmp_{recv,send}_packet

This doesn't fix the issue noted in the PR, but at the very least it
cleans up the error so it looks a bit more sane, and in the event
that bsnmp did wander off into the weeds, the likelihood of it
crashing with more sensible output is greater, in my opinion

MFC counter set high so I have enough time to resolve the real
underlying bug in bsnmpwalk

PR: 215721

7 years agoMFC r312937:
ngie [Sat, 4 Feb 2017 15:43:54 +0000 (15:43 +0000)]
MFC r312937:

Fix typo in lib/Makefile

The SUBDIR_DEPEND variable should be for librpcsec_gss, not
liblibrpc_gss

PR: 216409

7 years agoBelatedly add FreeBSD 11.0 and 12.0 to the family tree file.
sevan [Sat, 4 Feb 2017 15:41:59 +0000 (15:41 +0000)]
Belatedly add FreeBSD 11.0 and 12.0 to the family tree file.

Submitted by: des (a while back)
Sponsored by: The FreeBSD Foundation

7 years agoMFC r312935:
ngie [Sat, 4 Feb 2017 15:41:44 +0000 (15:41 +0000)]
MFC r312935:

Remove duplicate bhnd SUBDIR entry

PR: 216413

7 years agoMFC r310124 (by andrew):
gonzo [Sat, 4 Feb 2017 01:24:21 +0000 (01:24 +0000)]
MFC r310124 (by andrew):

Add -fPIC to the ubldr build. Without this the self relocation code will
try to use an absolute address in a switch statement, jumping to an invalid
memory location.

Sponsored by: ABT Systems Ltd

PR: 216504

7 years agoMFC 312904: Don't drop a reference to the TOE PCB in undo_offload_socket().
jhb [Fri, 3 Feb 2017 23:48:56 +0000 (23:48 +0000)]
MFC 312904: Don't drop a reference to the TOE PCB in undo_offload_socket().

undo_offload_socket() is only called by t4_connect() during a connection
setup failure, but t4_connect() still owns the TOE PCB and frees ita
after undo_offload_socket() returns.  Release a reference in
undo_offload_socket() resulted in a double-free which panicked when
t4_connect() performed the second free.  The reference release was
added to undo_offload_socket() incorrectly in r299210.

Sponsored by: Chelsio Communications

7 years agoMFC 312906:
jhb [Fri, 3 Feb 2017 23:33:06 +0000 (23:33 +0000)]
MFC 312906:
Unregister CPL handlers for TOE-related messages when unloading TOM.

Sponsored by: Chelsio Communications

7 years agoMFC 313020: Fix a couple of issues with t4iov probe and attach.
jhb [Fri, 3 Feb 2017 21:37:27 +0000 (21:37 +0000)]
MFC 313020: Fix a couple of issues with t4iov probe and attach.

- Check for Chelsio vendor ID in probe routines.
- Fail attach instead of faulting if pci_find_dbsf() doesn't find a
  device.

PR: 216539
Sponsored by: Chelsio Communications

7 years agoMFC r312993:
dim [Fri, 3 Feb 2017 19:15:53 +0000 (19:15 +0000)]
MFC r312993:

Pull in r279454 from upstream llvm trunk (by James Molloy):

  [SROA] Remove incorrect assertion

  Confirmed with aprantl, this assertion is incorrect - code can get
  here (for example 80-bit FP types) and if it does it's benign. This
  is exposed by a completely unrelated patch of mine, so stop the
  compiler falling over.

  Original differential: http://reviews.llvm.org/D16187
  aprantl's advice to remove assertion:
  http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html

This should fix assertions when building the math/opensolaris-libm port.

Reported by: marino

7 years agoMFC r312832:
dim [Fri, 3 Feb 2017 19:12:54 +0000 (19:12 +0000)]
MFC r312832:

Pull in r278160 from upstream llvm trunk (by Wei Mi):

  Recommit "Use ValueOffsetPair to enhance value reuse during SCEV
  expansion".

  The fix for PR28705 will be committed consecutively.

  In D12090, the ExprValueMap was added to reuse existing value during
  SCEV expansion. However, const folding and sext/zext distribution can
  make the reuse still difficult.

  A simplified case is: suppose we know S1 expands to V1 in
  ExprValueMap, and
    S1 = S2 + C_a
    S3 = S2 + C_b
  where C_a and C_b are different SCEVConstants. Then we'd like to
  expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is
  helpful when S2 is a complex SCEV expr and S2 has no entry in
  ExprValueMap, which is usually caused by the fact that S3 is
  generated from S1 after const folding.

  In order to do that, we represent ExprValueMap as a mapping from SCEV
  to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a}
  into the ExprValueMap when we create SCEV for V1. When S3 is
  expanded, it will first expand S2 to V1 - C_a because of S2->{V1,
  C_a} in the map, then expand S3 to V1 - C_a + C_b.

  Differential Revision: https://reviews.llvm.org/D21313

Pull in r278161 from upstream llvm trunk (by Wei Mi):

  Fix the runtime error caused by "Use ValueOffsetPair to enhance value
  reuse during SCEV expansion".

  The patch is to fix the bug in PR28705. It was caused by setting
  wrong return value for SCEVExpander::findExistingExpansion. The
  return values of findExistingExpansion have different meanings when
  the function is used in different ways so it is easy to make mistake.
  The fix creates two new interfaces to replace
  SCEVExpander::findExistingExpansion, and specifies where each
  interface is expected to be used.

  Differential Revision: https://reviews.llvm.org/D22942

Pull in r281439 from upstream llvm trunk (by Wei Mi):

  Create a getelementptr instead of sub expr for ValueOffsetPair if the
  value is a pointer.

  This patch is to fix PR30213. When expanding an expr based on
  ValueOffsetPair, if the value is of pointer type, we can only create
  a getelementptr instead of sub expr.

  Differential Revision: https://reviews.llvm.org/D24088

This should fix assertion failures when building OpenCV >= 3.1, and also
allow building lang/spidermonkey24 without any further assertions.

PR: 215649

7 years agoAdd history section for dd(1)
sevan [Fri, 3 Feb 2017 16:57:14 +0000 (16:57 +0000)]
Add history section for dd(1)
First version of UNIX to include dd found using TUHS
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c

PR: 211777
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMFC r312001:
pfg [Fri, 3 Feb 2017 16:35:10 +0000 (16:35 +0000)]
MFC r312001:
Remove __nonnull() attributes from x86 machine check architecture.

In this case the attributes serve little purpose as they just don't
enforce run time checks, If anything the attributes would cause NULL pointer
checks to be ignored but there are no such checks so the only effect is
cosmetic.

Reviewed by: jhb, avg

7 years agoRevert previous merge as it contained incorrect commit message.
sevan [Fri, 3 Feb 2017 12:47:24 +0000 (12:47 +0000)]
Revert previous merge as it contained incorrect commit message.

7 years agoMFC r312555:
kib [Fri, 3 Feb 2017 12:03:10 +0000 (12:03 +0000)]
MFC r312555:
Use SFENCE for ordering CLFLUSHOPT.

7 years agoIn v3 UNIX, the kill utility is documented in category 8, not 1.
sevan [Fri, 3 Feb 2017 11:17:44 +0000 (11:17 +0000)]
In v3 UNIX, the kill utility is documented in category 8, not 1.
Add a note of it.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8

PR: 211786
Approved by: bcr (mentor)
Obtained from: TUHS
Differential Revision: https://reviews.freebsd.org/D8105

7 years agoFix the previous commit to the family tree file. It is too early
sevan [Fri, 3 Feb 2017 11:04:50 +0000 (11:04 +0000)]
Fix the previous commit to the family tree file.  It is too early
to list 11.0, and we do not list -CURRENT here.

Submitted by: maxim
Sponsored by: The FreeBSD Foundation

7 years agoMFC r310724:
markj [Fri, 3 Feb 2017 01:32:04 +0000 (01:32 +0000)]
MFC r310724:
Follow DW_AT_specification when looking up DW_AT_type attributes.

PR: 215350, 215395

7 years agoMFC r308773:
markj [Fri, 3 Feb 2017 01:30:51 +0000 (01:30 +0000)]
MFC r308773:
Define dependencies for some auto-generated source files in libdtrace.

7 years agoMFC r307400, r307401:
markj [Fri, 3 Feb 2017 01:28:57 +0000 (01:28 +0000)]
MFC r307400, r307401:
DTrace test fixes.

7 years agoMFC r305055:
markj [Fri, 3 Feb 2017 01:23:39 +0000 (01:23 +0000)]
MFC r305055:
Recursively enumerate anonymous structs and unions in ctf_member_info().

7 years agoMFC r302793:
markj [Fri, 3 Feb 2017 01:21:56 +0000 (01:21 +0000)]
MFC r302793:
Allow ACPI wakeup code and page tables to be stored in non-contiguous pages.

7 years agoMFC r307693:
markj [Fri, 3 Feb 2017 01:19:48 +0000 (01:19 +0000)]
MFC r307693:
Simplify keg_drain() a bit by using LIST_FOREACH_SAFE.

7 years agoMFC r309698, r309699, r309700:
markj [Fri, 3 Feb 2017 01:18:47 +0000 (01:18 +0000)]
MFC r309698, r309699, r309700:
DTrace test fixes.

7 years agoMFC r309200:
markj [Fri, 3 Feb 2017 01:16:54 +0000 (01:16 +0000)]
MFC r309200:
Launder VPO_NOSYNC pages upon vnode deactivation.

7 years agoMFC r310420, r310421, r310422:
markj [Fri, 3 Feb 2017 01:15:31 +0000 (01:15 +0000)]
MFC r310420, r310421, r310422:
Fix races and logic errors around dlclose().

7 years agoMFC r310316:
markj [Fri, 3 Feb 2017 01:10:38 +0000 (01:10 +0000)]
MFC r310316:
Consistently print D variable indices in decimal when disassembling.

7 years agoMFC r312209:
markj [Fri, 3 Feb 2017 01:04:22 +0000 (01:04 +0000)]
MFC r312209:
Suppress a warning about m_assertbuf being unused.

7 years agoMFC r311902:
markj [Fri, 3 Feb 2017 00:58:08 +0000 (00:58 +0000)]
MFC r311902:
Coalesce TLB shootdowns of global PTEs in pmap_advise() on x86.

7 years agoMFC r312893:
markj [Fri, 3 Feb 2017 00:55:31 +0000 (00:55 +0000)]
MFC r312893:
Fix an off-by-one in an assertion on fasttrap tracepoint sizes.

7 years agoMFC r312199:
markj [Fri, 3 Feb 2017 00:54:27 +0000 (00:54 +0000)]
MFC r312199:
Stop the scheduler upon panic even in non-SMP kernels.

7 years agoMFC r312307:
markj [Fri, 3 Feb 2017 00:53:33 +0000 (00:53 +0000)]
MFC r312307:
Improve some of the sysctl descriptions added in r299827.

7 years agoMFC r310332:
markj [Fri, 3 Feb 2017 00:50:41 +0000 (00:50 +0000)]
MFC r310332:
Avoid modifying the object string table when patching USDT probes.

7 years agoMFC r310180, r310327
asomers [Thu, 2 Feb 2017 21:05:55 +0000 (21:05 +0000)]
MFC r310180, r310327

r310180:
Fix panic during lagg destruction with simultaneous status check

If you run "ifconfig lagg0 destroy" and "ifconfig lagg0" at the same time a
page fault may result. The first process will destroy ifp->if_lagg in
lagg_clone_destroy (called by if_clone_destroy). Then the second process
will observe that ifp->if_lagg is NULL at the top of lagg_port_ioctl and
goto fallback: where it will promptly dereference ifp->if_lagg anyway.

The solution is to repeat the NULL check for ifp->if_lagg

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8512

r310327:
Remove stray debugging code from r310180

Reported by: rstone
Pointy hat to: asomers
MFC after: 3 weeks
X-MFC-with: 310180
Sponsored by: Spectra Logic Corp

7 years agoMFC r311160, r311210, r311288, r311292, r311298, r311340
asomers [Thu, 2 Feb 2017 18:27:20 +0000 (18:27 +0000)]
MFC r311160, r311210, r311288, r311292, r311298, r311340

r311160:
misc minor fixes in mpr(4)

sys/dev/mpr/mpr_sas.c
* Fix a potential null pointer dereference (CID 1305731)
* Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID
  1211934)

sys/dev/mpr/mpr_sas_lsi.c
* Nullify a dangling pointer in mprsas_get_sata_identify
* Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935)

Reported by: Coverity (partially)
CID: 1305731 1211934 1211935
Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8880

r311210:
Quell Coverity for diskinfo(8)

* CID 1198994: Don't run the speed disk on a disk with no sectors
* CID 1011442: Don't call close(2) if open(2) fails
* CID 1011161: Use snprintf instead of sprintf
* CID 1009825: Check the return value of lseek

Reported by: Coverity
CID: 1198994 1011442 1011161 1009825
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311288:
Delete dead code in chat(8)

It's always been dead, ever since first import in 1994.  It's still dead in
OpenBSD's version, too.

Reported by: Coverity
CID: 270586
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311292:
Remove dead code in rpc_parse.c

It's been dead ever since it was imported from TI-RPC in 1995.  The dead
code is still present in Illumos today, but was removed from NetBSD in 2006.

Reported by: Coverity
CID: 270097
Obtained from: NetBSD
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311298:
Remove dead code in dhclient(8)

The offending code has been dead ever since the import from OpenBSD in
r195805.  OpenBSD later deleted that entire function.

Reported by: Coverity
CID: 500059
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311340:
Misc Coverity fixes for tail(1)

CID 1006402: Initialize stack variable
CID 271580: Don't leak memory when ENOMEM.

Reported by: Coverity
CID: 271580 1006402
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

7 years agoMFC r312649:
kib [Thu, 2 Feb 2017 01:21:55 +0000 (01:21 +0000)]
MFC r312649:
Document mount option "nonc" for tmpfs.

7 years agoMFC r312432:
kib [Thu, 2 Feb 2017 01:18:54 +0000 (01:18 +0000)]
MFC r312432:
Add a mount option for tmpfs(5) to not use namecache.

7 years agoMFC r312430:
kib [Thu, 2 Feb 2017 01:17:04 +0000 (01:17 +0000)]
MFC r312430:
Implement VOP_VPTOCNP() for tmpfs.

7 years agoMFC r312429:
kib [Thu, 2 Feb 2017 01:14:44 +0000 (01:14 +0000)]
MFC r312429:
VNON nodes cannot exist.