]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agovm_fault: Fix vm_fault_populate()'s handling of VM_FAULT_WIRE
Mark Johnston [Tue, 14 Dec 2021 20:10:46 +0000 (15:10 -0500)]
vm_fault: Fix vm_fault_populate()'s handling of VM_FAULT_WIRE

vm_map_wire() works by calling vm_fault(VM_FAULT_WIRE) on each page in
the rage.  (For largepage mappings, it calls vm_fault() once per large
page.)

A pager's populate method may return more than one page to be mapped.
If VM_FAULT_WIRE is also specified, we'd wire each page in the run, not
just the fault page.  Consider an object with two pages mapped in a
vm_map_entry, and suppose vm_map_wire() is called on the entry.  Then,
the first vm_fault() would allocate and wire both pages, and the second
would encounter a valid page upon lookup and wire it again in the
regular fault handler.  So the second page is wired twice and will be
leaked when the object is destroyed.

Fix the problem by modify vm_fault_populate() to wire only the fault
page.  Also modify the error handler for pmap_enter(psind=1) to not test
fs->wired, since it must be false.

PR: 260347
Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 88642d978a999aaa3752e86d2f54b1a6aba7fc85)

2 years agoClean up a couple of MD warts in vm_fault_populate():
Jason A. Harmening [Sat, 27 Mar 2021 03:10:46 +0000 (20:10 -0700)]
Clean up a couple of MD warts in vm_fault_populate():

--Eliminate a big ifdef that encompassed all currently-supported
architectures except mips and powerpc32.  This applied to the case
in which we've allocated a superpage but the pager-populated range
is insufficient for a superpage mapping.  For platforms that don't
support superpages the check should be inexpensive as we shouldn't
get a superpage in the first place.  Make the normal-page fallback
logic identical for all platforms and provide a simple implementation
of pmap_ps_enabled() for MIPS and Book-E/AIM32 powerpc.

--Apply the logic for handling pmap_enter() failure if a superpage
mapping can't be supported due to additional protection policy.
Use KERN_PROTECTION_FAILURE instead of KERN_FAILURE for this case,
and note Intel PKU on amd64 as the first example of such protection
policy.

Reviewed by: kib, markj, bdragon

(cherry picked from commit 8dc8feb53da0c1a2301cb21c87b17a09d12e8fa7)

2 years agox86: Deduplicate clock.h
Mark Johnston [Mon, 6 Dec 2021 15:39:08 +0000 (10:39 -0500)]
x86: Deduplicate clock.h

The headers were mostly identical on amd64 and i386.

No functional change intended.

Reviewed by: cperciva, mav, imp, kib, jhb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f06f1d1fdb969fa7a0a6eefa030d8536f365eb6e)

2 years agoaesni: Fix an out-of-bounds read in AES_GCM_decrypt()
Mark Johnston [Thu, 16 Dec 2021 14:08:16 +0000 (09:08 -0500)]
aesni: Fix an out-of-bounds read in AES_GCM_decrypt()

This is the same as 4285655adb74 ("aesni: Avoid a potential
out-of-bounds load in AES_GCM_encrypt()") except for the decryption
path.

Reported by: Jenkins (KASAN job)
Reviewed by: cem
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 4a61d8ef42cb44c337dfdc17424cc2e2f1d67fd5)

2 years agoamdsbwd: always enable watchdog register decoding
Andriy Gapon [Wed, 27 May 2020 10:15:54 +0000 (13:15 +0300)]
amdsbwd: always enable watchdog register decoding

This seems to be required even if the watchdog is accessed via the common
MMIO space.

Tested on:
- Ryzen 3 3200U APU;
- Ryzen 7 5800X CPU with X570 chipset.

(cherry picked from commit cca0d3bbd8c9f8b50c6940c33704a6c8c464b68f)

2 years agovmxnet3: skip zero-length descriptor in the middle of a packet
Andriy Gapon [Mon, 6 Dec 2021 07:59:28 +0000 (09:59 +0200)]
vmxnet3: skip zero-length descriptor in the middle of a packet

Passing up such descriptors to iflib is obviously wasteful.
But the main conern is that we may overrun iri_frags array because of
them.  That's been observed in practice.

Also, assert that the number of fragments / descriptors / segments is
less than IFLIB_MAX_RX_SEGS.

Sponsored by: Panzura LLC

(cherry picked from commit 9c612a5d0af17021abc6e1bb2a8baa5a4c97d05f)

2 years agoApply clang fix for crash or assertion failure compiling part of llvm
Dimitry Andric [Fri, 24 Dec 2021 11:46:00 +0000 (12:46 +0100)]
Apply clang fix for crash or assertion failure compiling part of llvm

Merge commit 77e8f4eeeeed from llvm git (by David Green):

  [ARM] Define ComplexPatternFuncMutatesDAG

  Some of the Arm complex pattern functions call canExtractShiftFromMul,
  which can modify the DAG in-place. For this to be valid and handled
  successfully we need to define ComplexPatternFuncMutatesDAG.

  Differential Revision: https://reviews.llvm.org/D107476

When building parts of llvm targeting armv6 on stable/12, the following
assertion can appear (or if assertions are disabled, clang is likely to
crash):

Assertion failed: (NodeToMatch->getOpcode() != ISD::DELETED_NODE && "NodeToMatch was removed partway through selection"), function SelectCodeCommon, file /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp, line 3573.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/obj/usr/src/freebsd12-amd64/tmp/usr/bin/c++ -cc1 -triple armv6kz-unknown-freebsd12.3-gnueabihf -S --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -mrelocation-model static -mconstructor-aliases -target-cpu arm1176jzf-s -target-feature +vfp2 -target-feature +vfp2sp -target-feature -vfp3 -target-feature -vfp3d16 -target-feature -vfp3d16sp -target-feature -vfp3sp -target-feature -fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature -vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature +fp64 -target-feature -d32 -target-feature -neon -target-feature -sha2 -target-feature -aes -target-feature -fp16fml -target-feature +strict-align -target-abi aapcs-linux -mfloat-abi hard -fallow-half-arguments-and-returns -ffunction-sections -fdata-sections -O1 -std=c++14 -fdeprecated-macro -fno-rtti -fno-signed-char -faddrsig -fexperimental-new-pass-manager PPCISelLowering-009095.ii
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'PPCISelLowering-009095.cpp'.
4. Running pass 'ARM Instruction Selection' on function '@_ZN4llvm17PPCTargetLoweringC2ERKNS_16PPCTargetMachineERKNS_12PPCSubtargetE'

This crash or assertion is fixed by the upstream commit.

MFC after: 3 days

(cherry picked from commit ada8b24d48d93f0b13209b555b64f3d355ef61d9)

2 years agotests/libalias: Make inline functions static inline
Dimitry Andric [Mon, 20 Dec 2021 09:52:02 +0000 (10:52 +0100)]
tests/libalias: Make inline functions static inline

In C, plain inline functions should never be used: they should be
declared either static inline or extern inline. In this case, they are
clearly meant to be static inline.

MFC after: 3 days

(cherry picked from commit 46aec7fae47ed46368f95338741b4daffa5cbc94)

2 years agoipfilter userland: Revert the ipmon part of a6fb9bbea731
Cy Schubert [Mon, 27 Dec 2021 09:10:52 +0000 (01:10 -0800)]
ipfilter userland: Revert the ipmon part of a6fb9bbea731

a6fb9bbea731 caused incorrect formatting of ipmon log output.

Fixes: a6fb9bbea7318e993dfe0f8a7f00821f79850b26

(cherry picked from commit d740faa30a4a2b300da0b2f2af4680a2cb260828)

2 years agosys/dev/arcmsr: Update Areca RAID driver to fix some issues on ARC-1886.
黃清隆 [Mon, 13 Dec 2021 16:09:15 +0000 (08:09 -0800)]
sys/dev/arcmsr: Update Areca RAID driver to fix some issues on ARC-1886.

1. Doorbell interrupt status may arrive lately when doorbell interrupt on
   ARC-1886.
2. System boot up hung when ARC-1886 with no volume created or no device
   attached.

Many thanks to Areca for continuing to support FreeBSD.

(cherry picked from commit 6964b77e598597789764ab6949a8031c14075a25)

2 years agonfscl: add a filesize limit check to nfs_allocate()
Rick Macklem [Mon, 13 Dec 2021 23:32:19 +0000 (15:32 -0800)]
nfscl: add a filesize limit check to nfs_allocate()

As reported in PR#260343, nfs_allocate() did not check
the filesize rlimit. This patch adds that check.

PR: 260343

(cherry picked from commit fe04c91184e9e82609a657c4e6e70e213ed3a859)

2 years agonfsd: Limit parsing of layout errors to maxcnt bytes
Rick Macklem [Mon, 13 Dec 2021 23:21:31 +0000 (15:21 -0800)]
nfsd: Limit parsing of layout errors to maxcnt bytes

This patch decrements maxcnt by the appropriate
number of bytes during parsing and checks to see
if there is data remaining.  If not, it just returns
from nfsrv_flexlayouterr() without further processing.
This prevents the tl pointer from running off the end
of the error data pointed at by layp, if there are
flaws in the data.

PR: 260293

(cherry picked from commit c302f889e21f73746a3b0917df5246e639df1481)

2 years agoqat: Address -Wunused-but-set-variable warnings
Mark Johnston [Fri, 10 Dec 2021 15:52:30 +0000 (10:52 -0500)]
qat: Address -Wunused-but-set-variable warnings

(cherry picked from commit 8fcf230c1377c4598a7aa6560ec43ff46662fbaa)

2 years agodtrace: Disable getf() as it is broken on FreeBSD
Domagoj Stolfa [Fri, 17 Dec 2021 16:01:54 +0000 (11:01 -0500)]
dtrace: Disable getf() as it is broken on FreeBSD

getf() on FreeBSD calls _sx_slock(), _sx_sunlock() and fget_locked().
Furthermore, it does not set the per-core fault flag, meaning it
usually ends up in a double fault panic once getf() does get called,
especially from fbt.

Reviewing the DTrace Toolkit + a number of other scripts scattered
around FreeBSD, I have not been able to find one use of getf(). Given
how broken the implementation currently is, we disable it until it
can be implemented properly.

Also comment out a test in aggs/tst.subr.d for getf().

Reviewed by: markj

(cherry picked from commit 30ec3138edc9d491446409910f52ccb1b158253e)

2 years agobhyve: Only snapshot initialized VirtIO queues
Vitaliy Gusev [Thu, 16 Dec 2021 16:06:08 +0000 (11:06 -0500)]
bhyve: Only snapshot initialized VirtIO queues

If the virtio device is not fully initialized, then suspend fails with:

  vi_pci_snapshot_queues: invalid address: vq->vq_desc
  Failed to snapshot virtio-rnd; ret=14

Reviewed by: jhb

(cherry picked from commit d079fc197aca951c7918276922038852167dd39f)

2 years agotwsi: use twsi_error() to handle wrong bus status when starting
Andriy Gapon [Sun, 19 Dec 2021 09:28:02 +0000 (11:28 +0200)]
twsi: use twsi_error() to handle wrong bus status when starting

(cherry picked from commit 46e0c03795443675f95db6da2195825d24a9fb7c)

2 years agonfscl: Fix must_commit handling for mirrored pNFS mounts
Rick Macklem [Sun, 12 Dec 2021 23:40:30 +0000 (15:40 -0800)]
nfscl: Fix must_commit handling for mirrored pNFS mounts

For pNFS mounts to mirrored Flexible File layout pNFS servers,
the "must_commit" component in the nfsclwritedsdorpc
structure must be checked and the "must_commit" argument passed
into nfscl_doiods() must be updated.  Technically, only writes to
the DS with a writeverf change must be redone, but since this
occurrence will be rare, the must_commit argument to nfscl_doiosd()
is set to 1, so all writes to all DSs will be redone.

This bug would affect few, since use of mirrored pNFS servers
is rare and "writeverf" rarely changes. Normally "writeverf"
only changes when a NFS server reboots.

(cherry picked from commit 24947b701d07634434b3208b0a0c970235f9d16e)

2 years agohwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake CPUs.
Alexander Motin [Fri, 26 Nov 2021 00:17:58 +0000 (19:17 -0500)]
hwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake CPUs.

MFC after: 1 month

(cherry picked from commit 913c07a04998b8cd11dc428f5d00fae7dd392244)

2 years agolibpmc: Update some x86 event definitions.
Alexander Motin [Thu, 25 Nov 2021 16:19:26 +0000 (11:19 -0500)]
libpmc: Update some x86 event definitions.

MFC after: 1 month

(cherry picked from commit 52d973f52c07b94909a6487be373c269988dc151)

2 years agogfx_fb: Fix a typo in a source code comment
Gordon Bergling [Wed, 22 Dec 2021 09:00:42 +0000 (10:00 +0100)]
gfx_fb: Fix a typo in a source code comment

- s/decriptor/descriptor/

(cherry picked from commit b5e0a70193a7a02ba611317cd1688e29002685a4)

2 years agosound(4): Fix a typo in a source code comment
Gordon Bergling [Wed, 22 Dec 2021 09:18:35 +0000 (10:18 +0100)]
sound(4): Fix a typo in a source code comment

- s/aggresively/aggressively/

(cherry picked from commit d34632a235dc4cb1b4f89e5dd570a6a53f0117ce)

2 years agommc_sim: fix setting of the mutex name
Andriy Gapon [Wed, 15 Dec 2021 11:37:59 +0000 (13:37 +0200)]
mmc_sim: fix setting of the mutex name

To quote the manual:
 The pointer passed in as name and type is saved rather than the data
 it points to.  The data pointed to must remain stable until the mutex
 is destroyed.

It seems that the type is actually copied, but the name is stored as
a pointer indeed.
mmc_cam_sim_alloc used a name stored on stack.
So, a corrupt mutex name would be reported.
For example:
  lock order reversal: (sleepable after non-sleepable)
  1st 0xd7285b20 <8A><C0><C0>P@<C1><D0>P@<C1>^D^A (aw_mmc_sim, sleep mutex) @ sys/cam/cam_xpt.c:2804

This change moves the name to struct mmc_sim.
Also, that name is used as the sim name as well.
Unused mtx_name variable is removed too.
The name buffer is reduced to 16 characters.

(cherry picked from commit 18679ab1c06575517df9df2509564dbf038d4720)
(cherry picked from commit 8eca341d9bb678f08065edd8f24c2ab32dcf8e56)

2 years agonfscl: Fix must_commit/writeverf handling for Direct I/O
Rick Macklem [Sat, 11 Dec 2021 23:00:30 +0000 (15:00 -0800)]
nfscl: Fix must_commit/writeverf handling for Direct I/O

Without this patch, the KASSERT(must_commit == 0,..) can be
triggered by the writeverf in the Direct I/O write reply changing.
This is not a situation that should cause a panic(). Correct
handling is to ignore the change in "writeverf" for Direct
I/O, since it is done with NFSWRITE_FILESYNC.

This patch modifies the semantics of the "must_commit"
argument slightly, allowing an initial value of 2 to indicate
that a change in "writeverf" should be ignored.
It also fixes the KASSERT()s.

This bug would affect few, since Direct I/O is not enabled
by default and "writeverf" rarely changes. Normally "writeverf"
only changes when a NFS server reboots, however I found the
bug when testing against a Linux 5.15.1 kernel nfsd, which
replied to a NFSWRITE_FILESYNC write with a "writeverf" of all
0x0 bytes.

(cherry picked from commit ead50c94cb604594987e6512289268891a427725)

2 years agoocs_fc: Populate subvendor and subdevice ids.
Ram Kishore Vegesna [Mon, 20 Dec 2021 12:25:13 +0000 (17:55 +0530)]
ocs_fc: Populate subvendor and subdevice ids.
Enable serialnumber reporting.

Reviewed by: mav
MFC after: 3 days

(cherry picked from commit cba757ef2a7ec2bb985fbcd67e8d616328b7209a)

ocs_fs(4): Fix some common typos in source code comments

- s/transfered/transferred/
- s/associted/associated/

MFC after: 3 days

(cherry picked from commit 16b71d98d96a3a9a2ac666440aa80f12d478959d)

2 years agolibefivar(3): efi_set_variables_supported.3 should be efi_variables_supported.3
Li-Wen Hsu [Tue, 21 Dec 2021 12:42:39 +0000 (20:42 +0800)]
libefivar(3): efi_set_variables_supported.3 should be efi_variables_supported.3

MFC after: 3 days

(cherry picked from commit 71779dddffe5e860118f42739ff8d51d181272ce)

2 years agosmist: Remove unneeded Giant from bus_dma_tag_create().
Alexander Motin [Fri, 10 Dec 2021 01:54:22 +0000 (20:54 -0500)]
smist: Remove unneeded Giant from bus_dma_tag_create().

bus_dmamap_load() call uses BUS_DMA_NOWAIT.

MFC after: 2 weeks

(cherry picked from commit a69f8104665c7356b08d81728d406c595973672c)

2 years agohpt27xx: Remove FreeBSD 9.x support including Giant.
Alexander Motin [Fri, 10 Dec 2021 01:24:29 +0000 (20:24 -0500)]
hpt27xx: Remove FreeBSD 9.x support including Giant.

MFC after: 2 weeks

(cherry picked from commit 63e0f96acecb4ca3aba778858361278177333dc1)

2 years agobusdma: Remove outdated comments about Giant.
Alexander Motin [Fri, 10 Dec 2021 03:17:54 +0000 (22:17 -0500)]
busdma: Remove outdated comments about Giant.

MFC after: 2 weeks

(cherry picked from commit 8493918868151d3d000fa11c0feb635c51702c95)

2 years agoahc: Mark sysctls with CTLFLAG_MPSAFE.
Alexander Motin [Fri, 10 Dec 2021 02:36:21 +0000 (21:36 -0500)]
ahc: Mark sysctls with CTLFLAG_MPSAFE.

MFC after: 2 weeks

(cherry picked from commit 35b2021a0adf6bd1a41930014bafbc5ee8b6369a)

2 years agoahci(4): Allow enclosure emulation without hardware.
Alexander Motin [Fri, 17 Dec 2021 20:24:56 +0000 (15:24 -0500)]
ahci(4): Allow enclosure emulation without hardware.

After 53f5ac1310e allowed SATA device mapping to enclosure slots,
it may have sense to provide enclosure device emulation even without
real hardware interface like SGPIO just for purposes of physical
device location tracking (still assuming straight cabling).

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

(cherry picked from commit 9aba757e92aaf0751c83c0ce3f18f65f864f1811)

2 years agowbwd: Mark sysctls with CTLFLAG_MPSAFE.
Alexander Motin [Fri, 10 Dec 2021 02:13:10 +0000 (21:13 -0500)]
wbwd: Mark sysctls with CTLFLAG_MPSAFE.

MFC after: 2 weeks

(cherry picked from commit fdec27ed82ea3f6406a7089e5e1ffd99bb4929e0)

2 years agohptiop: Remove Giant locking around ioctls.
Alexander Motin [Fri, 10 Dec 2021 01:35:21 +0000 (20:35 -0500)]
hptiop: Remove Giant locking around ioctls.

The methods have their own locking and don't require Giant.

MFC after: 2 weeks

(cherry picked from commit e06c67eef8faae3322c06056960562fde88fd7aa)

2 years agofxp: Mark sysctls with CTLFLAG_MPSAFE.
Alexander Motin [Fri, 10 Dec 2021 02:16:16 +0000 (21:16 -0500)]
fxp: Mark sysctls with CTLFLAG_MPSAFE.

MFC after: 2 weeks

(cherry picked from commit 35efbedc98539fa655c3fb8df146fb6f7784df57)

2 years agofxp: Remove unneeded Giant from bus_dma_tag_create().
Alexander Motin [Fri, 10 Dec 2021 01:09:48 +0000 (20:09 -0500)]
fxp: Remove unneeded Giant from bus_dma_tag_create().

All bus_dmamap_load() calls here use BUS_DMA_NOWAIT.

MFC after: 2 weeks

(cherry picked from commit 5ae7518b7b9711d54fdf3627dd052501bfab5407)

2 years agotwsi: fix handling of consecuitve write messages in transaction
Andriy Gapon [Sun, 19 Dec 2021 09:26:40 +0000 (11:26 +0200)]
twsi: fix handling of consecuitve write messages in transaction

Make sure to reset 'message_done' flag when jumping from a message to the
next one within the same interrupt handler call.  This happens only when
a write with no-stop flag message is followed by a write with no-start
flag message.
Without this fix the second message would be prematurely "completed"
without waiting for an ACK (or NACK) for its first byte and without
sending subsequent bytes (if any).

Fixes: ff1e8581 twsi: support more message combinations in transfers

(cherry picked from commit e5268c3d435e0a0f0fef64e6213504dd189272f6)

2 years agods3231: allow configuration via hints on FDT systems
Andriy Gapon [Mon, 13 Dec 2021 07:21:08 +0000 (09:21 +0200)]
ds3231: allow configuration via hints on FDT systems

(cherry picked from commit 1256067c5c575474e626e5f119f50275ea2d975e)
(cherry picked from commit b277ef3304fa97da041c191b02b2fcfb74378c75)

2 years agoCorrect type size format error in KASSERT.
Doug Moore [Thu, 16 Dec 2021 19:48:58 +0000 (13:48 -0600)]
Correct type size format error in KASSERT.
Reported by: jenkins
Fixes: 6f1c8908272f vm: Don't break vm reserv that can't meet align reqs

(cherry picked from commit f7aa44763d20d06c9ea5caf330aca02a8b107a70)

2 years agovm: Don't break vm reserv that can't meet align reqs
Doug Moore [Thu, 16 Dec 2021 18:20:56 +0000 (12:20 -0600)]
vm: Don't break vm reserv that can't meet align reqs

Function vm_reserv_test_contig has incorrectly used its alignment
and boundary parameters to find a well-positioned range of empty pages
in a reservation.  Consequently, a reservation could be broken
mistakenly when it was unable to provide a satisfactory set of pages.

Rename the function, correct the errors, and add assertions to detect
the error in case it appears again.

Reviewed by: alc, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33344

(cherry picked from commit 6f1c8908272f3c0a6631e001bd2eb50a5b69261d)

2 years agomca: Some error handling logic improvements.
Alexander Motin [Thu, 9 Dec 2021 02:06:11 +0000 (21:06 -0500)]
mca: Some error handling logic improvements.

 - Enable local MCEs on capable Intel CPUs.  It delivers exceptions
only to the affected CPU instead of global broadcast, requiring a lot
of synchronization between CPUs.  AMD always deliver MCEs locally.
 - Make MCE handler process only uncorrected errors, while CMCI and
polling only corrected.  It reduces synchronization problems between
them and is explicitly recommended by the documentation.
 - Add minimal support for uncorrected software recoverable errors
on Intel CPUs.  It allows to avoid kernel panics in case uncorrected
errors do not affect current operation, like ones found during scrub
or write.  Such errors are only logged, postponing the panic until
the corrupted data will actually be needed (that may never happen).
 - Reduce polling period from 1 hour to 5 minutes.

MFC after: 2 weeks

(cherry picked from commit 63346fef3382b0ee02366cd9799930f8dbc15a52)

2 years agoloader.efi: Do not use as frame buffer BLT-only GOPs.
Alexander Motin [Thu, 16 Dec 2021 16:44:34 +0000 (11:44 -0500)]
loader.efi: Do not use as frame buffer BLT-only GOPs.

Kernel needs physical frame buffer address and size, which Block
Transfer-only Graphics Output Protocol instances do not have.

Some recent ASUS boards like PRIME Z690M-PLUS D4 and PRIME H570-Plus
report two GOPs, out of which the second one support ConOut protocol,
that made it preferable, but is BLT-only, that made console unusable.

Discussed with: tsoome (previous version)
MFC after: 1 week

(cherry picked from commit 02732f945ed2ec2b4fd03421923720608b28a615)

2 years agonfscl: Sanity check the callback tag length
Rick Macklem [Thu, 9 Dec 2021 22:15:48 +0000 (14:15 -0800)]
nfscl: Sanity check the callback tag length

The sanity check for tag length in a callback request
was broken in two ways:

It checked for a negative value, but not a large positive
value.

It did not set taglen to -1, to indicate to the code that
it should not be used.

This patch fixes both of these issues.

PR: 260266

(cherry picked from commit d9931c25617d6625e280fda19bd9c2878e49c091)

2 years agonfscl: Check for an error return from nfsrv_getattrbits()
Rick Macklem [Thu, 9 Dec 2021 22:32:22 +0000 (14:32 -0800)]
nfscl: Check for an error return from nfsrv_getattrbits()

There were two places where the client code did not check
for a parse error return from nfsrv_getattrbits().

This patch fixes both of these cases.

PR: 260272

(cherry picked from commit ab639f2398bf7efd4dfd38cd6527e22f6e781ae9)

2 years agoOpenSSL: Do not remove symbolic links readded in 1.1.1m
Jung-uk Kim [Thu, 16 Dec 2021 14:31:46 +0000 (09:31 -0500)]
OpenSSL: Do not remove symbolic links readded in 1.1.1m

(cherry picked from commit 5c154c6b6bf7fef71b3ee457ec2e53a88b9abe24)

2 years agoe1000: fix interface capabilities management
Vincenzo Maffione [Wed, 8 Dec 2021 08:55:04 +0000 (08:55 +0000)]
e1000: fix interface capabilities management

The e1000 drivers (em, lem, igb) are currently looking at the
iflib copies of the capabilities bitvectors (scctx->isc_capabilities
and scctx->isc_capenable) rather than the ifnet ones
(ifp->if_capabilities and ifp->if_capenable). However, the latter
are the ones that are actually updated by ifconfig and that should
be used by the drivers during interface operation. The former are
set by the driver on interface attach (for iflib internal use)
and should not be used anymore by the driver.
This patch fixes the e1000 driver to use the correct bitvectors.

PR: 260068
Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33154

(cherry picked from commit e0f4cdba533693bb6ef9d90243acdad89605b150)

2 years agoo Fix i2c read operation for large transfers (more than 32 bytes).
Ruslan Bukin [Wed, 26 May 2021 09:55:23 +0000 (10:55 +0100)]
o Fix i2c read operation for large transfers (more than 32 bytes).

o Fix slave address setting.

This allows to read the EDID from an HDMI monitor.

(cherry picked from commit 38e7025a60b28623b5991622a6efd1b8a329ccb2)

2 years agork_i2c_fill_tx: fix a number of issues
Andriy Gapon [Wed, 15 Dec 2021 11:00:45 +0000 (13:00 +0200)]
rk_i2c_fill_tx: fix a number of issues

- maximum number of bytes that can be sent is 32, not 8;
- previous interface required callers to bump sc->msg->len in addition
  to setting sc->tx_slave_addr;
- because of the above there was an issue with writing one too many bytes
  because sc->cnt is not advanced when the slave address is written;
- the inetraction between outer and inner loops was confusing as the former
  was bounded on the number of bytes to write and the counter was
  incremented by one, but the inner loop advanced four bytes at a time;
- the return value was incorrect in the tx_slave_addr case; one call place
  had to use its own (and incorrect in some cases) notion of the write
  lenth.

All of the above issues should be fixed.
Some sanity asserts are added.
All callers use the return value to program RK_I2C_MTXCNT.
iic_msg::len no longer needs to be hacked.
A constant is added to reflect the maximum number of octets that can be
sent or received in one go (they are the same).

(cherry picked from commit c6635459510c9c03a439bc5b59fef37259d21967)
(cherry picked from commit b7bcd21d2da50364a512092cb4e75f2d53070ba6)

2 years agork_i2c_transfer: minor improvement to bit twiddling
Andriy Gapon [Wed, 15 Dec 2021 09:11:15 +0000 (11:11 +0200)]
rk_i2c_transfer: minor improvement to bit twiddling

No need to mask a uint8_t with 0xff, the mask covers the whole type.
Explcitly cast to uint32_t before bit shifting instead of relying on
the implicit promotion to signed int.

(cherry picked from commit 25e92673b54ea3b66cbaf53826cfd01df3441ea3)

2 years agork_i2c: do not hide NACK condition from consumers
Andriy Gapon [Wed, 15 Dec 2021 08:59:22 +0000 (10:59 +0200)]
rk_i2c: do not hide NACK condition from consumers

Previously the driver would happily talk to addresses with no device
returning some garbage for reads and sending bits into the void for writes.

(cherry picked from commit 4501b0707198e7ad1da792639a8b164f9380b95d)

2 years agork_i2c: keep sending bytes until all bytes are sent
Andriy Gapon [Wed, 15 Dec 2021 08:51:24 +0000 (10:51 +0200)]
rk_i2c: keep sending bytes until all bytes are sent

Previously the code would decalre the transfer complete after sending
first 31 bytes (plus the slave address) of a larger I2C write transfer.

That was tested using a large write to an EEPROM with 32-byte write page
size and a 2-byte address type.  Such a transaction needed to send 34
bytes, 2 bytes for an offset and 32 bytes of actual data.

(cherry picked from commit 7dc8a0e5dff4ad4c9c10442bef5228a91a98d5d6)

2 years agork_i2c_transfer: fix off-by-one in check for last message
Andriy Gapon [Wed, 15 Dec 2021 08:44:43 +0000 (10:44 +0200)]
rk_i2c_transfer: fix off-by-one in check for last message

This also fixes an access beyond msgs array.

(cherry picked from commit b6a2aba959c8b30d740c653c96c01fb90a3073f7)

2 years agork_i2c_drain_rx: remove useless arithmetic manipulations
Andriy Gapon [Wed, 15 Dec 2021 08:42:23 +0000 (10:42 +0200)]
rk_i2c_drain_rx: remove useless arithmetic manipulations

When i % 4 == 0 the result of (i / 4) * 4 is always i.

(cherry picked from commit ede576831b818c78d23a9600932e13e47b8fd745)

2 years agork_i2c: consistently treat booleans as such
Andriy Gapon [Wed, 15 Dec 2021 08:40:22 +0000 (10:40 +0200)]
rk_i2c: consistently treat booleans as such

(cherry picked from commit 1da04ae8fb5b7a1f1d9e52b87af1aaf756d28d4b)

2 years agork_i2c_transfer: use iicbus error codes instead of generic ones
Andriy Gapon [Wed, 15 Dec 2021 08:38:24 +0000 (10:38 +0200)]
rk_i2c_transfer: use iicbus error codes instead of generic ones

(cherry picked from commit 552503aca975ccab1b1f67f95f627e279db5826f)

2 years agork_i2c: remove write-only softc field
Andriy Gapon [Wed, 15 Dec 2021 08:37:04 +0000 (10:37 +0200)]
rk_i2c: remove write-only softc field

(cherry picked from commit 5f863d7e1319afe32d18e505c26acaacfcae0db7)

2 years agoipfilter: MSN RPC proxy is not complete
Cy Schubert [Thu, 16 Dec 2021 00:08:11 +0000 (16:08 -0800)]
ipfilter: MSN RPC proxy is not complete

The MSN RPC proxy is incomplete and does not do any address
translation. Remove it.

(cherry picked from commit c610426c4deeaa80ad86d8177e7c0b7680104dc7)

2 years agoipfilter: ipf_dstlist is a kernel source file
Cy Schubert [Wed, 15 Dec 2021 21:50:38 +0000 (13:50 -0800)]
ipfilter: ipf_dstlist is a kernel source file

Remove duplicate ipf_dstlist.* files. They live in sys/.

(cherry picked from commit 7aec934fffde73f7d22450b18e04436aa77b1148)

2 years agoipfilter: Fix struct ifnet pointer type
Cy Schubert [Sun, 12 Dec 2021 23:57:36 +0000 (15:57 -0800)]
ipfilter: Fix struct ifnet pointer type

The fr_info struct contains a summary of a packet. One of its fields
is a pointer to the ifnet struct the packet arrived on. It is pointed
to by a void* because ipfilter supports multiple O/Ses. Unfortunately
this makes it difficult it examine with DTrace. Defining fin_ifp as a
pointer to an ifnet struct makes the struct it points to using a DTrace
script possible.

(cherry picked from commit 8f19f3d31a7224c502c36dd16f1321b802e4da60)

2 years agoipfilter fil.c: Fix two typos in comments
Cy Schubert [Wed, 15 Dec 2021 03:44:58 +0000 (19:44 -0800)]
ipfilter fil.c: Fix two typos in comments

(cherry picked from commit 7835925aa420ae3046b5f13899a0c208741d0ad4)

2 years agoipfilter userland: Replace sprintf with range checking version (snprintf)
Cy Schubert [Mon, 13 Dec 2021 22:54:38 +0000 (14:54 -0800)]
ipfilter userland: Replace sprintf with range checking version (snprintf)

(cherry picked from commit a6fb9bbea7318e993dfe0f8a7f00821f79850b26)

2 years agoipfilter: radix_ipf is a kernel source file
Cy Schubert [Mon, 13 Dec 2021 21:35:43 +0000 (13:35 -0800)]
ipfilter: radix_ipf is a kernel source file

Remove duplicate radix_ipf.* files. They live in sys/.

(cherry picked from commit 9a563c5e484b077d8e689e9ab3f6f4797e47e576)

2 years agoipfilter: Replace sprintf with range checking version (snprintf)
Cy Schubert [Mon, 13 Dec 2021 21:24:17 +0000 (13:24 -0800)]
ipfilter: Replace sprintf with range checking version (snprintf)

(cherry picked from commit 8f945ad25f3193b4a204a12d58b186f1932d3659)

2 years agoipfilter radix_ipf: name is only valid with RDX_DEBUG
Cy Schubert [Mon, 13 Dec 2021 21:18:04 +0000 (13:18 -0800)]
ipfilter radix_ipf: name is only valid with RDX_DEBUG

ipf_rdx_node.name is only vaild when RDX_DEBUG is defined.

(cherry picked from commit e263821feacf59a14e9d648d9631c64b579021d5)

2 years agoipfilter: The SNPRINTF macro doesn't exist, remove it
Cy Schubert [Mon, 13 Dec 2021 21:04:34 +0000 (13:04 -0800)]
ipfilter: The SNPRINTF macro doesn't exist, remove it

(cherry picked from commit 8d2a8d243e1e92c6c88a01f56bb36c24ed1a3486)

2 years agohostapd: Fix wlan interfaces not UP/RUNNING
Cy Schubert [Mon, 13 Dec 2021 23:47:51 +0000 (15:47 -0800)]
hostapd: Fix wlan interfaces not UP/RUNNING

Like wpa_supplicant, hostapd does not automatically UP the interface
when configured. The fix is similar to 5fcdc19a8111.

Reported by: avg
Tested by: avg

(cherry picked from commit 0da2c91e64528d896f69d36670e25b4b4a140579)

2 years agosrc.conf.5: regenerate
Piotr Kubaj [Tue, 21 Dec 2021 17:54:34 +0000 (18:54 +0100)]
src.conf.5: regenerate

2 years agoriscv64*: enable OFED
Piotr Kubaj [Tue, 21 Dec 2021 16:24:20 +0000 (17:24 +0100)]
riscv64*: enable OFED

Summary:
OFED on riscv64 builds fine, so it's ok to enable it.

Also MFC to stable/13.

Test Plan: make buildworld

Reviewers: mhorne

Subscribers: bdrewery, imp, emaste

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

(cherry picked from commit 40218ffe8c85118a2bab0eb8c7bc3525d4ad639e)

2 years agorelease: riscv64 - increase GENERICSD image size
Glen Barber [Wed, 15 Dec 2021 20:26:22 +0000 (15:26 -0500)]
release: riscv64 - increase GENERICSD image size

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 66df505066f51e6d8411b966765d828817f88971)

2 years agoFix 'make bmake' top-level bootstrapping.
Bryan Drewery [Sat, 6 Mar 2021 17:45:08 +0000 (09:45 -0800)]
Fix 'make bmake' top-level bootstrapping.

Fixes: ee10666327b62
(cherry picked from commit eb8bf6bb4204c302e2329b68c8a930be5d44bc9c)

2 years agobsd.links.mk wants full paths
Simon J. Gerraty [Mon, 15 Feb 2021 18:05:00 +0000 (10:05 -0800)]
bsd.links.mk wants full paths

The values in LINKS need to be full paths.

(cherry picked from commit 85d6747a694a6da2619e9f627d005a0aee87dd34)

2 years agoLinks for bmake and bmake.1
Simon J. Gerraty [Mon, 15 Feb 2021 01:20:10 +0000 (17:20 -0800)]
Links for bmake and bmake.1

Some folk forget that make is bmake, and want the links...

MFC after: 1 week

(cherry picked from commit ee10666327b622c2f20a4ac17e7a5673b04e7c9a)

2 years agofb: Add new FBTYPE_EFIFB
Emmanuel Vadot [Wed, 1 Dec 2021 15:13:09 +0000 (16:13 +0100)]
fb: Add new FBTYPE_EFIFB

Currently the type isn't set in the fbtype struct so any userland
program that call the FBIOGTYPE ioctl will think it's a FBTYPE_SUN1BW
which is far from the truth.
No app that I found find checks the type but at least now it's correct.

Reviewed by: emaste, tsoome
MFC after: 2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33221

(cherry picked from commit ca23e9d2ac2cd5443ab7d5b8999da11feddf828a)

2 years agofb: Remove some unused ioctls
Emmanuel Vadot [Wed, 1 Dec 2021 10:57:42 +0000 (11:57 +0100)]
fb: Remove some unused ioctls

6d1699583d7e added the FBIOGXINFO,FBIOMONINFO and FBIOPUTCMAPI/FBIOGETCMAPI
ioctls and said that implementation in driver will come later.
Since it was in 2001 I think we can remove this.

Reviewed by: emaste, imp, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33218
Differential Revision: https://reviews.freebsd.org/D33219
Differential Revision: https://reviews.freebsd.org/D33220

(cherry picked from commit 706f32db8aec5d1e9e6f9210fab7be6f13ac25c3)

2 years agofb: Remove unused cursors ioctls
Emmanuel Vadot [Wed, 1 Dec 2021 10:56:26 +0000 (11:56 +0100)]
fb: Remove unused cursors ioctls

The cursors related ioctls were added in 1994 with the 4.4 Lite import
but were never implemented in either sc(4), fb(4) or vt(4).
Remove it.

Reviewed by: emaste, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33217

(cherry picked from commit b9d3b253e2f7c4910bbd3844158a2a80f9a7ff4f)

arm/freescale: remove FBIOSCURSOR

Unbreaks building EFIKA_MX

Fixes: b9d3b253e2f7c491 ("fb: Remove unused cursors ioctls")
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 793c74e415abf3c7e44c2df1472fdffde620f8e4)

2 years agofb: Remove unused FBIOVERTICAL ioctl
Emmanuel Vadot [Wed, 1 Dec 2021 10:53:03 +0000 (11:53 +0100)]
fb: Remove unused FBIOVERTICAL ioctl

Commit 6d1699583d7e added the FBIOVERTICAL ioctl and said that implementation
in driver will come later.
Since it was in 2001 I think we can remove this.

MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 87fae70dc58a16dfcdad75f929485c79d557bdd5)

2 years agofb: Remove unused FBIOSVIDEO/FBIOGVIDEO ioctls
Emmanuel Vadot [Wed, 1 Dec 2021 10:51:17 +0000 (11:51 +0100)]
fb: Remove unused FBIOSVIDEO/FBIOGVIDEO ioctls

The FBIOSVIDEO/FBIOGVIDEO ioctls were added in 1994 with the 4.4 Lite import
but were never implemented in either sc(4), fb(4) or vt(4).
Remove it.

Reviewed by: emaste, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33216

(cherry picked from commit 26542b33a4d5e06a26bd9ea523c1087d75c0c41a)

2 years agofb: Remove unused FBIOSATTR/FBIOGATTR ioctls
Emmanuel Vadot [Wed, 1 Dec 2021 10:49:57 +0000 (11:49 +0100)]
fb: Remove unused FBIOSATTR/FBIOGATTR ioctls

The FBIOSATTR/FBIOGATTR ioctls were added in 1994 with the 4.4 Lite import
but were never implemented in either sc(4), fb(4) or vt(4).
Remove it.

Reviewed by: emaste, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33215

(cherry picked from commit f1105fb8f7a2d9db06ed5e7c31392e6ffa9f06dd)

2 years agofb: Remove unused code
Emmanuel Vadot [Wed, 1 Dec 2021 10:43:46 +0000 (11:43 +0100)]
fb: Remove unused code

The FBIOGINFO ioctl was added in 1994 with the 4.4 Lite import but was commented.
Remove it.

Reviewed by: emaste
MFC after:      2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33211

(cherry picked from commit 95744d84b13ee1c34fd6d04fb3ff82cb8a34ac45)

2 years agoisp(4): Allow more than 2 ports to read WWNs from NVRAM.
Alexander Motin [Tue, 14 Dec 2021 18:20:14 +0000 (13:20 -0500)]
isp(4): Allow more than 2 ports to read WWNs from NVRAM.

It appears at least on QLE2694L cards 3rd and 4th ports follow the
same NVRAM addressing logic as the first two.  In lack of proper
documentation this guess is as good as it can be.

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

(cherry picked from commit 483e464ed4325a0710485925ecfbe0e1c8d6bb02)

2 years agoFIx "set but not used" in the isp driver.
Scott Long [Sun, 5 Dec 2021 22:19:56 +0000 (15:19 -0700)]
FIx "set but not used" in the isp driver.

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 14c912c60dbdeea1769eb32a511e8822356cc6ad)

2 years agoCorrect syscons description in i386 and amd64 configs
Ed Maste [Sat, 27 Nov 2021 21:15:41 +0000 (16:15 -0500)]
Correct syscons description in i386 and amd64 configs

Commit 2d6f6d63733d switched to vt(4) as the default console.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 228e020a3b6142bef17cfeb86cf06f1fd1f4f1fc)

2 years agoarch.7: update applicable FreeBSD versions to 12.0 and later
Ed Maste [Thu, 25 Nov 2021 18:50:03 +0000 (13:50 -0500)]
arch.7: update applicable FreeBSD versions to 12.0 and later

Information in this document is unchanged between 11.x and 12.x, but
this is intended to be a quick reference for supported architectures.
Also bump .Dd to cover recent changes including MIPS deprecation.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9c983ad791c3ca8213cae949f9ad381d1309ad8e)

2 years agoAdd an arm64 sha512 feature check
Andrew Turner [Mon, 29 Nov 2021 17:21:31 +0000 (17:21 +0000)]
Add an arm64 sha512 feature check

This is only available in recent toolchains. Check for it so we can
use it in libmd.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33166

(cherry picked from commit 629b5e87ed82aa428be1abbe51b80fa338fa839a)

2 years agoPer-thread stack canary on arm64
Andrew Turner [Mon, 22 Nov 2021 15:20:51 +0000 (15:20 +0000)]
Per-thread stack canary on arm64

With the update to llvm 13 we are able to tell the compiler it can find
the SSP canary relative to the register that holds the userspace stack
pointer. As this is unused in most of the kernel it can be used here
to point to a per-thread SSP canary.

As the kernel could be built with an old toolchain, e.g. when upgrading
from 13, add a warning that the options was enabled but the compiler
doesn't support it to both the build and kernel boot.

Discussed with: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33079

(cherry picked from commit ae92ace05fd4fcf64e3bb787951578f655b1fa5f)

2 years agoFix bracketing in the arm64 minidump code
Andrew Turner [Tue, 23 Nov 2021 18:28:28 +0000 (18:28 +0000)]
Fix bracketing in the arm64 minidump code

When building with gcc10 it suggests the parentheses are wrong. Set them
to be the calculated physical address or'd with page table attributes.

Reviewed by: mhorne, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33099

(cherry picked from commit 3ff041945054e692672f506a2448d1200133032d)

2 years agolibmd: Only define SHA256_Transform_c when using the ARM64 ifunc.
John Baldwin [Wed, 8 Dec 2021 22:25:02 +0000 (14:25 -0800)]
libmd: Only define SHA256_Transform_c when using the ARM64 ifunc.

GCC 9 doesn't define a SHA256_Transform symbol when the stub just wraps
SHA256_Transform_c resulting in an undefined symbol for
_libmd_SHA256_Transform in libmd.so.

Discussed with: andrew, jrtc27
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D31945

(cherry picked from commit a6765c4b449d79c6ee24dd7c37deb2239f6281a4)

2 years agoUse arm64 sha256 intrinsics in libmd
Andrew Turner [Fri, 23 Jul 2021 09:14:03 +0000 (10:14 +0100)]
Use arm64 sha256 intrinsics in libmd

Summary:
When running on a CPU that supports the arm64 sha256 intrinsics use them
to improve perfromance of sha256 calculations.

With this changethe following improvement has been seen on an Apple M1
with FreeBS running under Parallels, with similar results on a
Neoverse-N1 r3p1.

x sha256.orig
+ sha256.arm64
+--------------------------------------------------------------------+
|++                                                               x x|
|+++                                                              xxx|
||A                                                               |A||
+--------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5          3.41           3.5          3.46         3.458   0.042661458
+   5          0.47          0.54           0.5         0.504   0.027018512
Difference at 95.0% confidence
        -2.954 +/- 0.0520768
        -85.4251% +/- 0.826831%
        (Student's t, pooled s = 0.0357071)

Reviewed by: cem
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31284

(cherry picked from commit 69d8dc20be6ca10cf87c98223121c4121aff42cc)

2 years agopcf8591: remove write-only variables
Andriy Gapon [Mon, 13 Dec 2021 11:10:12 +0000 (13:10 +0200)]
pcf8591: remove write-only variables

(cherry picked from commit b416345d5b13c77d82708cab94f43cb6144fbaf7)

2 years agoREADME.md: update gnu directory description
Ed Maste [Fri, 17 Dec 2021 13:43:47 +0000 (08:43 -0500)]
README.md: update gnu directory description

(At this point in main we have just LGPL libdialog and dialog, and GPL
diff3, left in gnu/.)

Reported by: bapt
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 266cbbfc65263a3b8bc7c95dd3d589aab7cefe7f)

2 years agoRegen
Konstantin Belousov [Sun, 19 Dec 2021 02:52:20 +0000 (04:52 +0200)]
Regen

2 years agoswapon(8): adapt to the new swapoff(2) interface
Konstantin Belousov [Wed, 8 Dec 2021 21:05:49 +0000 (23:05 +0200)]
swapon(8): adapt to the new swapoff(2) interface

(cherry picked from commit b49b6e0f95c89f8dcb5898424c360b46019254b4)

2 years agoDocument new variant of swapoff(2)
Konstantin Belousov [Wed, 8 Dec 2021 21:24:31 +0000 (23:24 +0200)]
Document new variant of swapoff(2)

(cherry picked from commit 9f0fea5d033f5cd4b9b76aefe31b12c4dba25790)

2 years agoswapoff: add one more variant of the syscall
Konstantin Belousov [Wed, 8 Dec 2021 21:04:57 +0000 (23:04 +0200)]
swapoff: add one more variant of the syscall

For MFC, COMPAT_FREEBSD13 braces were removed.

(cherry picked from commit 5346570276a5ddfd5f530201fcbf24ddcc53033d)

2 years agoswapoff(8): add -f flag
Konstantin Belousov [Mon, 29 Nov 2021 16:30:09 +0000 (18:30 +0200)]
swapoff(8): add -f flag

(cherry picked from commit 1aa249c935884d4c0c096c00facbb22f214128cc)

2 years agoswapoff(2): document extended syscall arguments
Konstantin Belousov [Thu, 2 Dec 2021 03:17:40 +0000 (05:17 +0200)]
swapoff(2): document extended syscall arguments

(cherry picked from commit 79d650f26277b364be45c598dd498bff600bb4a6)

2 years agoswapoff(2): add a SWAPOFF_FORCE flag
Konstantin Belousov [Mon, 29 Nov 2021 16:28:19 +0000 (18:28 +0200)]
swapoff(2): add a SWAPOFF_FORCE flag

(cherry picked from commit e8dc2ba29c62f3be2bdeb1a09321d73644a84475)

2 years agoswapoff(2): replace special device name argument with a structure
Konstantin Belousov [Mon, 29 Nov 2021 16:26:31 +0000 (18:26 +0200)]
swapoff(2): replace special device name argument with a structure

(cherry picked from commit a4e4132fa3bfadb6047fc0fa5f399f4640460300)

2 years agoEnable OPENMP on riscv64* by default.
Piotr Kubaj [Fri, 25 Jun 2021 14:22:50 +0000 (16:22 +0200)]
Enable OPENMP on riscv64* by default.

Differential revision: https://reviews.freebsd.org/D30862
Approved by: mhorne

(cherry picked from commit aa033e0b14f20b39991a8aea9418fa712a4df1bf)

2 years agong_l2tp: improve seq structure locking.
Gleb Smirnoff [Fri, 6 Aug 2021 22:49:51 +0000 (15:49 -0700)]
ng_l2tp: improve seq structure locking.

PR: 241133
Reviewed by: mjg, markj
Differential Revision: https://reviews.freebsd.org/D31476
Author: glebius

(cherry picked from commit 0a76c63dd4987d8f7af37fe93569ce8a020cf43e)
(cherry picked from commit 89042ff77668555e77c88549e6ba697088ee72f9)
(cherry picked from commit ae04d30451056f16096cba7d8debcb15dac275d7)

2 years agozfs: merge openzfs/zfs@af88d47f1 (zfs-2.1-release) into stable/13
Martin Matuska [Sun, 19 Dec 2021 15:21:10 +0000 (16:21 +0100)]
zfs: merge openzfs/zfs@af88d47f1 (zfs-2.1-release) into stable/13

OpenZFS release 2.1.2

Notable upstream pull request merges:
  #12668 FreeBSD: Catch up with recent VFS changes
  #12704 Fix some FreeBSD VOPs to synchronize properly with teardown
  #12717 VOP_RENAME fixes for FreeBSD
  #12724 Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency
  #12745 Restore dirty dnode detection logic
  #12770 ZFS send/recv with ashift 9->12 leads to data corruption
  #12828 FreeBSD: Add vop_standard_writecount_nomsyn
  #12828 FreeBSD: Catch up with more VFS changes

Obtained from: OpenZFS
OpenZFS commit: af88d47f1ee86fae4abcfe0dabca67ea3c94d377
OpenZFS tag: zfs-2.1.2
Relnotes: yes

2 years agoipsec: fix a logic error in key_do_getnewspi
Wenfeng Liu [Wed, 24 Nov 2021 09:34:32 +0000 (17:34 +0800)]
ipsec: fix a logic error in key_do_getnewspi

(cherry picked from commit 509f1a0f405daf0e2bdaa5b366d21b77052149c3)