]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoif_bridge(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:26:01 +0000 (11:26 +0200)]
if_bridge(4): Fix a typo in a source code comment

- s/accross/across/

(cherry picked from commit f7faa4ad4844470058b84fa35156c463cfa8bd85)

2 years agorack: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 13:32:59 +0000 (15:32 +0200)]
rack: Fix a typo in a source code comment

- s/enought/enough/

(cherry picked from commit c93db89231fedd4afe64915cf8dcad89bfdd3c94)

2 years agoif_llatbl: Fix a typo in a debug statement
Gordon Bergling [Sat, 4 Jun 2022 13:22:09 +0000 (15:22 +0200)]
if_llatbl: Fix a typo in a debug statement

- s/droped/dropped/

Obtained from: NetBSD

(cherry picked from commit 4f493559b0d7853c7521bd3cb5affe659914e479)

2 years agonvmecontrol(8): Fix a typo in an error message
Gordon Bergling [Sat, 4 Jun 2022 18:30:48 +0000 (20:30 +0200)]
nvmecontrol(8): Fix a typo in an error message

- s/insufficent/insufficient/

(cherry picked from commit e2dfabb5895122ce46e627e53347f0e81019c95f)

2 years agoacpi(4): Fix a typo in a debug statement
Gordon Bergling [Sat, 4 Jun 2022 13:17:09 +0000 (15:17 +0200)]
acpi(4): Fix a typo in a debug statement

- s/Efficency/tEfficiency/

Obtained from: NetBSD

(cherry picked from commit 0b4302aa934d748503d6377f875f2972db41a092)

2 years agoif_sis(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 14:56:18 +0000 (16:56 +0200)]
if_sis(4): Fix a typo in a source code comment

- s/emperical/empirical/

(cherry picked from commit 3c2ea3ca28c5e95185f57ff27148909c8f846c3e)

2 years agosed(1): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 18:27:45 +0000 (20:27 +0200)]
sed(1): Fix a typo in a source code comment

- s/Initialy/Initially/

Obtained from: NetBSD

(cherry picked from commit bb0e21032bf61a93489f8b964b6707038cc4d1c3)

2 years agoam335x: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 11:28:10 +0000 (13:28 +0200)]
am335x: Fix a typo in a source code comment

- s/continous/continuous/

(cherry picked from commit 1261c01d7fa25955610936f690e237b7c308ee5b)

2 years agoaic79xx: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:52:34 +0000 (11:52 +0200)]
aic79xx: Fix a typo in a source code comment

- s/Disble/Disable/

Obtained from: NetBSD

(cherry picked from commit 2cada72c65931683121ea7f6f740a7d07420c367)

2 years agovm: Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:52:32 +0000 (09:52 +0200)]
vm: Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 860740ae0f0f247b2dabd15fcfa0c215f77e5858)

2 years agonlist(3): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:51:57 +0000 (09:51 +0200)]
nlist(3): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 565405095b88a00df786614cdaabfdd3de1148ec)

2 years agogeom(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:51:10 +0000 (09:51 +0200)]
geom(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit c2a249ad8f29e326e9c18b076eadd8730e43af0b)

2 years agoqlnxe(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:15:33 +0000 (09:15 +0200)]
qlnxe(4): Fix a typo in a source code comment

- s/indepent/independent/

(cherry picked from commit a87f167c41c5fc9240987a09a98379680c910c51)

2 years agotwe(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:55:25 +0000 (09:55 +0200)]
twe(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 508a46c745b34c1e520b0c00ad3e0b727967f5ae)

2 years agoqlxgbe(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:56:29 +0000 (09:56 +0200)]
qlxgbe(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit f1294737023fbb5748d6e572b0ac042281361bf7)

2 years agolibkern: Fix a typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 06:57:26 +0000 (08:57 +0200)]
libkern: Fix a typo in a source code comment

- s/involes/involves/

Obtained from: NetBSD

(cherry picked from commit 5cacfa7092f851ce31d75cd5dde73d26ea734497)

2 years agoffec: Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:54:39 +0000 (09:54 +0200)]
ffec: Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit d3e0919b564d0f0267758d33c5de8008526f61a5)

2 years agoif_age(4): Fix a typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:14:17 +0000 (09:14 +0200)]
if_age(4): Fix a typo in a source code comment

- s/indepent/independent/

(cherry picked from commit f207bdd2cc4fb43fed13a20dc7f892021e8a9b42)

2 years agomlx(4): Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:53:59 +0000 (09:53 +0200)]
mlx(4): Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 9ae6b386ab33a701c8df281f1dbf07a1659aab90)

2 years agostand: Fix a common typo in source code comments
Gordon Bergling [Sun, 5 Jun 2022 07:49:51 +0000 (09:49 +0200)]
stand: Fix a common typo in source code comments

- s/independant/independent/

(cherry picked from commit c44b5e090d84f911551d038f61e7cf798a843b8c)

2 years agolibgssapi: Fix a common typo in a source code comment
Gordon Bergling [Sun, 5 Jun 2022 07:53:24 +0000 (09:53 +0200)]
libgssapi: Fix a common typo in a source code comment

- s/independant/independent/

(cherry picked from commit 9e75b06f93d001fc961b6e839e59977f826b6c2f)

2 years agoixgbe(4): Fix common typos in source code comments
Gordon Bergling [Mon, 6 Jun 2022 05:28:56 +0000 (07:28 +0200)]
ixgbe(4): Fix common typos in source code comments

- s/filer/filter/

Obtained from: NetBSD

(cherry picked from commit cd7e11f78dedad810273ae71d791027e75aa16c9)

2 years agonfscl: Add support for a NFSv4 AppendWrite RPC
Rick Macklem [Sat, 30 Apr 2022 20:49:23 +0000 (13:49 -0700)]
nfscl: Add support for a NFSv4 AppendWrite RPC

For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct, followed by the Write operation.

This patch modifies the NFSv4 client to use an Appendwrite
RPC, which does a Verify to check the file's size before
doing the Write.  This avoids the need for a Getattr RPC
to preceed this RPC and reduces the RPC count by half for
IO_APPEND writes, so long as the client knows the file's
size.

The nfsd structure was moved from the stack to be malloc()'d,
since the kernel stack limit was being exceeded.

While here, fix the types of a few variables, although
there should not be any semantics change caused by these
type changes.

(cherry picked from commit 5218d82c81f987223054671b9821d39f08d87599)

2 years agonfscl: Add support for a NFSv4 AppendWrite RPC
Rick Macklem [Fri, 8 Apr 2022 20:59:05 +0000 (13:59 -0700)]
nfscl: Add support for a NFSv4 AppendWrite RPC

For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct, followed by the Write operation.

This patch modifies nfscl_wcc_data() to optionally
acquire the file's size, for use with an AppendWrite.
Although the "stuff" arguments are always NULL
(these were used for the Mac OSX port and should be
cleared out someday), make the argument to
nfscl_wcc_data() explicitly NULL for clarity.

This patch does not cause any semantics change until
the AppendWrite is added in a future commit.

(cherry picked from commit 21de450aa1a7ca226908e7421b93ca979ff42db7)

2 years agoUnbreak the build: Also define NFSV42_OLDNPROCS here.
Warner Losh [Tue, 5 Apr 2022 17:54:20 +0000 (11:54 -0600)]
Unbreak the build: Also define NFSV42_OLDNPROCS here.

If nfsproto.h is included before nfsport.h, then NFSV42_OLDNPROCS would
be undefined when it is used in struct nfsstatsov1.

(cherry picked from commit 393b7606f9c18c27f340edb28395093b618f68bd)

2 years agonfscl: Add support for a NFSv4 AppendWrite RPC
Rick Macklem [Tue, 5 Apr 2022 15:11:37 +0000 (08:11 -0700)]
nfscl: Add support for a NFSv4 AppendWrite RPC

For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct before doing the Write operation.

This patch prepares the NFSv4 client for such an
RPC, which will be added in a future commit.

This patch does not cause any semantics change.

(cherry picked from commit 330aa8acdec76d00d9e0ca526d421fe25ccf90cf)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285
Dimitry Andric [Sat, 4 Jun 2022 12:30:46 +0000 (14:30 +0200)]
Merge llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.4-0-g29f1039a7285, aka 14.0.4 release.

PR: 261742
MFC after: 3 days

(cherry picked from commit 2a66634d1bc6d7401adafad4a3be7b9ac6bab8b3)

Bump versions llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285

Somehow git rebase made this squashed commit disappear. Restore it.

PR: 261742
MFC after: 3 days

(cherry picked from commit ab9d54731f43bb6befae75e9fed64da98c9ae1b4)

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR: 261742
Fixes: ab9d54731f43
MFC after: 3 days

(cherry picked from commit 809922b01004daf627ad4b8d92c7f98eb579043c)

Add more old clang files to (Optional)ObsoleteFiles.inc

There were a few more libclang_rt libraries added recently, but not yet
listed in the ObsoleteFiles.inc lists.

MFC after: 3 days

(cherry picked from commit 5e383e360314c875fee648b386493b0dcde5c5f3)

2 years agonfscl: Always invalidate buffers for append writes
Rick Macklem [Thu, 6 Jan 2022 22:18:36 +0000 (14:18 -0800)]
nfscl: Always invalidate buffers for append writes

kib@ reported a problem which was resolved by
reverting commit 867c27c23a5c, which changed the NFS
client to use direct RPCs to the server for
IO_APPEND writes.  He also spotted that the
code only invalidated buffer cache buffers
when they were marked NMODIFIED (had been
written into).

This patch modifies the NFS VOP_WRITE() to
always invalidate the buffer cache buffers
and pages for the file when IO_APPEND is
specified.  It also includes some cleanup
suggested by kib@.

(cherry picked from commit e4df1036f66dc360606fea053ec04ccabb69df14)

2 years agonfscl: Partially revert commit 867c27c23a5c
Rick Macklem [Thu, 16 Dec 2021 22:30:37 +0000 (14:30 -0800)]
nfscl: Partially revert commit 867c27c23a5c

Commit 867c27c23a5c enabled the n_directio_opens code
in open/close, which sets/clears NNONCACHE, for
IO_APPEND. This code should not be enabled unless
newnfs_directio_enable is non-zero.

This patch reverts that part of commit 867c27c23a5c.

A future patch that fixes the case where the
file that is being written IO_APPEND is mmap()'d.

(cherry picked from commit 150da1e3cd51e552f7d6bc159b387e540c5a3733)

2 years agonfscl: Change IO_APPEND writes to direct I/O
Rick Macklem [Wed, 15 Dec 2021 16:35:48 +0000 (08:35 -0800)]
nfscl: Change IO_APPEND writes to direct I/O

IO_APPEND writes have always been very slow over NFS, due to
the need to acquire an up to date file size after flushing
all writes to the NFS server.

This patch switches the IO_APPEND writes to use direct I/O,
bypassing the buffer cache.  As such, flushing of writes
normally only occurs when the open(..O_APPEND..) is done.
It does imply that all writes must be done synchronously
and must be committed to stable storage on the file server
(NFSWRITE_FILESYNC).

For a simple test program that does 10,000 IO_APPEND writes
in a loop, performance improved significantly with this patch.

For a UFS exported file system, the test ran 12x faster.
This drops to 3x faster when the open(2)/close(2) are done
for each loop iteration.
For a ZFS exported file system, the test ran 40% faster.

The much smaller improvement may have been because the ZFS
file system I tested against does not have a ZIL log and
does have "sync" enabled.

Note that IO_APPEND write performance is still much slower
than when done on local file systems.

Although this is a simple patch, it does result in a
significant semantics change, so I have given it a
large MFC time.

(cherry picked from commit 867c27c23a5c469b27611cf53cc2390b5a193fa5)

2 years agortw88: plug various skb leaks in error cases
Bjoern A. Zeeb [Sun, 5 Jun 2022 18:07:48 +0000 (18:07 +0000)]
rtw88: plug various skb leaks in error cases

Based on manual inspection the skbs are not freed in those unlikely
cases, though all would give an error message so would have gone noticed
if happened.
While here fix a typo in one of these error messages.

(cherry picked from commit 728afa885f04f6316bc9ecf6498f4a635ced1e21)

2 years agoLinuxKPI: 802.11: plug a ni leak in lkpi_sta_assoc_to_run()
Bjoern A. Zeeb [Sun, 5 Jun 2022 21:10:01 +0000 (21:10 +0000)]
LinuxKPI: 802.11: plug a ni leak in lkpi_sta_assoc_to_run()

In lkpi_sta_assoc_to_run() we are going through some code segments
twice (auth->assoc, assoc->authorized).  The 2nd time we shall not
re-gain a reference on the net80211 node as otherwise it'll leak.
Likewise we do not have to re-set lsta and sta.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 71df58aefcf8be21b32e2a7b83da6d0facb8b326)

2 years agoLinuxKPI: 802.11 plug mbuf leak in error cases
Bjoern A. Zeeb [Sun, 5 Jun 2022 18:04:57 +0000 (18:04 +0000)]
LinuxKPI: 802.11 plug mbuf leak in error cases

Manually free the mbuf in certain error cases from net80211 to not
leak it.
Note that the differences between ieee80211_input_mimo() and
ieee80211_input_mimo_all(), the former not consuming the mbuf while
the later does, is confusing.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit dbc06dd98ae9940377a9ef31a594c17566334977)

2 years agoiwlwifi: disable more MEI (Management Engine) code
Bjoern A. Zeeb [Sat, 4 Jun 2022 16:18:58 +0000 (16:18 +0000)]
iwlwifi: disable more MEI (Management Engine) code

It is unclear why this hasn't bothered anyone in months; I can only assume
optimization levels but it seems there were unresolved symbols in
iwlwifi after d9836fb4b9380e2ed1c38455fb31a3832b452671:
link_elf_obj: symbol iwl_mvm_send_roaming_forbidden_event undefined

Hide more of the currently unsupported (GPL-only) MEI (Management Engine)
code behind #ifdef to avoid this.

Reported by: dchagin
Tested by: dchagin
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 75c779fb279c2bea90c08e275af5937213bdca81)

2 years agoiwlwifi: Update man pages with card list
Bjoern A. Zeeb [Tue, 17 May 2022 01:43:15 +0000 (01:43 +0000)]
iwlwifi: Update man pages with card list

Add list of supported names to iwlwifi.4 and an extended list with
PCI IDs and firmware prefix to iwlwififw.4.

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

(cherry picked from commit f5539996511eeca7dcf3c9849edda26d85306290)

2 years agoiwlwifi: add sysctl to dump PCI IDs/ names / firmware-prefixes
Bjoern A. Zeeb [Wed, 18 May 2022 16:05:49 +0000 (16:05 +0000)]
iwlwifi: add sysctl to dump PCI IDs/ names / firmware-prefixes

Add a FreeBSD-specifc SYSCTL_PROC to dump the list of
PCI IDs / name / firmware-prefix which can be post-processed
for man pages (iwlwifi.4 and iwlwififw.4) or the wiki.

The output still yields duplicates depending on by what information
you need so one may wants to filter them out (try not to use sort/uniq).

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 645886d028c85b3cb9fb36e96b1edc661cf4c0d8)

2 years agoMFC: if_glxgbe: fix stand-alone module build
Eugene Grosbein [Sun, 5 Jun 2022 17:59:46 +0000 (00:59 +0700)]
MFC: if_glxgbe: fix stand-alone module build

Fix module build outside of kernel build environment.

(cherry picked from commit 32467e47b7b7d224ca51889bbb9233af0462d87f)

2 years agoMFC: if_glxgb: fix stand-alone module build
Eugene Grosbein [Sun, 5 Jun 2022 17:54:50 +0000 (00:54 +0700)]
MFC: if_glxgb: fix stand-alone module build

Fix module build outside of kernel build environment.

(cherry picked from commit 966e279052f33b1665480e0327c177013cb8205a)

2 years agoif_qlxge: fix stand-alone module build
Eugene Grosbein [Sun, 5 Jun 2022 18:05:02 +0000 (01:05 +0700)]
if_qlxge: fix stand-alone module build

Fix module build outside of kernel build environment.

(cherry picked from commit 20634f026179ac73d4ea780138789195e335f275)

2 years agoAdd newline after 20220524 entry in ObsoleteFiles.inc
Dimitry Andric [Thu, 26 May 2022 14:31:51 +0000 (16:31 +0200)]
Add newline after 20220524 entry in ObsoleteFiles.inc

(cherry picked from commit 442bf90e52842ebdc3cd9911508df5535e48a89e)

2 years agokqueue tests: Simplify the test runner
Mark Johnston [Wed, 25 May 2022 00:17:04 +0000 (20:17 -0400)]
kqueue tests: Simplify the test runner

Just invoke the test program directly instead of trying to convert its
output to TAP format.  The test suite is all or nothing; there's no way
to enumerate individual test cases, so there's no advantage in trying to
massage its output, and doing so throws away information that's useful
when diagnosing test failures.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 68fe988a40ca5dedec426735f52471d9af7bddbd)

2 years agokqueue tests: Add new EVFILT_TIMER regression tests from upstream
Mark Johnston [Wed, 25 May 2022 00:16:32 +0000 (20:16 -0400)]
kqueue tests: Add new EVFILT_TIMER regression tests from upstream

One of the tests exposes the regression reported in PR 264131.

One test is disabled because FreeBSD does not support setting EV_ONESHOT
on an already-added periodic timer.  Though, in this case the flag is
simply ignored, which isn't ideal.

One test is slightly modified to set EV_ADD when reconfiguring a
disabled timer per some commentary in PR 258412.

Ideally we would re-import the test suite from libkqueue but there is a
fair bit of divergence so this will require some effort.  This just gets
us one small step closer while increasing test coverage.

PR: 258412
Sponsored by: The FreeBSD Foundation

(cherry picked from commit d6d4f9b45e0be306bdaf53b2133b2cd0f7642167)

2 years agokevent: Fix an off-by-one in filt_timerexpire_l()
Mark Johnston [Wed, 25 May 2022 00:14:33 +0000 (20:14 -0400)]
kevent: Fix an off-by-one in filt_timerexpire_l()

Suppose a periodic kevent timer fires close to its deadline, so that
now - kc->next is small.  Then delta ends up being 1, and the next timer
deadline is set to (delta + 1) * kc->to, where kc->to is the timer
period.  This means that the timer fires at half of the requested rate,
and the value returned in kn_data is similarly inaccurate.

PR: 264131
Fixes: 7cb40543e964 ("filt_timerexpire: do not iterate over the interval")
Reviewed by: kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 524dadf7a8725dea144571843e611dbdbd59d668)

2 years agokqueue tests: Add file and line info to some test failure output
Mark Johnston [Wed, 25 May 2022 00:14:20 +0000 (20:14 -0400)]
kqueue tests: Add file and line info to some test failure output

This brings us slightly closer to upstream and is useful when debugging
test failures.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit c728c56c870abe230e45cee5c477f0d890ebacef)

2 years agokqueue tests: Re-enable kqueue proc tests
Mark Johnston [Wed, 25 May 2022 00:14:10 +0000 (20:14 -0400)]
kqueue tests: Re-enable kqueue proc tests

- Some EVFILT_PROC bugs were fixed around the time that the tests were
  disabled.
- I can't reproduce any failures locally.
- Jenkins logs referenced from the PR are gone, so let's re-enable the
  tests and see whether a problem persists.

PR: 233586
Sponsored by: The FreeBSD Foundation

(cherry picked from commit bc7512cc58af2e8bbe5bbf5ca0059b1daa1da897)

2 years agoFix an indentation bug in the bcm pci driver
Andrew Turner [Mon, 23 May 2022 17:24:04 +0000 (18:24 +0100)]
Fix an indentation bug in the bcm pci driver

Sponsored by: The FreeBSD Foundation

(cherry picked from commit f16e38162c75015036b1c5e220b2f82a4bd94af1)

2 years agoUse the error given in the bcm PCI driver
Andrew Turner [Mon, 23 May 2022 17:21:40 +0000 (18:21 +0100)]
Use the error given in the bcm PCI driver

When given an error return it and not just ENXIO as it may contain
information usefule to debug an error.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 5749fdc53517179d9922235c9a1b5e99c6ac3abc)

2 years agoError is not a bool in bcm2838_pci, check for != 0
Andrew Turner [Mon, 23 May 2022 16:38:18 +0000 (17:38 +0100)]
Error is not a bool in bcm2838_pci, check for != 0

Fix for style an check if error != 0 in the bcm2838 pci driver.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit c3147104fdddb5cb358726888a0a612439d10f9e)

2 years agoFix the style of bcm_pcib_msi_attach a little
Andrew Turner [Mon, 23 May 2022 16:33:53 +0000 (17:33 +0100)]
Fix the style of bcm_pcib_msi_attach a little

Move the definition of error to the top of the function.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit b25d7f7477316d185277e4d29da220cc742f6802)

2 years agoSet mm before passing it to the UEFI firmware
Andrew Turner [Sat, 21 May 2022 10:45:41 +0000 (11:45 +0100)]
Set mm before passing it to the UEFI firmware

When reading the UEFI memory map we pass in a pointer to the memory to
hold the map. Unfortunately it wasn't initialised before the first use
so clang decided it was undefined behaviour so the entire loop was
removed. This leads to everything in bi_load after this to also be
removed as dead code.

The next function after bi_load in the binary is efi_copy_init. The
above caused us to enter efi_copy_init with a return address of the
start of the function. Because of this it would enter an infinite
loop of calling the function, allocating memory, then returning to
the start of the function.

PR: 264021
(cherry picked from commit 0d6600b579be769b85f049ef421023316f21b5c3)

2 years agoUse getpagesize in gcore to find the page size
Andrew Turner [Fri, 13 May 2022 11:56:14 +0000 (12:56 +0100)]
Use getpagesize in gcore to find the page size

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

(cherry picked from commit f9ca52bab510ff97c6a3c513ddce698a0d19934c)

2 years agoSupport LSE atomics in the arm64 casue* functions
Andrew Turner [Tue, 17 May 2022 13:52:30 +0000 (14:52 +0100)]
Support LSE atomics in the arm64 casue* functions

As with atomic(9) use the ARMv8.1 Large System Extension atomic
instructions to implement the userspace compare and swap functions.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35234

(cherry picked from commit 88ac318759f28f34aa991ecc6f336326ec00c501)

2 years agoHandle cas failure when the compare succeeds
Andrew Turner [Mon, 9 May 2022 14:28:56 +0000 (15:28 +0100)]
Handle cas failure when the compare succeeds

When locking a priority inherit mutex we perform a compare and swap
operation to try and acquire the mutex. This may fail even when the
compare succeeds.

Check and handle this case.

PR: 263825
Reviewed by: kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35150

(cherry picked from commit 11a6ecd4258b9108fb19420ec5db297f6d99a842)

2 years agoRemove PAGE_SIZE from libthr
Andrew Turner [Thu, 7 Apr 2022 16:24:46 +0000 (17:24 +0100)]
Remove PAGE_SIZE from libthr

In libthr we use PAGE_SIZE when allocating memory with mmap and to check
various structs will fit into a single page so we can use this allocator
for them.

Ask the kernel for the page size on init for use by the page allcator
and add a new machine dependent macro to hold the smallest page size
the architecture supports to check the structure is small enough.

This allows us to use the same libthr on arm64 with either 4k or 16k
pages.

Reviewed by: kib, markj, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34984

(cherry picked from commit c7904405a8d47f64c3b0e73158572e2dc8ef0217)

2 years agoUse the existing page size in libthr
Andrew Turner [Thu, 7 Apr 2022 16:20:04 +0000 (17:20 +0100)]
Use the existing page size in libthr

Rather than calling getpagesize() twice use the value saved after the
first call to size a mmap allocation.

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

(cherry picked from commit 86c500937c4514dda2319f193c4ccc043ffde2b3)

2 years agoMove the arm64 DMAP creation to C
Andrew Turner [Tue, 15 Mar 2022 17:05:48 +0000 (17:05 +0000)]
Move the arm64 DMAP creation to C

To simplify the creation of the direct map (DMAP) region on arm64 move
it from the pre-C code into pmap. This simplifies the DMAP creation
as we can use the notmal index macros, and should reduce the number
of pages needed to hold the level 1 tables to just those needed.

Reviewed by: alc, dch
Tested by: dch, kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34568

(cherry picked from commit bcd763b642abb4b236902e84184c579225265fb7)

2 years agoibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()
Hans Petter Selasky [Mon, 30 May 2022 18:19:33 +0000 (20:19 +0200)]
ibcore: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()

The algorithm pre-allocates a cm_id since allocation cannot be done while
holding the cm.lock spinlock, however it doesn't free it on one error
path, leading to a memory leak.

Linux commit:
c14dfddbd869bf0c2bafb7ef260c41d9cebbcfec

PR: 264248
Sponsored by: NVIDIA Networking

(cherry picked from commit c4a415505311e30093b6d9ee0493427a66f2b0de)

2 years agomlx4core: Fix a memory leak when deleting slave's resources
Hans Petter Selasky [Mon, 30 May 2022 18:11:50 +0000 (20:11 +0200)]
mlx4core: Fix a memory leak when deleting slave's resources

mlx4_delete_all_resources_for_slave() in the resource tracker should free
all memory allocated for a slave. While releasing memory of fs_rule,
it misses releasing memory of fs_rule->mirr_mbox.

Linux commit:
461d5f1b59490ce0096dfda45e10038c122a7892

PR: 264249
Sponsored by: NVIDIA Networking

(cherry picked from commit f29c9901a41fb650d46fd48f4880a894f54aa737)

2 years agomlx4: Fix a memory leak bug.
Hans Petter Selasky [Thu, 19 May 2022 08:10:48 +0000 (10:10 +0200)]
mlx4: Fix a memory leak bug.

In function mlx4_opreq_action(), pointer "mailbox" is not released,
when mlx4_cmd_box() return and error, causing a memory leak bug.
Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
free this pointer.

Linux commit:
febfd9d3c7f74063e8e630b15413ca91b567f963

PR: 264056
Sponsored by: NVIDIA Networking

(cherry picked from commit 527762b2f776381569bd662ce236d2845234c0a7)

2 years agoibcore: Fix possible memory leak in ib_mad_post_receive_mads()
Hans Petter Selasky [Thu, 19 May 2022 08:06:42 +0000 (10:06 +0200)]
ibcore: Fix possible memory leak in ib_mad_post_receive_mads()

If ib_dma_mapping_error() returns non-zero value,
ib_mad_post_receive_mads() will jump out of loops and return -ENOMEM
without freeing mad_priv. Fix this memory-leak problem by freeing
mad_priv in this case.

Linux commit:
a17f4bed811c60712d8131883cdba11a105d0161

PR: 264057
Sponsored by: NVIDIA Networking

(cherry picked from commit ad7741ff693a39bab59b75e432bd922a62f3ef0a)

2 years agoLACP: Do not wait response for marker messages not sent
Arnaud Ysmal [Thu, 23 Sep 2021 08:57:11 +0000 (10:57 +0200)]
LACP: Do not wait response for marker messages not sent

The error returned when a marker message can not be emitted on a port is not handled.

This cause the lacp to block all emissions until the timeout of 3 seconds is reached.

To fix this issue, I just clear the LACP_PORT_MARK flag when the packet could not be emitted.

Differential revision: https://reviews.freebsd.org/D30467
Obtained from: Stormshield

(cherry picked from commit 0b92a7fe47a5f7148a494514bfa530ddc6b496bf)

2 years agodevfs.rules: Do not expose "log" in the default devfs rules.
Zhenlei Huang [Tue, 24 May 2022 13:54:38 +0000 (09:54 -0400)]
devfs.rules: Do not expose "log" in the default devfs rules.

/etc/rc.d/jail no longer creates /dev/log as a symbolic link since
commit 84b354cb9ab61224713c159b1484e8f070fd37be.

PR: 228351
Reviewed by: jamie, markj

(cherry picked from commit 2670ea8a075ea29a0eee9d227c4cdf585a7b3b55)

2 years agonfscl: Ansify a function header
Rick Macklem [Sat, 9 Apr 2022 22:14:05 +0000 (15:14 -0700)]
nfscl: Ansify a function header

(cherry picked from commit c45d934f6b7ae4cbf1a1d718bfe305b028deb922)

2 years agonfscl: Fix IO_APPEND writes from kernel space
Rick Macklem [Mon, 28 Mar 2022 22:11:52 +0000 (15:11 -0700)]
nfscl: Fix IO_APPEND writes from kernel space

Commit 867c27c23a5c modified the NFS client so that
it did IO_APPEND writes directly to the NFS server
bypassing the buffer cache, via a call to
nfs_directio_write().  Unfortunately, this (very old)
function assumed that the uio iov was for user space
addresses.  As such, a IO_APPEND VOP_WRITE() that
was for system space, such as ktrace(1) does, would
write bogus data.

This patch fixes nfs_directio_write() so that it
handles kernel space uio iovs.

(cherry picked from commit c1970a7ebab582d19694c9a525ed6eb4512fdb73)

2 years agotcp: Correctly compute the retransmit length for all 64-bit platforms.
Hans Petter Selasky [Thu, 2 Jun 2022 18:33:21 +0000 (20:33 +0200)]
tcp: Correctly compute the retransmit length for all 64-bit platforms.

When the TCP sequence number subtracted is greater than 2**32 minus
the window size, or 2**31 minus the window size, the use of unsigned
long as an intermediate variable, may result in an incorrect retransmit
length computation on all 64-bit platforms.

While at it create a helper macro to facilitate the computation of
the difference between two TCP sequence numbers.

Differential Revision: https://reviews.freebsd.org/D35388
Reviewed by: rscheff
Sponsored by: NVIDIA Networking

(cherry picked from commit 28173d49dccb91e50be9c401dbad1da908a5dc75)

2 years agolib/libgssapi: Trailing whitespace cleanup
Cy Schubert [Fri, 27 May 2022 20:48:23 +0000 (13:48 -0700)]
lib/libgssapi: Trailing whitespace cleanup

Clean up trailing whitespace (trailing spaces and trailing tabs).

(cherry picked from commit efbe2af2ce5e444aa06d6d989c147ecea3f3120f)

2 years agopf: fix more syncookie memory leaks
Franco Fichtner [Thu, 2 Jun 2022 16:27:43 +0000 (18:27 +0200)]
pf: fix more syncookie memory leaks

Allocate memory for packed nvlists in M_NVLIST, as nvlist_pack() does
this as well, and we use the same variable interchangable with the
memory we allocate. When we free it we can end up freeing from the wrong
zone, leaking memory.

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D35385

(cherry picked from commit a37e0e6de6527a7eaddea8e28f5e4b3427fba1a4)

2 years agopf syncookies: fix memory leak
Kristof Provost [Thu, 7 Apr 2022 06:41:37 +0000 (08:41 +0200)]
pf syncookies: fix memory leak

We forgot to free the nvlist (and packed nvlist) on success.
While here start using the ERROUT macro to clean up error handling, and
to add SDTs for better debugging.

Reported by: Coverity
CID: 1473150

(cherry picked from commit be461cdfb36e229040aafae07a2ba68f73091431)

2 years agomii: correction after MFC
Eugene Grosbein [Sun, 5 Jun 2022 17:25:13 +0000 (00:25 +0700)]
mii: correction after MFC

Fix after wrong conflict resolution by me during cherry-pick.
This is direct commit to stable/13.

Fixes: 32d8af2b2d6a5da670ddbda34420e2ce114c4dc8

2 years agoMFC mii: Add opt_platform.h to all miibus drivers
Warner Losh [Tue, 5 Apr 2022 19:40:01 +0000 (13:40 -0600)]
MFC mii: Add opt_platform.h to all miibus drivers

miivar.h includes opt_platform.h. Make sure all the drivers that use the
miibus_if.h interface file have opt_platform.h as well. While some of
these may not, strictly speaking, need it, it's easier to include it
universally for miibus.

Sponsored by: Netflix

(cherry picked from commit b111430e54537a66080df115c3a2950a2922da5a)

Author:    Warner Losh <imp@FreeBSD.org>

2 years agoboot/zfs: Extend zfsimpl.h and make it easier to use
Mark Johnston [Sat, 21 May 2022 18:22:30 +0000 (14:22 -0400)]
boot/zfs: Extend zfsimpl.h and make it easier to use

Some makefs(8) patches make use of zfsimpl.h (not zfsimpl.c though) to
provide definitions for various on-disk structures.  Most of this diff
simply adds new definitions that are useful.

Also reduce dependencies of the header:
- remove an unused list_node_t field to drop the sys/list.h dependency
- replace CTASSERT with _Static_assert
And fix the declaration of decode_embedded_bp_compressed().

No functional change intended.

Reviewed by: tsoome
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 77649f35a7e53e3cbbd5b416e8802f70e21a99f6)

2 years agoExclude DEBUG_VFS_LOCKS from non-debug kernel configs
Konstantin Belousov [Wed, 2 Feb 2022 17:22:17 +0000 (19:22 +0200)]
Exclude DEBUG_VFS_LOCKS from non-debug kernel configs

MFC note: this is nop on stable branch where debug options are not
included into the shipped config outright.

(cherry picked from commit 21a37c3cc610d08d5f9d5319451b97f1a6a13320)

2 years agorpc.tlsclntd: Add the -2 option to the man page
Rick Macklem [Sun, 22 May 2022 21:20:14 +0000 (14:20 -0700)]
rpc.tlsclntd: Add the -2 option to the man page

Since the KTLS now supports TLS1.3, the daemons default
to version 1.3, since the draft (to be an RFC someday)
requires TLS1.3.

However, since FreeBSD 13,0, 13,1 uses TLS1.2 for
NFS-over-TLS, the "-2" option is added to both daemons
for compatibility with FreeBSD 13.0, 13.1.

This patch updates the man pages for this.

This is a content change.

(cherry picked from commit 915fc1afe57e89898c4edb0b19911e2a5b27976d)

2 years agorpc.tlsclntd: Update the man page for the -C option
Rick Macklem [Sun, 22 May 2022 20:58:59 +0000 (13:58 -0700)]
rpc.tlsclntd: Update the man page for the -C option

Commit f5b40aa0dea6 modifies the -C command line option
for rpc.tlsclntd to use the TLS 1.3 SSL_CTX_set_ciphersuites().

This patch updates the man page for this modified command
line option.

This is a content change.

(cherry picked from commit 0bf3f379e18f5f01af77a23163222165321a5502)

2 years agorpc.tlsservd: Add the -2 option to the man page
Rick Macklem [Sun, 22 May 2022 21:17:06 +0000 (14:17 -0700)]
rpc.tlsservd: Add the -2 option to the man page

Since the KTLS now supports TLS1.3, the daemons default
to version 1.3, since the draft (to be an RFC someday)
requires TLS1.3.

However, since FreeBSD 13,0, 13,1 uses TLS1.2 for
NFS-over-TLS, the "-2" option is added to both daemons
for compatibility with FreeBSD 13.0, 13.1.

This patch updates the man pages for this.

This is a content change.

(cherry picked from commit e2c72fecfc51d376600b29dfea737a3d1054e34a)

2 years agorpc.tlsservd: Update the man page for the -C option
Rick Macklem [Sat, 21 May 2022 22:44:29 +0000 (15:44 -0700)]
rpc.tlsservd: Update the man page for the -C option

Commit 712aac1389e8 adds a new -C command line option
to rpc.tlsservd.

This patch updates the man page for this new command
line option.

This is a content change.

(cherry picked from commit d94358e29d1eacab17e9992ad91decb1b84b9449)

2 years agorpc.tlsclntd: Add the -2 option to the usage line
Rick Macklem [Sun, 22 May 2022 21:41:20 +0000 (14:41 -0700)]
rpc.tlsclntd: Add the -2 option to the usage line

Commit 72bf76d6b8c9 added the -2 option to use
TLS 1.2 NFS-over-TLS mounts.  It did not add -2
to the usage message.

This patch adds -2 to the usage message.

(cherry picked from commit b387a075d9db81a7bcc3adcc7c1c5ba93e8d8f66)

2 years agorpc.tlsclntd: Modify the -C option to use SSL_CTX_set_ciphersuites
Rick Macklem [Sun, 22 May 2022 20:49:08 +0000 (13:49 -0700)]
rpc.tlsclntd: Modify the -C option to use SSL_CTX_set_ciphersuites

Commit 0b4f2ab0e913 fixes the krpc so that it can use TLS
version 1.3 for NFS-over-TLS, as required by
the draft (someday to be an RFC).
This patch replaces SSL_CTX_set_cipher_list() with
SSL_CTX_set_ciphersuites(), since that is the function
that is used for TLS1.3.

The man page will be updated in a separate commit.

(cherry picked from commit f5b40aa0dea690314bc70f88634a13cbaa53b6f0)

2 years agorpc.tlsservd: Delete set but unused variable
Rick Macklem [Wed, 27 Apr 2022 02:29:01 +0000 (19:29 -0700)]
rpc.tlsservd: Delete set but unused variable

(cherry picked from commit 350668eb09a274436922fd580cd958c6a8a7eb25)

2 years agorpc.tlsservd: Add the -2 option to the usage line
Rick Macklem [Sun, 22 May 2022 21:36:20 +0000 (14:36 -0700)]
rpc.tlsservd: Add the -2 option to the usage line

Commit 0637b12b13be added the -2 option to allow
TLS 1.2 NFS-over-TLS mounts.  It did not add -2
to the usage message.

This patch adds -2 to the usage message.

(cherry picked from commit b4fa7fde15854a7d40ca66694d6589fd45060050)

2 years agorpc.tlsservd: Modify the -C option to use SSL_CTX_set_ciphersuites
Rick Macklem [Sun, 22 May 2022 20:44:31 +0000 (13:44 -0700)]
rpc.tlsservd: Modify the -C option to use SSL_CTX_set_ciphersuites

Commit 0b4f2ab0e913 fixes the krpc so that it can use TLS
version 1.3 for NFS-over-TLS, as required by
the draft (someday to be an RFC).
This patch replaces SSL_CTX_set_cipher_list() with
SSL_CTX_set_ciphersuites(), since that is the function
that is used for TLS1.3.

(cherry picked from commit 8d098deda3786b223e44ad1bed923a6d66dfa341)

2 years agoApply compiler-rt fix for building with earlier versions of clang
Dimitry Andric [Wed, 1 Jun 2022 18:29:15 +0000 (20:29 +0200)]
Apply compiler-rt fix for building with earlier versions of clang

Merge commit 18efa420da5f from llvm git (by Brooks Davis)

  compiler-rt: Allow build without __c11_atomic_fetch_nand

  Don't build atomic fetch nand libcall functions when the required
  compiler builtin isn't available. Without this compiler-rt can't be
  built with LLVM 13 or earlier.

  Not building the libcall functions isn't optimal, but aligns with the
  usecase in FreeBSD where compiler-rt from LLVM 14 is built with an LLVM
  13 clang and no LLVM 14 clang is built.

  Reviewed By:   efriedma

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

MFC after: 3 days

(cherry picked from commit cfefd16d5721f5bb89506df7d2bb9e18f60b034a)

2 years agollvm MIPS target: add missed source file
Dimitry Andric [Tue, 31 May 2022 13:19:55 +0000 (15:19 +0200)]
llvm MIPS target: add missed source file

Otherwise, linking llvm binaries with this target enabled (which is not
the default) will fail with a number of undefined symbol errors:

  ld: error: undefined symbol: llvm::initializeMipsMulMulBugFixPass(llvm::PassRegistry&)
  ld: error: undefined symbol: llvm::createMipsMulMulBugPass()

MFC after: 3 days

(cherry picked from commit 4b1174e27a30f9a627586c5d45e10ba7e801d3bd)

2 years agoAdd several sanitizer ignore lists under /usr/lib/clang
Dimitry Andric [Fri, 27 May 2022 18:23:37 +0000 (20:23 +0200)]
Add several sanitizer ignore lists under /usr/lib/clang

Some of the sanitizers from compiler-rt can use ignore lists, which are
loosely modeled on valgrind's example. Upstream provides default lists
for AddressSanitizer, CFI, and MemorySanitizer, so install these in the
expected location, /usr/lib/clang/14.0.3/share.

Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35338

(cherry picked from commit 7b6f5ebef68194c09708abeb6426ca7602b6dab1)

2 years agoRemove accidentally committed diff file
Dimitry Andric [Wed, 18 May 2022 19:45:40 +0000 (21:45 +0200)]
Remove accidentally committed diff file

I accidentally added the upstream diff file from the llvm commit I
merged in 1a0329799c6d. Clean it out.

Noticed by: markj
Fixes: 1a0329799c6d
MFC after: 2 weeks

(cherry picked from commit 4e2d3f26bd12610ef8672eefb02814b882a4c29b)

2 years agoApply llvm fix for "Invalid PPC CTR loop!" error on powerpcspe
Dimitry Andric [Wed, 18 May 2022 09:02:03 +0000 (11:02 +0200)]
Apply llvm fix for "Invalid PPC CTR loop!" error on powerpcspe

Merge commit d9d15af7873f from llvm git (Qiu Chaofan):

  [PowerPC] Treat llvm.fmuladd intrinsic as using CTR

  This fixes bug 55463, similar to D78668. This is a temporary fix since
  we will switch to post-isel CTR loop determination in the future.

  Reviewed By: dim, shchenz

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

MFC after: 2 weeks

(cherry picked from commit 1a0329799c6d8bfb7eca89d0c8736736b8ab446c)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb
Dimitry Andric [Thu, 28 Apr 2022 18:32:24 +0000 (20:32 +0200)]
Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit 3a9a9c0ca44ec535dcf73fe8462bee458e54814b)

2 years agoApply libc++ fix for <ranges> not compiling at all
Dimitry Andric [Thu, 7 Apr 2022 20:04:53 +0000 (22:04 +0200)]
Apply libc++ fix for <ranges> not compiling at all

Merge commit 44cdca37c01a from llvm git (by Arthur O'Dwyer):

  [libc++] Define `namespace views` in its own detail header.

  Discovered in the comments on D118748: we would like this namespace
  to exist anytime Ranges exists, regardless of whether concepts syntax
  is supported. Also, we'd like to fully granularize the <ranges> header,
  which means not putting any loose declarations at the top level.

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

(cherry picked from commit 53683b95ef66a12337999587cd98302b1b425920)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.0-2-g3f43d803382d
Dimitry Andric [Tue, 29 Mar 2022 20:16:50 +0000 (22:16 +0200)]
Merge llvm-project release/14.x llvmorg-14.0.0-2-g3f43d803382d

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-2-g3f43d803382d.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit dbc822f3bc537e0d8350f63178397156bc163b1c)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a
Dimitry Andric [Thu, 17 Mar 2022 19:16:00 +0000 (20:16 +0100)]
Merge llvm-project release/14.x llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit fb03ea46eb853b2d128828e9d82882125bcc1657)

2 years agoApply libc++ fix for firefox visibility push/pop issue
Dimitry Andric [Tue, 15 Mar 2022 20:32:06 +0000 (21:32 +0100)]
Apply libc++ fix for firefox visibility push/pop issue

Merge commit 7ab1ab0db401 from llvm git (by Dimitry Andric):

  [libc++] Make __dir_stream visibility declaration consistent

  The class `__dir_stream` is currently declared in two places: as a
  top-level forward declaration in `directory_iterator.h`, and as a friend
  declaration in class `directory_entry`, in `directory_entry.h`.

  The former has a `_LIBCPP_HIDDEN` attribute, but the latter does not,
  causing the Firefox build to complain about the visibility not matching
  the previous declaration. This is because Firefox plays games with
  pushing and popping visibility.

  Work around this by making both `__dir_stream` declarations consistently
  use `_LIBCPP_HIDDEN`.

  Reviewed By: ldionne, philnik, #libc

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

(cherry picked from commit a1f13cbcbb26465d8b54c18a294896add63d6536)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103
Dimitry Andric [Sat, 5 Mar 2022 14:16:17 +0000 (15:16 +0100)]
Merge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc2-12-g09546e1b5103.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit d781ede639f2289ccf0889dd138169e1194b656b)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255
Dimitry Andric [Fri, 18 Feb 2022 22:41:20 +0000 (23:41 +0100)]
Merge llvm-project release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc1-74-g4dc3cb8e3255.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit d56accc7c3dcc897489b6a07834763a03b9f3d68)

2 years agoApply fix for asm constraint error in www/php80-opcache
Dimitry Andric [Thu, 17 Feb 2022 21:49:39 +0000 (22:49 +0100)]
Apply fix for asm constraint error in www/php80-opcache

Merge commit 027c16bef4b7 from llvm git (by Nick Desaulniers):

  [X86ISelLowering] permit BlockAddressSDNode "i" constraints for PIC

  When building 32b x86 code as PIC, the existing handling of "i"
  constraints is conservative since generally we have to go through the
  GOT to find references to functions.

  But generally, BlockAddresses from C code refer to the Function in the
  current TU.  Permit BlockAddresses to be used with the "i" constraint
  for those cases.

  I regressed this in
  commit 4edb9983cb8c ("[SelectionDAG] treat X constrained labels as i for asm")

Fixes: https://github.com/llvm/llvm-project/issues/53868
  Reviewed By: efriedma, MaskRay

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

(cherry picked from commit 8885dff6cec52378084211fdd9366a73833eceee)

2 years agoMerge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90
Dimitry Andric [Sat, 5 Feb 2022 22:51:07 +0000 (23:51 +0100)]
Merge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18315-g190be5457c90.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit 1838bd0f4839006b42d41a02a787b7f578655223)

2 years agoMerge llvm-project main llvmorg-14-init-18294-gdb01b123d012
Dimitry Andric [Sat, 5 Feb 2022 20:07:43 +0000 (21:07 +0100)]
Merge llvm-project main llvmorg-14-init-18294-gdb01b123d012

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18294-gdb01b123d012, the last commit before
the upstream release/14.x branch was created.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit 1fd87a682ad7442327078e1eeb63edc4258f9815)

2 years agoMerge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
Dimitry Andric [Thu, 27 Jan 2022 22:17:16 +0000 (23:17 +0100)]
Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit 04eeddc0aa8e0a417a16eaf9d7d095207f4a8623)

2 years agoMerge llvm-project main llvmorg-14-init-13186-g0c553cc1af2e
Dimitry Andric [Sat, 25 Dec 2021 22:36:56 +0000 (23:36 +0100)]
Merge llvm-project main llvmorg-14-init-13186-g0c553cc1af2e

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-13186-g0c553cc1af2e.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit 0eae32dcef82f6f06de6419a0d623d7def0cc8f6)

2 years agoMerge llvm-project main llvmorg-14-init-11187-g222442ec2d71
Dimitry Andric [Thu, 2 Dec 2021 21:49:08 +0000 (22:49 +0100)]
Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-11187-g222442ec2d71.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit 4824e7fd18a1223177218d4aec1b3c6c5c4a444e)

2 years agoMerge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3
Dimitry Andric [Sat, 20 Nov 2021 17:39:12 +0000 (18:39 +0100)]
Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR: 261742
MFC after: 2 weeks

(cherry picked from commit 5e801ac66d24704442eba426ed13c3effb8a34e7)