aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ddb(4): Add 'show badstacks' command to show witness badstacksConrad Meyer2017-09-221-16/+45
| | | | | | | | | | | | Add a DDB command that mirrors sysctl debug.witness.badstacks. Reported by: rstone Reviewed by: rstone Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12468 Notes: svn path=/head/; revision=323935
* Detect NEON and set HWCAP_NEON if present.John Baldwin2017-09-222-0/+6
| | | | | | | | | Reviewed by: andrew, ian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12389 Notes: svn path=/head/; revision=323934
* Correct HWCAP_VFP3* values to match Linux.John Baldwin2017-09-221-2/+2
| | | | | | | | | Reviewed by: andrew, ian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12388 Notes: svn path=/head/; revision=323933
* Fix 32bit build.Konstantin Belousov2017-09-221-2/+2
| | | | | | | | Reported by: emaste Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=323932
* Revert r323812 from release/tools/arm.subr, which has broken theGlen Barber2017-09-221-10/+0
| | | | | | | | | | | | build on arm/armv6 images. Pointyhat: gjb (myself) MFC after: immediate MFC note: releng/10.4 has broken because of this Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=323924
* Continuing efforts to provide hardening of FFS, this change adds aKirk McKusick2017-09-2217-58/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check hash to cylinder groups. If a check hash fails when a cylinder group is read, no further allocations are attempted in that cylinder group until it has been fixed by fsck. This avoids a class of filesystem panics related to corrupted cylinder group maps. The hash is done using crc32c. Check hases are added only to UFS2 and not to UFS1 as UFS1 is primarily used in embedded systems with small memories and low-powered processors which need as light-weight a filesystem as possible. Specifics of the changes: sys/sys/buf.h: Add BX_FSPRIV to reserve a set of eight b_xflags that may be used by individual filesystems for their own purpose. Their specific definitions are found in the header files for each filesystem that uses them. Also add fields to struct buf as noted below. sys/kern/vfs_bio.c: It is only necessary to compute a check hash for a cylinder group when it is actually read from disk. When calling bread, you do not know whether the buffer was found in the cache or read. So a new flag (GB_CKHASH) and a pointer to a function to perform the hash has been added to breadn_flags to say that the function should be called to calculate a hash if the data has been read. The check hash is placed in b_ckhash and the B_CKHASH flag is set to indicate that a read was done and a check hash calculated. Though a rather elaborate mechanism, it should also work for check hashing other metadata in the future. A kernel internal API change was to change breada into a static fucntion and add flags and a function pointer to a check-hash function. sys/ufs/ffs/fs.h: Add flags for types of check hashes; stored in a new word in the superblock. Define corresponding BX_ flags for the different types of check hashes. Add a check hash word in the cylinder group. sys/ufs/ffs/ffs_alloc.c: In ffs_getcg do the dance with breadn_flags to get a check hash and if one is provided, check it. sys/ufs/ffs/ffs_vfsops.c: Copy across the BX_FFSTYPES flags in background writes. Update the check hash when writing out buffers that need them. sys/ufs/ffs/ffs_snapshot.c: Recompute check hash when updating snapshot cylinder groups. sys/libkern/crc32.c: lib/libufs/Makefile: lib/libufs/libufs.h: lib/libufs/cgroup.c: Include libkern/crc32.c in libufs and use it to compute check hashes when updating cylinder groups. Four utilities are affected: sbin/newfs/mkfs.c: Add the check hashes when building the cylinder groups. sbin/fsck_ffs/fsck.h: sbin/fsck_ffs/fsutil.c: Verify and update check hashes when checking and writing cylinder groups. sbin/fsck_ffs/pass5.c: Offer to add check hashes to existing filesystems. Precompute check hashes when rebuilding cylinder group (although this will be done when it is written in fsutil.c it is necessary to do it early before comparing with the old cylinder group) sbin/dumpfs/dumpfs.c Print out the new check hash flag(s) sbin/fsdb/Makefile: Needs to add libufs now used by pass5.c imported from fsck_ffs. Reviewed by: kib Tested by: Peter Holm (pho) Notes: svn path=/head/; revision=323923
* Clean up error messages related to device discoveryScott Long2017-09-222-24/+36
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=323922
* MFV r323917: 8648 Fix range locking in ZIL commit codepathAndriy Gapon2017-09-222-4/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@42b14111721da2ebd5159e7b45012a3eb0e3384c https://github.com/illumos/illumos-gate/commit/42b14111721da2ebd5159e7b45012a3eb0e3384c https://www.illumos.org/issues/8648 I'm opening this bug to track integration of the following ZFS on Linux commit into illumos: commit f763c3d1df569a8d6b60bcb5e95cf07aa7a189e6 Author: LOLi <loli10K@users.noreply.github.com> Date: Mon Aug 21 17:59:48 2017 +0200 Fix range locking in ZIL commit codepath Since OpenZFS 7578 (1b7c1e5) if we have a ZVOL with logbias=throughput we will force WR_INDIRECT itxs in zvol_log_write() setting itx->itx_lr offset and length to the offset and length of the BIO from zvol_write()->zvol_log_write(): these offset and length are later used to take a range lock in zillog->zl_get_data function: zvol_get_data(). Now suppose we have a ZVOL with blocksize=8K and push 4K writes to offset 0: we will only be range-locking 0-4096. This means the ASSERTion we make in dbuf_unoverride() is no longer valid because now dmu_sync() is called from zilog's get_data functions holding a partial lock on the dbuf. Fix this by taking a range lock on the whole block in zvol_get_data(). Reviewed-by: Chunwei Chen <tuxoko@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: Andriy Gapon <avg@FreeBSD.org> Reviewed by: Alexander Motin <mav@FreeBSD.org> Approved by: Robert Mustacchi <rm@joyent.com> Author: LOLi <loli10K@users.noreply.github.com> MFC after: 10 days Notes: svn path=/head/; revision=323918
| * 8648 Fix range locking in ZIL commit codepathAndriy Gapon2017-09-222-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@42b14111721da2ebd5159e7b45012a3eb0e3384c https://github.com/illumos/illumos-gate/commit/42b14111721da2ebd5159e7b45012a3eb0e3384c https://www.illumos.org/issues/8648 I'm opening this bug to track integration of the following ZFS on Linux commit into illumos: commit f763c3d1df569a8d6b60bcb5e95cf07aa7a189e6 Author: LOLi <loli10K@users.noreply.github.com> Date: Mon Aug 21 17:59:48 2017 +0200 Fix range locking in ZIL commit codepath Since OpenZFS 7578 (1b7c1e5) if we have a ZVOL with logbias=throughput we will force WR_INDIRECT itxs in zvol_log_write() setting itx->itx_lr offset and length to the offset and length of the BIO from zvol_write()->zvol_log_write(): these offset and length are later used to take a range lock in zillog->zl_get_data function: zvol_get_data(). Now suppose we have a ZVOL with blocksize=8K and push 4K writes to offset 0: we will only be range-locking 0-4096. This means the ASSERTion we make in dbuf_unoverride() is no longer valid because now dmu_sync() is called from zilog's get_data functions holding a partial lock on the dbuf. Fix this by taking a range lock on the whole block in zvol_get_data(). Reviewed-by: Chunwei Chen <tuxoko@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: Andriy Gapon <avg@FreeBSD.org> Reviewed by: Alexander Motin <mav@FreeBSD.org> Approved by: Robert Mustacchi <rm@joyent.com> Author: LOLi <loli10K@users.noreply.github.com> Notes: svn path=/vendor-sys/illumos/dist/; revision=323917
* | Extend sysctl description for hw.usb.disable_enumeration .Hans Petter Selasky2017-09-221-1/+3
| | | | | | | | | | | | | | | | | | | | PR: 222505 Submitted by: Julian H. Stacey <jhs@berklix.com> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=323916
* | MFV r323914: 8661 remove "zil-cw2" dtrace probeAndriy Gapon2017-09-221-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@bd9d3f904625846bdc61af8897a1072029c7aeb7 https://github.com/illumos/illumos-gate/commit/bd9d3f904625846bdc61af8897a1072029c7aeb7 https://www.illumos.org/issues/8661 The "zil-cw1" dtrace probe was previously removed in 8558, and the "zil-cw2" probe should have been removed in that patch as well. Unfortunately, the "zil- cw2" was not removed in 8558, so this bug is to track it's removal. Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Robert Mustacchi <rm@joyent.com> Author: Prakash Surya <prakash.surya@delphix.com> MFC after: 1 week Notes: svn path=/head/; revision=323915
| * 8661 remove "zil-cw2" dtrace probeAndriy Gapon2017-09-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@bd9d3f904625846bdc61af8897a1072029c7aeb7 https://github.com/illumos/illumos-gate/commit/bd9d3f904625846bdc61af8897a1072029c7aeb7 https://www.illumos.org/issues/8661 The "zil-cw1" dtrace probe was previously removed in 8558, and the "zil-cw2" probe should have been removed in that patch as well. Unfortunately, the "zil- cw2" was not removed in 8558, so this bug is to track it's removal. Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Robert Mustacchi <rm@joyent.com> Author: Prakash Surya <prakash.surya@delphix.com> Notes: svn path=/vendor-sys/illumos/dist/; revision=323914
| * 8600 ZFS channel programs - snapshotAndriy Gapon2017-09-229-30/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@2840dce1a029098fb784afd951d5f98089f850d8 https://github.com/illumos/illumos-gate/commit/2840dce1a029098fb784afd951d5f98089f850d8 https://www.illumos.org/issues/8600 ZFS channel programs should be able to create snapshots. In addition to the base snapshot functionality, this will likely entail adding extra logic to handle edge cases which were formerly not possible, such as creating then destroying a snapshot in the same transaction sync. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Reviewed by: Brad Lewis <brad.lewis@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Chris Williamson <chris.williamson@delphix.com> Notes: svn path=/vendor-sys/illumos/dist/; revision=323913
| * 8592 ZFS channel programs - rollbackAndriy Gapon2017-09-224-13/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@000cce6b6fad4a8b0eecef6e1251f6aca1719c55 https://github.com/illumos/illumos-gate/commit/000cce6b6fad4a8b0eecef6e1251f6aca1719c55 https://www.illumos.org/issues/8592 ZFS channel programs should be able to perform a rollback. This logic will probably look pretty similar to zfs.sync.destroy(). Reviewed by: Chris Williamson <chris.williamson@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Brad Lewis <brad.lewis@delphix.com> Notes: svn path=/vendor-sys/illumos/dist/; revision=323912
| * 8502 illumos#7955 broke delegated datasets when libshare is not presentAndriy Gapon2017-09-221-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@1c18e8fbd8db41a9fb39bd3ef7a18ee71ece20da https://github.com/illumos/illumos-gate/commit/1c18e8fbd8db41a9fb39bd3ef7a18ee71ece20da https://www.illumos.org/issues/8502 The code in lib/libzfs/common/libzfs_mount.c already basically handles the case when libshare is not installed. We just need to not fail in zfs_init_libshare_impl. I tested this in lx and things work as expected. I also tested there trying to set sharenfs and sharesmb on the delegated dataset. Neither is allowed from within a zone. The spew of msgs from a native zone is not ZFS specific. I see the same spew simply running the share command. Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Yuri Pankov <yuripv@gmx.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Jerry Jelinek <jerry.jelinek@joyent.com> Notes: svn path=/vendor/illumos/dist/; revision=323911
| * 8604 Avoid unnecessary work search in VFS when unmounting snapshotsAndriy Gapon2017-09-203-54/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1 https://github.com/illumos/illumos-gate/commit/ed992b0aac4e5b70dc1273b1d055c0d471fbb4b1 https://www.illumos.org/issues/8604 Every time we want to unmount a snapshot (happens during snapshot deletion or renaming) we unnecessarily iterate through all the mountpoints in the VFS layer (see zfs_get_vfs). Ideally we would just put a hold on the snapshot and access its respective VFS resource directly. gwilson_snap_unmount.svg - Flamegraph indicating the issue discussed (138 KB) Serapheim Dimitropoulos, 2017-09-14 06:36 PM Reviewed by: Matt Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Serapheim Dimitropoulos <serapheim@delphix.com> Notes: svn path=/vendor-sys/illumos/dist/; revision=323795
| * 8605 zfs channel programs: zfs.exists undocumented and non-workingAndriy Gapon2017-09-202-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@5f39f884e2035d671ec02148fc4d8420c670bcb4 https://github.com/illumos/illumos-gate/commit/5f39f884e2035d671ec02148fc4d8420c670bcb4 https://www.illumos.org/issues/8605 zfs.exists() in channel programs doesn't return any result, and should have a man page entry. Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Chris Williamson <chris.williamson@delphix.com> Notes: svn path=/vendor-sys/illumos/dist/; revision=323794
* | Add support for 32-bit compatibility IOCTLs in the LinuxKPI.Hans Petter Selasky2017-09-223-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Bump the FreeBSD version to force recompilation of external kernel modules due to structure change. PR: 222504 Submitted by: Greg V <greg@unrelenting.technology> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=323910
* | libefi: define EISA PNP constantsToomas Soome2017-09-221-3/+8
| | | | | | | | | | | | | | Define EISA PNP constants and use them, also fix ID for 0x701 Notes: svn path=/head/; revision=323909
* | libefi: efipart_hdinfo_add_filepath should check strtol resultToomas Soome2017-09-221-0/+7
| | | | | | | | | | | | | | Use errno for error checking. Notes: svn path=/head/; revision=323908
* | libefi: efipart.c cstyle fix for efipart_print_common()Toomas Soome2017-09-221-1/+2
| | | | | | | | | | | | | | The else statement should have { } Notes: svn path=/head/; revision=323907
* | libefi: efipart_strategy() should return ENXIO when there is no mediaToomas Soome2017-09-221-1/+1
| | | | | | | | | | | | | | | | We should return ENXIO to indicate the situation with device present, but no media. Notes: svn path=/head/; revision=323906
* | libefi: pdinfo_t pd_unit and pd_open should be unsignedToomas Soome2017-09-222-3/+3
| | | | | | | | | | | | | | | | | | | | The device index, partition index and reference counter are all positive numbers. However, since our internal partition number may be negative to indicate GPT table, the compare expression need to take care when comparing pdinfo_t and partition data. Notes: svn path=/head/; revision=323905
* | Add missing locking. Found by Coverity while scanning the usrsctpMichael Tuexen2017-09-221-0/+10
| | | | | | | | | | | | | | | | | | library. MFC after: 1 week Notes: svn path=/head/; revision=323904
* | Add missing socket lock.Michael Tuexen2017-09-221-0/+2
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=323902
* | cryptotest.py: Like r323869, skip SHA HMAC tests on non-SHA driversConrad Meyer2017-09-221-0/+1
| | | | | | | | | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=323899
* | cryptotest.py: Fix whitespace style errorsConrad Meyer2017-09-221-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | I accidentally introduced different whitespace style in r323878. I'm not used to using tabs for indentation in Python scripts. Whitespace only; no functional change. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=323898
* | efilib.h: typo in structure member descriptionToomas Soome2017-09-221-1/+1
| | | | | | | | | | | | | | The link should be replaced by list. Notes: svn path=/head/; revision=323897
* | r323885 did miss efilib.h updateToomas Soome2017-09-221-1/+2
| | | | | | | | | | | | | | The efilib.h update was left out from r323885 by mistake. Notes: svn path=/head/; revision=323896
* | libefi: efi_devpath_match local len should be unsignedToomas Soome2017-09-221-2/+2
| | | | | | | | | | | | | | DevicePathNodeLength() will always return unsigned value. Notes: svn path=/head/; revision=323895
* | cam iosched: Bettar account IOPS for smoother performanceWarner Losh2017-09-221-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent cam_iosched_iops_tick() from discarding 'unspent' ios unless it's a new accounting interval. Previously ios that weren't used between ticks were lost, as a result the iops limiter could enforce a limit below the configured maximum. Obtained from: ElectroBSD Submitted by: Fabian Keil PR: 221974 Notes: svn path=/head/; revision=323894
* | cam iosched: Enforce iop limits below the quanta valueWarner Losh2017-09-221-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the iops limiter would always allow at least quanta ios per second as cam_iosched_iops_tick() never set ios->l_value1 below 1. Submitted by: Fabian Keil <fk@fabiankeil.de> Obtained from: ElectroBSD PR: 221974 Notes: svn path=/head/; revision=323893
* | Support AEAD requests with non-GCM algorithms.John Baldwin2017-09-221-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, support chaining an AES cipher with an HMAC for a request including AAD. This permits submitting requests from userland to encrypt objects like IPSec packets using these algorithms. In the non-GCM case, the authentication crypto descriptor covers both the AAD and the ciphertext. The GCM case remains unchanged. This matches the requests created internally in IPSec. For the non-GCM case, the COP_F_CIPHER_FIRST is also supported since the ordering matters. Note that while this can be used to simulate IPSec requests from userland, this ioctl cannot currently be used to perform TLS requests using AES-CBC and MAC-before-encrypt. Reviewed by: cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D11759 Notes: svn path=/head/; revision=323892
* | Add a new COP_F_CIPHER_FIRST flag for struct crypt_op.John Baldwin2017-09-223-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | This requests that the cipher be performed before rather than after the HMAC when both are specified for a single operation. Reviewed by: cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D11757 Notes: svn path=/head/; revision=323891
* | Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD.John Baldwin2017-09-221-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Software crypto implementations don't care how the buffer is laid out, but hardware implementations may assume that the AAD is always before the plain/cipher text and that the hash/tag is immediately after the end of the plain/cipher text. In particular, this arrangement matches the layout of both IPSec packets and TLS frames. Linux's crypto framework also assumes this layout for AEAD requests. Reviewed by: cem Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D11758 Notes: svn path=/head/; revision=323889
* | Fix undeclared identifier error introduced in r323879Stephen Hurd2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't appear to be safe to use gtask->gt_name. Reported by: Mark Johnston, Jenkins Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12448 Notes: svn path=/head/; revision=323887
* | libefi: efipart.c should use calloc()Toomas Soome2017-09-211-10/+5
| | | | | | | | | | | | | | | | The device specific *_add functions are using malloc() + memset, should use calloc instead. Notes: svn path=/head/; revision=323886
* | libefi: efi_devpath_match() should return boolToomas Soome2017-09-212-9/+9
| | | | | | | | | | | | | | | | The current implementation of efi_devpath_match() is returning values 0 or 1, so it should be updated to return bool. Notes: svn path=/head/; revision=323885
* | Always create usr/local/etc -> /etc/local symlinkWarner Losh2017-09-211-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | /usr/local/etc gets created and populated by packages. However, if no packages are installed when setup_nanobsd is run, this symlink won't get created, causing problems if packages are installed later (say on first boot). Therefore, always create the symlink and etc/local. It does no harm and may help. Inspired by crochet issue #183 (consuingly says NanoBSD, means crochet) Sponsored by: Netflix Notes: svn path=/head/; revision=323883
* | Only handle _PC_MAX_CANON, _PC_MAX_INPUT, and _PC_VDISABLE for TTY devices.John Baldwin2017-09-212-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Move handling of these three pathconf() variables out of vop_stdpathconf() and into devfs_pathconf() as TTY devices can only be devfs files. In addition, only return settings for these three variables for devfs devices whose device switch has the D_TTY flag set. Discussed with: bde, kib Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=323882
* | Use UFS_LINK_MAX instead of LINK_MAX.John Baldwin2017-09-211-1/+1
| | | | | | | | | | | | | | | | Submitted by: bde Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=323881
* | Simplify i915_gem_wire_page() and avoid unneeded page-busying.Mark Johnston2017-09-211-7/+6
| | | | | | | | | | | | | | | | Reviewed by: alc, kib MFC after: 1 week Notes: svn path=/head/; revision=323880
* | Improved logging of gtaskqueue failuesStephen Hurd2017-09-211-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the return code of intr_setaffinity() and log any errors it returns. When a qid is not located, log an error before returning failure. Also, use __func__ rather than hardcoding the function name Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12436 Notes: svn path=/head/; revision=323879
* | cryptotest.py: Actually use NIST-KAT HMAC test vectors and test the right hashesConrad Meyer2017-09-211-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this test was entirely a no-op as no vector in the NIST-KAT file has a precisely 20-byte key. Additionally, not every vector in the file is SHA1. The length field determines the hash under test, and is now decoded correctly. Finally, due to a limitation I didn't feel like fixing in cryptodev.py, MACs are truncated to 16 bytes in this test. With this change and the uncommitted D12437 (to allow key sizes other than those used in IPSec), the SHA tests in cryptotest.py actually test something and e.g. at least cryptosoft passes the test. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=323878
* | Fix M_GTASKQUEUE definitionStephen Hurd2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously had the same short and long description as taskqueues. This could cause problems with memguard(9) and vmstat -m which use the short description as a unique identifier. Reviewed by: sbruno Approved by: sbruno (mentor) MFC after: 3 days Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12438 Notes: svn path=/head/; revision=323876
* | bnxt: Fix driver when attached to a VFStephen Hurd2017-09-214-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use HWRM_FUNC_VF_CFG instead of HWRM_FUNC_CFG on VFs - Fix NPAR/VF detection - Clean up flag definitions - Don't allow WoL on VFs Although the bnxt driver doesn't support SR-IOV so can create VFs yet, the PF could be running Linux or ESCi with a VF passed through to a FreeBSD guest. This fixes the driver for that use case. Submitted by: Siva Kallam <siva.kallam@@broadcom.com> Reviewed by: shurd, sbruno Approved by: sbruno (mentor) Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D12410 Notes: svn path=/head/; revision=323874
* | Unprotected modification of ng_iface(4) private data leads to kernel panic.Eugene Grosbein2017-09-211-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a race with per-node read-mostly lock and refcounting for a hook. PR: 220076 Tested by: peixoto.cassiano Approved by: avg (mentor), mav (mentor) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D12435 Notes: svn path=/head/; revision=323873
* | cryptotest.py: Do not run AES-CBC or AES-GCM tests on non-AES crypto(4) driversConrad Meyer2017-09-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | For some reason, we only skipped AES-XTS tests if a driver was not in the aesmodules list. Skip other AES modes as well to prevent spurious failures in non-AES drivers. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=323869
* | Modernize calls to vm_page_unwire(). As of r288122, vm_page_unwire()Alan Cox2017-09-212-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | accepts PQ_NONE as the specified queue and returns a Boolean indicating whether the page's wire count transitioned to zero. Use these features in dev/drm2. Reviewed by: kib, markj MFC after: 1 week Notes: svn path=/head/; revision=323868
* | libefi: devicename.c cleanupsToomas Soome2017-09-211-16/+20
| | | | | | | | | | | | | | | | Remove duplicated free()+return statements, default unit to 0 and improve strtol error processing. Notes: svn path=/head/; revision=323867