1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00
Commit Graph

290508 Commits

Author SHA1 Message Date
Dimitry Andric
7a6dacaca1 Merge llvm-project main llvmorg-18-init-18359-g93248729cfae
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the
last commit before the upstream release/18.x branch was created.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:49 +02:00
Dimitry Andric
46c59ea9b6 Redo libc++ customizations
* Remove osreldate include because _LIBCPP_HAS_NO_GETS has disappeared
* Instead, add direct major __FreeBSD__ check for using ::gets declaration
* Mark EINTEGRITY values as FreeBSD customization
* Reformat _LIBCPP_TYPE_VISIBILITY_DEFAULT customization

PR:		276104
MFC after:	1 month
2024-04-06 22:13:43 +02:00
Dimitry Andric
297eecfb02 Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:39 +02:00
Dimitry Andric
1db9f3b21e Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:28 +02:00
Dimitry Andric
412fa3436f Add two FreeBSD customizations to libc++
This is intended to better support ports usage of older clang versions:
* Add _LIBCPP_ENABLE_COMPILER_VERSION_CHECKS block around compiler
  version checks, to avoid any warnings about support. This makes some
  ports that use -Werror fall over.
* When using clang < 15.0, avoid using a type visibility attribute on
  the std namespace, as older versions of clang do not support this.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:25 +02:00
Dimitry Andric
653487bbc8 Tentatively merge https://github.com/llvm/llvm-project/pull/77242
[libcxx] Re-include <osreldate.h> in __config for FreeBSD

  In 0a97720d0197 some changes were made to `__config` for assuming that
  `__BYTE_ORDER__` is always present.

  However, this deleted a `<osreldate.h>` include for FreeBSD, which is
  required to get the value of `__FreeBSD_version`, and that is used later
  in the file to determine whether `_LIBCPP_C_HAS_NO_GETS` needs to be
  enabled.

  Include `<osreldate.h>` just after the other includes used for feature
  detection, to fix this.

  Note that when FreeBSD 13 is EOLed, this can be removed, as then all
  supported FreeBSD versions will no longer have `gets()`.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:24 +02:00
Dimitry Andric
647cbc5de8 Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:16 +02:00
Dimitry Andric
edc2dc17b1 Revert commit 0e46b49de433 from llvm-project (by Matt Arsenault):
Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

  This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

  PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

Since it causes an assertion failure building /sys/dev/fb/vga.c:
https://github.com/llvm/llvm-project/issues/76416

PR:		276104
MFC after:	1 month
2024-04-06 22:13:11 +02:00
Dimitry Andric
cb14a3fe51 Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:06 +02:00
Dimitry Andric
3d68ee6cbd Tentatively apply https://github.com/llvm/llvm-project/pull/76175
This fixes libsa including compiler-rt builtins.

PR:		276104
MFC after:	1 month
2024-04-06 22:12:49 +02:00
Dimitry Andric
5f757f3ff9 Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR:		276104
MFC after:	1 month
2024-04-06 22:11:55 +02:00
Michael Tuexen
3e1c8a35f7 tcp: improve consistency
No functional change intended.

Reported by:		Coverity Scan
CID:			1523781
Reviewed by:		rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44645
2024-04-06 10:02:06 +02:00
Michael Tuexen
d902c8f55b tcp rack: fix memory corruption
When in rack_output() jumping to the label out, don't write errno into
the log buffer, since the pointer is not initialized.

Reported by:		Coverity Scan
CID:			1523773
Reviewed by:		rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44647
2024-04-06 09:55:46 +02:00
Warner Losh
ea002c1017 devmatch: Convert command line flags to bools
These are bools, and should have been bools from the start. Make them
bools.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh
03cfd91998 devmatch: Make -a work for all devices
devmatch -a should produce output for all attached devices, but doesn't.

Noticed by:		cperciva
Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh
cfcf475a66 stand: Install gptboot.efi(8)
We need to include bsd.init.mk first when we have man pages in the boot
loader.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh
fe83abacd4 nvme: Add my copyright to logpage.c
Reflect the command line refactoring I did, and other changes. git blame
says I'm to blame for ~1/4 of this file.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Warner Losh
0b8f21e8d1 nvme: Add LPA bits
Add all the bits from the NVMe 2.0 base specification: CMD_EFFECTS to
indicate the commands and effects log page is supported, TELEMETRY to
indicate that the telemetry log pages and protocols are supported,
PERSISTENT_EVENTS to indicate the persistent event log is supported,
LOG_PAGES_PAGE to indicate that various log pages related to log page
and command support are supported: L0, L5, L12, and L13. and
DA4_TELEMETRY to indicate that the DA4 area is supported for telemetry
data.

Sponsored by:		Netflix
2024-04-05 16:53:47 -06:00
Stephen J. Kiernan
3bbe8ed1a7 arm64: Add a CPU reset hook instead of expecting PSCI
Some SoCs do not include a PSCI for power management and defer it to
something else instead. Add a CPU reset hook to account for this, and
use it in the psci driver.

Reviewed by:	andrew
Obtained from:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D44535
2024-04-05 17:37:15 -04:00
Stephen J. Kiernan
1b60bbfe65 arm64: Separate serror handler to EL1H and EL0 versions.
In order to ensure the registers are saved and restored properly for
the exception level, we need separate handlers serror at each of
EL1H and EL0.

Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D44630
2024-04-05 15:22:11 -04:00
Collin Funk
8268a31bcc which: Use size_t instead of ssize_t for pathlen
The "pathlen" variable is the return value of strlen(3) and is then
passed as an argument to malloc(3) and memcpy(3). The size_t type
matches the prototype for these functions. The size_t type is unsigned
so it can fit larger $PATH values than ssize_t. However, in practice
ssize_t should be larger enough so this change is just for clarity.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>

MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1113
2024-04-05 14:30:31 -04:00
Lexi Winter
da2b732288 arm64: add CPU part identifiers for Apple M1 and M2
Part numbers are sourced from Linux (arch/arm64/include/asm/cputype.h).

MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1144
2024-04-05 14:18:32 -04:00
Zhenlei Huang
317cc829ee LinuxKPI: Remove the temporary variable fileid from the macro request_module
The variable fileid stores the result from kern_kldload() but never gets
used. Since the third parameter `*fileid` of kern_kldload() can be NULL,
this unused variable can be safely removed.

No functional change intended.

Reviewed by:	emaste, bz, #linuxkpi
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44583
2024-04-06 00:26:09 +08:00
Michael Tuexen
681711b77c uipc_socket: handle socket buffer locks in sopeeloff
PR:			278171
Reviewed by:		markj
Fixes:			a4fc41423f ("sockets: enable protocol specific socket buffers")
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D44640
2024-04-05 18:20:19 +02:00
Michael Tuexen
7df0ef5f48 tcp rack: fix sending
In rack_output(), idle is used as a boolean variable. So don't use it
as an int and don't clear it afterwards.
This avoids setting idle to false, when it is not intended.

Reported by:		olivier
Reviewed by:		rrs, rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44610
2024-04-05 17:47:03 +02:00
Dimitry Andric
aaabed1dea Merge commit eb8f379567e8 from llvm-project (by Florian Hahn):
[DSE] Remove malloc from EarliestEscapeInfo before removing. (#84157)

  Not removing the malloc from earliest escape info leaves stale entries
  in the cache.

  Fixes https://github.com/llvm/llvm-project/issues/84051.

  PR: https://github.com/llvm/llvm-project/pull/84157

This fixes a crash in clang (usually a bus error, but can also be
another memory error) when compiling the science/siconos port.

PR:		278174
Reported by:	yuri
MFC after:	3 days
2024-04-05 17:44:49 +02:00
Mark Johnston
fd56d24725 tarfs.5: Provide some guidance on zstd frame sizes
Reviewed by:	des, emaste
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44636
2024-04-05 11:43:58 -04:00
Michael Tuexen
60bc195745 tcp bblog: cleanup
Remove redundant checks and improve error checking.

Reported by:		Coverity Scan
CID:			1523780
Reviewed by:		rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44616
2024-04-05 17:36:40 +02:00
Michael Tuexen
aaaa01c0c8 tcp hpts: initialize variable
Ensure that  tv.tv_sec is zero in all code paths.

Reported by:		Coverity Scan
CID:			1527724
Reviewed by:		rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44584
2024-04-05 17:30:31 +02:00
Konstantin Belousov
f1519a8229 acpidump: add Foundation copyright
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2024-04-05 18:17:55 +03:00
Konstantin Belousov
6d789b6126 acpidump: dump AMD IVRS table describing IOMMU layout
Reviewed by:	markj
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44634
2024-04-05 18:17:55 +03:00
Konstantin Belousov
969a4b8be5 acpidump: add printfield() helper
Reviewed by:	markj
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44634
2024-04-05 18:17:55 +03:00
Konstantin Belousov
29a6b72775 acpidump: bump WARNS to 6
and disable warnings about unused function args coming from the vendor
acpi headers.

Reviewed by:	markj
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44634
2024-04-05 18:17:55 +03:00
Konstantin Belousov
4262ad56a0 acpidump: the acpi_get_fadt_revision() argument is unused
everywhere except i386.

Reviewed by:	markj
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44634
2024-04-05 18:17:55 +03:00
Konstantin Belousov
de937ecb75 acpidump: silent the warning about unaligned uuid
The field comes from the ACPI NFIT table and must be already properly
aligned by BIOS (at least so is written in the spec).

Reviewed by:	markj
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44634
2024-04-05 18:17:55 +03:00
Mark Johnston
a0895e394d tarfs: Implement VOP_BMAP
This lets tarfs provide readahead/behind hints to the VFS, which helps
memory-mapped I/O performance, important when running faulting in
executables out of a tarfs mount as one might if tarfs is used to back
the root filesystem, for example.  The improvement is particularly
noticeable when the backing tarball is zstd-compressed.

The implementation simply returns the extent of the virtual block
containing the target offset, clamped by the maximum I/O size.  This is
perhaps simplistic; it effectively just chooses values that would
correspond to a single VOP_READ call in tarfs_read_file().

Reviewed by:	des, kib
MFC after:	1 month
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44626
2024-04-05 11:14:36 -04:00
Mark Johnston
663a704a58 VOP_BMAP.9: Typo
MFC after:	1 week
Sponsored by:	Klara, Inc.
2024-04-05 11:14:28 -04:00
Konstantin Belousov
235436d631 stop_all_proc(): skip traced or signal-stoped processes
Since thread_single(SINGLE_ALLPROC) ignores them since 9241ebc796,
and there is not much we can do for the debugger-controlled process.

Noted by:	olce
Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44638
2024-04-05 17:52:39 +03:00
Juraj Lutter
bb4e55242e Add OpenBSD 7.5 to bsd-family-tree
Summary: Add OpenBSD 7.5 to bsd-family-tree

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D44643
2024-04-05 15:33:48 +02:00
Christos Margiolis
c0d8f58629 Revert "sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)"
This reverts commit dc831e93ba.

After several reports in the mailing lists, this commit breaks
pulseaudio. Revert until the issue is resolved.
2024-04-05 12:33:41 +02:00
Christos Margiolis
365067e98e Revert "sound: Implement asynchronous device detach"
This reverts commit 9eff58c6d5.

We are reverting dc831e93ba ("sound: Get rid of snd_clone and use
DEVFS_CDEVPRIV(9)"), so revert this commit as well since it depends
dc831e93ba.
2024-04-05 12:33:23 +02:00
Xin LI
5ffb19ac36 Backport export of lzma_mt_block_size symbol.
This restores binary compatibility against liblzma 5.6.0 library.

PR:		278127
MFC after:	3 days
2024-04-04 23:39:33 -07:00
Xin LI
2f9cd13d6c Revert "MFV: xz 5.6.0"
This commit reverts 8db56defa7,
rolling back the vendor import of xz 5.6.0 and restoring the
package to version 5.4.5.

The revert was not directly due to the attack (CVE-2024-3094):
our import process have removed the test cases and build scripts
that would have enabled the attack. However, reverting would
help to reduce potential confusion and false positives from
security scanners that assess risk based solely on version
numbers.

Another commit will follow to restore binary compatibility with
the liblzma 5.6.0 library by making the previously private
symbol (lzma_mt_block_size) public.

PR:		278127
MFC after:	3 days
2024-04-04 23:39:23 -07:00
Justin Hibbits
fcace5ab08 powerpc/booke: Reserve KVA for minidump working area
This was already handled for the AIM64 pmaps, so add the same to
Book-E64 pmap.
2024-04-04 19:03:27 -04:00
Mark Johnston
8eb21b4ff0 tmpfs tests: Remove an xfail annotation
This test passes after commit 08f3d5b60c ("copy_file_range: Call
vn_rdwr() at least once").

PR:		274615
MFC after:	1 month
2024-04-04 17:04:30 -04:00
Mark Johnston
08f3d5b60c copy_file_range: Call vn_rdwr() at least once
This ensures that we invoke VOP_READ on the input file even if it's
empty, which in turn helps ensure that filesystems update the atime of
the file.

PR:		274615
Reviewed by:	olce, rmacklem, kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D43524
2024-04-04 17:03:07 -04:00
Alan Somers
c1326c01df fusefs: correct a comment
[skip ci]

MFC after:	1 week
Sponsored by:	Axcient
2024-04-04 14:18:56 -06:00
Mark Johnston
d1801babad tarfs.5: Document the importance of zstd framing
Reviewed by:	des, kib
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44628
2024-04-04 10:54:25 -04:00
Mark Johnston
91eca18551 tarfs: Inherit mnt_iosize_max from the lower vnode
There is no obvious reason to use a value smaller than that.

Reviewed by:	des, kib
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44627
2024-04-04 10:54:06 -04:00
Dag-Erling Smørgrav
bee7cf9e97 ln: Improve link(1) variant of ln(1).
* Give link(1) its own usage message.
* Use getprogname(3) instead of rolling our own.
* Verify that the target file does not already exist.
* Add tests specific to link(1).

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44635
2024-04-04 16:14:50 +02:00