ngie [Sat, 14 Jan 2017 01:01:02 +0000 (01:01 +0000)]
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
glebius [Fri, 13 Jan 2017 22:16:41 +0000 (22:16 +0000)]
Remove deprecated fgetsock() and fputsock().
jhb [Fri, 13 Jan 2017 21:52:53 +0000 (21:52 +0000)]
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.
wblock [Fri, 13 Jan 2017 19:41:02 +0000 (19:41 +0000)]
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
glebius [Fri, 13 Jan 2017 18:36:46 +0000 (18:36 +0000)]
Use getsock_cap() instead of deprecated fgetsock().
Reviewed by: Daniel Braniss <danny cs.huji.ac.il>
ian [Fri, 13 Jan 2017 17:03:23 +0000 (17:03 +0000)]
Correct the comments about how much buffer is allocated.
glebius [Fri, 13 Jan 2017 16:54:44 +0000 (16:54 +0000)]
Use getsock_cap() instead of deprecated fgetsock().
Reviewed by: tuexen
cem [Fri, 13 Jan 2017 16:46:01 +0000 (16:46 +0000)]
fstyp.8: Move initial exFAT blurb to the -u section
Didn't notice the second list in r312003.
Reported by: trasz@
ian [Fri, 13 Jan 2017 16:37:38 +0000 (16:37 +0000)]
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
emaste [Fri, 13 Jan 2017 15:17:25 +0000 (15:17 +0000)]
libgcc_s: add libc DT_NEEDED to fix underlinking
PR: 216012
Reported by: jbeich
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
tuexen [Fri, 13 Jan 2017 10:55:26 +0000 (10:55 +0000)]
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
mav [Fri, 13 Jan 2017 08:31:55 +0000 (08:31 +0000)]
Improve CAM_CDB_POINTER support.
MFC after: 2 weeks
hrs [Fri, 13 Jan 2017 08:01:27 +0000 (08:01 +0000)]
Purge varargs.h in favor of stdarg.h.
adrian [Fri, 13 Jan 2017 07:24:58 +0000 (07:24 +0000)]
[net80211] add a macro to check this configuration option.
adrian [Fri, 13 Jan 2017 07:08:14 +0000 (07:08 +0000)]
[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.)
adrian [Fri, 13 Jan 2017 07:02:04 +0000 (07:02 +0000)]
[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. :/
adrian [Fri, 13 Jan 2017 06:53:56 +0000 (06:53 +0000)]
[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.
hrs [Fri, 13 Jan 2017 06:22:49 +0000 (06:22 +0000)]
- Add static for functions and variables with internal linkage.
- Quiet down -Wcast-align warnings.
- Remove dead code.
There is no functionality change.
ngie [Fri, 13 Jan 2017 04:21:09 +0000 (04:21 +0000)]
fmaxmin_test still fails with clang 3.9.x.. bypass the test
MFC after: 3 days
PR: 208703
Sponsored by: Dell EMC Isilon
ngie [Fri, 13 Jan 2017 04:04:48 +0000 (04:04 +0000)]
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
ngie [Fri, 13 Jan 2017 04:02:09 +0000 (04:02 +0000)]
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
ngie [Fri, 13 Jan 2017 03:42:51 +0000 (03:42 +0000)]
Add license preamble for r286964; credit to asomers
While here, clean up trailing whitespace
MFC after: 3 days
Sponsored by: Dell EMC Isilon
ngie [Fri, 13 Jan 2017 03:33:57 +0000 (03:33 +0000)]
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
cem [Fri, 13 Jan 2017 02:12:58 +0000 (02:12 +0000)]
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>
kevlo [Fri, 13 Jan 2017 02:11:16 +0000 (02:11 +0000)]
Increase retry count to 100 in r88e_fw_cmd() and r92c_fw_cmd().
pfg [Fri, 13 Jan 2017 01:39:19 +0000 (01:39 +0000)]
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
ian [Thu, 12 Jan 2017 21:18:43 +0000 (21:18 +0000)]
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
glebius [Thu, 12 Jan 2017 20:26:02 +0000 (20:26 +0000)]
Fix the contiguity once more.
hrs [Thu, 12 Jan 2017 18:44:58 +0000 (18:44 +0000)]
- 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
kan [Thu, 12 Jan 2017 18:05:12 +0000 (18:05 +0000)]
Fix typo in r311971.
Reported by: ohartmann at walstatt.org
sbruno [Thu, 12 Jan 2017 17:18:25 +0000 (17:18 +0000)]
Purge surprise change to sys/conf/files for ixgbe(4).
Reported by: imp
cem [Thu, 12 Jan 2017 17:02:29 +0000 (17:02 +0000)]
libkern: Remove obsolete 'register' keyword
Sponsored by: Dell EMC Isilon
sbruno [Thu, 12 Jan 2017 16:44:40 +0000 (16:44 +0000)]
Purge EM_MULTIQUEUE references from the man page for em(4).
bms [Thu, 12 Jan 2017 16:30:27 +0000 (16:30 +0000)]
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
sbruno [Thu, 12 Jan 2017 16:24:10 +0000 (16:24 +0000)]
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>
asomers [Thu, 12 Jan 2017 16:22:28 +0000 (16:22 +0000)]
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
kib [Thu, 12 Jan 2017 15:54:03 +0000 (15:54 +0000)]
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
arybchik [Thu, 12 Jan 2017 15:26:23 +0000 (15:26 +0000)]
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
sbruno [Thu, 12 Jan 2017 14:47:44 +0000 (14:47 +0000)]
Restore fixup for newer em(4) devices WOL capabilities post iflib integration.
PR: 208343
pfg [Thu, 12 Jan 2017 14:44:41 +0000 (14:44 +0000)]
rpcgen(1): Check getrlimit() return for generated code.
Obtained from: NetBSD (CVS rev 1.27, 1.28)
MFC after: 1 week
sbruno [Thu, 12 Jan 2017 14:38:18 +0000 (14:38 +0000)]
Deprecate kernel configuration option EM_MULTIQUEUE now that the em(4)
driver conforms to iflib.
sbruno [Thu, 12 Jan 2017 14:28:32 +0000 (14:28 +0000)]
Reset the EIAC register to include the LINK status bit and restore
link up/down notifications.
Submitted by: Franco Fichtner <franco@opnsense.org>
sbruno [Thu, 12 Jan 2017 14:18:52 +0000 (14:18 +0000)]
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
arybchik [Thu, 12 Jan 2017 13:00:17 +0000 (13:00 +0000)]
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
sobomax [Thu, 12 Jan 2017 10:14:54 +0000 (10:14 +0000)]
Fix slight type mismatch between so_options defined in sys/socketvar.h
and tw_so_options defined here which is supposed to be a copy of the
former (short vs u_short respectively).
Switch tw_so_options to be "signed short" to match the type of the field
it's inherited from.
ngie [Thu, 12 Jan 2017 09:01:14 +0000 (09:01 +0000)]
Add __BIT and __BITS macros from NetBSD to help support new testcases
MFC after: 1 week
mav [Thu, 12 Jan 2017 08:53:10 +0000 (08:53 +0000)]
Report random flash storage as non-rotating to GEOM_DISK.
While doing it, introduce respective constants in geom_disk.h.
MFC after: 1 week
ngie [Thu, 12 Jan 2017 08:46:19 +0000 (08:46 +0000)]
Add additional testcases missed in r311966
ngie [Thu, 12 Jan 2017 08:40:52 +0000 (08:40 +0000)]
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 .
MFC after: 1 week
ngie [Thu, 12 Jan 2017 08:31:42 +0000 (08:31 +0000)]
Fix lib/libc/sys/access_test after r311925
sys/param.h needs to be #included in order for __FreeBSD_version to be checked
MFC after: 13 days
ngie [Thu, 12 Jan 2017 07:26:39 +0000 (07:26 +0000)]
Sync ^/vendor/NetBSD/tests/dist with upstream
ngie [Thu, 12 Jan 2017 07:21:56 +0000 (07:21 +0000)]
Commit updates accepted upstream (NetBSD)
cem [Thu, 12 Jan 2017 06:58:31 +0000 (06:58 +0000)]
g_raid: Prevent tasters from attempting excessively large reads
Some g_raid tasters attempt metadata reads in multiples of the provider
sectorsize. Reads larger than MAXPHYS are invalid, so detect and abort
in such situations.
Spiritually similar to r217305 / PR 147851.
PR: 214721
Sponsored by: Dell EMC Isilon
rpokala [Thu, 12 Jan 2017 06:38:03 +0000 (06:38 +0000)]
Remove writability requirement for single-mbuf, contiguous-range
m_pulldown()
m_pulldown() only needs to determine if a mbuf is writable if it is going to
copy data into the data region of an existing mbuf. It does this to create a
contiguous data region in a single mbuf from multiple mbufs in the chain. If
the requested memory region is already contiguous and nothing needs to
change, the mbuf does not need to be writeable.
Submitted by: Brian Mueller <bmueller@panasas.com>
Reviewed by: bz
MFC after: 1 week
Sponsored by: Panasas
Differential Revision: https://reviews.freebsd.org/D9053
arybchik [Thu, 12 Jan 2017 06:30:44 +0000 (06:30 +0000)]
sfxge(4): stats refresh in SW should depend on HW update period
The period should be taken into account by the function which
refreshes driver stats.
Reviewed by: philip
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D9130
arybchik [Thu, 12 Jan 2017 06:29:14 +0000 (06:29 +0000)]
sfxge(4): do not ignore requested MAC stats update period
Firmware version which takes PERIOD_MS parameter into account is
required.
Reviewed by: philip
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D9129
scottl [Thu, 12 Jan 2017 01:13:05 +0000 (01:13 +0000)]
Print out the number of queues/MSIx vectors.
Sponsored by: Netflix
ian [Thu, 12 Jan 2017 00:48:06 +0000 (00:48 +0000)]
Rework tty_drain() to poll the hardware for completion, and restore
drain timeout handling to historical freebsd behavior.
The primary reason for these changes is the need to have tty_drain() call
ttydevsw_busy() at some reasonable sub-second rate, to poll hardware that
doesn't signal an interrupt when the transmit shift register becomes empty
(which includes virtually all USB serial hardware). Such hardware hangs
in a ttyout wait, because it never gets an opportunity to trigger a wakeup
from the sleep in tty_drain() by calling ttydisc_getc() again, after
handing the last of the buffered data to the hardware.
While researching the history of changes to tty_drain() I stumbled across
some email describing the historical BSD behavior of tcdrain() and close()
on serial ports, and the ability of comcontrol(1) to control timeout
behavior. Using that and some advice from Bruce Evans as a guide, I've
put together these changes to implement the hardware polling and restore
the historical timeout behaviors...
- tty_drain() now calls ttydevsw_busy() in a loop at 10 Hz to accomodate
hardware that requires polling for busy state.
- The "new historical" behavior for draining during close(2) is retained:
the drain timeout is "1 second without making any progress". When the
1-second timeout expires, if the count of bytes remaining in the tty
layer buffer is smaller than last time, the timeout is extended for
another second. Unfortunately, the same logic cannot be extended all
the way down to the hardware, because the interface to that layer is a
simple busy/not-busy indication.
- Due to the previous point, an application that needs a guarantee that
all data has been transmitted must use TIOCDRAIN/tcdrain(3) before
calling close(2).
- The historical behavior of honoring the drainwait setting for TIOCDRAIN
(used by tcdrain(3)) is restored.
- The historical kern.drainwait sysctl to control the global default
drainwait time is restored, but is now named kern.tty_drainwait.
- The historical default drainwait timeout of 300 seconds is restored.
- Handling of TIOCGDRAINWAIT and TIOCSDRAINWAIT ioctls is restored
(this also makes the comcontrol(1) drainwait verb work again).
- Manpages are updated to document these behaviors.
Reviewed by: bde (prior version)
cem [Thu, 12 Jan 2017 00:34:37 +0000 (00:34 +0000)]
pciconf(8): Reallow trailing colon in selectors
Reallow device selectors to have a trailing colon, as documented in the
manual page. This was broken along with some unrelated cleanups in
r295806.
PR: 215979
Reported by: David Boyd <David.Boyd49 at twc.com>
Sponsored by: Dell EMC Isilon
markj [Thu, 12 Jan 2017 00:22:36 +0000 (00:22 +0000)]
Enable the use of ^C and ^S/^Q in DDB.
This lets one interrupt DDB's output, which is useful if paging is
disabled and the output device is slow.
Submitted by: Anton Rang <rang@acm.org>
Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9138
ian [Thu, 12 Jan 2017 00:09:31 +0000 (00:09 +0000)]
Include sys/systm.h for use of bootverbose. Fixes powerpc MPC85XXSPE build.
bz [Thu, 12 Jan 2017 00:01:02 +0000 (00:01 +0000)]
Get rid of a compiler warning which I saw too often.
Include netinet/in.h before ip_compat.t which will then check if
IPPROTO_IPIP is defined or not. Doing it the other way round,
ip_compat.h would not find it defined and netinet/in.h then
redefine it.
np [Wed, 11 Jan 2017 23:48:17 +0000 (23:48 +0000)]
cxgbe/tom: Add VIMAGE support to the TOE driver.
Active Open:
- Save the socket's vnet at the time of the active open (t4_connect) and
switch to it when processing the reply (do_act_open_rpl or
do_act_establish).
Passive Open:
- Save the listening socket's vnet in the driver's listen_ctx and switch
to it when processing incoming SYNs for the socket.
- Reject SYNs that arrive on an ifnet that's not in the same vnet as the
listening socket.
CLIP (Compressed Local IPv6) table:
- Add only those IPv6 addresses to the CLIP that are in a vnet
associated with one of the card's ifnets.
Misc:
- Set vnet from the toepcb when processing TCP state transitions.
- The kernel sets the vnet when calling the driver's output routine
so t4_push_frames runs in proper vnet context already. One exception
is when incoming credits trigger tx within the driver's ithread. Set
the vnet explicitly in do_fw4_ack for that case.
MFC after: 3 days
Sponsored by: Chelsio Communications
avos [Wed, 11 Jan 2017 23:32:40 +0000 (23:32 +0000)]
rtwn: fix R92C_TXDW4_RTSRATE_M definition (0x3f -> 0x1f)
Submitted by: kevlo
pfg [Wed, 11 Jan 2017 23:05:29 +0000 (23:05 +0000)]
rpcgen(1): Avoid unused variable warning on generated code.
Avoid "unused variable 'i'" warnings in generated .c files by only
emitting the "int i;" for non-opaque arrays. Opaque arrays use
xdr_opaque() rather than iterating over the array.
Obtained from: OpenBSD (CVS rev 1.28)
MFC after: 1 week
emaste [Wed, 11 Jan 2017 22:54:04 +0000 (22:54 +0000)]
readelf: add S390 relocation types
From https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_zSeries.html
Reviewed by: bz
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9149
cperciva [Wed, 11 Jan 2017 22:50:57 +0000 (22:50 +0000)]
Remove obsolete path from fortune(6). This was inadvertantly left over
when fortune and other games moved from /usr/games to /usr/bin; I am
removing rather than correcting it since we normally do not mention in
the FILES section the paths to programs in /usr/bin/.
PR: 215962
Reported by: Andras Farkas
emaste [Wed, 11 Jan 2017 21:28:22 +0000 (21:28 +0000)]
readelf: add more PPC64 relocation types found in LLVM
MFC after: 2 weeks
MFC with: r311941
Sponsored by: The FreeBSD Foundation
emaste [Wed, 11 Jan 2017 21:18:14 +0000 (21:18 +0000)]
readelf: add PPC64 relocation types
Reported by: Mark Millard
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9146
mav [Wed, 11 Jan 2017 20:23:45 +0000 (20:23 +0000)]
Pretend we support some IOCTLs to not scary upper layers.
MFC after: 2 weeks
dim [Wed, 11 Jan 2017 20:00:24 +0000 (20:00 +0000)]
Use proper prototypes in struct boot_module_t
With clang 4.0.0, we are getting the following warnings about struct
boot_module_t in efi's boot_module.h:
In file included from sys/boot/efi/boot1/ufs_module.c:41:
sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
void (*init)();
^
void
sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
void (*status)();
^
void
sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
dev_info_t *(*devices)();
^
void
3 errors generated.
Fix this by adding 'void' to the parameter lists. No functional change.
Reviewed by: emaste, imp, smh
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9144
dim [Wed, 11 Jan 2017 19:59:27 +0000 (19:59 +0000)]
Make EFI_RESERVED_SERVICE a proper prototype
With clang 4.0.0, the EFI API header causes the following warning:
In file included from sys/boot/efi/loader/bootinfo.c:43:
In file included from sys/boot/efi/loader/../include/efi.h:52:
sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
(EFIAPI *EFI_RESERVED_SERVICE) (
^
Add VOID to make it into a real prototype.
Reviewed by: imp, emaste, tsoome
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9132
sbruno [Wed, 11 Jan 2017 19:29:33 +0000 (19:29 +0000)]
Restore v6 offload caps for igb(4) class devices.
Reported by: tuxen
dumbbell [Wed, 11 Jan 2017 19:29:28 +0000 (19:29 +0000)]
committers-ports.dot: Add myself
Approved by: antoine (mentor)
Differential Revision: https://reviews.freebsd.org/D9143
dim [Wed, 11 Jan 2017 18:47:00 +0000 (18:47 +0000)]
Don't include <errno.h> in reloc_elf.c, as it includes <stand.h> just
after it, which has a conflicting definition of errno. This leads to
the following warning with clang 4.0.0:
In file included from sys/boot/common/reloc_elf32.c:6:
In file included from sys/boot/common/reloc_elf.c:37:
/usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int errno;
^
sys/sys/errno.h:46:26: note: expanded from macro 'errno'
#define errno (* __error())
^
MFC after: 3 days
asomers [Wed, 11 Jan 2017 16:09:25 +0000 (16:09 +0000)]
Fix build of usr.bin/tail with GCC
Submitted by: pluknet
Reported by: pluknet
MFC after: 27 days
X-MFC-with: 311895
Sponsored by: Spectra Logic Corp
ngie [Wed, 11 Jan 2017 10:20:35 +0000 (10:20 +0000)]
Consolidate __NetBSD__ #ifdef
MFC after: 3 days
ngie [Wed, 11 Jan 2017 09:51:34 +0000 (09:51 +0000)]
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).
MFC after: 2 weeks
In collaboration with: christos@NetBSD.org
ngie [Wed, 11 Jan 2017 09:34:42 +0000 (09:34 +0000)]
Fix whitespace in comment
MFC after: 3 days
ngie [Wed, 11 Jan 2017 08:43:58 +0000 (08:43 +0000)]
Add acpi_if.h and opt_acpi.h to Makefile to unbreak "make depend" with
sys/modules/sdhci_acpi
MFC after: 6 days
X-MFC with: r311911
Reported by: Jenkins
ngie [Wed, 11 Jan 2017 08:15:18 +0000 (08:15 +0000)]
Pull in changes from upstream for lib/libc/{c063,gen,string,sys} to address
issues resolved in FreeBSD or support added to testcases
In collaboration with: <christos@NetBSD.org>
ngie [Wed, 11 Jan 2017 07:22:21 +0000 (07:22 +0000)]
Partially revert r311236
There's no sense in trying to close a file descriptor from the negative cases
with unlink_test; it's best to ignore these cases.
The mkfifo case does make sense to keep though.
MFC after: 3 days
hrs [Wed, 11 Jan 2017 07:21:59 +0000 (07:21 +0000)]
Add more #ifdef INET and INET6.
ngie [Wed, 11 Jan 2017 07:17:03 +0000 (07:17 +0000)]
Fix up r311227
Check for creat returning a value != -1, not a non-zero value
MFC after: 3 days
Pointyhat to: ngie
Reported by: Coverity
CID: 1368366
delphij [Wed, 11 Jan 2017 05:49:39 +0000 (05:49 +0000)]
MFV r311913:
Fix multiple OpenSSH vulnerabilities.
Submitted by: des
Approved by: so
jhibbits [Wed, 11 Jan 2017 02:21:34 +0000 (02:21 +0000)]
Force all TOC references in asm to include '@toc'
This reportedly fixes one problem with booting a clang kernel.
PR: kern/215819
Submitted by: Mark Millard <markmi AT dsl-only.net>
MFC after: 2 weeks
gonzo [Wed, 11 Jan 2017 01:53:54 +0000 (01:53 +0000)]
[sdhci] Add ACPI platform support for SDHCI driver
- Create ACPI version of SDHCI attach/detach/accessors logic. Some
platforms (e.g. BayTrail-based Minnowboard) expose SDHCI devices
via ACPI, not PCI
- Add sdchi_acpi kernel module
Reviewed by: ian, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9112
markj [Wed, 11 Jan 2017 01:18:06 +0000 (01:18 +0000)]
Have DTrace handle faults when dereferencing a lock object pointer.
MFC after: 1 week
markj [Wed, 11 Jan 2017 01:15:55 +0000 (01:15 +0000)]
Ignore LC_SLEEPABLE when testing whether a mutex is adaptive.
MFC after: 1 week
ian [Wed, 11 Jan 2017 00:14:47 +0000 (00:14 +0000)]
Follow r311103: add "pool" to the keywords that rc.d/ntpdate examines to
find a server address in ntp.conf.
Submitted by: Ronald Klop <ronald@klop.ws>
Pointy hat to: ian
cem [Wed, 11 Jan 2017 00:02:51 +0000 (00:02 +0000)]
Revert r311843, r311667
As jkim@ points out, it isn't needed.
mm [Tue, 10 Jan 2017 22:01:37 +0000 (22:01 +0000)]
Build libarchive tests missing in r311899
MFC after: 1 week
X-MFC with: r311899
mm [Tue, 10 Jan 2017 21:59:35 +0000 (21:59 +0000)]
MFV r311899:
Sync libarchive with vendor.
Vendor bugfixes:
#691: Support for SCHILY.xattr extended attributes
#854: Spelling fixes
Multiple fixes in ACL code:
- prefer acl_set_fd_np() to acl_set_fd()
- if acl_set_fd_np() fails, do no fallback to acl_set_file()
- do not warn if trying to write ACLs to a filesystem without ACL support
- fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs
MFC after: 1 week
X-MFC with: r310866
markj [Tue, 10 Jan 2017 21:52:48 +0000 (21:52 +0000)]
Coalesce TLB shootdowns of global PTEs in pmap_advise() on x86.
We would previously invalidate such entries individually, resulting in more
IPIs than necessary.
Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D9094
markj [Tue, 10 Jan 2017 21:41:28 +0000 (21:41 +0000)]
Do not set BIO_DONE if the BIO specifies a completion handler.
biowait() will otherwise race with completions of such BIOs. In-tree code
only calls biowait() on BIOs that do not specify a handler, so this change
should not have any functional impact.
Reviewed by: mav
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9070
sbruno [Tue, 10 Jan 2017 21:21:00 +0000 (21:21 +0000)]
Set CFLAGS correctly for sys/modules/em
Unbreak gcc sparc64 builds (or any gcc build that uses em(4)).
Reported by: lidl@freebsd.org
mm [Tue, 10 Jan 2017 21:18:32 +0000 (21:18 +0000)]
Update vendor/libarchive to git
22f2d190639e6bd496a3b82f70c01fba0d38b40a
Vendor changes:
#691: Support for SCHILY.xattr extended attributes
#854: Spelling fixes
Multiple fixes in ACL code:
- prefer acl_set_fd_np() to acl_set_fd()
- if acl_set_fd_np() fails, do no fallback to acl_set_file()
- do not warn if trying to write ACLs to a filesystem without ACL support
- fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs
mjg [Tue, 10 Jan 2017 21:10:20 +0000 (21:10 +0000)]
sparc64: add atomic_fcmpset
Tested on hardware provided by feld.
Reviewed by: marius
mav [Tue, 10 Jan 2017 20:52:44 +0000 (20:52 +0000)]
Add checks for received mode page length.
If our buffer is too small, we may receive part of the page, and should
not try read/write past the end of the buffer.
Reported by: Coverity
CID: 1368374, 1368375
MFC after: 1 week
pfg [Tue, 10 Jan 2017 20:44:31 +0000 (20:44 +0000)]
Remove unused __gnu_inline() attribute.
This was meant to be used by a future FORTIFY_SOURCE implementation.
Probably for good, FORTIFY_SOURCE and this particular GCCism were never
well supported by clang or other compilers. Furthermore, the technology
has long since been replaced by either static checkers, sanitizers, or
even just the strong stack protector that was enabled by default.
Drop __gnu_inline to avoid cluttering the headers.
MFC after: 5 days