]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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.

8 years agoMark shlibs_required/shlibs_provided lines as temporary, following
Glen Barber [Thu, 4 Feb 2016 21:27:03 +0000 (21:27 +0000)]
Mark shlibs_required/shlibs_provided lines as temporary, following
brief discussion with bapt.

Sponsored by: The FreeBSD Foundation

8 years agoAdd package files for libc, libedit, librtld_db, and libthr.
Glen Barber [Thu, 4 Feb 2016 21:20:26 +0000 (21:20 +0000)]
Add package files for libc, libedit, librtld_db, and libthr.

libedit is needed for sh(1), which if updated before runtime,
can cause undesirable behavior.

For the rest, the installation order needs to be:

 1) librtld
 2) libc
 3) libthr

The dependency listing and shilbs_required entries ensure this
behavior.

Sponsored by: The FreeBSD Foundation

8 years agoCreate a 'casper' package.
Glen Barber [Thu, 4 Feb 2016 21:17:15 +0000 (21:17 +0000)]
Create a 'casper' package.

Sponsored by: The FreeBSD Foundation

8 years agoFirst pass through library packaging.
Glen Barber [Thu, 4 Feb 2016 21:16:35 +0000 (21:16 +0000)]
First pass through library packaging.

Sponsored by: The FreeBSD Foundation

8 years agoWhen matching brand to the ELF binary by notes, try to find a brand
Konstantin Belousov [Thu, 4 Feb 2016 20:55:49 +0000 (20:55 +0000)]
When matching brand to the ELF binary by notes, try to find a brand
with interpreter name exactly matching one wanted by the binary.  If
no such brand exists, return first brand which accepted the binary by
note.

The change fixes a regression after r292749, where e.g. our two ia32
compat brands, ia32_brand_info and ia32_brand_oinfo, only differ by
the interpeter path and binary matches to a brand by linkage order.
Then old binaries which require /usr/libexec/ld-elf.so.1 but matched
against ia32_brand_info with interp_path /libexec/ld-elf.so.1, were
considered requiring non-standard interpreter name, and magic to force
ld-elf32.so.1 did not happen.

Note that it might make sense to apply the same selection of brands
for other matching criteria, SCO EI_OSABI and 3.x string.

Reported and tested by: dwmalone
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

8 years agoAdd defines for WRITE_UNCORRECTABLE ATA command, and improve command logging
Ravi Pokala [Thu, 4 Feb 2016 19:53:54 +0000 (19:53 +0000)]
Add defines for WRITE_UNCORRECTABLE ATA command, and improve command logging

Add #defines for ATA_WRITE_UNCORRECTABLE48 and its features. Update the
decoding in ATACAM to recognize the new values. Also improve command
decoding for a few other commands (SMART, NOP, SET_FEATURES). Bring the
decoding in ata(4) up to parity with ATACAM.

Reviewed by: mav, imp
MFC after: 1 month
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D5181

8 years agoIn FreeBSD 10 and higher the driver announces SCTP checksum offloading support
Michael Tuexen [Thu, 4 Feb 2016 18:08:50 +0000 (18:08 +0000)]
In FreeBSD 10 and higher the driver announces SCTP checksum offloading support
also for 82598, which doesn't support it.
The legacy code has a check for it, which was missed when the code for dealing with
CSUM_IP6_* was added. Add the same check for FreeBSD 10 and higher.

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

8 years ago- connect(2) Clarify namelen
Jason Helfman [Thu, 4 Feb 2016 18:03:06 +0000 (18:03 +0000)]
- connect(2) Clarify namelen

PR: 206838
Submitted by: t@tobik.me
Approved by: bcr (mentor)
MFH: after 1 week
Differential Revision: https://reviews.freebsd.org/D5194

8 years agoFix build of powerpc FPU emulator after changes in r295132 to restore the
John Baldwin [Thu, 4 Feb 2016 17:43:56 +0000 (17:43 +0000)]
Fix build of powerpc FPU emulator after changes in r295132 to restore the
ABI of struct fpreg.  The FPU emulator operates on the "raw" FPU state
stored in the pcb rather than the "cooked" fpreg state used for ptrace()
and cores.

Reported by: bz

8 years agoEnable checking of the stack alignment. The stack should be aligned to a
Andrew Turner [Thu, 4 Feb 2016 17:22:15 +0000 (17:22 +0000)]
Enable checking of the stack alignment. The stack should be aligned to a
16-byte value. With this the hardware will check if a memory access uses
an incorrectly aligned stack pointer as the base address.

Sponsored by: ABT Systems Ltd

8 years agoFix grammar in error statement
Devin Teske [Thu, 4 Feb 2016 17:09:43 +0000 (17:09 +0000)]
Fix grammar in error statement

s/consider to migrate to jail.conf/consider migrating to jail.conf/

8 years agoRemove duplicate line, likely result of a mismerge.
Glen Barber [Thu, 4 Feb 2016 17:03:12 +0000 (17:03 +0000)]
Remove duplicate line, likely result of a mismerge.

Sponsored by: The FreeBSD Foundation

8 years agoReplace broken implementation of fuswintr() and suswintr() by functions
Michal Meloun [Thu, 4 Feb 2016 17:01:38 +0000 (17:01 +0000)]
Replace broken implementation of fuswintr() and suswintr() by functions
which return -1 as well as on tier 1 archs. Remove block_userspace_access
used only in these implementations.

(1) These functions may be called in interrupt context and pcb_onfault
can be already set in this time. Thus, prior pcb_onfault must be saved
and restored afterwards.

(2) The check that an abort came either from nested interrupt or while
in critical section or holding not sleepable lock must be avoided for
this case.

These functions are called only for profiling reason, so there will be
only small gain by making the code more complex.

8 years agoFix typo: s/Conrol/Control/
Glen Barber [Thu, 4 Feb 2016 16:38:24 +0000 (16:38 +0000)]
Fix typo: s/Conrol/Control/

Submitted by: kib
Sponsored by: The FreeBSD Foundation

8 years agoDo not copy by field when converting struct oexport_args to struct
Konstantin Belousov [Thu, 4 Feb 2016 16:32:21 +0000 (16:32 +0000)]
Do not copy by field when converting struct oexport_args to struct
export_args on mount update, bzero() is consistent with
vfs_oexport_conv().
Make the code structure more explicit by using switch.
Return EINVAL if export option layout (deduced from size) is unknown.

Based on the submission by: bde
Sponsored by: The FreeBSD Foundation

8 years agoAdd FreeBSD RCSID header and svn:keyword property.
Glen Barber [Thu, 4 Feb 2016 15:41:00 +0000 (15:41 +0000)]
Add FreeBSD RCSID header and svn:keyword property.

Sponsored by: The FreeBSD Foundation

8 years agoRework the way <packagename>.ucl files are generated.
Glen Barber [Thu, 4 Feb 2016 15:32:03 +0000 (15:32 +0000)]
Rework the way <packagename>.ucl files are generated.
One of the major pain points with how this was implemented
is the requirement of in-tree, hard-coded <name>.ucl, as
well as <name>-<suffix>.ucl where <suffix> can be lib32,
profile, development, debug, or any combination of the four.

This created significant overhead when adding new packages
and any of the files in any of the combinations were missing.

Instead of test(1)-ing if the <packagename>.ucl file exists,
hand off to a script to figure out what the final ucl file
name should be before invoking pkg(8).

The default behavior is 'template.ucl' is used as a fallback.

This affects only the userland packages, as the kernel code
is already smart enough to handle these variations.

Sponsored by: The FreeBSD Foundation

8 years agoAdd 't' and 'p' postfixes to dd(1).
Edward Tomasz Napierala [Thu, 4 Feb 2016 15:21:01 +0000 (15:21 +0000)]
Add 't' and 'p' postfixes to dd(1).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoReduce code duplication.
Edward Tomasz Napierala [Thu, 4 Feb 2016 15:10:08 +0000 (15:10 +0000)]
Reduce code duplication.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoARM: For ARMv6/v7, code in locore.S initializes SCTLR and ACTRL registers.
Michal Meloun [Thu, 4 Feb 2016 14:32:48 +0000 (14:32 +0000)]
ARM: For ARMv6/v7, code in locore.S initializes SCTLR and ACTRL registers.
Don't duplicate this initialization in cpu_setup().

8 years agoAccess pcpup using gp register.
Ruslan Bukin [Thu, 4 Feb 2016 14:30:46 +0000 (14:30 +0000)]
Access pcpup using gp register.

8 years agoMake VM_MEMATTR_xxx definitions independent on pmap internals
Svatopluk Kraus [Thu, 4 Feb 2016 14:15:24 +0000 (14:15 +0000)]
Make VM_MEMATTR_xxx definitions independent on pmap internals
for __ARM_ARCH >= 6.

It's TEX class number now, so it still has some meaning.

8 years agoARM: Set UNAL_ENABLE bit in SCTLR CP15 register. This bit is RAO/SBOP
Michal Meloun [Thu, 4 Feb 2016 14:02:42 +0000 (14:02 +0000)]
ARM: Set UNAL_ENABLE bit in SCTLR CP15 register. This bit is RAO/SBOP
for ARMv7. For ARMv6, it controls ARMv5 compatible alignment support.
This bit have no effect until unaligned access is enabled.

8 years agoSmall rearrangement of abort_handler().
Svatopluk Kraus [Thu, 4 Feb 2016 13:35:40 +0000 (13:35 +0000)]
Small rearrangement of abort_handler().

(1) Move cnt.v_trap increment to the beginning. There is cnt.v_vm_faults
counter in vm_fault(), so a number of hardware emulation aborts may be
get roughly as difference.
(2) Move kdb_reenter() up to not be ignored if pmap_fault() has failed.
(3) Update comments.

8 years agoARM: RPI-B kernel was broken by r294740. Make it functional again.
Michal Meloun [Thu, 4 Feb 2016 13:32:29 +0000 (13:32 +0000)]
ARM: RPI-B kernel was broken by r294740. Make it functional again.

8 years agoReuse gp register for pcpu pointer.
Ruslan Bukin [Thu, 4 Feb 2016 12:49:28 +0000 (12:49 +0000)]
Reuse gp register for pcpu pointer.

gp (global pointer) is used by compiler in userland only,
so re-use it for pcpup in kernel, save it on stack on switching
out to userland and load back on return to kernel.

Discussed with: jhb, andrew, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5178