]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoRevert r351076 and r351074 because of atomic_swap_64 on 32-bit platforms
Andriy Gapon [Thu, 15 Aug 2019 15:27:58 +0000 (15:27 +0000)]
Revert r351076 and r351074 because of atomic_swap_64 on 32-bit platforms

Trying to sort it out.

4 years agoMFV r351075: 10406 large_dnode changes broke zfs recv of legacy stream
Andriy Gapon [Thu, 15 Aug 2019 15:11:20 +0000 (15:11 +0000)]
MFV r351075: 10406 large_dnode changes broke zfs recv of legacy stream

illumos/illumos-gate@811964cd9f1fbae0fc3b93d116269e9b1fca090a
https://github.com/illumos/illumos-gate/commit/811964cd9f1fbae0fc3b93d116269e9b1fca090a

https://www.illumos.org/issues/10406
  The large dnode changes from 8423 caused problems in zfs recv for a legacy
  stream. This manifests when attempting to mount the received stream, but the
  problem is in the receive code. We missed the following commit from ZoL which
  fixes this.
  commit da2feb42fb5c7a8c1e1cc67f7a880da9d8e97bc2
  Author: Tom Caputi <tcaputi@datto.com>
  Date: Thu Jun 28 17:55:11 2018 -0400
  Fix 'zfs recv' of non large_dnode send streams
  Currently, there is a bug where older send streams without the
      DMU_BACKUP_FEATURE_LARGE_DNODE flag are not handled correctly.
      The code in receive_object() fails to handle cases where
      drro->drr_dn_slots is set to 0, which is always the case when the
      sending code does not support this feature flag. This patch fixes
      the issue by ensuring that that a value of 0 is treated as
      DNODE_MIN_SLOTS.

Author: Tom Caputi <tcaputi@datto.com>

MFC after: 3 weeks
X-MFC after: r351074

4 years ago10406 large_dnode changes broke zfs recv of legacy stream
Andriy Gapon [Thu, 15 Aug 2019 15:07:17 +0000 (15:07 +0000)]
10406 large_dnode changes broke zfs recv of legacy stream

illumos/illumos-gate@811964cd9f1fbae0fc3b93d116269e9b1fca090a
https://github.com/illumos/illumos-gate/commit/811964cd9f1fbae0fc3b93d116269e9b1fca090a

https://www.illumos.org/issues/10406
  The large dnode changes from 8423 caused problems in zfs recv for a legacy
  stream. This manifests when attempting to mount the received stream, but the
  problem is in the receive code. We missed the following commit from ZoL which
  fixes this.
  commit da2feb42fb5c7a8c1e1cc67f7a880da9d8e97bc2
  Author: Tom Caputi <tcaputi@datto.com>
  Date: Thu Jun 28 17:55:11 2018 -0400
  Fix 'zfs recv' of non large_dnode send streams
  Currently, there is a bug where older send streams without the
      DMU_BACKUP_FEATURE_LARGE_DNODE flag are not handled correctly.
      The code in receive_object() fails to handle cases where
      drro->drr_dn_slots is set to 0, which is always the case when the
      sending code does not support this feature flag. This patch fixes
      the issue by ensuring that that a value of 0 is treated as
      DNODE_MIN_SLOTS.

Author: Tom Caputi <tcaputi@datto.com>

4 years agoMFV r350898: 8423 8199 7432 Implement large_dnode pool feature
Andriy Gapon [Thu, 15 Aug 2019 14:57:27 +0000 (14:57 +0000)]
MFV r350898: 8423 8199 7432 Implement large_dnode pool feature

8423 8199 7432 Implement large_dnode pool feature

8423 Implement large_dnode pool feature
8199 multi-threaded dmu_object_alloc()
7432 Large dnode pool feature

llumos/illumos-gate@54811da5ac6b517992fdc173df5d605e4e61fdc0
https://github.com/illumos/illumos-gate/commit/54811da5ac6b517992fdc173df5d605e4e61fdc0
https://www.illumos.org/issues/8423
https://www.illumos.org/issues/8199
https://www.illumos.org/issues/7432

  ZoL issues:
  Improved dnode allocation #6564
  Clean up large dnode code #6262
  Fix dnode_hold() freeing dnode behavior #8172
  Fix dnode allocation race #6414, #6439
  Partial: Raw sends must be able to decrease nlevels #6821, #6864
  Remove unnecessary txg syncs from receive_object() Closes #7197

This updates FreeBSD large_dnode code (that was imported from ZoL) to a version
that was committed to illumos.  It has some cleanups, improvements and fixes
comparing to what we have in FreeBSD now.  I think that the most significant
update is 8199 multi-threaded dmu_object_alloc().

Obtained from: illumos
MFC after: 3 weeks

4 years agostand: remove CLANG_NO_IAS from boot2
Ed Maste [Thu, 15 Aug 2019 14:54:18 +0000 (14:54 +0000)]
stand: remove CLANG_NO_IAS from boot2

Many components under stand/ had CLANG_NO_IAS added when Clang's
Integrated Assembler (IAS) did not handle .codeNN directives.  Clang
gained support quite some time ago, and we can now build stand/ with
IAS.  In most cases IAS- and GNU as-assembled boot components were
identical, and CLANG_NO_IAS was already removed from other components.

Clang IAS produces different output for some components, including
boot2, so CLANG_NO_IAS was not previously removed for those.

In the case of boot2 the difference is that IAS produces a larger
encoding for one instruction (the testb at the beginning of read).

GNU as produces:

    2e    f6 06 b0 08       80

while IAS includes an address size override prefix (67) and produces:

    2e 67 f6 05 b3 08 00 00 80

This results in three fewer NOPs elsewhere in boot2 but no functional
change, so switch to IAS for boot2.

(We can separately pursue improved 16-bit IAS support with the LLVM
developers.)

Sponsored by: The FreeBSD Foundation

4 years agoImplement new methods for Intel and PLX NTB.
Alexander Motin [Thu, 15 Aug 2019 14:11:11 +0000 (14:11 +0000)]
Implement new methods for Intel and PLX NTB.

This restores parity with AMD NTB driver.  Though without any drivers
supporting more then one peer and respective KPI modification to pass
peer index to most of the calls this addition is pretty useless now.

MFC after: 2 weeks

4 years agoFix rule truncation on external action module unloading.
Andrey V. Elsukov [Thu, 15 Aug 2019 13:44:33 +0000 (13:44 +0000)]
Fix rule truncation on external action module unloading.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC

4 years agotelnet: remove 3rd clause from Berkeley copyrights
Ed Maste [Thu, 15 Aug 2019 13:27:57 +0000 (13:27 +0000)]
telnet: remove 3rd clause from Berkeley copyrights

Per the July 22, 1999 letter (in /COPYRIGHT) from
William Hoskins
Director, Office of Technology Licensing
University of California, Berkeley

MFC after: 1 week

4 years agodo not enable userland retpoline if not supported by compiler/linker
Ed Maste [Thu, 15 Aug 2019 12:48:17 +0000 (12:48 +0000)]
do not enable userland retpoline if not supported by compiler/linker

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21101

4 years agopf tests: Fix accidental duplication of content
Mateusz Piotrowski [Thu, 15 Aug 2019 12:00:59 +0000 (12:00 +0000)]
pf tests: Fix accidental duplication of content

Some files got their contented duplicated in r345409. Some mistakes where
fixed in r345430. The only file that was left with a duplicated content was
CVE-2019-5598.py.

Reviewed by: kp
Approved by: src (kp)
Differential Revision: https://reviews.freebsd.org/D21267

4 years agoRevert prior change till installworld sorted
Simon J. Gerraty [Thu, 15 Aug 2019 06:00:55 +0000 (06:00 +0000)]
Revert prior change till installworld sorted

4 years agofusefs: fix conditional from r351061
Alan Somers [Thu, 15 Aug 2019 04:47:42 +0000 (04:47 +0000)]
fusefs: fix conditional from r351061

The entirety of r351061 was a copy/paste error.  I'm sorry I've been
comitting so hastily.

Reported by: rpokala
Reviewed by: rpokala
MFC after: 2 weeks
MFC-With: 351061
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21265

4 years agopowerpc/pmap: Enable UMA_MD_SMALL_ALLOC for 64-bit booke
Justin Hibbits [Thu, 15 Aug 2019 03:42:15 +0000 (03:42 +0000)]
powerpc/pmap: Enable UMA_MD_SMALL_ALLOC for 64-bit booke

The only thing blocking UMA_MD_SMALL_ALLOC from working on 64-bit booke
powerpc was a missing check in pmap_kextract().  Adding DMAP handling into
pmap_kextract(), we can now use UMA_MD_SMALL_ALLOC.  This should improve
performance and stability a bit, since DMAP is always mapped in TLB1, so
this relieves pressure on TLB0.

MFC after: 3 weeks

4 years agoswap_pager.c reserves 2 blocks for a bsd label. Change that 2 to the
Doug Moore [Thu, 15 Aug 2019 02:30:44 +0000 (02:30 +0000)]
swap_pager.c reserves 2 blocks for a bsd label.  Change that 2 to the
expression howmany(BBSIZE, PAGE_SIZE), where BBSIZE is the size of the
boot block area.  That can be less than 2 if PAGE_SIZE is big.

swapon(8) has an option to trim (delete) all the blocks of a device at
startup.  However, if the first of those blocks is a bsd label, then
trimming those blocks is destructive.  Change swapon to leave the
first BBSIZE bytes untrimmed.

Update manual pages to reflect changes in how swapon and how it may be
used, espeically in association with savecore.

Reviewed by: alc
Approved by: markj (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D21191

4 years agoarch.7: be explicit about the future for unmigrated GCC 4.2.1 archs
Ed Maste [Thu, 15 Aug 2019 02:14:44 +0000 (02:14 +0000)]
arch.7: be explicit about the future for unmigrated GCC 4.2.1 archs

Reported by: imp
MFC after: 1 week
MFC with: r351036

4 years agorandom(4): Remove "EXPERIMENTAL" verbiage from concurrent operation
Conrad Meyer [Thu, 15 Aug 2019 00:39:53 +0000 (00:39 +0000)]
random(4): Remove "EXPERIMENTAL" verbiage from concurrent operation

No functional change.

Add a verbose comment giving an example side-by-side comparison between the
prior and Concurrent modes of Fortuna, and why one should believe they
produce the same result.

The intent is to flip this on by default prior to 13.0, so testing is
encouraged.  To enable, add the following to loader.conf:

    kern.random.fortuna.concurrent_read="1"

The intent is also to flip the default blockcipher to the faster Chacha-20
prior to 13.0, so testing of that mode of operation is also appreciated.
To enable, add the following to loader.conf:

    kern.random.use_chacha20_cipher="1"

Approved by: secteam(implicit)

4 years agofusefs: fix the 32-bit build after 351042
Alan Somers [Thu, 15 Aug 2019 00:23:03 +0000 (00:23 +0000)]
fusefs: fix the 32-bit build after 351042

Reported by: jhb
MFC after: 2 weeks
MFC-With: 351042
Sponsored by: The FreeBSD Foundation

4 years agoAdd support for PCI Device ID 0x148B in ntb_hw_amd driver.
Alexander Motin [Wed, 14 Aug 2019 22:35:11 +0000 (22:35 +0000)]
Add support for PCI Device ID 0x148B in ntb_hw_amd driver.

Submitted by: Rajesh Kumar <rajesh1.kumar@amd.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20892

4 years agobsd.files.mk: fix targets to avoid directories
Simon J. Gerraty [Wed, 14 Aug 2019 22:33:46 +0000 (22:33 +0000)]
bsd.files.mk: fix targets to avoid directories

Reintroduce :T when file is used as part of a target name.

Reviewed by: stevek

4 years agoStop listing "on motherboard" as the parent of nexus devices on x86.
John Baldwin [Wed, 14 Aug 2019 22:13:11 +0000 (22:13 +0000)]
Stop listing "on motherboard" as the parent of nexus devices on x86.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D21256

4 years agoMove the common x86 ipmi files to files.x86. The powerpc file list is different
Warner Losh [Wed, 14 Aug 2019 20:58:50 +0000 (20:58 +0000)]
Move the common x86 ipmi files to files.x86. The powerpc file list is different
enough that unification will have to wait for the next pass.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoThe x86 part of hwpmc is shared, so move it to files.x86.
Warner Losh [Wed, 14 Aug 2019 20:58:44 +0000 (20:58 +0000)]
The x86 part of hwpmc is shared, so move it to files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoWindows ndis support is x86 only. Move the MI parts there.
Warner Losh [Wed, 14 Aug 2019 20:58:39 +0000 (20:58 +0000)]
Windows ndis support is x86 only. Move the MI parts there.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoIntel's isci is part of the chipset, so it is x86 specific.
Warner Losh [Wed, 14 Aug 2019 20:58:34 +0000 (20:58 +0000)]
Intel's isci is part of the chipset, so it is x86 specific.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoMove hyperv to files.x86
Warner Losh [Wed, 14 Aug 2019 20:58:28 +0000 (20:58 +0000)]
Move hyperv to files.x86

Move the comomon part of hyperv to files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoThe bxe driver, QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver, is x86
Warner Losh [Wed, 14 Aug 2019 20:58:23 +0000 (20:58 +0000)]
The bxe driver, QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver, is x86
specific, and only builds there. Likewise the module is built there. Move it to
the x86-only files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoThe ACPI parts are identical between i386 and amd64
Warner Losh [Wed, 14 Aug 2019 20:58:17 +0000 (20:58 +0000)]
The ACPI parts are identical between i386 and amd64

Apart from one MD file, ACPI is a x86 implementation, not specific to either
i386 or amd64, so put it into files.x86. Other architectures include fewer
files for the same options, so it can't move into the MI files file.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoMove via padlock files to files.x86.
Warner Losh [Wed, 14 Aug 2019 20:58:12 +0000 (20:58 +0000)]
Move via padlock files to files.x86.

VIA Padlock support is for VIA C3, C7 and Eden processors, which are 64bit x86
processors.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoApart from one MD file, aesni is common to x86. Move it into files.x86.
Warner Losh [Wed, 14 Aug 2019 20:58:06 +0000 (20:58 +0000)]
Apart from one MD file, aesni is common to x86. Move it into files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoMove all the hp* drivers too files.x86
Warner Losh [Wed, 14 Aug 2019 20:58:01 +0000 (20:58 +0000)]
Move all the hp* drivers too files.x86

The HPT drivers are all x86 only. Move them to files.x86. Because of the way we
run uudecode, we can use $M instead of needing entries for them in separate
files.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agoMove the identical x86 lines to files.x86
Warner Losh [Wed, 14 Aug 2019 20:57:54 +0000 (20:57 +0000)]
Move the identical x86 lines to files.x86

Move all the identical x86 lines to files.x86. The non-identical ones should be
unified and moved as well, but that would require additional changes that would
need a more careful review and may not be MFCable, so I'll do them
separately. I'll delete the mildly snarky comment when things are unified.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248

4 years agofusefs: Fix the size of fuse_getattr_in
Alan Somers [Wed, 14 Aug 2019 20:45:00 +0000 (20:45 +0000)]
fusefs: Fix the size of fuse_getattr_in

In FUSE protocol 7.9, the size of the FUSE_GETATTR request has increased.
However, the fusefs driver is currently not sending the additional fields.
In our implementation, the additional fields are always zero, so I there
haven't been any test failures until now.  But fusefs-lkl requires the
request's length to be correct.

Fix this bug, and also enhance the test suite to catch similar bugs.

PR: 239830
MFC after: 2 weeks
MFC-With: 350665
Sponsored by: The FreeBSD Foundation

4 years agocompiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V
Ed Maste [Wed, 14 Aug 2019 18:41:28 +0000 (18:41 +0000)]
compiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V

As with other archs the compiler may emit calls to the byte swap routines
under certain conditions.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agofusefs: fix intermittency in the default_permissions.Unlink.ok test
Alan Somers [Wed, 14 Aug 2019 18:04:04 +0000 (18:04 +0000)]
fusefs: fix intermittency in the default_permissions.Unlink.ok test

The test needs to expect a FUSE_FORGET operation. Most of the time the test
would pass anyway, because by chance FUSE_FORGET would arrive after the
unmount.

MFC after: 2 weeks
MFC-With: 350665
Sponsored by: The FreeBSD Foundation

4 years agoPrint few more useful identify fields.
Alexander Motin [Wed, 14 Aug 2019 17:36:26 +0000 (17:36 +0000)]
Print few more useful identify fields.

MFC after: 2 weeks

4 years agoarch.7: clarify that the table shows the default tool chain
Ed Maste [Wed, 14 Aug 2019 17:17:52 +0000 (17:17 +0000)]
arch.7: clarify that the table shows the default tool chain

Reported by: jhb
MFC after: 1 week
MFC with: r351035
Sponsored by: The FreeBSD Foundation

4 years agoarch.7: add deprecation notice for GCC 4.2.1
Ed Maste [Wed, 14 Aug 2019 17:13:36 +0000 (17:13 +0000)]
arch.7: add deprecation notice for GCC 4.2.1

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoarch.7: add tool chain table
Ed Maste [Wed, 14 Aug 2019 17:04:28 +0000 (17:04 +0000)]
arch.7: add tool chain table

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoping: Make in_cksum() operate on u_char buffer
Alan Somers [Wed, 14 Aug 2019 16:55:06 +0000 (16:55 +0000)]
ping: Make in_cksum() operate on u_char buffer

This fixes -Wcast-align errors for in_cksum() calls when compiled with
WARNS=6.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21261

4 years agoping: fix triptime calculation after r350998
Alan Somers [Wed, 14 Aug 2019 16:45:09 +0000 (16:45 +0000)]
ping: fix triptime calculation after r350998

That revision changed the internal clock to the monotonic, but neglected to
change the datagram's timestamp source.

Reported by: Oliver Hartmann, Michael Butler
Reviewed by: Ján Sučan <sucanjan@gmail.com>, allanjude
MFC after: 2 weeks
MFC-With: r350998
Differential Revision: https://reviews.freebsd.org/D21258

4 years agoReport NOIOB and NPWG fields as stripe size.
Alexander Motin [Wed, 14 Aug 2019 16:12:03 +0000 (16:12 +0000)]
Report NOIOB and NPWG fields as stripe size.

Namespace Optimal I/O Boundary field added in NVMe 1.3 and Namespace
Preferred Write Granularity added in 1.4 allow upper layers to align
I/Os for improved SSD performance and endurance.

I don't have hardware reportig those yet, but NPWG could probably be
reported by bhyve.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

4 years agoEnable BSD_CRTBEGIN on powerpc
Andrew Turner [Wed, 14 Aug 2019 14:31:17 +0000 (14:31 +0000)]
Enable BSD_CRTBEGIN on powerpc

In r342974 jhibbits added support to build crtsavres.o. This was the
blocker for BSD_CRTBEGIN to be enabled there. As such enable this
option again.

Reviewed by: jhibbits
Sponsored by: DARPA, AFRL

4 years agoImplement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
Hans Petter Selasky [Wed, 14 Aug 2019 09:36:25 +0000 (09:36 +0000)]
Implement pci_enable_msi() and pci_disable_msi() in the LinuxKPI.
This patch makes the DRM graphics driver in ports usable on aarch64.

Submitted by: Greg V <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D21008
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoAdd missing break statements in r351004.
Alexander Motin [Wed, 14 Aug 2019 02:02:14 +0000 (02:02 +0000)]
Add missing break statements in r351004.

Surprisingly code still worked, but thanks imp@ for noticing it.

MFC after: 1 week

4 years agogeom_uzip(4), mkuzip(8): Add Zstd image mode
Conrad Meyer [Tue, 13 Aug 2019 23:32:56 +0000 (23:32 +0000)]
geom_uzip(4), mkuzip(8): Add Zstd image mode

The Zstd format bumps the CLOOP major number to 4 to avoid incompatibility
with older systems.  Support in geom_uzip(4) is conditional on the ZSTDIO
kernel option, which is enabled in amd64 GENERIC, but not all in-tree
configurations.

mkuzip(8) was modified slightly to always initialize the nblocks + 1'th
offset in the CLOOP file format.  Previously, it was only initialized in the
case where the final compressed block happened to be unaligned w.r.t.
DEV_BSIZE.  The "Fake" last+1 block change in r298619 means that the final
compressed block's 'blen' was never correct unless the compressed uzip image
happened to be BSIZE-aligned.  This happened in about 1 out of every 512
cases.  The zlib and lzma decompressors are probably tolerant of extra trash
following the frame they were told to decode, but Zstd complains that the
input size is incorrect.

Correspondingly, geom_uzip(4) was modified slightly to avoid trashing the
nblocks + 1'th offset when it is known to be initialized to a good value.
This corrects the calculated final real cluster compressed length to match
that printed by mkuzip(8).

mkuzip(8) was refactored somewhat to reduce code duplication and increase
ease of adding other compression formats.

  * Input block size validation was pulled out of individual compression
    init routines into main().

  * Init routines now validate a user-provided compression level or select
    an algorithm-specific default, if none was provided.

  * A new interface for calculating the maximal compressed size of an
    incompressible input block was added for each driver.  The generic code
    uses it to validate against MAXPHYS as well as to allocate compression
    result buffers in the generic code.

  * Algorithm selection is now driven by a table lookup, to increase ease of
    adding other formats in the future.

mkuzip(8) gained the ability to explicitly specify a compression level with
'-C'.  The prior defaults -- 9 for zlib and 6 for lzma -- are maintained.
The new zstd default is 9, to match zlib.

Rather than select lzma or zlib with '-L' or its absense, respectively, a
new argument '-A <algorithm>' is provided to select 'zlib', 'lzma', or
'zstd'.  '-L' is considered deprecated, but will probably never be removed.

All of the new features were documented in mkuzip.8; the page was also
cleaned up slightly.

Relnotes: yes

4 years agoMake nvd(4) report NGUID or EUI64 as GEOM::lunid.
Alexander Motin [Tue, 13 Aug 2019 21:49:07 +0000 (21:49 +0000)]
Make nvd(4) report NGUID or EUI64 as GEOM::lunid.

With support for multiple namespaces and multiple ports in NVMe there is
now a need for reliable unique namespace identification alike to SCSI.

MFC after: 1 weeks
Sponsored by: iXsystems, Inc.

4 years agoFix build with DRM and INVARIANTS enabled.
John Baldwin [Tue, 13 Aug 2019 21:15:59 +0000 (21:15 +0000)]
Fix build with DRM and INVARIANTS enabled.

The DRM drivers use the lockdep assertion macros with spinlock_t locks
which are backed by mutexes, not sx locks.  This causes compile
failures since you can't use sx_assert with a mutex.  Instead, change
the lockdep macros to use lock_class methods.  This works by assuming
that each LinuxKPI locking primitive embeds a FreeBSD lock as its
first structure and uses a cast to get to the underlying 'struct
lock_object'.

Reviewed by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20992

4 years agoClarify comment that describes how the FS_METACKHASH is managed.
Kirk McKusick [Tue, 13 Aug 2019 20:56:44 +0000 (20:56 +0000)]
Clarify comment that describes how the FS_METACKHASH is managed.

MFC after: 3 days

4 years agoRemove deprecated GEOM classes
Conrad Meyer [Tue, 13 Aug 2019 20:06:55 +0000 (20:06 +0000)]
Remove deprecated GEOM classes

Follow-up on r322318 and r322319 and remove the deprecated modules.

Shift some now-unused kernel files into userspace utilities that incorporate
them.  Remove references to removed GEOM classes in userspace utilities.

Reviewed by: imp (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D21249

4 years agosys/{x86,amd64}: remove one of doubled ;s
Ed Maste [Tue, 13 Aug 2019 19:39:36 +0000 (19:39 +0000)]
sys/{x86,amd64}: remove one of doubled ;s

MFC after: 1 week

4 years agoping: use the monotonic clock to measure durations
Alan Somers [Tue, 13 Aug 2019 19:27:23 +0000 (19:27 +0000)]
ping: use the monotonic clock to measure durations

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21245

4 years agoping6: use the monotonic clock to measure durations
Alan Somers [Tue, 13 Aug 2019 19:24:17 +0000 (19:24 +0000)]
ping6: use the monotonic clock to measure durations

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21226

4 years agoping: fix data type of a variable for a packet sequence number
Alan Somers [Tue, 13 Aug 2019 16:25:23 +0000 (16:25 +0000)]
ping: fix data type of a variable for a packet sequence number

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21244

4 years agoConsistently use the byteorder functions in the correct direction
Alan Somers [Tue, 13 Aug 2019 16:22:43 +0000 (16:22 +0000)]
Consistently use the byteorder functions in the correct direction

Though ntohs and htons are functionally identical, they have different meanings.Using the correct one helps to document the code.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21219

4 years agofusefs: skip some tests when unsafe aio is disabled
Alan Somers [Tue, 13 Aug 2019 15:52:28 +0000 (15:52 +0000)]
fusefs: skip some tests when unsafe aio is disabled

MFC after:      15 days
MFC-With:       r350665
Sponsored by:   The FreeBSD Foundation

4 years agor350976 accidentally removed nvram device. Restore it.
Warner Losh [Tue, 13 Aug 2019 15:50:47 +0000 (15:50 +0000)]
r350976 accidentally removed nvram device. Restore it.

4 years agofusefs: add SVN Keywords to the test files
Alan Somers [Tue, 13 Aug 2019 15:49:40 +0000 (15:49 +0000)]
fusefs: add SVN Keywords to the test files

Reported by: SVN pre-commit hooks
MFC after: 15 days
MFC-With: r350665
Sponsored by: The FreeBSD Foundation

4 years agoRemove some more leftover rlogin man page xrefs
Ed Maste [Tue, 13 Aug 2019 15:41:36 +0000 (15:41 +0000)]
Remove some more leftover rlogin man page xrefs

rcmds were removed in r32435 and these three man pages can trivially
drop the references.

There's still a reference in pts.4 because it describes a mode
(TIOCPKT_NOSTOP), and only lists rlogin/rlogind as examples of programs
that use that mode.  To update later.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoAdd PNP_INFO to the gpiopps driver.
Ian Lepore [Tue, 13 Aug 2019 15:38:05 +0000 (15:38 +0000)]
Add PNP_INFO to the gpiopps driver.

4 years agoping6: Fix data type of a variable for a packet sequence number
Alan Somers [Tue, 13 Aug 2019 15:30:29 +0000 (15:30 +0000)]
ping6: Fix data type of a variable for a packet sequence number

Submitted by:   Ján Sučan <sucanjan@gmail.com>
MFC after:      2 weeks
Sponsored by:   Google, inc. (Google Summer of Code 2019)
Differential Revision:  https://reviews.freebsd.org/D21218

4 years agoFlowtables were removed in r321618, remove stray reference here.
Warner Losh [Tue, 13 Aug 2019 15:28:22 +0000 (15:28 +0000)]
Flowtables were removed in r321618, remove stray reference here.

4 years agovx(4) was removed in r347921. Remove stray reference.
Warner Losh [Tue, 13 Aug 2019 15:28:18 +0000 (15:28 +0000)]
vx(4) was removed in r347921. Remove stray reference.

4 years agonsp(4) was removed in r339571. Remove stray reference.
Warner Losh [Tue, 13 Aug 2019 15:28:11 +0000 (15:28 +0000)]
nsp(4) was removed in r339571. Remove stray reference.

4 years agocrunch: remove rsh and rlogin from example config file
Ed Maste [Tue, 13 Aug 2019 15:23:14 +0000 (15:23 +0000)]
crunch: remove rsh and rlogin from example config file

rcmds removed in r324351.

Historical references in the README are maintained.  There's a paragraph
describing a "980K crunched 'fixit'" that references rsh and rlogin.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agofe(4) driver has been removed from the tree in r347914. Remove stray reference.
Warner Losh [Tue, 13 Aug 2019 15:16:42 +0000 (15:16 +0000)]
fe(4) driver has been removed from the tree in r347914. Remove stray reference.

4 years agoRegen src.conf.5 after r350980 (remove rsh/rlogin references)
Ed Maste [Tue, 13 Aug 2019 14:57:04 +0000 (14:57 +0000)]
Regen src.conf.5 after r350980 (remove rsh/rlogin references)

Also pick up changes to LLVM_TARGET_RISCV, NAND, NVME, OPENM

Sponsored by: The FreeBSD Foundation

4 years agoRemove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT
Ed Maste [Tue, 13 Aug 2019 14:51:16 +0000 (14:51 +0000)]
Remove rlogin/rsh references from src.conf(5) WITHOUT_BLACKLIST_SUPPORT

rcmds were removed in r324351

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agoRemove rsh/rlogin references from security man page
Ed Maste [Tue, 13 Aug 2019 14:47:24 +0000 (14:47 +0000)]
Remove rsh/rlogin references from security man page

More extensive changes to this page are certainly needed, but at least
remove references to binaries that no longer exist.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

4 years agonvme has been moved to 'files' so shouldn't be here anymore. It works on
Warner Losh [Tue, 13 Aug 2019 13:41:46 +0000 (13:41 +0000)]
nvme has been moved to 'files' so shouldn't be here anymore. It works on
powerpc64 and arm64 these days as well as amd64/i386.

4 years agoed(4) has been removed from the tree, but these were forgotten in r347911.
Warner Losh [Tue, 13 Aug 2019 13:28:12 +0000 (13:28 +0000)]
ed(4) has been removed from the tree, but these were forgotten in r347911.

4 years agoSave ip_ttl value and restore it after checksum calculation.
Andrey V. Elsukov [Tue, 13 Aug 2019 12:47:53 +0000 (12:47 +0000)]
Save ip_ttl value and restore it after checksum calculation.

Since ipvoly is used for checksum calculation, part of original IP
header is zeroed. This part includes ip_ttl field, that can be used
later in IP_MINTTL socket option handling.

PR: 239799
MFC after: 1 week

4 years agoPlace back in the dependency on HPTS via module depends versus
Randall Stewart [Tue, 13 Aug 2019 12:41:15 +0000 (12:41 +0000)]
Place back in the dependency on HPTS via module depends versus
a fatal error in compiling. This was taken out by mistake
when I mis-merged from the 18q22p2 sources of rack in NF. Opps.

Reported by: sbruno

4 years agoMove scheduler state into the per-cpu area where it can be allocated on the
Jeff Roberson [Tue, 13 Aug 2019 04:54:02 +0000 (04:54 +0000)]
Move scheduler state into the per-cpu area where it can be allocated on the
correct NUMA domain.

Reviewed by: markj, gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19315

4 years agoFix the driver name in ads111x.4, and hook the manpage up to the build.
Ian Lepore [Tue, 13 Aug 2019 03:49:53 +0000 (03:49 +0000)]
Fix the driver name in ads111x.4, and hook the manpage up to the build.

The driver was originally written with the name ads1115, but at the last
minute it got renamed to ads111x to reflect its support for many related
chips, but I forgot to update the manpage to match the renaming before
committing it all.

4 years agoAdd deprecation notice to snd_maestro(4).
Pedro F. Giffuni [Tue, 13 Aug 2019 01:25:07 +0000 (01:25 +0000)]
Add deprecation notice to snd_maestro(4).

As suggested in:
https://wiki.freebsd.org/WhatsGoing/FreeBSD13

this old driver is buggy and no one is working on it so we should deprecate
it for the next release.

MFC after: 3 days
Diferential Revision: https://reviews.freebsd.org/D21139

4 years agoAdd deprecation notice to snd_ds1(4).
Pedro F. Giffuni [Tue, 13 Aug 2019 01:24:43 +0000 (01:24 +0000)]
Add deprecation notice to snd_ds1(4).

As suggested in:
https://wiki.freebsd.org/WhatsGoing/FreeBSD13

We will be dropping the snd_ds1 driver. The driver is known to be buggy
and no one has been working on it for years now.
Users of old Yamaha cards may have luck with the OSS drivers instead.

MFC after: 3 days
Diferential Revision: https://reviews.freebsd.org/D21138

4 years agoFix powerpc LINT build
Warner Losh [Mon, 12 Aug 2019 23:25:21 +0000 (23:25 +0000)]
Fix powerpc LINT build

tcpratelimit isn't supported as there's now atomic_add_64, so add it to the exclusion list
Add comment for why PPC_PROBE_CHIPSET is on the list
Remove UKBD_DFLT_KEYMAP now that ukbd works on all platforms.

4 years agoukbdmap.h rule was identical on all platforms, so move them into sys/conf/files.
Warner Losh [Mon, 12 Aug 2019 23:25:14 +0000 (23:25 +0000)]
ukbdmap.h rule was identical on all platforms, so move them into sys/conf/files.

This allows us to remove 'nodevice ukbd' from the arm64 NOTES file.

4 years agoCreate files.x86
Warner Losh [Mon, 12 Aug 2019 22:58:56 +0000 (22:58 +0000)]
Create files.x86

files.x86 is for the parts of the system that are common to both i386 and amd64
due too their nature. First up, to get the ball rolling, is fdc, the floppy disk
support. It works only on amd64 and i386 these days, and that's unlikely to
change.

Reviewed by: jhb, cem (earlier versrions)
Differential Revision: https://reviews.freebsd.org/D21210

4 years agoFloppy driver really only works on x86
Warner Losh [Mon, 12 Aug 2019 22:58:50 +0000 (22:58 +0000)]
Floppy driver really only works on x86

Move the floppy driver to the x86 specific notes file.

Reviewed by: jhb, manu, jhibbits, emaste
Differential Revision: https://reviews.freebsd.org/D21208

4 years agoMove sc out of the global file
Warner Losh [Mon, 12 Aug 2019 22:58:44 +0000 (22:58 +0000)]
Move sc out of the global file

x86 needs sc, as does sparc64. powerpc doesn't use it by default, but some old
powermac notebooks do not work with vt yet for reasons unknonw. Even so, I've
removed it from powerpc LINT. It's not in daily use there, and the intent is to
100% switch to vt now that it works for that platform to limit support burden.

All the other architectures omit some or all of the screen savers from their
lint config. Move them to the x86 NOTES files and remove the exclusions. This
reduces slightly the number of savers sparc64 compiles, but since they are in
GENERIC, the overage is adequate and if someone reaelly wants to sort them out
in sparc64 they can sweat the details and the testing.

Reviewed by: jhb (earlier version), manu (earlier version), jhibbits
Differential Revision: https://reviews.freebsd.org/D21233

4 years agoStart to split out the really x86 specific NOTES from the global notes file.
Warner Losh [Mon, 12 Aug 2019 22:58:13 +0000 (22:58 +0000)]
Start to split out the really x86 specific NOTES from the global notes file.
Start with COMPAT_43, since it's really only relevant to x86.

Reviewed by: jhb@
Differential Revision: https://reviews.freebsd.org/D21203

4 years agoMissed part of r350523.
Alexander Motin [Mon, 12 Aug 2019 21:51:47 +0000 (21:51 +0000)]
Missed part of r350523.

MFC after: 3 days

4 years agoIncrease YPMAXRECORD to 16M to be compatible with Linux.
Konstantin Belousov [Mon, 12 Aug 2019 20:27:33 +0000 (20:27 +0000)]
Increase YPMAXRECORD to 16M to be compatible with Linux.

Since YP protocol definition uses the constant to declare
variable-size opaque byte strings, the change should be binary
compatible with existing installations which do not expose keys or
values larger than 1024 bytes.

All uses of local variables with YPMAXRECORD sizes were removed to
avoid insane stack use.  On the other hand, variables with static
lifetime should be fine and only result in increased VA use.

Glibc made same change, increasing the allowed length for keys and
values in YP to 16M, in 2013.

Reviewed by: markj
Discussed with: ian
Sponsored by: Mellanox Technologies
MFC after: 3 weeks
Differential revision: https://reviews.freebsd.org/D20900

4 years agofusefs: skip some tests when unsafe aio is disabled
Alan Somers [Mon, 12 Aug 2019 20:00:21 +0000 (20:00 +0000)]
fusefs: skip some tests when unsafe aio is disabled

MFC after: 16 days
MFC-With: r350665
Sponsored by: The FreeBSD Foundation

4 years agoFix style and clarify comment
Leandro Lupori [Mon, 12 Aug 2019 19:44:57 +0000 (19:44 +0000)]
Fix style and clarify comment

Fix code style in proc.h and clarify comment about empty structs.

4 years agoping6: Fix data type of a variable for a packet sequence number
Alan Somers [Mon, 12 Aug 2019 19:14:11 +0000 (19:14 +0000)]
ping6: Fix data type of a variable for a packet sequence number

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFC after: 2 weeks
Sponsored by: Google, inc. (Google Summer of Code 2019)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21218

4 years ago[ppc] avoid empty mdproc struct
Leandro Lupori [Mon, 12 Aug 2019 17:18:20 +0000 (17:18 +0000)]
[ppc] avoid empty mdproc struct

Avoid empty structs, that have undefined behavior in C99 and
make compilers complain about it
(empty struct has size 0 in C, size 1 in C++).

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D21231

4 years ago[PPC64] Save FPU registers before enabling VSX
Leandro Lupori [Mon, 12 Aug 2019 12:51:47 +0000 (12:51 +0000)]
[PPC64] Save FPU registers before enabling VSX

Fixed trap handler logic, in order to make it save FPU registers,
if FPU is enabled, before enabling VSX. Without this change, FPU
register contents were being lost when set before VSX was enabled.

4 years ago8423 8199 7432 Implement large_dnode pool feature
Andriy Gapon [Mon, 12 Aug 2019 12:05:40 +0000 (12:05 +0000)]
8423 8199 7432 Implement large_dnode pool feature

8423 Implement large_dnode pool feature
8199 multi-threaded dmu_object_alloc()
7432 Large dnode pool feature

llumos/illumos-gate@54811da5ac6b517992fdc173df5d605e4e61fdc0
https://github.com/illumos/illumos-gate/commit/54811da5ac6b517992fdc173df5d605e4e61fdc0
https://www.illumos.org/issues/8423
https://www.illumos.org/issues/8199
https://www.illumos.org/issues/7432

  ZoL issues:
  Improved dnode allocation #6564
  Clean up large dnode code #6262
  Fix dnode_hold() freeing dnode behavior #8172
  Fix dnode allocation race #6414, #6439
  Partial: Raw sends must be able to decrease nlevels #6821, #6864
  Remove unnecessary txg syncs from receive_object() Closes #7197

Author: Toomas Soome <tsoome@me.com>

4 years agoMFV r350896: 6585 sha512, skein, and edonr have an unenforced dependency on extensibl...
Andriy Gapon [Mon, 12 Aug 2019 11:42:16 +0000 (11:42 +0000)]
MFV r350896: 6585 sha512, skein, and edonr have an unenforced dependency on extensible dataset

illumos/illumos-gate@892586e8a147c02d7f4053cc405229a13e796928
https://github.com/illumos/illumos-gate/commit/892586e8a147c02d7f4053cc405229a13e796928

https://www.illumos.org/issues/6585
  In any pool without the extensible dataset feature flag already enabled,
  creating a dataset with dedup set to use one of the new checksums would result
  in the following panic as soon as any data was added:
  panic[cpu0]/thread=ffffff0006761c40: feature_get_refcount(spa, feature,
  &refcount) != 48 (0x30 != 0x30), file: ../../common/fs/zfs/zfeature.c line 390

  ffffff0006761830 fffffffffba8fbdd ()
  ffffff0006761890 zfs:feature_do_action+11a ()
  ffffff00067618c0 zfs:spa_feature_incr+1e ()
  ffffff0006761920 zfs:dmu_object_zapify+b7 ()
  ffffff00067619b0 zfs:dsl_dataset_activate_feature+97 ()
  ffffff0006761a20 zfs:dsl_dataset_sync+ba ()
  ffffff0006761ab0 zfs:dsl_pool_sync+153 ()
  ffffff0006761b70 zfs:spa_sync+26e ()
  ffffff0006761c20 zfs:txg_sync_thread+227 ()
  ffffff0006761c30 unix:thread_start+8 ()
  Inspection showed that feature->fi_feature was 7, which is the value of
  SPA_FEATURE_EXTENSIBLE_DATASET in the spa_feature enum.
  Testing shows that the panic can be prevented by explicitly setting extensible
  dataset as a dependency for the sha512, edonr, and skein feature flags.
  Alternatively, the new checksums code could possibly be changed to obviate the
  need for the dependency.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: ilovezfs <ilovezfs@icloud.com>

Note that FreeBSD does not support ednor yet.

MFC after: 2 weeks

4 years ago6585 sha512, skein, and edonr have an unenforced dependency on extensible dataset
Andriy Gapon [Mon, 12 Aug 2019 11:27:17 +0000 (11:27 +0000)]
6585 sha512, skein, and edonr have an unenforced dependency on extensible dataset

illumos/illumos-gate@892586e8a147c02d7f4053cc405229a13e796928
https://github.com/illumos/illumos-gate/commit/892586e8a147c02d7f4053cc405229a13e796928

https://www.illumos.org/issues/6585
  In any pool without the extensible dataset feature flag already enabled,
  creating a dataset with dedup set to use one of the new checksums would result
  in the following panic as soon as any data was added:
  panic[cpu0]/thread=ffffff0006761c40: feature_get_refcount(spa, feature,
  &refcount) != 48 (0x30 != 0x30), file: ../../common/fs/zfs/zfeature.c line 390

  ffffff0006761830 fffffffffba8fbdd ()
  ffffff0006761890 zfs:feature_do_action+11a ()
  ffffff00067618c0 zfs:spa_feature_incr+1e ()
  ffffff0006761920 zfs:dmu_object_zapify+b7 ()
  ffffff00067619b0 zfs:dsl_dataset_activate_feature+97 ()
  ffffff0006761a20 zfs:dsl_dataset_sync+ba ()
  ffffff0006761ab0 zfs:dsl_pool_sync+153 ()
  ffffff0006761b70 zfs:spa_sync+26e ()
  ffffff0006761c20 zfs:txg_sync_thread+227 ()
  ffffff0006761c30 unix:thread_start+8 ()
  Inspection showed that feature->fi_feature was 7, which is the value of
  SPA_FEATURE_EXTENSIBLE_DATASET in the spa_feature enum.
  Testing shows that the panic can be prevented by explicitly setting extensible
  dataset as a dependency for the sha512, edonr, and skein feature flags.
  Alternatively, the new checksums code could possibly be changed to obviate the
  need for the dependency.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: ilovezfs <ilovezfs@icloud.com>

4 years agoinstall.1: Add missing arguments to option descriptions
Mateusz Piotrowski [Mon, 12 Aug 2019 10:57:56 +0000 (10:57 +0000)]
install.1: Add missing arguments to option descriptions

While here:
- Remove deprecated Tn macros.
- Do not use macros with the -width option.

Reviewed by: bcr
Approved by: doc (bcr)
Differential Revision: https://reviews.freebsd.org/D21173

4 years agoa stop gap fix for a race between dnode_hold and dnode_sync_free
Andriy Gapon [Mon, 12 Aug 2019 10:30:00 +0000 (10:30 +0000)]
a stop gap fix for a race between dnode_hold and dnode_sync_free

The race was introduced in r337669, the large dnode feature import from
ZoL.  The problem was debugged by ZoL developers and then,
independently, on FreeBSD.

The fix is an early proposal by Brian Behlendorf:
https://github.com/behlendorf/zfs/commit/50f32ed74e42aa28522e9681fb8ae55239fa33a7
This fix never went into ZoL.  A larger change that was committed later
included a different solution because of the re-worked code.

Ideally, we want to revert this fix and re-synchronize FreeBSD large
dnode code with that in illumos (or newer ZoL).  illumos has a later
import of the feature from ZoL that does not have the bug.

PR: 236480
Obtained from: Brian Behlendorf <behlendorf1@llnl.gov>
Submitted by: ncrogers@gmail.com (patch adaptation)
Reported by: ncrogers@gmail.com
Tested by: ncrogers@gmail.com,
Dennis Noordsij <dennis.noordsij@alumni.helsinki.fi>,
Julien Cigar <julien@perdition.city>
MFC after: 10 days

4 years agoAllow ZVOL bookmarks to be listed recursively
Andriy Gapon [Mon, 12 Aug 2019 10:00:32 +0000 (10:00 +0000)]
Allow ZVOL bookmarks to be listed recursively

Many thanks to cryx-freebsd@h3q.com for reporting the problem and
submitting a fix.  I have chosen to take an equivalent but textually
different patch from ZoL just to avoid increasing divergence between
OpenZFS flavours.

ZoL commit: zfsonlinux/zfse33da554c5daf0103b093f44ab5b90ad6c064c3f
Author: loli10K <ezomori.nozomu@gmail.com>
Date: Wed Sep 7 19:34:20 2016 +0200
PR: 197821
Submitted by: cryx-freebsd@h3q.com (alternative version)
Reported by: cryx-freebsd@h3q.com
Obtained from: ZoL
MFC after: 1 week

4 years agortwn_pci: add device ID for RTL8192CE.
Andriy Voskoboinyk [Mon, 12 Aug 2019 08:01:21 +0000 (08:01 +0000)]
rtwn_pci: add device ID for RTL8192CE.

PR: 239795
Submitted by: James Parsons <james.m.parsons@protonmail.com>
MFC after: 1 week
Relnotes: yes

4 years agopowerpc: Unify pmap definitions between AIM and Book-E
Justin Hibbits [Mon, 12 Aug 2019 03:03:56 +0000 (03:03 +0000)]
powerpc: Unify pmap definitions between AIM and Book-E

This is part 2 of r347078, pulling the page directory out of the Book-E
pmap.  This breaks KBI for anything that uses struct pmap (such as vm_map)
so any modules that access this must be rebuilt.

4 years agoInitialize the frentry (the control block that defines a rule) checksum
Cy Schubert [Mon, 12 Aug 2019 02:42:47 +0000 (02:42 +0000)]
Initialize the frentry (the control block that defines a rule) checksum
to zero. Matching checksums save time and effort by mitigating the need
for full rule compare.

MFC after: 3 days

4 years agoCalculate the number interface array elements using the new FR_NUM macro
Cy Schubert [Sun, 11 Aug 2019 23:54:52 +0000 (23:54 +0000)]
Calculate the number interface array elements using the new FR_NUM macro
instead of the hard-coded value of 4. This is a precursor to increasing
the number of interfaces speficied in "on {interface, ..., interface}".
Note that though this feature is coded in ipf_y.y, it is partially
supported in the ipfilter kld, meaning it does not work yet (and is yet
to be documented in ipf.5 too).

MFC after: 2 weeks

4 years agor272552 applied the patch from ipfilter upstream fil.c r1.129 to fix
Cy Schubert [Sun, 11 Aug 2019 23:54:49 +0000 (23:54 +0000)]
r272552 applied the patch from ipfilter upstream fil.c r1.129 to fix
broken ipfilter rule matches (upstream bug #554). The upstream patch
was incomplete, it resolved all but one rule compare issue. The issue
fixed here is when "{to, reply-to, dup-to} interface" are used in
conjuncion with "on interface". The match was only made if the on keyword
was specified in the same order in each case referencing the same rule.
This commit fixes this.

The reason for this is that interface name strings and comment keyword
comments are stored in a a variable length field starting at fr_names
in the frentry struct. These strings are placed into this variable length
in the order they are encountered by ipf_y.y and indexed through index
pointers in fr_ifnames, fr_comment or one of the frdest struct fd_name
fields. (Three frdest structs are within frentry.) Order matters and
this patch takes this into account.

While in here it was discovered that though ipfilter is designed to
support multiple interface specifiations per rule (up to four), this
undocumented (the man page makes no mention of it) feature does not work.
A todo is to fix the multiple interfaces feature at a later date. To
understand the design decision as to why only four were intended, it is
suspected that the decision was made because Sun workstations and PCs
rarely if ever exceeded four NICs at the time, this is not true in 2019.

PR: 238796
Reported by: WHR <msl0000023508@gmail.com>
MFC after: 2 weeks