Commit Graph

219304 Commits

Author SHA1 Message Date
Enji Cooper
02820e5e4e Bump WARNS up to 6 again
Has not been tested (can't be after r312103 without cem's hacks
to atf/kyua)!
2017-01-14 04:00:26 +00:00
Enji Cooper
36b9e15c66 Delete trailing whitespace and use __arraycount instead of nitems in contrib code
MFC after:	1 week
2017-01-14 03:54:23 +00:00
Conrad Meyer
5c9ce2504a Follow-up to r312103:
Revert r310995 as well.
2017-01-14 02:29:25 +00:00
Enji Cooper
63eca8f1dd Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS
This will allow inetd to stand by itself without libwrap.

MFC after:	2 weeks
Relnotes:	yes
Reviewed by:	hrs (earlier version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D9056
2017-01-14 01:37:03 +00:00
Conrad Meyer
4a6ace7328 Fix broken fstyp exfat testcase
Introduced in r312010.

It helps to read the documentation before trying to test something.
2017-01-14 01:08:04 +00:00
Conrad Meyer
47f2efe4fb Revert r310994
Don't implement some terrible hack on a test by test basis.  The
framework fix is straightforward and can be chased up in the original
bug.

Reviewed by:	ngie ("be my guest")
2017-01-14 01:03:20 +00:00
Enji Cooper
a5deb9babb Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD
MFC after:	12 days
X-MFC with:	r305358
Sponsored by:	Dell EMC Isilon
2017-01-14 01:01:02 +00:00
Gleb Smirnoff
4fce19da8d Remove deprecated fgetsock() and fputsock(). 2017-01-13 22:16:41 +00:00
John Baldwin
e2c14d90df Trim a few comments on platforms that did not implement mmap of /dev/kmem.
After r307332, no platforms implement mmap for /dev/kmem, so the lack of
it for these platforms is no longer unique.
2017-01-13 21:52:53 +00:00
Warren Block
b44047f3df Update the shm_open.2 man page to reflect objective reality.
PR:		215612
Submitted by:	rwatson
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9066
2017-01-13 19:41:02 +00:00
Gleb Smirnoff
f8f24e9ec2 Use getsock_cap() instead of deprecated fgetsock().
Reviewed by:	Daniel Braniss <danny cs.huji.ac.il>
2017-01-13 18:36:46 +00:00
Ian Lepore
d5b937680c Correct the comments about how much buffer is allocated. 2017-01-13 17:03:23 +00:00
Gleb Smirnoff
0f7ddf91e9 Use getsock_cap() instead of deprecated fgetsock().
Reviewed by:	tuexen
2017-01-13 16:54:44 +00:00
Conrad Meyer
b632b00087 fstyp.8: Move initial exFAT blurb to the -u section
Didn't notice the second list in r312003.

Reported by:	trasz@
2017-01-13 16:46:01 +00:00
Ian Lepore
a6f63533a7 Check tty_gone() after allocating IO buffers. The tty lock has to be
dropped then reacquired due to using M_WAITOK, which opens a window in
which the tty device can disappear.  Check for this and return ENXIO
back up the call chain so that callers can cope.

This closes a race where TF_GONE would get set while buffers were being
allocated as part of ttydev_open(), causing a subsequent call to
ttydevsw_modem() later in ttydev_open() to assert.

Reported by:	pho
Reviewed by:	kib
2017-01-13 16:37:38 +00:00
Ed Maste
2f21ec0129 libgcc_s: add libc DT_NEEDED to fix underlinking
PR:		216012
Reported by:	jbeich
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2017-01-13 15:17:25 +00:00
Michael Tuexen
24209f0122 Ensure that the buffer length and the length provided in the IPv4
header match when using a raw socket to send IPv4 packets and
providing the header. If they don't match, let send return -1
and set errno to EINVAL.

Before this patch is was only enforced that the length in the header
is not larger then the buffer length.

PR:			212283
Reviewed by:		ae, gnn
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D9161
2017-01-13 10:55:26 +00:00
Alexander Motin
4902e14dc8 Improve CAM_CDB_POINTER support.
MFC after:	2 weeks
2017-01-13 08:31:55 +00:00
Hiroki Sato
373eea194d Purge varargs.h in favor of stdarg.h. 2017-01-13 08:01:27 +00:00
Adrian Chadd
da6ee937ae [net80211] add a macro to check this configuration option. 2017-01-13 07:24:58 +00:00
Adrian Chadd
321eb9ffbe [net80211] begin laying the groundwork for drivers to do their own sequence number management.
I added IEEE80211_TX_LOCK() a few years ago because there were races between
seqno allocation, driver queuing and crypto IV allocation.  This meant that
they'd appear out of sequence and the receiver would drop them, leading to
terrible performance or flat out traffic hangs.

This flag should be set by drivers that do their own sequence number
allocation for all frames it needs to happen for, including beacon frames.

Eventually this should lead to the driver taking care of locking for
allocating seqno and other traffic-triggered events (eg addba setup.)
2017-01-13 07:08:14 +00:00
Adrian Chadd
51172f62a7 [net80211] Initial VHT node upgrade/downgrade support and initial IE parsing.
This is the bulk of the magic to start enabling VHT channel negotiation.
It is absolutely, positively not yet even a complete VHT wave-1 implementation.

* parse IEs in scan, assoc req/resp, probe req/resp;
* break apart the channel upgrade from the HT IE parsing - do it after the
  VHT IEs are parsed;
* (dirty! sigh) add channel width decision making in ieee80211_ht.c htinfo_update_chw().
  This is the main bit where negotiated channel promotion through IEs occur.
* Shoehorn in VHT node init ,teardown, rate control, etc calls like the HT
  versions;
* Do VHT channel adjustment where appropriate

Tested:

* monitor mode, ath10k port
* STA mode, ath10k port - VHT20, VHT40, VHT80 modes

TODO:

* IBSS;
* hostap;
* (ignore mesh, wds for now);
* finish 11n state engine - channel width change, opmode notifications, SMPS, etc;
* VHT basic rate negotiation and acceptance criteria when scanning, associating, etc;
* VHT control/management frame handling (group managment and operating mode being
  the two big ones);
* Verify TX/RX VHT rate negotiation is actually working correctly.

Whilst here, add some comments about seqno allocation and locking.  To achieve
the full VHT rates I need to push seqno allocation into the drivers and
finally remove the IEEE80211_TX_LOCK() I added years ago to fix issues. :/
2017-01-13 07:02:04 +00:00
Adrian Chadd
67f4aa3878 [net80211] initial, somewhat incomplete VHT channel setup code and attach path.
This sets up:

* vht capabilities in vaps;
* calls vht_announce to announce VHT capabilities if any;
* sets up vht20, vht40 and vht80 channels, assuming the regulatory code
  does the right thing with 80MHz available ranges;
* adds support to the ieee80211_add_channel_list_5ghz() code to populate
  VHT channels, as this is the API my ath10k driver is using;
* add support for the freq1/freq2 field population and lookup that
  VHT channels require.

The VHT80 code assumes that the regulatory domain already has limited VHT80
bands to, well, 80MHz wide chunks.
2017-01-13 06:53:56 +00:00
Hiroki Sato
1296e1b0b7 - Add static for functions and variables with internal linkage.
- Quiet down -Wcast-align warnings.
- Remove dead code.

There is no functionality change.
2017-01-13 06:22:49 +00:00
Enji Cooper
ee5d5813c0 fmaxmin_test still fails with clang 3.9.x.. bypass the test
MFC after:	3 days
PR:		208703
Sponsored by:	Dell EMC Isilon
2017-01-13 04:21:09 +00:00
Enji Cooper
ef7ff3e308 Use dfr-01-xfat.img.bz2, not dfr-01-xfat.dd.bz2 (the latter
case was the full disk image from the website, which was never
checked in to svn)

Regardless, the testcase still fails

PR:		214908
Sponsored by:	Dell EMC Isilon
2017-01-13 04:04:48 +00:00
Enji Cooper
6f81c4d9bb Add testcase for exFAT that currently fails
Disk image obtained from:
http://www.cfreds.nist.gov/dfr-images/dfr-01-xfat.dd.bz2 -- was ripped off the
first GPT partition and verified to be a FAT-like partition with file(1)/hexdump.

This testcase currently fails

PR:		214908
Sponsored by:	Dell EMC Isilon
2017-01-13 04:02:09 +00:00
Enji Cooper
cebf8a2ca7 Add license preamble for r286964; credit to asomers
While here, clean up trailing whitespace

MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-01-13 03:42:51 +00:00
Enji Cooper
cdebaff820 Upgrade NetBSD tests to 01.11.2017_23.20 snapshot
This contains some new testcases in /usr/tests/...:

- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern

Tested on:	amd64, i386
MFC after:	1 month
2017-01-13 03:33:57 +00:00
Conrad Meyer
e266075649 fstyp(8): Detect exFAT filesystems
Simply detect the exFAT filesystem name in the Volume Boot Record
(superblock).

PR:		214908
Reported by:	<vermaden at interia.pl>
2017-01-13 02:12:58 +00:00
Kevin Lo
68c3c0258d Increase retry count to 100 in r88e_fw_cmd() and r92c_fw_cmd(). 2017-01-13 02:11:16 +00:00
Pedro F. Giffuni
be04edbb4f Remove __nonnull() attributes from x86 machine check architecture.
These are of the few cases where we use the GCC non-null attributes in
non-header code. As part of a review [1] of our use of such attributes we
are replacing such uses of the overly aggressive GCC attribute with clang's
_Nonnull attribute.

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 only effect is
cosmetic.

The references appear to be left over from code development and likely
already fulfilled their purpose.

Reference [1]:
https://reviews.freebsd.org/D9004

Reviewed by:	jhb
MFC after:	3 weeks
2017-01-13 01:39:19 +00:00
Ian Lepore
e046e8e680 Restructure the tty_drain loop so that device-busy is checked one more time
after tty_timedwait() returns an error only if the error is EWOULDBLOCK;
other errors cause an immediate return.  This fixes the case of the tty
disappearing while in tty_drain().

Reported by:	pho
2017-01-12 21:18:43 +00:00
Gleb Smirnoff
4f56243aad Fix the contiguity once more. 2017-01-12 20:26:02 +00:00
Hiroki Sato
c10340d440 - Fix dereference of NULL pointer which could cause a crash [1]
- Fix memory leak due to lack of freeaddrinfo() [2]

CID:	1018281 [1]
CID:	1225057 [2]
MFC after:	3 days
2017-01-12 18:44:58 +00:00
Alexander Kabaev
eae0fba453 Fix typo in r311971.
Reported by:	ohartmann at walstatt.org
2017-01-12 18:05:12 +00:00
Sean Bruno
245c5ebbce Purge surprise change to sys/conf/files for ixgbe(4).
Reported by:	imp
2017-01-12 17:18:25 +00:00
Conrad Meyer
484820d442 libkern: Remove obsolete 'register' keyword
Sponsored by:	Dell EMC Isilon
2017-01-12 17:02:29 +00:00
Sean Bruno
9acdec7132 Purge EM_MULTIQUEUE references from the man page for em(4). 2017-01-12 16:44:40 +00:00
Bruce M Simpson
fb1d9b7f41 Allow uart(4) to use MSI interrupts on single-port PCI instances.
Do this here as puc(4) disallows single-port instances; at least
one multi-port PCIe UART chip (in this case, the ASIX MCS9922)
present separate PCI configuration space (functions) for each UART.

Tested using lrzsz and a null-modem cable. The ExpressCard/34
variants containing the MCS9922 should also use MSI with this change.

Reviewed by:		jhb, imp, rpokala
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D9123
2017-01-12 16:30:27 +00:00
Sean Bruno
25a3341048 Fix panic on mb_free_ext() due to NULL destructor.
This used to happen because of the SET_MBUF_DESTRUCTOR() called
on unregif.

Submitted by:	Vincenzo Maffione <v.maffione@gmail.com>
2017-01-12 16:24:10 +00:00
Alan Somers
c6e3715fbc Fix uninitialized variable CIDs in route6d
The variables in question are actually return arguments, but it's still good
form to initialize them.

Reported by:	Coverity
CID:		979679 979680
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
2017-01-12 16:22:28 +00:00
Konstantin Belousov
f8adf1a784 For the main binary, postpone enforcing relro read-only protection
until copy relocations are done.

Newer binutils and lld seems to output copy into relro-protected range.

Reported by: Rafael Espц╜ndola via emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-12 15:54:03 +00:00
Andrew Rybchenko
a0e88689f0 sfxge(4): add sysctl to change MAC stats update period
The sysctl controls the period per interface.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9153
2017-01-12 15:26:23 +00:00
Sean Bruno
653e35e69f Restore fixup for newer em(4) devices WOL capabilities post iflib integration.
PR:	208343
2017-01-12 14:47:44 +00:00
Pedro F. Giffuni
f5ab496e62 rpcgen(1): Check getrlimit() return for generated code.
Obtained from:	NetBSD (CVS rev 1.27, 1.28)
MFC after:	1 week
2017-01-12 14:44:41 +00:00
Sean Bruno
062a4b8c68 Deprecate kernel configuration option EM_MULTIQUEUE now that the em(4)
driver conforms to iflib.
2017-01-12 14:38:18 +00:00
Sean Bruno
0aa7d3ff9e Reset the EIAC register to include the LINK status bit and restore
link up/down notifications.

Submitted by:	Franco Fichtner <franco@opnsense.org>
2017-01-12 14:28:32 +00:00
Sean Bruno
8bc3dfc424 Attempt to use the "new" BAR address for newer igb(4) devices. This code
was dropped during the IFLIB migration.

Reported by:	olivier
Reviewed by:	mmacy@nextbsd.org
2017-01-12 14:18:52 +00:00
Andrew Rybchenko
58223d5b7a sfxge(4): add tunable to configure MAC stats update period
Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9151
2017-01-12 13:00:17 +00:00