Commit graph

21616 commits

Author SHA1 Message Date
Florian Walpen
30c3a5f248 Add idle priority scheduling privilege group to MAC/priority
(cherry picked from commit a9545eede4)
2021-12-19 04:42:51 +02:00
Florian Walpen
984b9d89f8 MAC/priority module for realtime privilege group
PR:	239125

(cherry picked from commit bf2fa8d9d1)
2021-12-19 04:42:51 +02:00
Dimitry Andric
606b6ce485 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 20d425842a)
2021-12-17 19:32:40 +01:00
Andrew Turner
c71bfb1013 Revert "Switch to Arm Optimized Routines for mem* & str*"
The Arm Optimized Routines don't exist in 13. I missed this as my
builds succeeded, likely due to stale depends files.

This reverts commit bfd10d146b.
2021-12-14 12:34:09 +00:00
Andrew Turner
b2969efae8 Use a builtin where possible in msun
Some of the functions in msun can be implemented using a compiler
builtin function to generate a small number of instructions. Implement
this support in fma, fmax, fmin, and sqrt on arm64.

Care must be taken as the builtin can be implemented as a function
call on some architectures that lack direct support. In these cases
we need to use the original code path.

As we don't set errno on failure build with -fno-math-errno so the
toolchain doesn't convert a builtin into a function call when it
detects a failure, e.g. gcc will add a call to sqrt when the input
is negative leading to an infinite loop.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32801

(cherry picked from commit b2e843161d)
2021-12-14 10:58:01 +00:00
Andrew Turner
bfd10d146b Switch to Arm Optimized Routines for mem* & str*
These are the updated version of the older Cortex Strings Library we
previously used. The Arm Optimized Routines also support CPU features
that are currently in development on FreeBSD, e.g. Branch Target
Identification (BTI). Rather than add BTI support to the old code it's
easier to just use the maintained version.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32774

(cherry picked from commit 2e8ff4d1d5)
2021-12-14 10:58:01 +00:00
Dimitry Andric
8918a2875e Apply only the libadd/libnames part of dbf05458e3
Add libz to the dependencies for libdwarf. Otherwise, building older
branches on recent -CURRENT might fail in the cross-tools stage with:

ld: error: undefined symbol: uncompress
>>> referenced by libdwarf_elf_init.c:233 (/usr/src/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c:233)
>>>               libdwarf_elf_init.o:(_dwarf_elf_init) in archive /usr/lib/libdwarf.a

Direct commit to stable/13, since dbf05458e3 has other libdwarf
changes to support compressed ELF sections, which are more intrusive.
2021-12-13 22:23:44 +01:00
Mark Johnston
a5659943e3 libc: Add pdfork to the list of interposed system calls
Otherwise the asm stub is used and libthr interposition does not work.

Reviewed by:	kib
Fixes:		21f749da82 ("libthr: wrap pdfork(2), same as fork(2).")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit cbdec8db18)
2021-12-13 08:26:58 -05:00
Mateusz Piotrowski
190c88c458 gmultipath.8: Fix a typo
It's Word Wide Port Name, not World Word Port Name.

MFC after:	3 days

(cherry picked from commit 58d60030ff)
2021-12-13 02:10:26 +01:00
Konstantin Belousov
ba6f5ed72e fcntl(2): be more precise about third arg type
(cherry picked from commit 97722455cc)
2021-12-13 02:58:22 +02:00
Konstantin Belousov
9258e9e3a8 fcntl(2): add F_KINFO operation
(cherry picked from commit 794d3e8e63)
2021-12-13 02:58:22 +02:00
Ed Maste
bf4a70bb40 libc: Use musl's optimized strchr and strchrnul
Parentheses added to HASZERO macro to avoid a GCC warning, and formatted
with clang-format as we have adopted these and don't consider them
'contrib' code.

Obtained from:	musl (snapshot at commit 4d0a82170a25)
Reviewed by:	kib (libc integration), mjg (both earlier)
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17630

(cherry picked from commit 7f72497ef7)
2021-12-12 17:32:33 -05:00
Cy Schubert
26ede19e22 libradius: fix no SSL build
int alen is only used with SSL.

(cherry picked from commit 48b11217bf)

libradius: fix WITHOUT_OPENSSL build

int alen is used only with SSL.

Reported by:	Michael Dexter, Build Option Survey
MFC after:	3 days
Fixes:		8d5c781306 ("libradius: Fix input validation bugs")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit a901f2af58)
2021-12-12 17:17:00 -05:00
Mike Karels
1ab4b70db5 res_init: remove unused inet_makeaddr with IN_LOOPBACKNET
Remove code that is ifdefed out on USELOOPBACK, which uses historical
class.  No functional change intended.

(cherry picked from commit 0bf7f99b2a)
2021-12-10 10:26:14 -06:00
Mike Karels
d98a0edb26 man pages: deprecate Internet Class A/B/C
Mark functions inet_netof(), inet_lnaof(), and inet_makeaddr() as
deprecated, as they assume Class A/B/C.  inet_makeaddr() mostly works
when networks are a multiple of 8 bits, but warn for anything other
than historical classes.  Reduce other mentions of network classes.

(cherry picked from commit 12bd931d8c)
2021-12-10 10:25:45 -06:00
Michael Tuexen
4bf3c8ea0d libc sctp: improve conformance of sctp_getpaddrs()
When there is no association, don't return -1 and indicate ENOENT,
but return 0 instead. This is specified in RFC 6458.

PR:		260117
MFC after:	1 week

(cherry picked from commit 83a103ec42)
2021-12-10 11:39:15 +01:00
Michael Tuexen
6a5487e34b libc sctp: fix sctp_getladdrs() when reporting no addresses
Section 9.5 of RFC 6458 (SCTP Socket API) requires that
sctp_getladdrs() returns 0 in case the socket is unbound. This
is the cause of reporting 0 addresses. So don't indicate an
error, just report this case as required.

PR:		260117
MFC after:	1 week

(cherry picked from commit 071966e874)
2021-12-10 11:38:31 +01:00
Michael Tuexen
4749d55fb3 libc sctp: improve error reporting of sctp_getladdrs()
Do not hide errno from getsockopt() called internally.

MFC after:	1 week

(cherry picked from commit 6e9309bd3b)
2021-12-10 11:26:31 +01:00
Michael Tuexen
30e6da1149 libc sctp: fix sctp_getladdrs() for 64-bit BE platforms
When calling getsockopt() with SCTP_GET_LOCAL_ADDR_SIZE, use a
pointer to a 32-bit variable, since this is what the kernel
expects.
While there, do some cleanups.

MFC after:	1 week

(cherry picked from commit dabd8bf914)
2021-12-10 11:25:21 +01:00
Konstantin Belousov
ed43c7ac0a procstat_getfiles_sysctl: do not require non-null ki_fd
PR:	260174

(cherry picked from commit 7a9423d6f3)
2021-12-09 02:23:29 +02:00
Konstantin Belousov
0ab5452ca3 Style
(cherry picked from commit 0ea3e4a27b)
2021-12-09 02:23:28 +02:00
Konstantin Belousov
bc663f746e Document posix_spawn_file_actions_addclosefrom_np(3)
(cherry picked from commit 78963d796d)
2021-12-07 02:25:55 +02:00
Konstantin Belousov
54cdfdf12a posix_spawn: add closefrom non-portable action
(cherry picked from commit a18ddf7757)
2021-12-07 02:25:55 +02:00
Konstantin Belousov
ef39284e94 Document posix_spawn_file_actions_addchdir_np(3)
(cherry picked from commit bd44dce5b3)
2021-12-07 02:25:55 +02:00
Konstantin Belousov
c7b624979a posix_spawn: add chdir-related non-portable actions
(cherry picked from commit 25cda42a49)
2021-12-07 02:25:53 +02:00
Konstantin Belousov
4529cb3db2 posix_spawn(3), posix_spawn_file_actions_addopen(3): use .Fo/.Fc
(cherry picked from commit 8ed1e4a5c1)
2021-12-07 02:25:01 +02:00
Konstantin Belousov
94f97c0424 posix_spawn: style, use return ()
(cherry picked from commit b239cc204a)
2021-12-07 02:25:01 +02:00
Konstantin Belousov
198932fd77 posix_spawn.c: format fae_action anon enum more stylish
(cherry picked from commit adbaf1b443)
2021-12-07 02:25:01 +02:00
Dimitry Andric
7224d4125a Merge llvm-project 13.0.0 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-0-gd7b669b3a303, aka 13.0.0 release.

PR:		258209

(cherry picked from commit 28a41182c0)
2021-12-06 17:30:07 +01:00
Dimitry Andric
37ce25d2c0 llvm-readobj: Add missed source file
In some configurations (e.g. powerpc64) the llvm-readobj tool also needs
contrib/llvm-project/llvm/BinaryFormat/MsgPackWriter.cpp, so add it to
libllvm.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
Fixes:		1b85b68da0

(cherry picked from commit 79239b5b47)
2021-12-06 17:30:07 +01:00
Cameron Katri
e52de8a915 llvm-readobj: Attach to buildsystem
Also install it as readelf when MK_LLVM_BINUTILS is set.

Reviewed By:	dim, arichardson
Differential Revision: https://reviews.freebsd.org/D32058

(cherry picked from commit 1b85b68da0)
2021-12-06 17:30:05 +01:00
Dimitry Andric
18baa99126 Merge llvm-project release/13.x llvmorg-13.0.0-rc3-8-g08642a395f23
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc3-8-g08642a395f23.

PR:		258209

(cherry picked from commit 8c6f6c0c80)
2021-12-06 17:30:05 +01:00
Dimitry Andric
c77c1b5c48 Merge llvm-project release/13.x llvmorg-13.0.0-rc2-43-gf56129fe78d5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc2-43-gf56129fe78d5.

PR:		258209

(cherry picked from commit 69ade1e033)
2021-12-06 17:30:04 +01:00
Dimitry Andric
2e2f8eac75 Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc1-97-g23ba3732246a.

PR:		258209

(cherry picked from commit 6e75b2fbf9)
2021-12-06 17:30:03 +01:00
Dimitry Andric
5f7ddb1456 Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR:		258209

(cherry picked from commit fe6060f10f)
2021-12-06 17:30:02 +01:00
Mark Johnston
d0bcdb3e10 libelf: Link gelf_getchdr.3 to the build
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 9ff084f0fa)
2021-12-06 09:04:03 -05:00
Konstantin Belousov
f457e04994 citrus_prop.c: do not ignore sign
(cherry picked from commit 181751a8b6)
2021-12-06 02:23:45 +02:00
Konstantin Belousov
c20c7a3122 libc/tests/stdlib/dynthr_mod/dynthr_mod.c: mark dummy as used
(cherry picked from commit a64a3b7988)
2021-12-06 02:23:45 +02:00
Konstantin Belousov
f19aa58ee6 libc/stdio/vfwscanf.c::convert_wstring(): wcp0 is write-only
(cherry picked from commit c8a4a49d58)
2021-12-06 02:23:45 +02:00
Konstantin Belousov
f894975dda libc/x86/__vdso_gettc.c::tsc_selector_idx(): cpu_id is calculated but not used
(cherry picked from commit 4b6f4db341)
2021-12-06 02:23:45 +02:00
Konstantin Belousov
f4669d7064 acl_delete_entry(): remove write-only variable
(cherry picked from commit 959c7ab51e)
2021-12-06 02:23:45 +02:00
Konstantin Belousov
065166c76a setproctitle_internal(): remove kbuf local, it is write-only
(cherry picked from commit 412fd7a34c)
2021-12-06 02:23:45 +02:00
Konstantin Belousov
5298739f2d libc/rpc/getrpcent.c: Mark write-only variables as unused
(cherry picked from commit 16b238b740)
2021-12-06 02:23:44 +02:00
Konstantin Belousov
9cb9ecafac libc/net/nscachedcli.c: remove write-only variables
(cherry picked from commit 0e00befcaf)
2021-12-06 02:23:44 +02:00
Konstantin Belousov
9e8f0f6934 libc/net/getservent.c: Mark write-only variables as unused
(cherry picked from commit 346eaa41f8)
2021-12-06 02:23:44 +02:00
Konstantin Belousov
75f8750524 libc/net/getprotoent.c: Mark write-only variables as unused
(cherry picked from commit f6d403743c)
2021-12-06 02:23:44 +02:00
Konstantin Belousov
4914a141fb libc/net/getnetnamadr.c: Mark write-only variables as unused
(cherry picked from commit 1c4f305d21)
2021-12-06 02:23:44 +02:00
Konstantin Belousov
20e0f16d35 libc/net/gethostnamadr.c: mark write-only variables as __unused
(cherry picked from commit 024547c9bd)
2021-12-06 02:23:44 +02:00
Konstantin Belousov
0c80653b16 libc/gen/getpwent.c: plug warnings about write-only variables
(cherry picked from commit 701473ef94)
2021-12-06 02:23:44 +02:00
Konstantin Belousov
81baf3493b libc/gen/getgrent.c: plug warnings about write-only variables
(cherry picked from commit 075fa5a9a8)
2021-12-06 02:23:44 +02:00