201576 Commits

Author SHA1 Message Date
ian
543007eb97 MFC r289619:
Follow the advice of the misplaced comment and don't access the map struct
  after freeing it.  Remove the comment whose uselessness has been revealed.
2016-01-24 18:25:37 +00:00
des
58256dbc0b MFH (r263234, r263691, r266465, r290671, r290672, r290673, r290674,
r294320, r294322, r294324, r294330, r294469, r294494, r294466)

Reduce diffs to head in preparation for removing HPN and None.
2016-01-24 15:44:57 +00:00
ngie
4aca574c5a MFC r293073:
- Use attach_md instead of hardcoding md(4) provider unit numbers
- Implement a gmirror_test_cleanup function, which in turn calls
  geom_test_cleanup to clean up all md(4) providers allocated in the test
  run.
- Remove duplicate logic in test scripts for removing md(4) providers.
- Don't create files in /tmp (outside the kyua sandbox); use the current
  directory instead
2016-01-24 06:19:49 +00:00
vangyzen
78461d0975 MFC r293860
bsdinstall: Suggest the GPT+Active workaround on Dell T5810

The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode
without the Active flag in the Protective MBR.  Suggest the workaround
during installation.

Since an increasing number of Dell systems exhibit this behavior,
I imagine all Dells past a certain date will do so.  I would like
to suggest the workaround for all Dells with a BIOS date of, say,
2014 or later, but I would need to test a variety of systems before
committing such a change.

Relnotes:   We should probably suggest using GPT+Active on "recent" Dells.
Sponsored by:   Dell Inc.
2016-01-24 02:10:05 +00:00
allanjude
339b899e2c MFC: r285732
Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround

MFC: r287843
  Add the HP ProBook 4330s, Intel DP965LT, D510MO, and Acer Veriton M6630G to the GPT workaround list

Sponsored by:	ScaleEngine Inc.
2016-01-23 22:13:31 +00:00
ngie
e184c2b973 MFC r294125:
Test for EPROTOTYPE not EPROTONOSUPPORT

- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
  the prototype is invalid (this isn't explicitly documented anywhere I could
  find)
2016-01-23 21:04:34 +00:00
vangyzen
dab5810197 MFC r293858
libthr: const-ify two variables

Make the default umutex and urwlock initializers const,
because they can be, and as a microoptimization.

Sponsored by:	Dell Inc.
2016-01-23 20:49:52 +00:00
ian
49868192d4 MFC r294235:
Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
  Previously the polarity was for TTL levels, which are the reverse of RS-232.

  Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl
  value, the same as was recently added to uart(4), so that people using TTL
  level connections can request a logical inverting of the signal.

  Use the named constants from the new dev/uart/uart_ppstypes.h for the pps
  capture modes and option bits.
2016-01-23 19:13:48 +00:00
jhb
3c1c5bc607 MFC 294366:
Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.

If a driver's Linux mmap callback passed vm_page_prot through unchanged,
then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
value 0 is to the mapping.  On x86, VM_MEMATTR_DEFAULT is the PAT value
for write-back (WB) which is 6, while 0 maps to the PAT value for
uncacheable (UC).  Thus, any mmap request that did not explicitly set
page_prot was tried to map memory as UC triggering the warning in
sg_pager_getpages().

Sponsored by:	Chelsio Communications
2016-01-23 17:08:17 +00:00
trasz
13c803f307 MFC r289453:
Add -w flag to iscsictl(8) utility, to make it wait for successfull
session establishment.  Scripting is kind of hard without it.

Sponsored by:	The FreeBSD Foundation
2016-01-23 15:48:14 +00:00
kib
7908c6241f MFC r294137:
Do not panic when the filesystem which carries the audit files, is unmounted
and audit is active.  Do not write to the suspended fs.
2016-01-23 07:35:29 +00:00
kib
00ce898270 MFC r293059:
Hide transient EBADF errors caused by the parallel revoke(2) or forced
unmount of devfs mounts, by restarting the failed syscall.
2016-01-23 07:33:02 +00:00
jhb
51a396136e MFC 292892:
Call kern_thr_exit() instead of duplicating it.

This code is missing the racct_subr() call from kern_thr_exit() and would
require further code duplication in future changes.
2016-01-23 01:21:11 +00:00
jhb
27f8f705dc MFC 286974,291653:
286974:
Remove reference to non-existent kern_openat(9).

291653:
The cdevpriv_dtr_t typedef was not able to be used in a function prototype
like the various d_*_t typedefs since it declared a function pointer rather
than a function.  Add a new d_priv_dtor_t typedef that declares the function
and can be used as a function prototype.  The previous typedef wasn't
useful outside of the cdevpriv implementation, so retire it.

The name d_priv_dtor_t was chosen to be more consistent with cdev methods
since it is commonly used in place of d_close_t even though it is not a
direct pointer in struct cdevsw.
2016-01-23 01:02:28 +00:00
glebius
488bba9bb8 Make it possible to override NO_INSTALLEXTRAKERNELS.
Submitted by:	ngie
2016-01-22 18:38:52 +00:00
delphij
0e1dba9a0a MFC r294554: MFV r294491: ntp 4.2.8p6.
Security:	CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security:	CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security:	CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security:	CVE-2015-8140, CVE-2015-8158
With hat:	so
2016-01-22 15:55:21 +00:00
ngie
7a67cba86b MFC r293048,r293444:
r293048:

- Use a temporary file for the temporary md(4) devices instead of
  hardcoding it
- Remove the temporary file in the cleanup routine

r293444:

- Move functions that might be used in class-specific cleanup functions
  (geom_test_cleanup, etc) down so the testcases don't emit noise when
  bailing
- Conform to the TAP protocol better when dealing with classes that can't
  be loaded and with temporary files that can't be allocated for tracking
  md(4) devices.
2016-01-22 07:23:50 +00:00
pfg
1781e96ea4 Revert r294271:
ext4: add support for reading sparse files

Our older GCC can't handle anonymous unions, so
ia64 and powerpc LINT kernels are now failing.
2016-01-22 03:25:06 +00:00
jilles
c749c94c2e MFC r294234: utimensat(2): Correct description of [EINVAL] error. 2016-01-21 21:16:57 +00:00
dchagin
fb5d84effe MFC 294233:
Prevent double free of control in common sendmsg path as sosend
already freeing it.
2016-01-21 19:19:24 +00:00
bz
e8ebbaf6da MFC 292953:
This code is not in modules that need KPI stability so no need to use
 the wrapper functions as used in r252511 (head).  We can directly use
 the locking macros.
2016-01-21 14:11:01 +00:00
bz
c9c2f75c5c MFC r292604:
If vnets are torn down while ifconfig runs an ioctl to say, destroy an
 epair(4), we may hit if_detach_internal() without holding a lock and by
 the time we aquire it the interface might be gone.
 We should not panic() in this case as it is our fault for not holding
 the lock all the way. It is not ideal to return silently without error
 to user space, but other callers will all ignore the return values so
 do not change the entire KPI for little benefit for now.
 The ifp will be dealt with one way or another still.
2016-01-21 14:08:40 +00:00
bz
66c4b9df9c MFC r292603:
If bootverbose is enabled every vnet startup and virtual interface
 creation will print extra lines on the console. We are generally not
 interested in this (repeated) information for each VNET. Thus only
 print it for the default VNET. Virtual interfaces on the base system
 will remain printing information, but e.g. each loopback in each vnet
 will no longer cause a "bpf attached" line.
2016-01-21 14:06:16 +00:00
bz
4f9dd5713d MFC r292602:
Simplify bringup order by removing a SYSINIT making it a static list
 initialization.

Obtained from:	p4 @180384,180385
2016-01-21 14:04:02 +00:00
dumbbell
b7a57a0815 iicbus: Use device_delete_children() instead of explicit child removal
If the bus is detached and deleted by a call to device_delete_child() or
device_delete_children() on a device higher in the tree, I²C children
were already detached and deleted. So the device_t pointer stored in sc
points to freed memory: we must not try to delete it again.

By using device_delete_children(), we let subr_bus.c figure out if there
are children to take care of.

While here, make sure iicbus_detach() and iicoc_detach() call
device_delete_children() too, to be safe.

Reviewed by:	jhb, imp
Approved by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D3926
2016-01-21 08:32:11 +00:00
dumbbell
240e29b903 iicbus: Remove trailing whitespaces
MFC of:		r289656
2016-01-21 08:24:54 +00:00
ngie
d5dcdbe9cc MFC r294126:
Fix warnings with gcc 5.0

reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
  warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
  mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)
2016-01-21 05:59:33 +00:00
ngie
1765ee7015 MFC r294127:
Fix warnings with clang/gcc

- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
  return code of -1 is implementation dependent
- Bump WARNS to 6
2016-01-21 05:57:32 +00:00
jamie
edc9e0e402 MFC r294183:
Clear errno before calling getpw*.

MFC r294196:

  Don't bother checking an ip[46].addr netmask/prefixlen.  This is already
  handled by ifconfig, and it was doing it wrong when the paramater included
  extra ifconfig options.

PR:		205926
2016-01-21 04:37:16 +00:00
rpokala
ad88a89c79 MFC r294042: Add rotationrate to geom disk dumpconf
Parse and report the nominal rotation rate reported by the drive.

Approved by:	jhb
2016-01-21 03:05:03 +00:00
jhb
92f20bcad8 MFC 292682:
Fix remaining direct tests of the carry flag in the v86 %eflags via a
magic number to use V86_CY() instead.  These should have been fixed as
part of the cleanup in r226746 but were missed.

The md5 sums of the object files were unchanged, so there should be no
functional change.

PR:		205424
Submitted by:	Alexander Kuleshov <kuleshovmail@gmail.com>
2016-01-21 01:25:28 +00:00
allanjude
c599610d3a MFC: r294191
Never 4k align the MBR bootpool because zfsldr can not deal with a gap

Sponsored by:	ScaleEngine Inc.
2016-01-21 01:15:40 +00:00
ian
501fb1d31d Add strlcat and strlcpy to libstand on ia64. This is conceptually part
of the MFC done in r294342, but since ia64 is gone in -current this is a
direct commit to 10-stable to add the functions.
2016-01-20 22:05:49 +00:00
emaste
73f3f54cd9 Leave temporary ia64 loader.sym behind if the build fails
This facilitates investigation of the build failure, and is the same way
it's done for other architectures using EFI.
2016-01-20 21:22:06 +00:00
emaste
1f21751dc8 MFC r276539: Update ELF headers to include additional defines
The elftoolchain project includes these additional defines for various
userland programs. Given that arch-specific defines are still interesting
in the context of userland programs reading or writing ELF metadata, they
should be included in top-level ELF headers.

Remove duplicate defines from ARM and MIPS elf headers.

Submitted by:	will (initial version)
Sponsored by:	The FreeBSD Foundation
2016-01-20 21:06:24 +00:00
brooks
6ef41be39c MFC r293856:
Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR:		206178
Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>
2016-01-20 19:26:04 +00:00
emaste
b0b221cc1e MFC r288081: Add MIPS ELF section type SHT_MIPS_ABIFLAGS definition 2016-01-20 19:20:28 +00:00
brooks
e2eb05d1c7 MFC r293855:
Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR:		206177
Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>
2016-01-20 19:08:49 +00:00
emaste
8ac497f63e MFC r288083, r288138: elfdump: report MIPS-specific ELF section types 2016-01-20 17:40:11 +00:00
emaste
891fcb7338 MFC r293245: loader.efi style(9) cleanup
Submitted by:	smh
2016-01-20 17:38:21 +00:00
emaste
778c0e779e MFC r293234: Enable the beastie menu for the UEFI console
As of r294445 [in stable/10] the UEFI console includes basic terminal
emulator support.

Relnotes:	Yes
2016-01-20 16:59:37 +00:00
emaste
edbebd2db4 MFC r293233: loader.efi: add terminal emulation support
This is based on the vidconsole implementation.

Submitted by:	Toomas Soome <tsoome@me.com>
Relnotes:	Yes
2016-01-20 16:53:38 +00:00
emaste
a418893174 MFC r293281: Use standard name for ASCII LF and FF control codes
PR:		205778
2016-01-20 16:41:00 +00:00
royger
0ad0bd3893 MFC r277215, r277291, r277418, r280953 and r280954:
loader: implement multiboot support for Xen Dom0

Note that only the subset of the multiboot specification needed in order to
boot a Xen Dom0 is implemented.

Sponsored by: Citrix Systems R&D
2016-01-20 13:23:02 +00:00
arybchik
2f8109724f MFC r294372
sfxge: refresh version to note matching version of out-of-tree driver

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 09:00:42 +00:00
arybchik
8e1b4efdf3 MFC r294310
sfxge: improve error handling in ef10_ev_rx()

Ensure that checksum flags and L3/L4 fields are ignored
if lower level errors are reported in the event.

Remove checks for CRC0_ERR (bad iSCSI header CRC) and
CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
are not used by any existing code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:28:32 +00:00
arybchik
c051b72131 MFC r294309
sfxge: select whether to read current or backup partition in Medford A/B scheme

The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes.  This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:26:58 +00:00
arybchik
1dee23352d MFC r294259
sfxge: regenerate EF10 registers definition for Medford

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:25:41 +00:00
arybchik
bdc333fcf3 MFC r294257
sfxge: regenerate siena_flash.h from FW sources

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:24:00 +00:00
arybchik
42521ae1a6 MFC r294256
sfxge: cleanup: remove extra empty lines

Sponsored by:   Solarflare Communications, Inc.
2016-01-20 08:21:07 +00:00