Commit Graph

216195 Commits

Author SHA1 Message Date
Konstantin Belousov
5925fff002 Editing fixes for r306257, documentation for trapcap.
Suggested by:	wblock
Discussed with:	jilles
Reviewed by:	cem (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D8023
2016-09-27 11:31:53 +00:00
Ruslan Bukin
5bec6d5513 Mark SSP broken on MIPS.
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-27 09:44:30 +00:00
Kevin Lo
3925fe3135 - Prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the
interface address list
- Update IFF_RENAMING macro descriptions
2016-09-27 08:47:02 +00:00
Kevin Lo
3ff511d316 Remove a comment about the size of the ifnet structure.
Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D8036
2016-09-27 08:11:09 +00:00
Sepherosa Ziehau
9f06037b0d hyperv/vmbus: Add dynamic device add and remove support
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8008
2016-09-27 06:30:24 +00:00
Sepherosa Ziehau
4d6e19e457 pci: Clear the MEM/PORT_EN bit when updating PCI BAR
It's unsafe to update the BAR when the related EN bit is set.

Submitted by:	Dexuan Cui <decui microsoft com>
Reviewed by:	jhb
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7914
2016-09-27 06:00:10 +00:00
Justin Hibbits
1e6afa0eaf Add NXP/Freescale DIU driver for PowerPC SoCs
Summary:
This enables some features of the DIU, using a static configuration,
specified either via a 'edid' property on the 'display' FDT node, or a
'video-mode' environment variable (bootarg).  'video-mode' was chosen because it
matches u-boot's naming, so it can be set with:

setenv bootargs video-mode=${video-mode}

at the u-boot CLI.

Mouse cursor is not supported currently, as a hardware cursor is not supported
by framebuffer VT yet.  Currently it only supports a 32bpp ARGB (actually BGRA)
format, and only a single composite plane, at up to 1280x1024.

Differential Revision: https://reviews.freebsd.org/D8022
2016-09-27 00:53:41 +00:00
Oleksandr Tymoshenko
89d7100b1f Document hw.psm.elantech_support in psm(4)
PR:             205690
Submitted by:   Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:      1 week
2016-09-26 22:08:35 +00:00
Oleksandr Tymoshenko
4f57f07e37 Add Elantech trackpad to the list of known models
PR:             205690
Submitted by:   Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:      1 week
2016-09-26 22:07:45 +00:00
Oleksandr Tymoshenko
0fe98e8f2c Add Elantech trackpad support
Elantech trackpads are found in some laptops like the Asus UX31E. They
are "synaptics compatible" but use a slightly different protocol.

Elantech hardware support is not enabled by default and just like
Synaptic or TrackPoint devices it should be enabled by setting
tunable, in this case hw.psm.elantech_support, to non-zero value

PR:		205690
Submitted by:	Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:	1 week
2016-09-26 22:06:19 +00:00
Ruslan Bukin
cda20f96df Increase timeout from 300 (default) to 600 seconds.
It takes 6-7 minutes to proceed the test on MIPS64EB.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-26 20:13:33 +00:00
Konstantin Belousov
9fc97c9010 Handle TLB shootdown IPI during the EFI runtime calls, on SandyBridge
and IvyBridge machines, which support PCID but do not have INVPCID
instruction.

MFC after:	1 week
2016-09-26 17:25:25 +00:00
Konstantin Belousov
20692187ea For machines which support PCID but not have INVPCID instruction,
i.e. SandyBridge and IvyBridge, correct a race between pmap_activate()
and invltlb_pcid_handler().

Reported by and tested by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after:	1 week
2016-09-26 17:22:44 +00:00
Pedro F. Giffuni
70e7268bd5 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)
2016-09-26 16:06:50 +00:00
Hiren Panchasara
7c9a4d09d6 Revert r306337. dhw@ reproted a panic which seems related to this and bde@ has
raised some issues.
2016-09-26 15:45:30 +00:00
Ruslan Bukin
ed8f18ded4 Don't build SSP tests on MIPS as we dont have stack-protector
supported on this platform.

Discussed with:	brooks
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-26 15:38:02 +00:00
Eric van Gyzen
310ab671b8 Make no assertions about mutex state when the scheduler is stopped.
This changes the assert path to match the lock and unlock paths.

MFC after:	1 week
Sponsored by:	Dell EMC
2016-09-26 15:30:30 +00:00
Jung-uk Kim
f1fe58d376 Merge OpenSSL 1.0.2j. 2016-09-26 14:22:17 +00:00
Jung-uk Kim
e656c34a18 Import OpenSSL 1.0.2j. 2016-09-26 14:13:11 +00:00
Ruslan Bukin
5b1b1405e3 Use bsdlabel as we don't have hardlink disklabel -> bsdlabel on MIPS.
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-26 14:01:41 +00:00
Ruslan Bukin
60e5fa86df Increase timeout for legacy_test from 300 (default) to 600 seconds.
It takes about 7 minutes to pass the test on MIPS64EB in QEMU.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-26 13:59:18 +00:00
Hiren Panchasara
41bb1a25a9 In sendit(), if mp->msg_control is present, then in sockargs() we are allocating
mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(),
will check validity of file pointer passed, if this fails EBADF is returned but
mbuf allocated in sockargs() is not freed. Fix this possible leak.

Submitted by:	Lohith Bellad <lohith.bellad@me.com>
Reviewed by:	adrian
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D7910
2016-09-26 10:13:58 +00:00
Konstantin Belousov
fd6c95c09f Document thr_suspend(2) and thr_wake(2).
Reviewed by:	bjk, jilles
Discussed with:	emaste, wblock
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D8016
2016-09-26 08:18:34 +00:00
Marcel Moolenaar
7b5a53ea4d Portability changes:
1.  macOS nor Linux have MAP_NOCORE nor MAP_NOSYNC. Define as 0.
2.  macOS doesn't have SEEK_DATA nor SEEK_HOLE. Define as -1
    so that lseek will return -1 (with errno set to EINVAL).
3.  gcc correctly warns that error is assigned but not used in
    image_copyout_region().  Fix by returning on the first error.
2016-09-26 04:14:00 +00:00
Pedro F. Giffuni
d191be26c0 btree(3): don't shortcut closing if the metadata is dirty.
Obtained from:	NetBSD (from krb5 tree)

MFC after:	3 weeks
2016-09-26 02:29:28 +00:00
Adrian Chadd
3e0d0fcee9 [ath_hal] add a new regdomain flag - I think this means "yes, you can use this
NIC in channel 144 if you're in FCC6."

I have to go figure out more details about this before I enable it..
2016-09-26 02:05:02 +00:00
Marcel Moolenaar
5aad7d9a87 Avoid depending on the <sys/endian.h> header for le*enc and be*enc.
Not only is the header unportable, the encoding/decoding functions
are as well.  Instead, duplicate the handful of small inlines we
need into a private header called endian.h.

Aside: an alternative approach is to move the encoding/decoding
functions to a separate system header.  While the header is still
nonportable, such an approach would make it possible to re-use the
definitions by playing games with include paths. This may be the
preferred approach if more (build) utilities need this.  This
change does not preclude that.  In fact, it makes it easier.
2016-09-26 01:06:32 +00:00
Marcel Moolenaar
4039ea7c9b Eliminate the use of EDOOFUS. The error code was used to signal
programming errors, but is really a poor substitute for assert.
And less portable as well.
2016-09-26 00:41:08 +00:00
Oleksandr Tymoshenko
ee484d5bd3 Update PCI driver to match new dts tree
In new dts tree phy is a property of port, not the controller node, also
the name was changed from "pcie" to "pcie-0"
2016-09-25 23:48:15 +00:00
Oleksandr Tymoshenko
23ea1f2b1d Update AHCI driver to match new dts tree
phy name parameter was changed from "sata-phy" to "sata-0" in new dts tree
introduced in r306197
2016-09-25 23:45:49 +00:00
Marcel Moolenaar
5a1302ab2e Replace the use of linker sets with constructors for both the
formats and schemes.  Formats and schemes are registered at
runtime now, rather than collected at link time.
2016-09-25 22:57:59 +00:00
Adrian Chadd
5b06614ce3 [ath_hal] add a comment for the channel 144 regdomain flag.
I'm .. still trying to figure out what's going on.
2016-09-25 22:17:46 +00:00
Adrian Chadd
85bc19eb22 [ath_hal] Add FCC6_FCCA regulatory domain (0x0014).
Tested:

* TP-Link N900, AR9380, regdomain 0x0014 (FCC6_FCCA).
2016-09-25 22:07:41 +00:00
Andriy Voskoboinyk
fbc9d202d8 rsu: do not restart calibration task when going out of RUN state.
Clear 'sc_calibrating' flag and stop calibration task when interface
is not associated; this fixes possible panic after detach.

Reported and tested by:	hselasky
Reviewed by:	adrian
MFC after:	6 days
2016-09-25 19:13:07 +00:00
Bruce Evans
9eeaa0ea1f Minor fixes for 160-bit disassembly:
(1) Print the default segment %ss before adresses relative to %bp.
    This is too cluttered for me, but so is printing some other default
    prefixes, and this is a reasonable reminder that %ss is quite
    likely to be different from %ds in 16-bit mode.

    db_disasm still handles prefixes poorly, by trying to discard
    redundant ones.  This loses information, and sometimes the result
    is wrong or misleading.

    Clean up nearby initializations and dead code.

(2) Fix decoding of operand and address size prefixes in 16-bit mode.
    They reverse the default in all modes.

Obtained from:            (1) is partly from r1.4 (2003/11/08) in DFlyBSD (?)
2016-09-25 18:39:24 +00:00
Tijl Coosemans
81d7ca7761 MFamd64: r266901
Allocate a zeroed LDT.

Failing to do this might result in the LDT appearing to run out of free
descriptors because of random junk in the descriptor's 'sd_type' field.

http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html

PR:		212639
Submitted by:	wheelcomplex@gmail.com
MFC after:	2 weeks
2016-09-25 18:29:02 +00:00
Marcel Moolenaar
6d93a08d0a Document the ".pico" extension for object files.
Suggested by: emaste@
2016-09-25 16:50:31 +00:00
Marcel Moolenaar
bba95d2d7e Relocatable object files are renamed from *.So to *.pico
Reminder by:	imp@
2016-09-25 16:39:18 +00:00
Bruce Evans
808cf02c24 Determine the operand/address size of %cs in a new function
db_segsize().

Use db_segsize() to set the default operand/address size for
disassembling.  Allow overriding this with the "alternate" display
format /I.  The API of db_disasm() should be debooleanized to pass a
more general request (amd64 needs overrides to sizes of 16, 32, and
64, but this commit doesn't implement anything for amd64 since much
larger changes are needed to restore the amd64 disassmbler's support
for non-default sizes).

Fix db_print_loc_and_inst() to ask for the normal format and not the
alternate in normal operation.

This is most useful for vm86 mode, but also works for 16-bit protected
mode.

Use db_segsize() to avoid trying to print a garbage stack trace if %cs
is 16 bits.  Print something like the stack trace termination message
for a trap boundary instead.

Document that the alternate format is now useful on i386.
2016-09-25 16:30:29 +00:00
Bruce Evans
f5435b8bbe Fix vm86 initialization, part 3 of 2 and a half. (Actually, just fix
early printfs and debugging of vm86 initialization and some other early
initialization in some cases.)  Add an option debug.late_console (with
default 1=off) to move console and kdb initialization back where it was.
Do the same for amd64 although there is no vm86 there.

On my test system, debug.late_console=0 works for the syscons, sio and
uart console drivers on amd64 and i386, and for vt on i386 but not on
amd64.

The early printfs fixed by debug.late_console=0 are:
- on i386, the message about lost memory above 4G
- with -v in otherwise normal use, about 20 printfs for SMAP
- other debugging messages for memory sizing.  Mostly under -v and
  not printed in normal use.

Document in a comment how much earlier the initialization and early
printf()s can be.  That is very early for the console.  Not much more
than curthread is needed.  kdb use obviously needs to be not so early,
since it needs IDT initialization and that is done relatively late
for convenience and historical reasons.
2016-09-25 14:56:24 +00:00
Andrew Turner
b9413b5512 Add the start of a GENERIC armv6 kernel config. This supports the Allwinner
SMP SoCs and qemu virt. Further SoCs can be supported if they support the
PLATFORM, PLATFORM_SMP, and MULTIDELAY options.

Tested by:	manu
Sponsored by:	ABT Systems Ltd
2016-09-25 07:48:08 +00:00
Julian Elischer
1c8260b61d Give the user a clue as to which process hit maxfiles.
MFC after:	1 week
Sponsored by:	Panzura
2016-09-24 22:56:13 +00:00
Mark Johnston
970fe0938e Convert checks in nd6_dad_start() and nd6_dad_timer() to assertions.
In particular, these functions can assume they are operating on tentative
addresses.

MFC after:	2 weeks
2016-09-24 21:40:24 +00:00
Mark Johnston
9e579a58c3 Move implementations of uread() and uwrite() to the illumos compat layer.
MFC after:	1 week
2016-09-24 21:40:14 +00:00
Navdeep Parhar
788f3c06f6 cxgbe(4): Use the port's top speed to figure out whether it is "high
speed" or not (for the purpose of calculating the number of queues etc.)
This does the right thing for 25Gbps and 100Gbps ports.
2016-09-24 19:03:05 +00:00
Marcel Moolenaar
84b809fd65 When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

Missed in r306297

MFC after:	1 month
Sponsored by:	Bracket Computing
Differential Revision:	https://reviews.freebsd.org/D7906
2016-09-24 17:50:11 +00:00
Marcel Moolenaar
ac3425511d Update local variable 'block' after calling capacity_resize(),
otherwise format_resize(), which is called right after, isn't
getting the current/actual image size. Rather than rounding up,
format_resize() could end up truncating the size and we don't
allow that by design.

MFC after:	1 week
2016-09-24 17:29:27 +00:00
Marcel Moolenaar
2b4da8aa20 When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

See also r305855

MFC after:	1 month
Sponsored by:	Bracket Computing
Differential Revision:	https://reviews.freebsd.org/D7906
2016-09-24 15:11:27 +00:00
Navdeep Parhar
d44268d135 cxgbe(4): Support SIOGIFXMEDIA so that ifconfig displays correct media
for 25Gbps and 100Gbps ports.   This should have been part of r305713,
which is when the driver first started reporting extended media types.
2016-09-24 13:23:47 +00:00
Andriy Gapon
d26312a4e4 fix vnode lock assertion for extended attributes directory
Background.  In ZFS a file with extended attributes has a special
directory associated with it where each extended attribute is a file.
The attribute's name is a file name and its value is a file content.
When the ownership of a file with extended attributes is changed, ZFS
also changes ownership of the special directory.  This is where the bug
was hit.

The bug was introduced in r209158.

Nota bene.  ZFS vnode locks are typically acquired before
z_teardown_lock (i.e., before ZFS_ENTER).  But this is not the case for
the vnodes that represent the extended attribute directory and files.
Those are always locked after ZFS_ENTER.  This is confusing and fragile.

PR:		212702
Reported by:	Christian Fuss to FreeNAS
Tested by:	mav
MFC after:	1 week
2016-09-24 08:13:15 +00:00