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

2 years agox86: Make AMD elvtX dump more compact.
Alexander Motin [Sun, 5 Dec 2021 02:45:20 +0000 (21:45 -0500)]
x86: Make AMD elvtX dump more compact.

MFC after: 2 weeks

(cherry picked from commit a07d4265095ed473a3db5c3a998c699fa46dbe86)

2 years agopci: add missing PCI id of Coffee Lake GPU
Corvin Köhne [Fri, 17 Dec 2021 21:09:32 +0000 (23:09 +0200)]
pci: add missing PCI id of Coffee Lake GPU

(cherry picked from commit 16f02a4cb4594326b6687eeedde5feb9cb40cba4)

2 years agoThread creation privilege for realtime group
Florian Walpen [Tue, 14 Dec 2021 21:55:51 +0000 (23:55 +0200)]
Thread creation privilege for realtime group

(cherry picked from commit e28767f0e17550d8ed030cff0918202e5de101ab)

2 years agoAdd idle priority scheduling privilege group to MAC/priority
Florian Walpen [Fri, 10 Dec 2021 01:35:38 +0000 (03:35 +0200)]
Add idle priority scheduling privilege group to MAC/priority

(cherry picked from commit a9545eede43b8fac889f3ec3180f5917f0d0b0ea)

2 years agoAdd PRIV_SCHED_IDPRIO
Florian Walpen [Fri, 10 Dec 2021 01:43:12 +0000 (03:43 +0200)]
Add PRIV_SCHED_IDPRIO

(cherry picked from commit a20a2450cd5f38fb28d5fa5540177edfb60d2473)

2 years agoMAC/priority module for realtime privilege group
Florian Walpen [Sat, 4 Dec 2021 16:17:29 +0000 (18:17 +0200)]
MAC/priority module for realtime privilege group

PR: 239125

(cherry picked from commit bf2fa8d9d11c9f2ceff09bacc406876fa37096be)

2 years agoexec_elf: use intermediate u_long variable to correct mismatched type
Konstantin Belousov [Sun, 12 Dec 2021 16:47:26 +0000 (18:47 +0200)]
exec_elf: use intermediate u_long variable to correct mismatched type

(cherry picked from commit e499988f0cc45ad2e21573b6d11c9cefdd37608d)

2 years agoimgact_elf: avoid mapsz overflow
Konstantin Belousov [Wed, 8 Dec 2021 09:33:19 +0000 (11:33 +0200)]
imgact_elf: avoid mapsz overflow

(cherry picked from commit bf839416381cb9f63a8a82ea6e897a22830a8009)

2 years agoimgact_elf: check that the alignment of PT_LOAD segment is power of two
Konstantin Belousov [Thu, 9 Dec 2021 15:27:24 +0000 (17:27 +0200)]
imgact_elf: check that the alignment of PT_LOAD segment is power of two

(cherry picked from commit 36df8f540fa3802e3d7ccf9d71a13750a72b33ff)

2 years agoimgact_elf: exclude invalid alignment requests
Konstantin Belousov [Wed, 8 Dec 2021 09:33:57 +0000 (11:33 +0200)]
imgact_elf: exclude invalid alignment requests

(cherry picked from commit 714d6d09b57e9cf98a5c3f45f869c08be5454849)

2 years agornd_elf: add comment explaining the interface
Konstantin Belousov [Thu, 9 Dec 2021 15:22:54 +0000 (17:22 +0200)]
rnd_elf: add comment explaining the interface

(cherry picked from commit a4007ae10c8ffdd89155b4e0b6665b721d7b0a6c)

2 years agoelf image activator: convert asserts into errors
Konstantin Belousov [Tue, 7 Dec 2021 09:29:53 +0000 (11:29 +0200)]
elf image activator: convert asserts into errors

(cherry picked from commit 9cf78c1cf6e8909e4b5eaedeb86482904c0bbdc4)

2 years agoexec_elf: assert that the image vnode is still locked on return
Konstantin Belousov [Thu, 9 Dec 2021 15:14:46 +0000 (17:14 +0200)]
exec_elf: assert that the image vnode is still locked on return

(cherry picked from commit b4b20492cd92b5ca7ff03f4140e88363449d3021)

2 years agoStyle
Konstantin Belousov [Wed, 8 Dec 2021 15:08:59 +0000 (17:08 +0200)]
Style

(cherry picked from commit 88dd7a0a39089b4c324cc83e0b0b4c089ca0501d)

2 years agoUPDATING: Add an entry for commit 18f5b477ee66
Rick Macklem [Sat, 18 Dec 2021 22:48:20 +0000 (14:48 -0800)]
UPDATING: Add an entry for commit 18f5b477ee66

This is a direct commit.

2 years agoparam.h: Bump __FreeBSD_version for commit 18f5b477ee66
Rick Macklem [Sat, 18 Dec 2021 22:44:46 +0000 (14:44 -0800)]
param.h: Bump __FreeBSD_version for commit 18f5b477ee66

Commit 18f5b477ee66 added two arguments to VOP_ALLOCATE().
As such, all NFS modules must be rebult from sources.

This is a direct commit.

2 years agovfs: Add "ioflag" and "cred" arguments to VOP_ALLOCATE
Rick Macklem [Sat, 6 Nov 2021 20:26:43 +0000 (13:26 -0700)]
vfs: Add "ioflag" and "cred" arguments to VOP_ALLOCATE

When the NFSv4.2 server does a VOP_ALLOCATE(), it needs
the operation to be done for the RPC's credential and not
td_ucred. It also needs the writing to be done synchronously.

This patch adds "ioflag" and "cred" arguments to VOP_ALLOCATE()
and modifies vop_stdallocate() to use these arguments.

The VOP_ALLOCATE.9 man page will be patched separately.

(cherry picked from commit f0c9847a6c477430d6fff647b12e9e9e2b461f2a)

2 years agoem: skip rxcsum offload processing when disabled
Vincenzo Maffione [Wed, 1 Dec 2021 21:10:46 +0000 (21:10 +0000)]
em: skip rxcsum offload processing when disabled

Similarly to the other Intel drivers, don't try to process
RX checksum offloads when this feature (IFCAP_RXCSUM) is
disabled.

Reviewed by: gallatin, kbowling, erj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33155

(cherry picked from commit d0633af7658fe02bc1af8639ef6dbb0d029c1b65)

2 years agoe1000: remove unused ifp backpointer
Vincenzo Maffione [Mon, 29 Nov 2021 21:28:26 +0000 (21:28 +0000)]
e1000: remove unused ifp backpointer

The ifp (struct ifnet) backpointer in the e1000 private ifnet
data is not used anymore since the iflib transition.
Remove it so that developers are not tempted to use it and
get a NULL pointer dereference.

Reviewed by: markj, kbowling, erj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33157

(cherry picked from commit d91559564dc647846479824340bdf94b7cf98c05)

2 years agoApply fix for clang incorrectly optimizing part of dns/bind916
Dimitry Andric [Wed, 15 Dec 2021 19:56:12 +0000 (20:56 +0100)]
Apply fix for clang incorrectly optimizing part of dns/bind916

Merge commit e5a8af7a90c6 from llvm git (by Gulfem Savrun Yeniceri):

  [Passes] Fix relative lookup table converter pass

  This patch fixes the relative table converter pass for the lookup table
  accesses that are resulted in an instruction sequence, where gep is not
  immediately followed by a load, such as gep being hoisted outside the loop
  or another instruction is inserted in between them. The fix inserts the
  call to load.relative.instrinsic in the original place of load instead of gep.
  Issue is reported by FreeBSD via https://bugs.freebsd.org/259921.

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

PR: 259921
Reported by: O. Hartmann <freebsd@walstatt-de.de>

(cherry picked from commit 5a925e4644665b9a7a5cdd664764fb0a4d1c5797)

2 years agonfsd: Fix Verify for attributes like FilesAvail
Rick Macklem [Sat, 4 Dec 2021 22:38:55 +0000 (14:38 -0800)]
nfsd: Fix Verify for attributes like FilesAvail

When the Verify operation calls nfsv4_loadattr(), it provides
the "struct statfs" information that can be used for doing a
compare for FilesAvail, FilesFree, FilesTotal, SpaceAvail,
SpaceFree and SpaceTotal.  However, the code erroneously
used the "struct nfsstatfs *" argument that is NULL.
This patch fixes these cases to use the correct argument
structure.  For the case of FilesAvail, the code in
nfsv4_fillattr() was factored out into a separate function
called nfsv4_filesavail(), so that it can be called from
nfsv4_loadattr() as well as nfsv4_fillattr().

In fact, most of the code in nfsv4_filesavail() is old
OpenBSD code that does not build/run on FreeBSD, but I
left it in place, in case it is of some use someday.

I am not aware of any extant NFSv4 client that does Verify
on these attributes.

PR: 260176

(cherry picked from commit 2d90ef47141d3ea0f88b43a1b6daf08d68ba8aba)

2 years agoMake msgbuf_peekbytes() not return leading zeroes.
Alexander Motin [Sat, 11 Dec 2021 04:18:52 +0000 (23:18 -0500)]
Make msgbuf_peekbytes() not return leading zeroes.

Introduce new MSGBUF_WRAP flag, indicating that buffer has wrapped
at least once and does not keep zeroes from the last msgbuf_clear().
It allows msgbuf_peekbytes() to return only real data, not requiring
every consumer to trim the leading zeroes after doing pointless copy.
The most visible effect is that kern.msgbuf sysctl now always returns
proper zero-terminated string, not only after the first buffer wrap.

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

(cherry picked from commit 81dc00331d148fab19af24833521334e39f3692d)

2 years agonfsd: Sanity check the Layouttype count
Rick Macklem [Sat, 4 Dec 2021 22:18:48 +0000 (14:18 -0800)]
nfsd: Sanity check the Layouttype count

PR: 260155

(cherry picked from commit 480be96e1e24617f0f152256d7453f60774fd1f3)

2 years agoRemove set-but-unused variable from s_sincosl.c
Dimitry Andric [Tue, 14 Dec 2021 21:41:49 +0000 (22:41 +0100)]
Remove set-but-unused variable from s_sincosl.c

This look like a copy and paste leftover.

Reported by: enh@google.com (via freebsd-numerics@)
Reviewed by: Steve Kargl <sgk@troutmask.apl.washington.edu>

(cherry picked from commit 20d425842a4f80f9efc1de3f7a3b043435fe4b39)

2 years agoAdd genet.4 for RPi 4 Ethernet
Mike Karels [Thu, 9 Dec 2021 14:06:15 +0000 (08:06 -0600)]
Add genet.4 for RPi 4 Ethernet

Add new man page for genet(4) Ethernet on Raspberry Pi 4B, based on
several other Ethernet man pages.  Hook into build.

Note, this could potentially be added as an aarch64 man page; not
sure if that matters now.  Include if_genet(4) link as for other
network devices.

Copyright notice cloned from a recent FreeBSD Foundation copyright.

Reviewed by: imp bcr #manpages
Differential Revision: https://reviews.freebsd.org/D33360

(cherry picked from commit 61eaac599ce157b36796dcdac5fb2f420f4bfd8d)

2 years agoocs_fc: Remove unused function delarations.
Ram Kishore Vegesna [Mon, 6 Dec 2021 07:02:02 +0000 (12:32 +0530)]
ocs_fc: Remove unused function delarations.

Remove unused function declarations.
Changes required for internal tool.

Approved by: ken

(cherry picked from commit 6f78736cb12026fcb423e1b313e83efb80597f21)

2 years agoocs_fc: Fix device lost timer where device is not getting deleted.
Ram Kishore Vegesna [Fri, 24 Sep 2021 09:35:30 +0000 (15:05 +0530)]
ocs_fc: Fix device lost timer where device is not getting deleted.

Issue: Devices wont go away after the link down.

Device lost timer functionality in ocs_fc is broken,
`is_target` flag is not set in the target database and target delete is skipped.

Fix: Remove unused flags and delete the device when timer expires.

Reported by: ken@kdm.org
Reviewed by: mav, ken

(cherry picked from commit 41e946694333bcc6f64242f294312553f2ef2dcd)

2 years agoocs_fc: When commands complete with an error, freeze the device queue.
Ram Kishore Vegesna [Fri, 24 Sep 2021 09:32:09 +0000 (15:02 +0530)]
ocs_fc: When commands complete with an error, freeze the device queue.

Proper error recovery depends on freezing the device queue when an
error occurs, so we can recover from an error before sending
additional commands.

The ocs_fc(4) driver was not freezing the device queue for most
SCSI errors, and that broke error recovery.

sys/dev/ocs_fc/ocs_cam.c:
In ocs_scsi_initiator_io_cb(), freeze the device queue if
        we're passing back status other than CAM_REQ_CMP.

Submitted by: ken@kdm.org
Reviewed by: mav, ken

(cherry picked from commit d063d1bc928165e7798df5ec1c424794a1ec41e9)

2 years agoocs_fc: Fix CAM status reporting in ocs_fc(4) when no data is returned.
Ram Kishore Vegesna [Fri, 24 Sep 2021 09:19:49 +0000 (14:49 +0530)]
ocs_fc: Fix CAM status reporting in ocs_fc(4) when no data is returned.

        In ocs_scsi_initiator_io_cb(), if the SCSI command that is
        getting completed had a residual equal to the transfer length,
        it was setting the CCB status to CAM_REQ_CMP.

        That breaks the expected behavior for commands like READ ATTRIBUTE.
        For READ ATTRIBUTE, if the first attribute requested doesn't exist,
        the command is supposed to return an error (Illegal Request,
        Invalid Field in CDB).  The broken behavior for READ ATTRIBUTE
        caused LTFS tape formatting to fail.  It looks for attribute
        0x1623, and expects to see an error if the attribute isn't present.

        In addition, if the residual is negative (indicating an overrun),
        only set the CCB status to CAM_DATA_RUN_ERR if we have not already
        reported an error.  The SCSI sense data will have more detail about
        what went wrong.

        sys/dev/ocs_fc/ocs_cam.c:
                In ocs_scsi_initiator_io_cb(), don't set the status to
                CAM_REQ_CMP if the residual is equal to the transfer length.

                Also, only set CAM_DATA_RUN_ERR if we didn't get SCSI
                status.

Submitted by: ken@kdm.org
Reviewed by: mav, ken

(cherry picked from commit 1af49c2eeb4a05f524ed9a6657c741bc96fbaf87)

2 years agoocs_fc: Increase maximum supported SG elements to support larger transfer sizes.
Ram Kishore Vegesna [Fri, 24 Sep 2021 09:05:03 +0000 (14:35 +0530)]
ocs_fc: Increase maximum supported SG elements to support larger transfer sizes.

Reported by: ken@kdm.org
Reviewed by: mav, ken

(cherry picked from commit 322dbb8ce8f63fd6f542309fd38324664ce8dd3f)

2 years agoocs_fc: Emulex Gen 7 HBA support.
Ram Kishore Vegesna [Thu, 23 Sep 2021 06:51:26 +0000 (12:21 +0530)]
ocs_fc: Emulex Gen 7 HBA support.

Emulex Gen7 adapter support in ocs_fc driver.

Reviewed by: mav, ken

(cherry picked from commit 3bf42363b02c9bd728c92b9d9c4a5d022982a21a)

2 years agoocs_fc: Add gendump and dump_to_host ioctl command support.
Ram Kishore Vegesna [Thu, 24 Jun 2021 07:05:00 +0000 (12:35 +0530)]
ocs_fc: Add gendump and dump_to_host ioctl command support.

Support to generate firmware dump.

Approved by: mav(mentor)

(cherry picked from commit 29e2dbd42c3e2e10e606b3414f4d0c53021d4e86)

Add ocs_gendump.c to the build, missed in 29e2dbd42c3e.

(cherry picked from commit d0732fa81963d336099a6b134a1eb4be867bfa8b)

2 years agoocs_fc: Fix use after free bug in ocs_hw_async_call()
Ram Kishore Vegesna [Fri, 28 May 2021 05:51:10 +0000 (11:21 +0530)]
ocs_fc: Fix use after free bug in ocs_hw_async_call()

Freed ctx is used in the later callee ocs_hw_command(),
which is a use after free bug.

Return error if sli_cmd_common_nop() failed.

PR: 255865
Reported by: lylgood@foxmail.com
Approved by:: markj

(cherry picked from commit 7377d3831bc8abec2d6e5fee359d7383d4551feb)

2 years agoocs_fc: Fix a use after free in ocs_sport_free
Ram Kishore Vegesna [Fri, 28 May 2021 05:26:13 +0000 (10:56 +0530)]
ocs_fc: Fix a use after free in ocs_sport_free

Domain which could be freed is used while freeing the sport.
Use ocs from sport.

PR: 255866
Reported by: lylgood@foxmail.com
Approved by:: markj

(cherry picked from commit dd722ccd6efcaed5c6056e51a044db7f1a5b4a0d)

2 years agoocs_fc: Fix memory leak in ocs_scsi_io_alloc()
Ram Kishore Vegesna [Mon, 19 Apr 2021 15:40:59 +0000 (21:10 +0530)]
ocs_fc: Fix memory leak in ocs_scsi_io_alloc()

PR: 254690
Approved by: mav(mentor)
MFC after: 2 weeks

(cherry picked from commit fc620f9782d1fda5a243fd51a93a0fb46bc80f64)

2 years agotwsi: support more message combinations in transfers
Andriy Gapon [Fri, 26 Nov 2021 09:48:21 +0000 (11:48 +0200)]
twsi: support more message combinations in transfers

Most prominently, add support for a transfer where a write with no-stop
flag is followed by a write with no-start flag.  Logically, it's a
single larger write, but consumers may want to split it like that
because one part can be a register ID and the other part can be data to
be written to (or starting at) that register.

Such a transfer can be created by i2c tool and iic(4) driver, e.g., for
an EEPROM write at specific offset:
    i2c -m tr -a 0x50 -d w -w 16 -o 0 -c 8 -v < /dev/random

This should be fixed by new code that handles the end of data transfer
for both reads and writes.  It handles two existing conditions and one
new.  Namely:
- the last message has been completed -- end of transfer;
- a message has been completed and the next one requires the start
  condition;
- a message has been completed and the next one should be sent without
  the start condition.

In the last case we simply switch to the next message and start sending
its data.  Reads without the start condition are not supported yet,
though.  That's because we NACK the last byte of the previous message,
so the device stops sending data.  To fix this we will need to add a
look-ahead at the next message when handling the penultimate byte of the
current one.

This change also fixed a bug where msg_idx was not incremented after a
read message.  Apparently, typically a read message is a last message in
a transfer, so the bug did not cause much trouble.

PR: 258994

(cherry picked from commit ff1e8581806f70e54fecddf8a6a23488dc7b968a)

2 years agotwsi: make data receiving code safer
Andriy Gapon [Fri, 26 Nov 2021 08:34:42 +0000 (10:34 +0200)]
twsi: make data receiving code safer

Assert that we are not receiving data beyond the requested length.
Assert that we have not NACK-ed incoming data prematurely.
Abort the current transfer if the incoming data is NACK-ed or not
NACK-ed unexpectedly.

Add debug logging of received data to complement logging of sent data.

(cherry picked from commit 00c07d9559c6197957b00811a0b29876a5c8b573)

2 years agotwsi: remove redundant write of control register
Andriy Gapon [Fri, 26 Nov 2021 08:09:59 +0000 (10:09 +0200)]
twsi: remove redundant write of control register

The write at the end of twsi_intr() already handles all cases, no need
to have another write for TWSI_STATUS_START / TWSI_STATUS_RPTD_START.

(cherry picked from commit aeacf172fd29b16b3661ff057c9abb238baba813)

2 years agotwsi: move handling of TWSI_CONTROL_ACK into the state machine
Andriy Gapon [Fri, 26 Nov 2021 08:07:27 +0000 (10:07 +0200)]
twsi: move handling of TWSI_CONTROL_ACK into the state machine

Previously the code set TWSI_CONTROL_ACK in twsi_transfer() based on
whether the first message had a length of one.  That was done regardless
of whether the message was a read or write and what kind of messages
followed it.
Now the bit is set or cleared while handling TWSI_STATUS_ADDR_R_ACK
state transition based on the current (read) message.

The old code did not correctly work in a scenario where a single byte
was read from an EEPROM device with two byte addressing.
For example:
    i2c -m tr -a 0x50 -d r -w 16 -o 0 -c 1 -v
The reason is that the first message (a write) has two bytes, so
TWSI_CONTROL_ACK was set and never cleared.
Since the controller did not send NACK the EEPROM sent more data resulting
in a buffer overrun.

While working on TWSI_STATUS_ADDR_R_ACK I also added support for
the zero-length read access and then I did the same for zero-length write
access.
While rare, those types of I2C transactions are completely valid and are
used by some devices.

PR: 258994

(cherry picked from commit 04622a7f21157827fe75276a4520a52d3a571a86)

2 years agokern_tc: unify timecounter to bintime delta conversion
Andriy Gapon [Tue, 30 Nov 2021 13:23:23 +0000 (15:23 +0200)]
kern_tc: unify timecounter to bintime delta conversion

There are two places where we convert from a timecounter delta to
a bintime delta: tc_windup and bintime_off.
Both functions use the same calculations when the timecounter delta is
small.  But for a large delta (greater than approximately an equivalent
of 1 second) the calculations were different.  Both functions use
approximate calculations based on th_scale that avoid division.  Both
produce values slightly greater than a true value, calculated with
division by tc_frequency, would be.  tc_windup is slightly more
accurate, so its result is closer to the true value and, thus, smaller
than bintime_off result.

As a consequence there can be a jump back in time when time hands are
switched after a long period of time (a large delta).  Just before the
switch the time would be calculated with a large delta from
th_offset_count in bintime_off.  tc_windup does the switch using its own
calculations of a new th_offset using the large delta.  As explained
earlier, the new th_offset may end up being less than the previously
produced binuptime.  So, for a period of time new binuptime values may
be "back in time" comparing to values just before the switch.

Such a jump must never happen.  All the code assumes that the uptime is
monotonically nondecreasing and some code works incorrectly when that
assumption is broken.  For example, we have observed sleepq_timeout()
ignoring a timeout when the sbinuptime value obtained by the callout
code was greater than the expiration value, but the sbinuptime obtained
in sleepq_timeout() was less than it.  In that case the target thread
would never get woken up.

The unified calculations should ensure the monotonic property of the
uptime.

The problem is quite rare as normally tc_windup should be called HZ
times per second (typically 1000 or 100).  But it may happen in VMs on
very busy hypervisors where a VM's virtual CPU may not get an execution
time slot for a second or more.

Reviewed by: kib
Sponsored by: Panzura LLC

(cherry picked from commit 3d9d64aa1846217eac9229f8cba5cb6646a688b7)

2 years agoREADME.md: correct GPL expansion
Fabian Keil [Tue, 14 Dec 2021 21:49:44 +0000 (16:49 -0500)]
README.md: correct GPL expansion

PR: 260404
MFC after: 3 days

(cherry picked from commit 8b9fe05a49d7cd8079e3364f75fd48b2f53bf696)

2 years agoAPEI: Improve multiple error sources handling.
Alexander Motin [Thu, 2 Dec 2021 23:01:02 +0000 (18:01 -0500)]
APEI: Improve multiple error sources handling.

Some AMD systems I have report 8 NMI and 3591 polled error sources.
Previous code could handle only one NMI source and used separate
callout for each polled source.  New code can handle multiple NMIs
and groups polled sources by power of 2 of the polling period.

MFC after: 2 weeks

(cherry picked from commit 2dfc1f73552d5aa5d9f6fa3e642f00e87952551c)

2 years agoRevert clang change that breaks CTF on aarch64
Dimitry Andric [Sun, 12 Dec 2021 20:11:40 +0000 (21:11 +0100)]
Revert clang change that breaks CTF on aarch64

Revert commit e655e74a318e from llvm git (by Peter Collingbourne):

  AST: Create __va_list in the std namespace even in C.

  This ensures that the mangled type names match between C and C++,
  which is significant when using -fsanitize=cfi-icall. Ideally we
  wouldn't have created this namespace at all, but it's now part of
  the ABI (e.g. in mangled names), so we can't change it.

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

As reported by Jessica in https://reviews.llvm.org/D104830#3129527, this
upstream change is implemented in such a way that it breaks DTrace's
CTF. Since a proper fix has not yet been forthcoming, and we are
unaffected by the (CFI-related) problem upstream was trying to address,
revert the change for now.

Requested by: jrtc27
MFC after: 3 days

(cherry picked from commit da2012af42fb704365cfaff7ae68fc7de59981da)

2 years agoamd64: Reduce the amount of cpuset copying done for TLB shootdowns
Mark Johnston [Mon, 15 Nov 2021 17:52:03 +0000 (12:52 -0500)]
amd64: Reduce the amount of cpuset copying done for TLB shootdowns

We use pmap_invalidate_cpu_mask() to get the set of active CPUs.  This
(32-byte) set is copied by value through multiple frames until we get to
smp_targeted_tlb_shootdown(), where it is copied yet again.

Avoid this copying by having smp_targeted_tlb_shootdown() make a local
copy of the active CPUs for the pmap, and drop the cpuset parameter,
simplifying callers.  Also leverage the use of the non-destructive
CPU_FOREACH_ISSET to avoid unneeded copying within
smp_targeted_tlb_shootdown().

Reviewed by: alc, kib
Tested by: pho
Sponsored by: The FreeBSD Foundation

(cherry picked from commit ab12e8db292c386a33445dcd95fa629413954192)

2 years agopci: Don't try to read cfg registers of non-existing devices
Kornel Duleba [Tue, 23 Nov 2021 08:13:56 +0000 (09:13 +0100)]
pci: Don't try to read cfg registers of non-existing devices

Instead of returning 0xffs some controllers, such as Layerscape generate
an external exception when someone attempts to read any register
of config space of a non-existing device other than PCIR_VENDOR.
This causes a kernel panic.
Fix it by bailing during device enumeration if a device vendor register
returns invalid value. (0xffff)
Use this opportunity to replace some hardcoded values with a macro.

I believe that this change won't have any unintended side-effects since
it is safe to assume that vendor == 0xffff -> hdr_type == 0xffff.

Sponsored by: Alstom
Obtained from: Semihalf
Reviewed by: jhb
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D33059

(cherry picked from commit 68cbe189fdd3c572476f8af9219a5d335f05b51a)

2 years agomca: Switch to using taskqueue_enqueue_timeout_sbt().
Alexander Motin [Wed, 8 Dec 2021 17:29:15 +0000 (12:29 -0500)]
mca: Switch to using taskqueue_enqueue_timeout_sbt().

Previously it was not allowed on fast taskqueues.  It was fixed in
4730a8972b1f.  This should make no functional change, just a bit
cleaner and efficient code.

MFC after: 1 week

(cherry picked from commit 9a128e1678d1d22a2d4855784b511c0cb370189e)

2 years agomca: Decode new Intel status bits.
Alexander Motin [Wed, 8 Dec 2021 17:01:48 +0000 (12:01 -0500)]
mca: Decode new Intel status bits.

MFC after: 1 week

(cherry picked from commit 3bdba24c74604b1bb27623cd8304476bbbed69d1)

2 years agomca: Remove excessively verbose debug messages.
Alexander Motin [Wed, 8 Dec 2021 03:27:09 +0000 (22:27 -0500)]
mca: Remove excessively verbose debug messages.

Expecially in case of AMD there was more than dozen lines per CPU.

MFC after: 1 week

(cherry picked from commit 935dc0de88195e8ce62be085ddfb002eb19ca17f)

2 years agomca: Make some sysctls also a loader tunables.
Alexander Motin [Wed, 8 Dec 2021 03:20:59 +0000 (22:20 -0500)]
mca: Make some sysctls also a loader tunables.

MFC after: 1 week

(cherry picked from commit c2003f268480f040f422c4d7e2d5f590e7084ba2)

2 years agoKernel linkers: add emergency sysctl to restore old behavior
Konstantin Belousov [Sun, 7 Nov 2021 09:26:26 +0000 (11:26 +0200)]
Kernel linkers: add emergency sysctl to restore old behavior

PR: 207898

(cherry picked from commit ecd8245e0d7784bcd78dafce233f303eee765068)

2 years agokernel linker: do not read debug symbol tables for non-debug symbols
Konstantin Belousov [Sun, 7 Nov 2021 08:37:48 +0000 (10:37 +0200)]
kernel linker: do not read debug symbol tables for non-debug symbols

PR: 207898

(cherry picked from commit 95c20faf11a1af6924f97ec4aafc32d899fea8b0)

2 years agolinker_debug_symbol_values(): use proper linker interface to get debug values
Konstantin Belousov [Tue, 16 Nov 2021 17:57:32 +0000 (19:57 +0200)]
linker_debug_symbol_values(): use proper linker interface to get debug values

(cherry picked from commit 72f6662662de61ba9a221a3dd59adea115ad4646)

2 years agox86: add a comment providing source for numbers in legacy XSAVE area layout
Konstantin Belousov [Mon, 13 Dec 2021 23:25:36 +0000 (01:25 +0200)]
x86: add a comment providing source for numbers in legacy XSAVE area layout

(cherry picked from commit 0e6b06d5c8719597b2ec59e6856b5decbd9e65f6)

2 years agoamd64: correct size of the SSE area in the xsave layout
Konstantin Belousov [Sun, 12 Dec 2021 02:49:50 +0000 (04:49 +0200)]
amd64: correct size of the SSE area in the xsave layout

(cherry picked from commit 73b357be92385cbb70ba19e7023a736af2c6b493)

2 years agonfsd: Do not try to cache a reply for NFSERR_BADSLOT
Rick Macklem [Wed, 1 Dec 2021 21:46:41 +0000 (13:46 -0800)]
nfsd: Do not try to cache a reply for NFSERR_BADSLOT

When nfsrv_checksequence() replies NFSERR_BADSLOT,
the value of nd_slotid is not valid.  As such, the
reply cannot be cached in the session.
Do not set ND_HASSEQUENCE for this case.

PR: 260076

(cherry picked from commit 33d0be8a923a840ec0724d50815890c5ffe0e884)

2 years agonfsd: Sanity check the ACL attribute
Rick Macklem [Wed, 1 Dec 2021 21:55:17 +0000 (13:55 -0800)]
nfsd: Sanity check the ACL attribute

When an ACL is presented to the NFSv4 server in
Setattr or Verify, parsing of the ACL assumed a
sane acecnt and sane sizes for the "who" strings.
This patch adds sanity checks for these.

The patch also fixes handling of an error
return from nfsrv_dissectacl() for one broken
case.

PR: 260111

(cherry picked from commit fd020f197d6ac481d36171ea69fe555eb911d673)

2 years agoOpenSSL: Merge OpenSSL 1.1.1m
Jung-uk Kim [Tue, 14 Dec 2021 21:01:07 +0000 (16:01 -0500)]
OpenSSL: Merge OpenSSL 1.1.1m

(cherry picked from commit 754c4757c9cb225c66eb3297f2a8be198786fcc9)

2 years agoOpenSSL: Merge OpenSSL 1.1.1m
Jung-uk Kim [Tue, 14 Dec 2021 19:04:30 +0000 (14:04 -0500)]
OpenSSL: Merge OpenSSL 1.1.1m

(cherry picked from commit b2bf0c7e5f4037d63458def91a026592468afd2f)