Commit Graph

23665 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
a9a38dea37 libc: Remove prototype and documentation for tzsetwall().
PR:		269445
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D38481
2023-03-07 17:20:49 +00:00
Vitaliy Gusev
cff4823804 bhyve: Move libcasper dependecy to lib9p
libcasper(3) is not used in bhyve. So move dependency to the appropriate
place.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	vStack
Differential Revision:	https://reviews.freebsd.org/D38905
2023-03-07 11:09:22 -05:00
Vitaliy Gusev
755dcd5e49
libvmm: add missing ioctl's to vm_ioctl_cmds
Reviewed by:		corvink, markj
MFC after:		1 week
Sponsored by:		vStack
Differential Revision:	https://reviews.freebsd.org/D38866
2023-03-06 14:04:02 +01:00
Val Packett
c7a8502bdf open.2: describe O_RESOLVE_BENEATH errors correctly
The behavior is the same as in capability mode, it does not actually
return EINVAL for absolute lookups:

    openat(AT_FDCWD,"/tmp/test",O_RDONLY|O_DIRECTORY,00) = 3 (0x3)
    openat(3,"../../",O_RDONLY|0x800000,00)          ERR#93 'Capabilities insufficient'
    openat(3,"/etc/passwd",O_RDONLY|0x800000,00)     ERR#93 'Capabilities insufficient'

Fixes:          1f305be43 ("Document {O,AT}_RESOLVE_BENEATH...")
Reviewed by:    kib, pauamma (manpages), emaste
Sponsored by:   https://www.patreon.com/valpackett
Pull Request:	https://github.com/freebsd/freebsd-src/pull/680
Differential Revision: https://reviews.freebsd.org/D38675
2023-03-02 15:58:00 -05:00
Val Packett
939b24b0ab xlocale: garbage collect references to strtoq_l/strtouq_l
These were explicitly never implemented (see
lib/libc/locale/DESIGN.xlocale), but were referenced in the
manpage and the symbol map.

Fixes:          3c87aa1d3d ("Implement xlocale APIs from Darwin")
Reported by:    ld.lld 16 being --no-undefined-version by default
Reviewed by:    theraven, emaste
Sponsored by:   https://www.patreon.com/valpackett
Pull Request:	https://github.com/freebsd/freebsd-src/pull/679
Differential Revision: https://reviews.freebsd.org/D38408
2023-03-02 15:53:29 -05:00
Mark Johnston
d1d0ae97ca librss: Remove rss_socket_set_rss_bucket()
In preparation for the removal of the IP_RSS_LISTEN_BUCKET socket
option.

PR:		261398 (exp-run)
Reviewed by:	glebius
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38821
2023-02-28 15:57:11 -05:00
Ihor Antonov
6e9b4e3e0d man 3 daemon: remove double negation
Rephrase double negated sentences to improve readability
OpenBSD has done the same in the past to their man 3 daemon

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/671
2023-02-27 08:40:08 -07:00
Mark Johnston
b9199d152f librss: Remove rss_sock_set_bindmulti()
In preparation for the removal of the IP(V6)_BINDMULTI option.

PR:		261398 (exp-run)
Reviewed by:	glebius
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38574
2023-02-27 10:03:11 -05:00
Dimitry Andric
ab80f0b21f Ensure .inc files are regenerated when llvm/clang tblgen binaries change
When doing a fully incremental build (with WITHOUT_CLEAN enabled), from
a commit before llvm 15 was merged (3264f6b88f), to a commit after
that, a number of .inc files were not regenerated. This could lead to
unexpected compilation errors when these .inc files were included from
llvm-project sources, similar to:

  In file included from /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:8268:
  /usr/obj/usr/src/amd64.amd64/lib/clang/libclang/clang/Basic/arm_mve_builtin_cg.inc:279:18: error: no matching constructor for initialization of 'clang::CodeGen::Address'
    Address Val2 = Address(Val1, CharUnits::fromQuantity(2));
                   ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Work around this by making the .inc files dependent on the tblgen binary
used for generating them. E.g., we can relatively safely assume that if
the binary gets updated, the .inc files must also be updated. (Although
this is not 100% optimal, the gain by complicating things even more is
probaby not worth the effort.)

MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D38770
2023-02-26 15:56:07 +01:00
Gordon Bergling
211ceb62e8 inet6_opt_init.3: Some enhancements
- Be consistent with RFC references, so add a space after 'RFC'
- Add a LIBRARY section
- Use standard integer types in the SYNOPSIS section

Obtained from:	DragonflyBSD
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D27548
2023-02-25 14:11:27 +01:00
John-Mark Gurney
eb81dd8404
make cross build from arm64 work..
Reviewed by:	dim, imp, emaste
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D38762
2023-02-24 14:24:19 -08:00
Paul Floyd
2c709ee70a libc: handle zero alignment in memalign()
For compatibility with glibc. The previous code would trigger a division
by zero in roundup() and terminate.  Instead, just pass through to
malloc() for align == 0.

PR:		269688
Reviewed by:	imp, mjg
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/655
2023-02-24 13:19:06 -05:00
Kyle Evans
4e696aff69 iconvlist(3): fix count argument type
count is just an unsigned int, not a pointer.

Sponsored by:	Klara, Inc.
2023-02-23 15:22:12 -06:00
Warner Losh
2b46091032 efivar: Really look for labels for the provider with right efimedia
The prior code mistakently thought that the g_consumer that hung off the
provider we found were the right thing to use to find all the glabel
aliases for this node. However, the only way to find that is to iterate
through all the geoms that belong to the glabel geom class, looking for
those geoms with the same name as the provider with the right efimedia.
Do this in a way that caches glabel class, and allows for it to be
absent. Tighten the filter for mounted filesystems to only look
for the ones that are mounted on /dev/.. since the rest of the code
assumes that.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		corvink, asomers
Differential Revision:	https://reviews.freebsd.org/D38619
2023-02-16 08:54:39 -07:00
Warner Losh
57d5ca4eeb efivar: support device paths as well as mounted paths in path_to_dp
In path_to_dp, allow passing in either the actual device path "eg
/dev/foo/bar" or the path where the device is mounted (say
/mnt/baz/bing). In the former case we'll assume the path within the
device is nothing (the relpath). In the latter, we'll take from the
mount point on down as the relpath.

Sponsored by:		Netflix
Reviewed by:		corvink, manu, asomers
Differential Revision:	https://reviews.freebsd.org/D38616
2023-02-16 08:54:39 -07:00
Warner Losh
49fd6affdb efivar: Allow NULL paths in build_dp
Allow there to be NULL paths in buildp. This lets us return the device
path to the partition, as well as to files on the partition.

Sponsored by:		Netflix
Reviewed by:		corvink, manu, asomers
Differential Revision:	https://reviews.freebsd.org/D38615
2023-02-16 08:54:39 -07:00
Warner Losh
ccf2121d59 efivar: Try harder to find label's efimedia
If there's no efimedia attribute on the provider, and the provider's a
glabel, then find the 'parent' geom. In this case, the provider's name
is label-type/name, but the geom's label will that of the underlying
device (eg ada0p1). If it is, recurisvely call find_geom_efimedia with
the geom's name, which shuold have the efimedia attribute.

Sponsored by:		Netflix
Reviewed by:		corvink, manu, asomers
Differential Revision:	https://reviews.freebsd.org/D38614
2023-02-16 08:54:39 -07:00
Warner Losh
942815c548 libefivar: Add note about extra compiler flags
Add a note about why we need these extra compiler flags to suppress
warnings. EDK2 upstream code is being used verbatim and as of the last
update these issuse persist, but are benign.

Sponsored by:		Netflix
Reviewed by:		asomers
Differential Revision:	https://reviews.freebsd.org/D38613
2023-02-15 16:03:54 -07:00
Warner Losh
5f044c4e05 profil(2): profil(II) was in the v3 sources
profil(II) is in the scanned 3rd edition manual that we have. We don't
have the 3rd edition sources, nor do we have the 4th edition souces. We
have a mostly complete (missing pipes) 4th edition C rewrite where
profil system call number is reserved, but it's not implemented (it's in
the manx section for things that apeared to have been in 3rd edition but
weren't yet part of the reimplemented 4th edition). The 5th edition
sources we have do have it, however. For other items that have appeared
in earlier manuals, we've added the simple verbage to the manual and
relegated the rest of the data for that file to the commit message.
2023-02-15 12:44:32 -07:00
Dmitry Chagin
cbc32e4c5e cpuset: Add compat shim to the sched_affinity functions
To allow to run a newer world on a pre-1400079 kernel a compat shims to
the sched_affinity functions has beed added.

Reported by:		antoine
Tested by:		antoine
Reviewed by:		kib
Differential revision:	https://reviews.freebsd.org/D38555
MFC after:		3 days
2023-02-15 12:23:15 +03:00
Konstantin Belousov
5942b4b6fd sys/param.h: Add _WANT_P_OSREL
Use it instead of defining IN_RTLD by base sources that want P_OSREL_
defines in userspace, but are not rtld.
This allows to remove abuse of IN_RTLD from userspace.

Reviewed by:	dchagin, markj, imp
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38585
2023-02-15 02:43:18 +02:00
Warner Losh
ae902a5be9 libc: Simplify soft-float on 32-bit arm
Simplify the tests for 32-bit arm soft float support. For the files
included only on arm, drop the test entirely. For others, test
MACHINE_CPUARCH against arm.

No functional change intended. File lists appear the same before / after
the change.

Sponsored by:		Netflix
Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D38582
2023-02-14 09:53:08 -07:00
Dmitry Chagin
c8a79231a5 linux(4): Rename linux_timer.h to linux_time.h
To avoid confusing people, rename linux_timer.h to linux_time.h,
as linux_timer.c is the implementation of timer syscalls only,
while linux_time.c contains implementation of all stuff declared
in linux_time.h.

MFC after:		2 weeks
2023-02-14 17:46:33 +03:00
Warner Losh
9768746ba8 bearssl: Suppress warnings from functions that have no args
clag15 is much pickier than others, so suppress the warning until
upstream can be updated.

Sponsored by:		Netflix
2023-02-13 08:19:40 -07:00
Warner Losh
09c4c1e836 prof: Remove sysctl docs for sysctls that are now gone.
GRPOF based kernel profiling was removed in aa3ea612be. However, the
docs for the sysctls were not. Remove them belatedly.

Sponsored by:		Netflix
2023-02-13 08:18:50 -07:00
Kyle Evans
f123c6c425 libc: popen: slightly simplify cloexec logic
No need to check the mode again here; we know that `iop` wraps the
correct fd.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D37987
2023-02-13 00:33:57 -06:00
Kyle Evans
d646513e57 getopt_long(3): note an inconsistency with getopt(3) in BUGS
getopt_long(3) will not allow an `optind` setting of 0 to be bug-for-bug
compatible with the GNU implementation, as some software does rely on
it.  Document it as a BUG, since it affects previous declarations of
compatibility with getopt(3).

Reviewed by:	pauamma (markup)
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37867
2023-02-10 23:32:50 -06:00
Kyle Evans
f44df7959a libc: ssp: remove some GCC 4.2 remnants
With GCC 4.2 out of the tree for a while now and no sign of it
returning, we don't really need to support older versions that don't
allow us to specify a ctor priority anymore.

Noticed by:	mjg
2023-02-09 22:11:54 -06:00
Dag-Erling Smørgrav
71e0c8906e tzcode: Resurrect tzsetwall(3) with a deprecation warning.
This function has been around since 4.4BSD but was dropped upstream in 2020.  This went unnoticed when tzcode was updated.  Bring it back, but prepare for removing it before 14.0 is released.

PR:		269445
MFC after:	3 days
Reported by:	val@packett.cool
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38445
2023-02-09 19:35:34 +01:00
Dimitry Andric
50d7464c3f Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:25 +01:00
Dimitry Andric
f3fd488f1e Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:19 +01:00
Dimitry Andric
6246ae0b85 Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:09 +01:00
Dimitry Andric
a4a491e223 Merge llvm-project release/15.x llvmorg-15.0.0-9-g1c73596d3454
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-9-g1c73596d3454.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:02 +01:00
Dimitry Andric
61cfbce334 Merge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-rc2-40-gfbd2950d8d0d.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:56 +01:00
Dimitry Andric
972a253a57 Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17826-g1f8ae9d7e7e4, the last commit before
the upstream release/16.x branch was created.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:48 +01:00
Dimitry Andric
fcaf7f8644 Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17485-ga3e38b4a206b.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:38 +01:00
Dimitry Andric
753f127f3a Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:03:59 +01:00
Dimitry Andric
81ad626541 Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:02:26 +01:00
Mariusz Zaborski
5fff09660e geli: split the initalization of HMAC
GELI allows to read a user key from a standard input.
However if user initialize multiple providers at once, the standard
input will be empty for the second and next providers.
This caused GELI to encrypt a master key with an empty key file.

This commits initialize the HMAC with the key file, and then reuse the
finalized structure to generate different encryption keys for different
providers.

Reported by:	Nathan Dorfman
Tested by:	philip
Security:	FreeBSD-SA-23:01.geli
Security:	CVE-2023-0751
2023-02-08 10:01:58 -08:00
Warner Losh
8c784bb8cf lua: Update to 5.4.4
Merge commit '755d9301ca89f02956fd17858b9d4d821ab5c972' from the
vendor branch. This updates us from lua 5.4.2 to 5.4.4.

In addition, it switches around how we flavor liblua for the boot loader
and flua. This is done to reduce diffs with upstream and make it easier
to import new versions (the current method has too many conflicts to
resolve by hand): we include luaconf.local.h from luaconf.h (the only
change to this file is now that #include at the end). We then define
what we need to: for flua (which does very little) and one for stand
(which creates the new FLOAT type out of int64).

Sponsored by:		Netflix
2023-02-08 10:33:26 -07:00
Emmanuel Vadot
c9621d45a1 pkgbase: Put libpanelw and libform in FreeBSD-clibs
Put them with the others ncurses libs.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38227
2023-02-08 08:49:59 +01:00
Emmanuel Vadot
4c9c296e63 pkgbase: Create a FreeBSD-netmap package
This unbloat FreeBSD-utilities a bit and not everyone uses
valectl which is the only in-tree consumer of libnetmap

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38225
2023-02-08 08:49:28 +01:00
Emmanuel Vadot
1af3908ce6 pkgbase: Create a FreeBSD-elftoolchain package
It contain all the binaries and libs from the elftoolchain contrib
project except for libelf which is used everywhere.
All of those tools are never used by the average user.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38224
2023-02-08 08:49:12 +01:00
Emmanuel Vadot
9c1720e59a pkgbase: Create a FreeBSD-smbutils package
And put smb related programs and lib in it.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38228
2023-02-08 08:48:28 +01:00
Kyle Evans
d4ecf62f12 libc: base64: trim some bogus trailing whitespace
No functional change, just a style fix.

Sponsored by:	Klara, Inc.
2023-02-08 00:39:25 -06:00
Mark Johnston
7bb441c866 libdwarf: Add some constants from DWARF 5
This is not exhaustive - DWARF 5 has some new enumeration types not
implemented here - but I think I caught all the ones that are extended
in DWARF 5, plus the new compilation unit type (DW_UT_*), needed when
parsing .debug_info headers.

These were useful when extending libdwarf/ctfconvert/readelf to handle
DWARF generated by gcc 12, which is version 5 by default.

Reviewed by:	emaste
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38273
2023-02-07 15:10:24 -05:00
Dag-Erling Smørgrav
2768d70567 libmd / md5: Add SHA-512/224.
While there, remove .Tn from man pages.

Also remove an obsolete comment about the 80386.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, allanjude
Differential Revision:	https://reviews.freebsd.org/D38373
2023-02-06 18:03:04 +01:00
Alfonso
70164d957e Fix truncation when ssize_t is larger than MAX_INT
Casting to int truncates size on some platforms, resulting swab not
copying all the data. Cast len to size_t to avoid right shifting a
signed value: we know here it's > 0, so we can safely cast it w/o losing
precision.

In addition, be more careful with signedness of char pointers and
temporaries. Downgrade tmp from unsigned long to unsigned char since
we're only reading and writing characters.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/516
2023-02-04 21:14:14 -07:00
Kornel Dulęba
6926e2699a arm: Add support for using VFP in kernel
Add missing logic to allow in-kernel VFP usage for ARMv7 NEON.
The implementation is strongly based on arm64 code.
It introduces a family of fpu_kern_* functions to enable the usage
of VFP instructions in kernel.
Apart from that the existing armv7 VFP logic was modified,
taking into account that the state of the VFP registers can now
be modified in the kernel.

Co-developed by: Wojciech Macek <wma@FreeBSD.org>
Sponsored by:	Stormshield
Obtained from:	Semihalf
Reviewed by:	andrew
Differential Revision: https://reviews.freebsd.org/D37419
2023-02-04 20:21:43 +01:00
Tom Hukins
6f52f85048 Refer to a related manpage
Add reference to the lua jail man page.

Reviewed by: imp, Mina Galic
Pull Request: https://github.com/freebsd/freebsd-src/pull/642
2023-02-04 08:22:28 -07:00