]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFH
Glen Barber [Tue, 9 Feb 2016 01:42:51 +0000 (01:42 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoAdjust MAC algo to support interface branching
Devin Teske [Tue, 9 Feb 2016 01:41:03 +0000 (01:41 +0000)]
Adjust MAC algo to support interface branching

8 years agoStop clang from generating movt/movw sequences. These don't get relocated
Andrew Turner [Tue, 9 Feb 2016 00:15:41 +0000 (00:15 +0000)]
Stop clang from generating movt/movw sequences. These don't get relocated
so will access data from an unrelocated address. This is only needed for
self relocating code on ARMv7, however this is true for both ubldr and
loader.efi, the only two loaders we support on ARMv7.

While here also force the fpu to be none as is done in libstand.

Sponsored by: ABT Systems Ltd

8 years agoEnsure the bss is aligned to a 4-byte address as we use 4-byte aligned
Andrew Turner [Tue, 9 Feb 2016 00:01:43 +0000 (00:01 +0000)]
Ensure the bss is aligned to a 4-byte address as we use 4-byte aligned
stores to clear it.

While here reduce the alignment of the data from 4k to 16 byte aligned.
This should be more than enough, without wasting too much space.

Sponsored by: ABT Systems Ltd

8 years agoCall kthread_exit() rather than kproc_exit() for a premature kthread exit.
John Baldwin [Mon, 8 Feb 2016 23:11:23 +0000 (23:11 +0000)]
Call kthread_exit() rather than kproc_exit() for a premature kthread exit.

Kernel threads (and processes) are supposed to call kthread_exit() (or
kproc_exit()) to terminate.  However, the kernel includes a fallback in
fork_exit() to force a kthread exit if a kernel thread's "main" routine
returns.  This fallback was added back when the kernel only had processes
and was not updated to call kthread_exit() instead of kproc_exit() when
threads were added to the kernel.

This mistake was particular exciting when the errant thread belonged to
proc0.  Due to the missing P_KTHREAD flag the fallback did not kick in
and instead tried to return to userland via whatever garbage was in the
trapframe.  With P_KTHREAD set it tried to terminate proc0 resulting in
other amusements.

PR: 204999
MFC after: 1 week

8 years agoMark proc0 as a kernel process via the P_KTHREAD flag.
John Baldwin [Mon, 8 Feb 2016 23:06:27 +0000 (23:06 +0000)]
Mark proc0 as a kernel process via the P_KTHREAD flag.

All other kernel processes have this flag set and all threads in proc0
(including thread0) have the similar TDP_KTHREAD flag set.

PR: 204999
Submitted by: Oliver Pinter @ HardenedBSD
Reviewed by: kib
MFC after: 1 week

8 years agoFix the SCSI Extended INQUIRY probe case when an error is returned
Kenneth D. Merry [Mon, 8 Feb 2016 22:13:08 +0000 (22:13 +0000)]
Fix the SCSI Extended INQUIRY probe case when an error is returned
and a retry is scheduled.

Instead of leaving the device queue frozen, unfreeze the device queue so
that the retry can happen.

Sponsored by: Spectra Logic
MFC after: 3 days

8 years agoFix the gcc build after r295407.
Mark Johnston [Mon, 8 Feb 2016 22:02:56 +0000 (22:02 +0000)]
Fix the gcc build after r295407.

X-MFC-With: r295407

8 years agoCreate a package for HAST.
Glen Barber [Mon, 8 Feb 2016 21:15:07 +0000 (21:15 +0000)]
Create a package for HAST.

Sponsored by: The FreeBSD Foundation

8 years agokmod.mk: Ensure ILINKS are created before building.
Bryan Drewery [Mon, 8 Feb 2016 20:58:52 +0000 (20:58 +0000)]
kmod.mk: Ensure ILINKS are created before building.

This allows skipping 'make depend' or running 'make clean all' without
getting a flip-flopping dependency due to the exists() just below.
Otherwise an error is encountered, such as:
  fatal error: 'machine/endian.h' file not found.

Sponsored by: EMC / Isilon Storage Division

8 years agokmod.mk: Support a beforebuild target such as bsd.prog.mk has.
Bryan Drewery [Mon, 8 Feb 2016 20:57:12 +0000 (20:57 +0000)]
kmod.mk: Support a beforebuild target such as bsd.prog.mk has.

Sponsored by: EMC / Isilon Storage Division

8 years agoEnsure include/ is properly tagged in the METALOG.
Glen Barber [Mon, 8 Feb 2016 20:21:07 +0000 (20:21 +0000)]
Ensure include/ is properly tagged in the METALOG.

Noticed by: des
Sponsored by: The FreeBSD Foundation

8 years agoficl: Replace rand(3) with random(3).
Pedro F. Giffuni [Mon, 8 Feb 2016 20:03:14 +0000 (20:03 +0000)]
ficl: Replace rand(3) with random(3).

Be a little more consistent with random(3) and push an
unsigned value.

Again, this has no effect as this code doesn't get compiled
for the boot code.

8 years agoficl: Replace rand(3) with random(3).
Pedro F. Giffuni [Mon, 8 Feb 2016 19:45:55 +0000 (19:45 +0000)]
ficl: Replace rand(3) with random(3).

While the later is a better random generator than the former, the main
reason of the change is that random() has a better chance to work with
libstand(3).

At this time we don't include random number generators in bootforth
so this has no effect.

8 years agoImplement -P for boot loader. It's a bit easier to implement here than
Warner Losh [Mon, 8 Feb 2016 19:34:17 +0000 (19:34 +0000)]
Implement -P for boot loader. It's a bit easier to implement here than
in boot1, like is normally done. When a keyboard appears in the UEFI
device tree, assume -D -h, just like on a BIOS boot.

# It is unclear if an ACPI keyboard appearing in the tree means there's
# a real keyboard or not. A USB keyboard doesn't seem to appear unless
# it is really there.

Differential Revision: https://reviews.freebsd.org/D5223

8 years agoIf libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols
Konstantin Belousov [Mon, 8 Feb 2016 19:24:13 +0000 (19:24 +0000)]
If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols
do not participate in the global symbols namespace, but rtld locks are
still replaced and functions are interposed.  In particular,
__pthread_map_stacks_exec is resolved to the libc version.  If a
library is loaded later, which requires adjustment of the stack
protection mode, rtld calls into libc __pthread_map_stacks_exec due to
the symbols scope.  The libc version might recurse into binder and
recursively acquire rtld bind lock, causing the hang.

Make libc __pthread_map_stacks_exec() interposed, which synchronizes
rtld locks and version of the stack exec hook when libthr loaded,
regardless of the symbol scope control or symbol resolution order.

The __pthread_map_stacks_exec() symbol is removed from the private
version in libthr since libc symbol now operates correctly in presence
of libthr.

Reported and tested by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAdd libexec/smrsh to the sendmail package.
Glen Barber [Mon, 8 Feb 2016 18:57:06 +0000 (18:57 +0000)]
Add libexec/smrsh to the sendmail package.

Submitted by: pfg
Sponsored by: The FreeBSD Foundation

8 years agoAdd comment/description for clibs, rescue, and sendmail packages.
Glen Barber [Mon, 8 Feb 2016 18:44:26 +0000 (18:44 +0000)]
Add comment/description for clibs, rescue, and sendmail packages.

Sponsored by: The FreeBSD Foundation

8 years agoSort.
Glen Barber [Mon, 8 Feb 2016 18:42:33 +0000 (18:42 +0000)]
Sort.

Sponsored by: The FreeBSD Foundation

8 years agoCreate a package for sendmail(8).
Glen Barber [Mon, 8 Feb 2016 18:41:46 +0000 (18:41 +0000)]
Create a package for sendmail(8).

Sponsored by: The FreeBSD Foundation

8 years agoAdjust MAC allocation algo to support layering
Devin Teske [Mon, 8 Feb 2016 17:47:36 +0000 (17:47 +0000)]
Adjust MAC allocation algo to support layering

8 years agoProvide additional information on overall purpose
Devin Teske [Mon, 8 Feb 2016 17:36:46 +0000 (17:36 +0000)]
Provide additional information on overall purpose

8 years agoFix copy/paste error; s/ngX/eXb/
Devin Teske [Mon, 8 Feb 2016 17:30:17 +0000 (17:30 +0000)]
Fix copy/paste error; s/ngX/eXb/

8 years agoRestore kgzldr on i386 only
Ed Maste [Mon, 8 Feb 2016 16:59:52 +0000 (16:59 +0000)]
Restore kgzldr on i386 only

I previously disconnected kgzdr based on a misunderstanding.

I'd still like to transition to supporting only the loader(8)-based
boot path for handling compressed kernels, but that can follow the
standard deprecation procedure.

This reverts r291113.

Requested by: dteske

8 years agoRename the signpackages target to sign-packages, and include it in the
Dag-Erling Smørgrav [Mon, 8 Feb 2016 16:34:13 +0000 (16:34 +0000)]
Rename the signpackages target to sign-packages, and include it in the
packages meta-target so 'make packages' now does everything.

8 years agoSplit the packages target into stage-packages and create-packages to make
Dag-Erling Smørgrav [Mon, 8 Feb 2016 16:08:13 +0000 (16:08 +0000)]
Split the packages target into stage-packages and create-packages to make
it possible to roll new packages from an existing build without having to
restage them.

8 years agoSplit /rescue into its own package.
Glen Barber [Mon, 8 Feb 2016 14:27:45 +0000 (14:27 +0000)]
Split /rescue into its own package.

Sponsored by: The FreeBSD Foundation

8 years agoMFH
Glen Barber [Mon, 8 Feb 2016 12:16:01 +0000 (12:16 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoRemove the assert which outlived its usefulness, and, by default,
Konstantin Belousov [Mon, 8 Feb 2016 10:54:27 +0000 (10:54 +0000)]
Remove the assert which outlived its usefulness, and, by default,
disable compilation of the code which made it possible to call
stop_all_proc() from usermode at all.

Move the comment to the preamble of stop_all_proc() and reword it to
give overview of the function intent.

proc0 has P_HADTHREADS flag set due to kthread_add(), but no
P_KTHREAD, which triggered the assert, which does not serve a purpose
now.

Reported by: Oliver Pinter
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAdd a format string to the err() calls.
Adrian Chadd [Mon, 8 Feb 2016 02:11:34 +0000 (02:11 +0000)]
Add a format string to the err() calls.

8 years agoMake sure NANO_DISKIMGDIR exists.
Warner Losh [Sun, 7 Feb 2016 23:20:44 +0000 (23:20 +0000)]
Make sure NANO_DISKIMGDIR exists.

8 years agosemget(): Check for [EEXIST] error first.
Jilles Tjoelker [Sun, 7 Feb 2016 22:12:39 +0000 (22:12 +0000)]
semget(): Check for [EEXIST] error first.

Although POSIX literally permits failing with [EINVAL] if IPC_CREAT and
IPC_EXCL were both passed, the semaphore set already exists and has fewer
semaphores than nsems, this does not allow an application to retry safely:
if the [EINVAL] is actually because of the semmsl limit, an infinite loop
would result.

PR: 206927

8 years agosemget(2): Add missing [EINVAL] conditions.
Jilles Tjoelker [Sun, 7 Feb 2016 21:25:08 +0000 (21:25 +0000)]
semget(2): Add missing [EINVAL] conditions.

PR: 206927

8 years agoSimplify running the FreeBSD test suite
Enji Cooper [Sun, 7 Feb 2016 18:40:04 +0000 (18:40 +0000)]
Simplify running the FreeBSD test suite

Replace `make regress` (legacy test make target) and `make test` (incomplete
test make target added with the FreeBSD test suite) with make check as it's
consistent with other open source projects.

`make check` defaults to running tests from `.OBJDIR`, but can be overridden
with the `CHECKDIR` variable.

Add `make checkworld` target to simplify running the FreeBSD test suite from
`TESTSBASE` (i.e. the top-level tests directory), similar to buildworld.

Document `make check` and `make checkworld` in build(7).

Other minor changes:

- Rename intermediate file (`Kyuafile.auto`) to `Kyuafile` to simplify
  `make check`.
- Remove terse warnings attached to `beforetest`/`aftertest`.
- Add kyua binary check to check target in suite.test.mk; error out if it's
  not found

The MFC is [partly] contingent on other build related changes being MFCed.

Differential Revision: https://reviews.freebsd.org/D4406
MFC after: 2 months
X-MFC to: stable/10
Relnotes: yes
Reviewed by: bdrewery, Evan Cramer <eccramer@gmail.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoUse new NANO_LOG to put the logs some place reasonable. Also, share
Warner Losh [Sun, 7 Feb 2016 16:44:13 +0000 (16:44 +0000)]
Use new NANO_LOG to put the logs some place reasonable. Also, share
the object directory among all builds where it makes sense. When
building with NANO_CPUTYPE, separate that out to its own object
directory. Put disk files in their own directories.

This should make having multiple variants of the same architecture
saner.

8 years agoUse NANO_LOG instead of NANO_OBJ for log file locations. Have it
Warner Losh [Sun, 7 Feb 2016 16:44:06 +0000 (16:44 +0000)]
Use NANO_LOG instead of NANO_OBJ for log file locations. Have it
default to NANO_OBJ.

8 years agoAdd simple config for i386 BIOS boot.
Warner Losh [Sun, 7 Feb 2016 16:44:04 +0000 (16:44 +0000)]
Add simple config for i386 BIOS boot.

8 years agoVarious fixups:
Warner Losh [Sun, 7 Feb 2016 16:43:55 +0000 (16:43 +0000)]
Various fixups:
o Make sure we create bsd label for MBR scheme (though we don't
  really need it for the efi case, and boot1 can't read it). Add
  notes about why we have to do this, at least for BIOS.
o Make the BIOS / UEFI with gpt config work.
o Remove now-moribund packaging stuff

8 years agoAdd two scripts for vnet jails
Devin Teske [Sun, 7 Feb 2016 16:41:54 +0000 (16:41 +0000)]
Add two scripts for vnet jails

One for if_bridge(4) back-end, another for ng_bridge(4) back-end

Sponsored by: FIS Global, Inc.

8 years agoMinor grammar fix in comment.
Pedro F. Giffuni [Sun, 7 Feb 2016 16:18:12 +0000 (16:18 +0000)]
Minor grammar fix in comment.

8 years agoRevert r295359:
Pedro F. Giffuni [Sun, 7 Feb 2016 15:40:01 +0000 (15:40 +0000)]
Revert r295359:
CID 1018688 is a false positive.

The initialization is done by calling vn_start_write(... &mp, flags).
mp is only an output parameter unless (flags & V_MNTREF), and fdesc
doesn't put V_MNTREF in flags.

Pointed out by: bde

8 years agomsdosfs_rename: yet another unused value.
Pedro F. Giffuni [Sun, 7 Feb 2016 15:36:16 +0000 (15:36 +0000)]
msdosfs_rename: yet another unused value.

As with r295355, it seems to be left over from a cleanup
in r33548. The code is not in NetBSD either.

Thanks to bde for checking out the history.

8 years agoMFV r295360
Pedro F. Giffuni [Sun, 7 Feb 2016 15:26:21 +0000 (15:26 +0000)]
MFV r295360
Sync our libedit with NetBSD's libedit 2016-01-16

Obtained from: NetBSD

8 years agoAdd missing comma
Devin Teske [Sun, 7 Feb 2016 13:33:18 +0000 (13:33 +0000)]
Add missing comma

8 years agoRemove the hard-coded 'ath0' strings and use ATH_DEFAULT.
Adrian Chadd [Sun, 7 Feb 2016 04:28:03 +0000 (04:28 +0000)]
Remove the hard-coded 'ath0' strings and use ATH_DEFAULT.

Remove the duplicate ATH_DEFAULT fields.  The build bits should be including
../Makefile.inc as appropriate.

8 years agocd9660: Drop an unnecessary check for NULL.
Pedro F. Giffuni [Sun, 7 Feb 2016 03:48:40 +0000 (03:48 +0000)]
cd9660: Drop an unnecessary check for NULL.

This was unnecessary and also confused Coverity.

Confirmed on: NetBSD
CID: 978558

8 years agoImport libedit 2016-01-16
Pedro F. Giffuni [Sun, 7 Feb 2016 01:38:50 +0000 (01:38 +0000)]
Import libedit 2016-01-16

Obtained from: NetBSD

8 years agofdesc_setattr: unitialized pointer read
Pedro F. Giffuni [Sun, 7 Feb 2016 01:09:38 +0000 (01:09 +0000)]
fdesc_setattr: unitialized pointer read

CID: 1018688

8 years agoClarify a comment in kern_openat() about the use of falloc_noinstall().
Kirk McKusick [Sun, 7 Feb 2016 01:04:47 +0000 (01:04 +0000)]
Clarify a comment in kern_openat() about the use of falloc_noinstall().

Suggested by: Steve Jacobson

8 years agoDo not set vfs.root.mountfrom unnecessarily
Allan Jude [Sun, 7 Feb 2016 00:49:15 +0000 (00:49 +0000)]
Do not set vfs.root.mountfrom unnecessarily

This causes boot from external media (installer USB image) to mount / from
the default ZFS BE, rather than the USB device.

Reported by: kmoore
MFC after: 5 days
Sponsored by: ScaleEngine Inc.

8 years agoFix EFI platform build failures
Steven Hartland [Sat, 6 Feb 2016 22:01:25 +0000 (22:01 +0000)]
Fix EFI platform build failures

With warnings now enabled some plaforms where failing due to warnings.
* Fix st_size printed as a size_t when its actually an off_t.
* Fix pointer conversion in load_elf for some 32bit platforms due to 64bit
  off in ef.

MFC after: 2 days
X-MFC-With:
Sponsored by: Multiplay

8 years agomsdosfs_rename: Unused value
Pedro F. Giffuni [Sat, 6 Feb 2016 21:54:02 +0000 (21:54 +0000)]
msdosfs_rename: Unused value

Assigned value to pmp, is immediatedly overwritten before it can be used.

CID: 1304892

8 years agoDo not call vn_fullpath(9) (through the pmc_getfilename() wrapper)
Konstantin Belousov [Sat, 6 Feb 2016 15:39:04 +0000 (15:39 +0000)]
Do not call vn_fullpath(9) (through the pmc_getfilename() wrapper)
when its result is immediately ignored, i.e. for kernel processes
forked from the user process.  Do not test for non-null before freeing
string.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoARM: Rename remaining ARMv4 specific function in DTrace code.
Michal Meloun [Sat, 6 Feb 2016 11:16:15 +0000 (11:16 +0000)]
ARM: Rename remaining ARMv4 specific function in DTrace code.
I missed it in r295319.

Pointed by: tuexen

8 years agofork: ansify sys_pdfork
Mateusz Guzik [Sat, 6 Feb 2016 09:01:03 +0000 (09:01 +0000)]
fork: ansify sys_pdfork

No functional changes.

8 years agoUse basenames for getfacl, setfacl, and zpool to work around the
Enji Cooper [Sat, 6 Feb 2016 04:13:20 +0000 (04:13 +0000)]
Use basenames for getfacl, setfacl, and zpool to work around the
fact that Jenkins hardcodes image sizes to 2GB with the FreeBSD_HEAD
job

This is to stop the unnecessary failure emails because we've gone
over the 2GB limit

MFC after: 1 week
X-MFC with: r295341
Sponsored by: EMC / Isilon Storage Division

8 years agoFix typo in a comment; s/redined/redefined/
Devin Teske [Sat, 6 Feb 2016 02:35:52 +0000 (02:35 +0000)]
Fix typo in a comment; s/redined/redefined/

Thanks to: rpokala

8 years agoAdd comment to explain functionality of code
Devin Teske [Sat, 6 Feb 2016 02:32:13 +0000 (02:32 +0000)]
Add comment to explain functionality of code

Thanks to: rpokala

8 years agoAllow rc_conf_files to be redefined in rc.conf(5)
Devin Teske [Sat, 6 Feb 2016 02:16:48 +0000 (02:16 +0000)]
Allow rc_conf_files to be redefined in rc.conf(5)

With this change, it's possible to redefine rc_conf_files (e.g.,
sysrc rc_conf_files+=/etc/rc.conf.other) and have the boot process
pick up settings in extra files. The sysrc(8) tool can be used to
query/enumerate/find/manage extra files configured in this manner.

Relnotes: yes

8 years agoRequire /bin/getfacl and /bin/setfacl when running the acl tests
Enji Cooper [Fri, 5 Feb 2016 23:50:15 +0000 (23:50 +0000)]
Require /bin/getfacl and /bin/setfacl when running the acl tests

For cases where these utilities aren't installed, the tests would fail today
in a non-intuitive manner on sub-testcase #3 in each of the test scripts

MFC after: 1 week
Reviewed by: markj
Sponsored by: EMC / Isilon Storage Division

8 years agoProvide a future release as an example, instead of a historical one.
Gleb Smirnoff [Fri, 5 Feb 2016 21:57:50 +0000 (21:57 +0000)]
Provide a future release as an example, instead of a historical one.

8 years agoRemove libc, librtld_db, libthr packages, and further increase
Glen Barber [Fri, 5 Feb 2016 21:01:08 +0000 (21:01 +0000)]
Remove libc, librtld_db, libthr packages, and further increase
the constraints on what needs to be installed in a specific to
maintain consistency during upgrades.

Create a new clibs package containing libraries that are needed
as a bare minimum for consistency.

With much help and input from: kib
Sponsored by: The FreeBSD Foundation

8 years agoreadelf: decode AArch64 TLS descriptor relocations
Ed Maste [Fri, 5 Feb 2016 20:57:21 +0000 (20:57 +0000)]
readelf: decode AArch64 TLS descriptor relocations

From ELF for the ARM(R) 64-bit Architecture, table 4-19.

Obtained from: ELF Tool Chain r3386
Sponsored by: The FreeBSD Foundation

8 years agoreadelf: report value of unknown relocation types
Ed Maste [Fri, 5 Feb 2016 20:56:11 +0000 (20:56 +0000)]
readelf: report value of unknown relocation types

Obtained from: ELF Tool Chain r3387
Sponsored by: The FreeBSD Foundation

8 years agoreadelf: avoid accidental fallthrough in RISC-V relocations
Ed Maste [Fri, 5 Feb 2016 20:54:51 +0000 (20:54 +0000)]
readelf: avoid accidental fallthrough in RISC-V relocations

This would have printed an unknown RISC-V relocation type as a SPARC
relocation.

CID: 1331398
Obtained from: ELF Tool Chain r3283
Sponsored by: The FreeBSD Foundation

8 years agoRename aiocblist to kaiocb and use consistent variable names.
John Baldwin [Fri, 5 Feb 2016 20:38:09 +0000 (20:38 +0000)]
Rename aiocblist to kaiocb and use consistent variable names.

Typically <foo>list is used for a structure that holds a list head in
FreeBSD, not for members of a list.  As such, rename 'struct aiocblist'
to 'struct kaiocb' (the kernel version of 'struct aiocb').

While here, use more consistent variable names for AIO control blocks:

- Use 'job' instead of 'aiocbe', 'cb', 'cbe', or 'iocb' for kernel job
  objects.
- Use 'jobn' instead of 'cbn' for use with TAILQ_FOREACH_SAFE().
- Use 'sjob' and 'sjobn' instead of 'scb' and 'scbn' for fsync jobs.
- Use 'ujob' instead of 'aiocbp', 'job', 'uaiocb', or 'uuaiocb' to hold
  a user pointer to a 'struct aiocb'.
- Use 'ujobp' instead of 'aiocbp' for a user pointer to a 'struct aiocb *'.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5125

8 years agoPlug a vm_page leak introduced in r292373.
Mark Johnston [Fri, 5 Feb 2016 19:35:53 +0000 (19:35 +0000)]
Plug a vm_page leak introduced in r292373.

Reported by: vangyzen

8 years agoUpdate script for modern `zpool status` output.
Alexander Motin [Fri, 5 Feb 2016 18:17:37 +0000 (18:17 +0000)]
Update script for modern `zpool status` output.

8 years agoAdd error check to not leak logs with syntax errors in case of failed
Alexander Motin [Fri, 5 Feb 2016 17:28:11 +0000 (17:28 +0000)]
Add error check to not leak logs with syntax errors in case of failed
`zpool history`.

MFC after: 1 month

8 years agoUpdate em(4) to 7.6.1; update igb(4) to 2.5.3.
Eric Joyner [Fri, 5 Feb 2016 17:14:37 +0000 (17:14 +0000)]
Update em(4) to 7.6.1; update igb(4) to 2.5.3.

Major changes:

- Add i219/i219(2) hardware support. (Found on Skylake generation and newer
  chipsets.)
  - Further to the last Skylake support diff, this one also includes support for
    the Lewisburg chipset (i219(3)).

- Add a workaround to an igb hardware errata.
  All 1G server products need to have IPv6 extension header parsing turned off.
  This should be listed in the specification updates for current 1G server
  products, e.g. for i350 it's errata #37 in this document:
  http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ethernet-controller-i350-spec-update.pdf

- Avoton (i354) PHY errata workaround added

And a bunch of minor fixes, as well as #defines for things that the current
em(4)/igb(4) drivers don't implement.

Differential Revision: https://reviews.freebsd.org/D3162
Reviewed by: sbruno, marius, gnn
Approved by: gnn
MFC after: 2 weeks
Sponsored by: Intel Corporation

8 years agoImplement kdb_cpu_sync_icache on arm64.
Andrew Turner [Fri, 5 Feb 2016 15:38:28 +0000 (15:38 +0000)]
Implement kdb_cpu_sync_icache on arm64.

Sponsored by: ABT Systems Ltd

8 years agoFix EFI multi device boot support
Steven Hartland [Fri, 5 Feb 2016 15:35:33 +0000 (15:35 +0000)]
Fix EFI multi device boot support

Fix EFI boot support when presented with multiple valid boot partitions
across multiple devices.

It now prefers to boot from partitions that are present on the underlying
device that the boot1 image was loaded from. This means that it will boot
from the partitions on device the user chose from EFI boot menu in
preference to those on other devices.

Also fixed is the recovery from a failed attempt to boot, from a seemingly
valid partition, by continuing to trying all other available partitions
no matter what the error.

boot1 now use * to signify a partition what was accepted from the preferred
device and + otherwise.

Finally some error messages where improved and DPRINTF's with slowed boot
to aid debugging.

ZFS will still be preferred over UFS when both are available on the boot
device.

Reviewed by: imp
MFC after: 1 week
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5108

8 years agoARM: Use new ARMv6 naming conventions for cache and TLB functions
Michal Meloun [Fri, 5 Feb 2016 14:57:41 +0000 (14:57 +0000)]
ARM: Use new ARMv6 naming conventions for cache and TLB functions
in all but ARMv4 specific files.
Expand ARMv6 compatibility stubs in cpu-v4.h. Use physical address
in L2 cache functions if ARM_L2_PIPT is defined.

8 years agoFollow up r295257 and replace bad reference to TEX in defines,
Svatopluk Kraus [Fri, 5 Feb 2016 11:28:35 +0000 (11:28 +0000)]
Follow up r295257 and replace bad reference to TEX in defines,
variables and functions. This stuff is named properly now.

Thus, the VM_MEMATTR_xxx is an index to PTE2 attribute table.

Pointy hat to: skra

8 years agoFollow up r295257 and convert also pt_memattr. This did not break
Svatopluk Kraus [Fri, 5 Feb 2016 10:40:01 +0000 (10:40 +0000)]
Follow up r295257 and convert also pt_memattr. This did not break
anything as both VM_MEMATTR_WB_WA and PTE2_ATTR_WB_WA are zero.
Correct also type of pmap_dcache_wb_pou() last argument.

8 years agoARM: Introduce new cpu-v4.h header and move all ARMv4 specific code
Michal Meloun [Fri, 5 Feb 2016 09:46:24 +0000 (09:46 +0000)]
ARM: Introduce new cpu-v4.h header and move all ARMv4 specific code
from cpu-v6.h to it.
Remove unneeded cpu-v6.h includes.

8 years agohyperv: Use malloc for page allocation.
Sepherosa Ziehau [Fri, 5 Feb 2016 07:29:11 +0000 (07:29 +0000)]
hyperv: Use malloc for page allocation.

We will eventually convert them to use busdma.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: adrian, sephe, Dexuan Cui <decui microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5087

8 years agohyperv: Use WAITOK in the places where we can wait
Sepherosa Ziehau [Fri, 5 Feb 2016 07:20:31 +0000 (07:20 +0000)]
hyperv: Use WAITOK in the places where we can wait

And convert rndis non-hot path spinlock to mutex.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: adrian, sephe
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5081

8 years agohyperv: Use standard taskqueue instead of hv_work_queue
Sepherosa Ziehau [Fri, 5 Feb 2016 07:09:58 +0000 (07:09 +0000)]
hyperv: Use standard taskqueue instead of hv_work_queue

HyperV code was ported from Linux.  There is an implementation of
work queue called hv_work_queue.  In FreeBSD, taskqueue could be
used for the same purpose.  Convert all the consumer of hv_work_queue
to use taskqueue, and remove work queue implementation.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4963

8 years agohyperv/hn: Add an option to always do transmission scheduling
Sepherosa Ziehau [Fri, 5 Feb 2016 05:50:53 +0000 (05:50 +0000)]
hyperv/hn: Add an option to always do transmission scheduling

It is off by default. This eases more experiment on hn(4).

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5175

8 years agohyperv/hn: Move LRO flush to the channel processing rollup
Sepherosa Ziehau [Fri, 5 Feb 2016 05:44:31 +0000 (05:44 +0000)]
hyperv/hn: Move LRO flush to the channel processing rollup

This significantly increases LRO aggregation ratio when there are
large amount of connections (improves reception performance a lot).

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5167

8 years agohyperv/hn: Increase LRO entry count to 128 by default
Sepherosa Ziehau [Fri, 5 Feb 2016 05:38:01 +0000 (05:38 +0000)]
hyperv/hn: Increase LRO entry count to 128 by default

hn(4) only has one RX ring currently, so default 8 LRO entries
are too small.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5166

8 years agohyperv/hn: Recover half of the chimney sending space
Sepherosa Ziehau [Fri, 5 Feb 2016 05:31:31 +0000 (05:31 +0000)]
hyperv/hn: Recover half of the chimney sending space

We lost half of the chimney sending space, because we mis-used
ffs() on a 64 bits mask, where ffsl() should be used.

While I'm here:
- Use system atomic operation instead.
- Stringent chimney sending index assertion.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5159

8 years agohyperv/hn: Factor out hn_encap() from hn_start_locked()
Sepherosa Ziehau [Fri, 5 Feb 2016 05:25:11 +0000 (05:25 +0000)]
hyperv/hn: Factor out hn_encap() from hn_start_locked()

It will be shared w/ upcoming ifnet.if_transmit implementaion.

No functional changes.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5158

8 years agohyperv/hn: Obey IFCAP_RXCSUM configure
Sepherosa Ziehau [Fri, 5 Feb 2016 05:17:48 +0000 (05:17 +0000)]
hyperv/hn: Obey IFCAP_RXCSUM configure

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5104

8 years agohyperv/hn: Add sysctls to trust host side UDP and IP csum verification
Sepherosa Ziehau [Fri, 5 Feb 2016 05:12:30 +0000 (05:12 +0000)]
hyperv/hn: Add sysctls to trust host side UDP and IP csum verification

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5103

8 years agohyperv/hn: Enable UDP RXCSUM
Sepherosa Ziehau [Fri, 5 Feb 2016 05:06:14 +0000 (05:06 +0000)]
hyperv/hn: Enable UDP RXCSUM

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5102

8 years agohyperv/hn: Enable IP header checksum offloading
Sepherosa Ziehau [Fri, 5 Feb 2016 05:01:02 +0000 (05:01 +0000)]
hyperv/hn: Enable IP header checksum offloading

So that:
- TCP/IP stack will not do unnecessary IP header checksum for TSO
  packets.
- Reduce guest load for non-TSO IP packets.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5099

8 years agohyperv/hn: Reorganize TX csum offloading
Sepherosa Ziehau [Fri, 5 Feb 2016 04:10:04 +0000 (04:10 +0000)]
hyperv/hn: Reorganize TX csum offloading

- For non-TSO offloading, we don't need to access mbuf to know
  which csum offloading is requested, we can just use the
  CSUM_{IP,TCP,UDP} in the csum_flags.
- For TSO offloading, we still can depend on CSUM_{TSO4,TSO6}
  in the csum_flags to tell whether the TSO packet is an IPv4
  TSO packet or an IPv6 TSO packet.

This streamlines csum offloading handling (remove the two goto)
and allows us the nuke the unnecessary get_transport_proto_type().

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5098

8 years agohyperv/hn: Avoid duplicate csum features settings
Sepherosa Ziehau [Fri, 5 Feb 2016 04:03:50 +0000 (04:03 +0000)]
hyperv/hn: Avoid duplicate csum features settings

- Record csum features in softc, so we don't need to duplicate the
  logic from attach path to ioctl path.
- Protect if_capenable and if_hwassist changes by main lock.
- Prefer turn on/off bits in if_hwassist explicitly instead of using
  XOR.

Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5085

8 years agohyperv/stor: Fix the NULL pointer dereference
Sepherosa Ziehau [Fri, 5 Feb 2016 03:46:53 +0000 (03:46 +0000)]
hyperv/stor: Fix the NULL pointer dereference

Reported by: Netapp
Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: adrian, sephe, Dexuan Cui <decui microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5097

8 years agoAdd missing files to 'at' and 'rcmds' packages.
Glen Barber [Fri, 5 Feb 2016 03:20:27 +0000 (03:20 +0000)]
Add missing files to 'at' and 'rcmds' packages.

Sponsored by: The FreeBSD Foundation

8 years agoCapture a few stragglers that should be in the casper package.
Glen Barber [Fri, 5 Feb 2016 02:51:45 +0000 (02:51 +0000)]
Capture a few stragglers that should be in the casper package.

Sponsored by: The FreeBSD Foundation

8 years agoInclude ld-elf.so and ld-elf32.so in the librtld_db
Glen Barber [Fri, 5 Feb 2016 02:29:41 +0000 (02:29 +0000)]
Include ld-elf.so and ld-elf32.so in the librtld_db
package.

Sponsored by: The FreeBSD Foundation

8 years agoUpdate libalias and libpam packaged files.
Glen Barber [Fri, 5 Feb 2016 01:03:38 +0000 (01:03 +0000)]
Update libalias and libpam packaged files.

Sponsored by: The FreeBSD Foundation

8 years agoSilence a few command lines.
Glen Barber [Fri, 5 Feb 2016 00:43:42 +0000 (00:43 +0000)]
Silence a few command lines.

Sponsored by: The FreeBSD Foundation

8 years agoAdd sysctls for dumping out the device mapping tables. I'm finding this
Scott Long [Thu, 4 Feb 2016 23:38:55 +0000 (23:38 +0000)]
Add sysctls for dumping out the device mapping tables.  I'm finding this
useful for debugging device-target translation bugs.

MFC after: 3 days
Sponsored by: Netflix

8 years agoProvide a workaround for setting the correct endianness when doing CFI on
Adrian Chadd [Thu, 4 Feb 2016 22:39:27 +0000 (22:39 +0000)]
Provide a workaround for setting the correct endianness when doing CFI on
a mips big-endian board.

This is (hopefully! ish!) a temporary change until a slightly better way
can be found to express this without a config option.

Tested:

* BUFFALO WZR-HP-G300NH 1stGen (by submitter)

Submitted by: Mori Hiroki <yamori813@yahoo.co.jp>

8 years agoSummary: Update the date
George V. Neville-Neil [Thu, 4 Feb 2016 21:46:37 +0000 (21:46 +0000)]
Summary: Update the date

8 years agoSummary: Remove discussion of fastforwarding.
George V. Neville-Neil [Thu, 4 Feb 2016 21:39:58 +0000 (21:39 +0000)]
Summary: Remove discussion of fastforwarding.