214942 Commits

Author SHA1 Message Date
Konstantin Belousov
977f45fc0a MFC r308733:
Move the fast fault path into the separate function.
2016-11-23 09:37:02 +00:00
Konstantin Belousov
b1478acdc1 MFC r308689:
Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and
CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the
ifunc resolvers on x86.

MFC r308925:
Adjust r308689 to make rtld compilable with either in-tree or
(hopefully) stock gcc 4.2.1 on i386 and other arches.
2016-11-23 09:25:51 +00:00
Alexander Motin
b29f65b954 MFC r308425: Add support for EIIOE flag in Additional Element Status.
It was added in SES-3 spec, and its support required to properly link
the Additional Element Status page data to the original elements.
2016-11-23 09:10:11 +00:00
Alan Somers
78edc837c7 MFC r307584
Fix C++ includability of crypto headers with static array sizes

C99 allows array function parameters to use the static keyword for their
sizes. This tells the compiler that the parameter will have at least the
specified size, and calling code will fail to compile if that guarantee is
not met. However, this syntax is not legal in C++.

This commit reverts r300824, which worked around the problem for
sys/sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can
be used in headers as a static array size, but will still compile in C++
mode.
2016-11-22 20:28:17 +00:00
John Baldwin
7380df920a MFC 306999: Add a missing word. 2016-11-22 18:46:01 +00:00
John Baldwin
346df89f11 MFC 308142: Move declarations of invpcid_works and pmap_pcid_enabled to pmap.h.
Previously these were only declared under #ifdef SMP in <machine/smp.h>.
However, these variables are defind in pmap.c unconditionally, and efirt.c
references them unconditionally.  This fixes non-SMP kernel builds.
2016-11-22 18:43:04 +00:00
Mark Johnston
dbc06adbc8 MFC r308694:
Plug a lock leak in sysctl_ifmalist().

PR:	214542
2016-11-22 17:42:59 +00:00
Xin LI
99346ecad0 MFC r308957: MFV r308954:
ntp 4.2.8p9.

Approved by:	so
2016-11-22 16:22:51 +00:00
Andrey V. Elsukov
3d3dea74ab MFC r308673:
Add missing support of named lookup tables to the IPv6 code.

  PR:		214419
2016-11-22 10:09:04 +00:00
Konstantin Belousov
f74c20d691 MFC r308688:
Assert that there is no unresolved symbols during rtld linking.
2016-11-22 09:37:31 +00:00
Konstantin Belousov
94073e29e5 MFC r308687:
Update hint to utilize user variable.
2016-11-22 09:35:50 +00:00
Konstantin Belousov
83f857f9bf MFC r308642:
Initialize reserved bytes in struct mq_attr.

PR:	214488
2016-11-21 10:44:40 +00:00
Andriy Gapon
3a4a0828bb MFC r308089: zfsbootcfg: a simple tool to set next boot (one time)
options for zfsboot
2016-11-21 10:13:09 +00:00
Luiz Otavio O Souza
8dc700891a Zero etherswitch_vlangroup structure before doing partial assignments.
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-11-20 17:03:52 +00:00
Konstantin Belousov
5f8a9de45b MFC r308617:
Move common cleanup code into helper.
2016-11-20 09:11:21 +00:00
Jilles Tjoelker
0bf3732220 MFC r307755: swapoff: Remove only late devices with -aL.
Currently, '/etc/rc.d/swaplate stop' removes all swap devices. This can be
very slow and may not even be possible if there is a lot of swap space in
use. However, removing swap devices is only needed for late swap devices
that may depend on daemons that subsequent shutdown steps stop. Normal swap
devices such as hard disk partitions will remain available throughout the
shutdown process and need not be removed.

In swapoff, interpret -aL to remove late swap devices only, and use this in
etc/rc.d/swaplate. The meaning of -aL in swapon remains unchanged (add all
swap devices, both normal and late).

PR:		187081
2016-11-19 20:02:49 +00:00
Jilles Tjoelker
3fa1ced0da MFC r306585: swapon(8): Update to reality: swapoff ignores -L and the late
option in fstab.
2016-11-19 19:25:38 +00:00
Alan Somers
97f8ef973b MFC r307752
Close some file descriptor leaks in pw
2016-11-18 22:28:57 +00:00
Konstantin Belousov
764d7088c7 MFC r308538:
Increase the max allowed size of the microcode update blob for x86.
2016-11-18 09:01:44 +00:00
Konstantin Belousov
7b9979682b MFC r308288:
Do not sleep in vm_wait() if pagedaemon did not yet started.  Panic instead.
2016-11-18 08:59:47 +00:00
Andriy Gapon
d2743d7e55 MFC r308247: MFV r308222: 6051 lzc_receive: allow the caller to read the
begin record
2016-11-17 15:19:27 +00:00
Andriy Gapon
e9a9d88ecb MFC r308218: Add support for microcode update on newer AMD CPUs (10h+) 2016-11-17 15:16:52 +00:00
Andriy Gapon
09e2ed565c MFC r308101: hwpmc: fix a race between amd_stop_pmc and amd_intr 2016-11-17 15:14:54 +00:00
Andriy Gapon
7b60c879d4 MFC r307195: convert iicsmb to use iicbus_transfer for all operations 2016-11-17 15:13:16 +00:00
Andriy Gapon
949844a750 MFC r308040,308479: nap time between pats is forced to be at most half
of the timeout
2016-11-17 15:10:52 +00:00
Luiz Otavio O Souza
084885627c MFC r308237:
Remove the mbuf tag after use (for reinjected packets).

Fixes the packet processing in dummynet l2 rules.

Obtained from:	pfSense
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-11-17 14:32:23 +00:00
Alexander Motin
3318e4ee70 MFC r308464, r308471: Add some device IDs found in my new laptop. 2016-11-16 18:38:40 +00:00
Konstantin Belousov
f6ecf02595 MFC r308212:
Allow some dotdot lookups in capability mode.
2016-11-16 16:14:01 +00:00
Baptiste Daroussin
f643b945e5 MFC r308477:
make pxeboot consistent with common/dev_net.c

Always define boot.netif.server in kenv in pxeboot
Add "boot.tftproot.server" to kenv when pxeboot uses tftpfs
Change the code order when setting env for TFTP or NFS to be the same as
common/dev_net.c

Reported by:	tsoome
2016-11-16 07:05:42 +00:00
Baptiste Daroussin
d89d921bf6 MFC r308160:
syslogd(8): add an 'include' keyword

All the '.conf' files not beginning with a '.' contained int he directory
following the keyword will be included.

This keyword can only be used in the first level configuration files.

Modify the default syslogd.conf to 'include' /etc/syslog.d and
/usr/local/etc/syslog.d

It simplify a lot handling of syslog from automation tools.

Reviewed by:	markj, kib (via irc)
Approved by:	markj
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D8402
2016-11-16 07:04:49 +00:00
Baptiste Daroussin
eb171fa9fd MFC r308139, r308157-r308158
r308139:
cron(8): add support for /etc/cron.d and /usr/local/etc/cron.d

For automation tools it is way easier to maintain files in directories rather
than modifying /etc/crontab.

The files in those directories are in the same format as /etc/crontab

Reviewed by:	adrian
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D8400

r308157:
Fix typo in cron(8) date

Reported by:	jilles

r308158:
Allow symlinks to be followed in cron.d directories and fix detection of
regular files on NFS

Reported by:	jilles
2016-11-16 07:03:24 +00:00
Baptiste Daroussin
1da33403f4 MFC r307238:
Stop closing the network device when netbooting for loaders using the common
dev_net.c code.

The NETIF_OPEN_CLOSE_ONCE flag was added in r201932 to prevent that behaviour
on some architectures (sparc64 and powerpc64) the default was left to always
open and close the device for each open and close of a file by the loader
because it was necessary for u-boot on arm.

Since it has been added, the flag was turned on for every arches including the
u-boot loader for arm.

This also fixes netbooting on RPi3 (tested by gonzo@)

For the loader.efi it greatly speeds up netbooting

Reviewed by:	emaste, gonzo, tsoome
Approved by:	gonzo
MFC after:	1 month
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D8230
2016-11-16 07:01:52 +00:00
Hiroki Sato
fa18323e6c MFC r308348:
Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE.

  Reported by:  philip
2016-11-16 03:54:30 +00:00
Hiroki Sato
d8a56889bd MFC r308347:
Fix an infinite loop at an non-responding hop when other echo replies
  are kept arriving in the waittime time window.

  Submitted by: Denny Page
  PR:           210286
2016-11-16 03:51:05 +00:00
Kirk McKusick
b7d598c5bd MFC r307978:
Bug 180894 reports that rm -rf on a directory causes kernel panic and reboot.
Return EINVAL rather than panic for low directory link count.

PR: 180894
2016-11-16 01:03:42 +00:00
Kurt Lidl
d196a95642 MFC r308567: Fix build when WITHOUT_BLACKLIST=yes is specified
Sponsored by:	The FreeBSD Foundation
2016-11-15 23:03:57 +00:00
Hiren Panchasara
ca0435e131 MFC r302474 (By gnn)
On FreeBSD there is a setsockopt option SO_USER_COOKIE which allows
setting a 32 bit value on each socket. This can be used by applications
and DTrace as a rendezvous point so that an applicaton's data can
more easily be captured at run time. Expose the user cookie via
DTrace by updating the translator in tcp.d and add a quick test
program, a TCP server, that sets the cookie on each connection
accepted.

Sponsored by:	    Limelight Networks
2016-11-15 22:18:52 +00:00
Hans Petter Selasky
5ced7b7227 MFC r308416:
Add timer to watch the RQ when we are out of mbufs.

The firmware/hardware does not generate additional completion
events unless we post new buffers. Use a timer to try to post
more buffers in case we are temporarily out of mbufs. Else
the receive schedule completely stops.

Sponsored by:	Mellanox Technologies
2016-11-15 08:54:03 +00:00
Hans Petter Selasky
d8307917a6 MFC r308414:
Add more firmware related structures and update existing ones in the
MLX5 core module. Update the set and query diagnostics counter API.

Sponsored by:	Mellanox Technologies
2016-11-15 08:53:25 +00:00
Hans Petter Selasky
b9dc2d1746 MFC r308413:
Query flow table capabilities according to the correct capability bit
for infiniband.

Sponsored by:	Mellanox Technologies
2016-11-15 08:52:45 +00:00
Hans Petter Selasky
47db5fb1e2 MFC r308412:
Correct checksum fields in the "mlx5_mini_cqe8" structure. The fields
in question are currently not used.

Sponsored by:	Mellanox Technologies
2016-11-15 08:52:06 +00:00
Hans Petter Selasky
7391940ad8 MFC r308411:
Ensure the firmware is notified of any host memory allocation
failures. Else firmware commands may time out waiting for host
memory.

Sponsored by:	Mellanox Technologies
2016-11-15 08:51:29 +00:00
Hans Petter Selasky
1b6d1b1ee1 MFC r308409:
When a firmware command times out do not free the command structure to
avoid use after free.

Sponsored by:	Mellanox Technologies
2016-11-15 08:50:42 +00:00
Oleksandr Tymoshenko
8c551d4e8b MFC r308295:
[gpio] Add GPIO driver for Intel Bay Trail SoC

Bay Trail has three banks of GPIOs exposed to userland as /dev/gpiocN,
where N is 1, 2, and 3. Pins in each bank are pre-named to match names
on boards schematics: GPIO_S0_SCnn, GPIO_S0_NCnn, and GPIO_S5_nn.

Controller supports edge-triggered and level-triggered interrupts but
current version of the driver does not have interrupts support
2016-11-15 03:40:22 +00:00
Luiz Otavio O Souza
94ded269a7 Stop abusing from struct ifnet presence to determine the packet direction
for dummynet, use the correct argument for that, remove the false coment
about the presence of struct ifnet.

Fixes the input match of dummynet l2 rules.

Obtained from:	pfSense
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-11-15 01:20:36 +00:00
Oleksandr Tymoshenko
4959d7f550 MFC r308428:
Refactor FDT part of gpioled driver

- Split driver in two parts: FDT and non-FDT
- Instead of reattach gpioled nodes to GPIO bus use
    gpio_pin_get_by_ofw_idx and add ofwbus and simplebus as parrent buses

Reviewed by:	loos
Differential Revision:	https://reviews.freebsd.org/D8233
2016-11-15 00:28:07 +00:00
Oleksandr Tymoshenko
436e8288e4 MFC r308581:
[rpi_ft5406] Add missing dependency on mbox_if.h

Submitted by:	hselasky
2016-11-14 22:39:33 +00:00
Oleksandr Tymoshenko
8b84153833 MFC r308240:
[evdev] Add evdev support to atkbd(4) driver

To enable event sourcing from atkbd kern.evdev.rcpt_mask value
should have bit 3 set.

Submitted by:	Vladimir Kondratiev <wulf@cicgroup.ru>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8381
2016-11-14 22:33:57 +00:00
Oleksandr Tymoshenko
93a7ee0e81 MFC r308189:
[psm] Fix choosing wrong mode for synaptic device + trackpoint

With guest trackpoint present trackpoint probing switched synaptics
device to absolute mode with different protocol instead of keeping it
in relative mode.

PR:		213757
Submitted by:	Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:	1 week
2016-11-14 21:27:18 +00:00
Dimitry Andric
97d3d3ea1c MFC r308559:
Pull in r263169 from upstream llvm trunk (by Tim Northover):

  AArch64: only try to use scaled fcvt ops on legal vector types.

  Before we ended up calling getSimpleVectorType on a <3 x float>, which
  asserted.

This fixes an assertion when building the print/ghostscript9-agpl-base
port for AArch64.

PR:		213865
2016-11-14 18:57:21 +00:00