Commit Graph

24492 Commits

Author SHA1 Message Date
Alexander Motin
278d695094 libpmc: Import AMD Zen 4 PMU events
MFC after:	1 week
2024-04-20 11:54:04 -04:00
Dimitry Andric
dfa39133b3 Merge llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6.

PR:		276104
MFC after:	3 days
2024-04-20 16:02:57 +02:00
Gordon Bergling
bbef63ec27 timerfd.2: Remove a double word
- s/is is/is/

MFC after:	3 days
2024-04-20 11:31:25 +02:00
Ricardo Branco
a8fd0a5f44 glabel: Remove support for old reiserfs
Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1101
2024-04-19 16:48:28 -06:00
Alexander Ziaee
de525c502a intro.2: Integrate introduction with state of page
Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
2024-04-19 16:30:32 -06:00
Alexander Ziaee
d846f33bb6 intro.2: Section RETURN VALUES is actually ERRORS
Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
2024-04-19 16:30:27 -06:00
Alexander Ziaee
4696ca7baf intro.2: Add FILES mentioning table of syscalls
Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
2024-04-19 16:30:23 -06:00
Alexander Ziaee
9e8df7900f intro.2: Tweak grammar and syntax for consistency
Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
2024-04-19 16:30:19 -06:00
Alexander Ziaee
bcc57e9715 intro.2: Import HISTORY from OpenBSD but our style
Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
2024-04-19 16:30:14 -06:00
Brooks Davis
f0bd655a61 libc/quad: further narrow list of i386 symbols
It's unclear to me why lld didn't complain about these are they aren't
present and haven't been.  Instead ld.bfd complained.

Reviewed by:	dim
Fixes:		6e6cd03c91 libc/quad: narrow list of symbols exposed on i386
Differential Revision:	https://reviews.freebsd.org/D44879
2024-04-19 22:56:13 +01:00
Brooks Davis
44e89340fe libgcc_s: expose __divmoddi4 on i386
GCC has used this for some time (since 7.0) and apparently we were
getting away with using the hidden symbol, but when linking with
--no-undefined-version we get an error unless it's properly exported.
(For anyone who wonders at the assymetry, __udivmoddi4 is indeed much
older and was introduced with GCC 3.0.)

MFC after:	3 days
Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D44878
2024-04-19 22:56:13 +01:00
Brooks Davis
0b9e358580 libgcc_{eh,s}: restore __*_frame_info symbols post llvm18
The upstream llvm commit 5eb44df1b64d made the addition of these GCC
compatability symbols dependent on build configuration rather than
hardcoded for amd64, i386, and powerpc.  Reenable them.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D44877
2024-04-19 22:56:13 +01:00
Brooks Davis
6e83504c60 Revert "lib{c,sys}: normalize export of openat, setcontext, and swapcontext"
I put the symbols in the wrong file (should have been
lib/libc/sys/Symbol.map), added a duplicate pdfork entry due to a botch
rebase, and there seems to be a issue with gcc13/binutils not exposing
the symbols so revert the whole thing while I debug.

This reverts commit ee632fb9eb.
2024-04-19 22:25:04 +01:00
Brooks Davis
ee632fb9eb lib{c,sys}: normalize export of openat, setcontext, and swapcontext
List them in the symbol map rather than using the __sym_default to
expose them.  This will allow later improvements in the stub
implementations in libc.so.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44113
2024-04-17 23:39:46 +01:00
Brooks Davis
df1a09ba52 libsys: expose a few more symbols for libc's use
These private symbols are used by libc so expose as we do with
auxargs bits rather then relying on duplicate implementations in libc.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44114
2024-04-17 23:39:46 +01:00
Dimitry Andric
f276adc148 libcompiler_rt Makefile.inc: update _Float16/__bf16 checks
Clang supports __bf16 for riscv from version 18.0 onwards, so update the
checks for it. While here, rewrite the checks so they are hopefully more
readable, and also handle gcc a little better.

In addition, define COMPILER_RT_HAS_FLOAT16 and COMPILER_RT_HAS_BFLOAT16
when these features should be available, since there are some parts in
compiler-rt that check for these defines.

PR:		276104
MFC after:	1 month
2024-04-17 22:20:47 +02:00
Martin Matuska
7d03ec3306 libarchive: add two missing package files to libarchive tests
MFC after:	1 week
2024-04-17 09:58:32 +02:00
Martin Matuska
b9128a37fa libarchive: merge from vendor branch
Libarchive 3.7.3

New features:
  #1941 uudecode filter: support file name and file mode in raw mode
  #1943 7-zip reader: translate Windows permissions into UNIX
        permissions
  #1962 zstd filter now supports the "long" write option
  #2012 add trailing letter b to bsdtar(1) substitute pattern
  #2031 PCRE2 support
  #2054 add support for long options "--group" and "--owner" to tar(1)

Security fixes:
  #2101 Fix possible vulnerability in tar error reporting introduced
        in f27c173

Important bugfixes:
  #1974 ISO9660: preserve the natural order of links
  #2105 rar5: fix infinite loop if during rar5 decompression the last
        block produced no data
  #2027 xz filter: fix incorrect eof at the end of an lzip member
  #2043 zip: fix end-of-data marker processing when decompressing zip
        archives

PR:		278315 (exp-run)
MFC after:	1 week
2024-04-16 23:39:31 +02:00
Brooks Davis
e0919a4bac libc/arm: export __signalcontext not _signalcontext
The former exists and architectures other than aarch64 and riscv provide
it.  The later does not exist.

Differential Revision:	https://reviews.freebsd.org/D44329
2024-04-16 22:14:21 +01:00
Brooks Davis
da77a1b4f0 libcxxrt: don't export nonexistant symbols
Remove version entries that we don't build.

Add an arm specific Version.map and for other targets run the files
through sed to handle int vs long in new and delete.

Ideally we'd use the SYMBOL_MAPS functionality to preprocess with cpp,
but it doesn't currently handle C++ symbols so be annoyingly duplicative
for now.

Differential Revision:	https://reviews.freebsd.org/D44325
2024-04-16 22:14:21 +01:00
Brooks Davis
b457144cea libgcc_s: exclude symbols not present on some arches
arm, aarch64, and riscv lack some/all frame_info interfaces.
arm and powerpc lack some numeric functions.

Differential Revision:	https://reviews.freebsd.org/D44324
2024-04-16 22:14:21 +01:00
Brooks Davis
3f82d8345b libgcc_s: only export 128-bit int APIs when available
These interfaces are only compiled when the platform supports 128-bit
ints.  Use a CRT_HAS_128BIT guard similar to the one used in the
compiler_rt sources.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D44323
2024-04-16 22:14:21 +01:00
Brooks Davis
b8df8b0c2e libgcc_s: only export 128-bit long double when available
These functions are only available on aarch64 and riscv so only try to
export them on those architectures.

Differential Revision:	https://reviews.freebsd.org/D44322
2024-04-16 22:14:21 +01:00
Brooks Davis
35b3504ee6 librpcsec_gss: don't export non-existant symbols
rpc_gss_mesh_to_oid was never implemented.

This doesn't seem to be any reason why we would need to export the _stub
functions, but it's also a little unclear to me why the linker thinks
they aren't present.  Perhaps they should be static.

Differential Revision:	https://reviews.freebsd.org/D44248
2024-04-16 22:14:21 +01:00
Brooks Davis
63b179b68d libc: don't try to export __sF
This symbol has been static since 2008 (commit 1e98f88776).

Differential Revision:	https://reviews.freebsd.org/D44188
2024-04-16 22:14:20 +01:00
Brooks Davis
88fcb61799 libc: don't try to export _nsdbtdump
It is only present when compiling nsdispatch.c with -D_NSS_DEBUG and we
provide no mechanism to do so.

Differential Revision:	https://reviews.freebsd.org/D44187
2024-04-16 22:14:20 +01:00
Brooks Davis
4d6722ec69 libc: don't try to export mexitcount
This requires that mcount.c be compiled with -DGUPROF and we provide no
mechanism to do so.

Differential Revision:	https://reviews.freebsd.org/D44186
2024-04-16 22:14:20 +01:00
Brooks Davis
1b10a30539 libc: don't try to export mpool_stat
This requires that mpool.c be compiled with -DSTATISTICS and we provide
no mechanism to do this.

Differential Revision:	https://reviews.freebsd.org/D44185
2024-04-16 22:14:20 +01:00
Brooks Davis
0dd2f4a0cc libc: only export hesiod symbols when enabled
Create a seperate symbol file for hesiod and conditionally include it.
This allows linkage with --no-undefined-version.

Differential Revision:	https://reviews.freebsd.org/D44184
2024-04-16 22:14:20 +01:00
Brooks Davis
7dd9070e44 libc: INTERPOS_SYS macro for interposed syscalls
This macro makes uses the __sys_<foo>_t typedefs from libsys.h to
greatly simplify calling functions in the interposing table.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44389
2024-04-16 17:48:08 +01:00
Brooks Davis
792081a730 lib{c,rt}: use libsys.h for __sys_* declerations
Use the genreated source of truth for system call declerations.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44388
2024-04-16 17:48:07 +01:00
Brooks Davis
1fd880742a libsys: add a libsys.h
This declares an API for libsys which currently consists of
__sys_<foo>() declarations for system call stubs and function pointer
typedefs of the form __sys_<foo>_t.  The vast majority of the
implementation resides in a generated _libsys.h which ensures that all
system call stub declarations match syscalls.master.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44387
2024-04-16 17:48:07 +01:00
Brooks Davis
418b4c2a80 acl_to_text: include sys/param.h for MAXLOGNAME
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44474
2024-04-15 21:35:41 +01:00
rilysh
f362c952a5 libc(bt_utils.c): fix "contiguous" spelling
From "contigous" to "contiguous".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119
2024-04-12 16:34:55 -06:00
rilysh
0fc1fb1491 libc(bt_seq.c): fix "uninitialized" spelling
From "unitialized" to "uninitialized".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119
2024-04-12 16:34:54 -06:00
rilysh
bdf5675a49 libc(xdr_reference.c): fix "referenced" spelling
From "referneced" to referenced".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119
2024-04-12 16:34:53 -06:00
rilysh
84970eab6a libc(xdr.c): fix "discriminated" spelling
From "descriminated" to "discriminated".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119
2024-04-12 16:34:52 -06:00
rilysh
9a7f7b2480 libc(inet_net_pton.c): fix "Fiery" spelling
From "Firey" to "Fiery".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119
2024-04-12 16:34:51 -06:00
rilysh
2f1da80f21 libc(localeconv.c): fix "appropriate" spelling
From "approprate" to "appropriate".

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1119
2024-04-12 16:34:51 -06:00
Henri Chataing
2b2cd97844 msun: Fix math error in comment explaining y reduction
x = k + y for some integer k and |y| < 1/2
exp2(x) = exp2(k + y) = exp2(k) * exp2(y)
which can be written as 2**k * exp2(y)

The original had x = 2**k + y, which is has an extra 2** in it which
isn't correct.

Confirmed by forumula 2 in Gal and Bachelis referenced in the comments
for the source of this method
	https://dl.acm.org/doi/pdf/10.1145/103147.103151

The actual code is correct.

Reviewed by: imp (who added s_exp2.c and wrote the commit message)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1127
2024-04-12 16:15:04 -06:00
Minsoo Choo
7c7299df76 libc: Remove support for pre-C99 C standards
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D43254
2024-04-12 12:05:09 -07:00
Collin Funk
22ddb5bb83 math: Add long double constant definitions
These constants are GNU libc extensions that are likely to be adopted
by the next POSIX revision [1]. The definitions can be verified in
a PARI-GP shell session:

* M_El: exp (1)
* M_LOG2El: log (exp (1)) / log (2)
* M_LOG10El: log (exp (1)) / log (10)
* M_LN2l: log (2)
* M_LN10l: log (10)
* M_PIl: Pi
* M_PI_2l: Pi / 2
* M_PI_4l: Pi / 4
* M_1_PIl: 1 / Pi
* M_2_PIl: 2 / Pi
* M_2_SQRTPIl: 2 / sqrt (Pi)
* M_SQRT2l: sqrt (2)
* M_SQRT1_2l: 1 / sqrt (2)

[1] https://austingroupbugs.net/view.php?id=828

Put these behind __BSD_VISIBLE || __XSI_VISIBLE >= 800 to future-proof
these changes. They shouldn't be defined at lower levels of XSI, but don't
have other XSI 800 stuff in place yet.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: imp, allanjude
Pull Request: https://github.com/freebsd/freebsd-src/pull/1121
2024-04-12 12:30:58 -06:00
Mark Murray
737799dfd3 Now that D44168 has been merged to stable/14, update the manpage
to correctly reflect history.
2024-04-12 16:33:54 +01:00
Dimitry Andric
442d351bd2 libllvm: add missed tlbgen headers and sources for BPF target
Noticed by:	vishwin
PR:		276104
MFC after:	1 month
2024-04-11 00:10:13 +02:00
Mark Johnston
56a26fc1af libvmmapi: Conditionalize compilation of some functions
Hide definitions of several functions that currently don't have
implementatations in the arm64 vmm port.  In particular, add a
WITH_VMMAPI_SNAPSHOT preprocessor variable that can be used to enable
compilation of save/restore functions, and conditionalize compilation of
some functions only used by amd64 bhyve.  If in the long term they
remain amd64-only, they can move to vmmapi_machdep.c, but for now it's
not clear to me that that's the right thing to do.

MFC after:	2 weeks
Sponsored by:	Innovate UK
2024-04-10 11:17:56 -04:00
Mark Johnston
11c79f9e35 arm64: Connect bhyve and libvmmapi to the build
Reviewed by:	corvink, andrew, jhb, emaste
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41742
2024-04-10 11:17:56 -04:00
Mark Johnston
e499fdcb66 libvmmapi: Zero out the structure passed to VM_GET_MEMSEG
Avoid assuming that the kernel zeros the name buffer, it does not do
this for zero-length segments.

MFC after:	2 weeks
Sponsored by:	Innovate UK
2024-04-10 11:17:56 -04:00
Mark Johnston
1855002ddf libvmmapi: Make vm_raise_msi() a common function
Currently, bhyve PCI emulation uses vm_lapic_msi() to raise an MSI in
the guest.  The arm64 port has a similar function, vm_raise_msi().
Add vm_raise_msi() on amd64 as well and have it simply call
vm_lapic_msi() so that bhyve can use a common, generically named
function.

Reviewed by:	corvink, andrew, jhb
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41752
2024-04-10 11:17:56 -04:00
Mark Johnston
5ec6c3007e libvmmapi: Add arm64 support
- Define wrappers for some MD ioctls.
- Provide a list of vmm device ioctls for cap_ioctl_limit().
- Disable use of the lowmem region.

Reviewed by:	corvink
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41005
2024-04-10 11:17:56 -04:00
Mark Johnston
7e0fa79412 libvmmapi: Make memory segment handling a bit more abstract
libvmmapi leaves a hole at [3GB, 4GB) in the guest physical address
space.  This hole is not used in the arm64 port, which maps everything
above 4GB.  This change makes the code a bit more general to accomodate
arm64 more naturally.  In particular:

- Remove vm_set_lowmem_limit(): it is unused and doesn't have
  well-defined constraints, e.g., nothing prevents a consumer from
  setting a lowmem limit above the highmem base.
- Define a constant for the highmem base and use that everywhere that
  the base is currently hard-coded.
- Make the lowmem limit a compile-time constant instead of a vmctx field.
- Store segment info in an array.
- Add vm_get_highmem_base(), for use in bhyve since the current value is
  hard-coded in some places.

No functional change intended.

Reviewed by:	corvink, jhb
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41004
2024-04-10 11:17:56 -04:00