Commit graph

289197 commits

Author SHA1 Message Date
Mark Johnston
36f0a34ca6 libthr: Force the thr_wake() symbol to be resolved during initialization
Otherwise the lock upgrade performed by rtld's load_filtees() can result
in infinite recursion, wherein:
1. _rtld_bind() acquires the bind read lock,
2. the source DSO's filtees haven't been loaded yet, so the lock upgrade
   in load_filtees() cause rtld to jump to _rtld_bind() and release the
   bind lock,
3. _thr_rtld_lock_release() calls _thr_ast(), which calls thr_wake(),
   which hasn't been resolved yet,
4. _rtld_bind() acquires the bind read lock in order to resolve
   thr_wake(),
5. ...

See the linked pull request for an instance of this problem arising with
libsys.  That particular instance is also worked around by commit
e7951d0b04.

Reported by:	brooks
Reviewed by:	kib
Pull Request:	https://github.com/freebsd/freebsd-src/pull/908
MFC after:	1 week
Sponsored by:	Innovate UK
2024-02-02 10:32:30 -05:00
Lexi Winter
4339f1e667 share/examples/IPv6/USAGE: remove
This document dates from the KAME days and, among other things,
references the 'prefix' command which has not existed for a long time.
Since IPv6 configuration is now documented in the Handbook, remove this
obsolete file.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1094
2024-02-02 08:30:18 -07:00
Graham Perrin
7edb49a115 freebsd-tips: freebsd-update fetch, then install
In end of life (EOL) warning cases: freebsd-update fetch install (the
two commands, combined) may fetch and patch, but not install.

Instead: run the two consecutively. Consistent with installation
information in /releases/ areas and with accepted
https://reviews.freebsd.org/D42722

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1096
2024-02-02 08:25:44 -07:00
Mark Johnston
e7951d0b04 rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls
In order to atomically upgrade the rtld bind lock, load_filtees() may
trigger a longjmp back to _rtld_bind() so that the binding can be done
with the write lock held.  However, the write lock is only needed when
filtee objects haven't already been loaded, so move the
lock_restart_for_upgrade() call to avoid unnecessary lock upgrades when
a filtee is defined.

Reviewed by:	kib
Tested by:	brooks
MFC after:	1 week
Sponsored by:	Innovate UK
2024-02-02 09:39:54 -05:00
Emmanuel Vadot
9bbe06b004 Revert "pkgbase: Create a FreeBSD-dtb package"
Somehow this doesn't work iwth make packages due to some kind of a race.
The package is first created correctly but later in the process it is
overwritten by a badly created empty package.
Revert in the mean time so we can have working pkgbase on arm/arm64

This reverts commit a5afd7920d.
2024-02-02 11:39:51 +01:00
Warner Losh
22d12caad6 checkstyle9.pl: Differentiate errors and warnings
Use ::error and ::warning as appropriate to give better meaning to the
messages.

Sponsored by:		Netflix
2024-02-02 00:24:32 -07:00
Warner Losh
ac9abe93e8 checkstyle9.pl: Another correction to github workflow
Remove extra space...

Sponsored by:		Netflix
2024-02-01 23:27:37 -07:00
Warner Losh
c2f5306c64 checkstyle9.pl: Correct github output
Change the : between file and line to a ,. This should fix this...

Sponsored by:		Netflix
2024-02-01 23:15:13 -07:00
Warner Losh
33326dd5f5 github: Enable github workflow output from checkstyle9.pl
Let's see if we can get the style issues flagged inline.

Sponsored by:		Netflix
2024-02-01 22:53:58 -07:00
Warner Losh
0949b237bb checkstyle9.pl: Add --github to output for github workflows
If you add "::error file=foo/bar.c:line=123:" before the error message,
it will appear inline.

Sponsored by:		Netflix
2024-02-01 22:50:19 -07:00
Philip Paeps
2723c7ffb7 contrib/tzdata: import tzdata 2024a
Changes: https://github.com/eggert/tz/blob/2024a/NEWS

MFC after:	3 days
2024-02-02 10:01:39 +08:00
Philip Paeps
76e31da7ab Import tzdata 2024a 2024-02-02 09:53:59 +08:00
Ed Maste
5f047ae0c7 pflowctl: add missing break to case 's'
CID:		1534009
Reported by:	Coverity Scan
Reviewed by:	kp
Differential Revision: https://reviews.freebsd.org/D43704
2024-02-01 17:03:12 -05:00
Gleb Smirnoff
861274c9f8 tests/netinet: add a demo of TCP implied connect
The TCP implied connect is an artifact left after T/TCP.  To my surprise
it still works, hence the existence of this test.  Please read this email
first:

https://lists.freebsd.org/pipermail/freebsd-net/2010-August/026311.html

An interesting fact that this test takes 220 - 240 milliseconds to
execute on my Threadripper PRO.  Flipping the '#if 0' to '#if 1' in the
test, thus bringing it back to normal connect(2), would speed the test up
a hundred times and I guess all this time is fork+exec of the test.
2024-02-01 13:43:36 -08:00
Gleb Smirnoff
702c481847 socket tests: improve error message 2024-02-01 13:37:26 -08:00
Gleb Smirnoff
5bdf8150cd unix/dgram: don't clear so_error in case of MSG_PEEK 2024-02-01 13:37:26 -08:00
Brooks Davis
d6d4183cc5 syscalls.master: Remove stray blank lines
No functional change.
2024-02-01 17:14:40 +00:00
Dag-Erling Smørgrav
bc2913d173 bintrans: Remove unused variable.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D43559
2024-02-01 14:10:45 +01:00
Dag-Erling Smørgrav
64028ac3ba bintrans: Add base64 to name list in manual page.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	0mp, pstef
Differential Revision:	https://reviews.freebsd.org/D43558
2024-02-01 14:10:41 +01:00
Dag-Erling Smørgrav
bce34cba07 bintrans: Fix uninitialized variable.
`prev` may be used uninitialized if `body` starts with a newline.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D43534
2024-02-01 14:10:37 +01:00
Dag-Erling Smørgrav
5cb28f7979 bintrans: Error out if writing to the output failed.
- Cover all code paths.
- When decoding, check all output files, not just the last one.
- A simple `ferror()` check is not enough as an error may later occur
  while flushing whatever remains in the output buffer.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D43532
2024-02-01 14:10:31 +01:00
Baptiste Daroussin
0f4e803733 kbdmap: fix typo preventing kbdmap to work under vt 2024-02-01 08:45:50 +01:00
Baptiste Daroussin
f14ea00c8f kbdmap: remove debug 2024-02-01 08:45:50 +01:00
Robert Wing
d9b3bba2f3 mpr: endianess fix for set/get dpm page0
Reviewed by:	oshogbo, imp
Sponsored by:   Klara, Inc.
Sponsored by:   Datazap
Differential Revision:	https://reviews.freebsd.org/D43505
2024-01-31 17:33:05 -09:00
Gregory Neil Shapiro
2c191ba6b0 Minor change to update these files so new freebsd*.cf files are
generated
2024-02-01 00:27:37 +00:00
Gregory Neil Shapiro
21c1f1deb6 Add a note about sendmail 8.18.1's stricter SMTP protocol enforcement 2024-02-01 00:21:15 +00:00
Gregory Neil Shapiro
1b6a5580c1 New sendmail 8.18.1 cf file 2024-02-01 00:13:58 +00:00
Gregory Neil Shapiro
19d4fb85bf Add new source file for sendmail 8.18.1 2024-02-01 00:04:53 +00:00
Gregory Neil Shapiro
d39bd2c138 Merge commit '850ef5ae11d69ea3381bd310f564f025fc8caea3'
Merge vendor sendmail 8.18.1 into HEAD
2024-01-31 23:53:48 +00:00
Gregory Neil Shapiro
850ef5ae11 Import sendmail 8.18.1 2024-01-31 23:37:30 +00:00
John Baldwin
1f1b2286fd pmap: Convert boolean_t to bool.
Reviewed by:	kib (older version)
Differential Revision:	https://reviews.freebsd.org/D39921
2024-01-31 14:48:26 -08:00
Brad Davis
009d3f66cb bsdinstall: separate out dist selection in prep for pkgbase support
No functional change intended.

Approved by:	asiciliano
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43621
2024-01-31 15:05:27 -07:00
Enji Cooper
d6251ebad5 periodic: fix a typo in a comment
No functional change.
2024-01-31 12:45:32 -08:00
Ed Maste
ed3563b0ac csu: add crtbrand.o dependency on sys/param.h
__FreeBSD_version is recorded in *crt1.o and crti.o via crtbrand.o.  Add
an explicit dependency to pick up __FreeBSD_version bumps.

Additional changes are required to fully plumb *crt1.o dependencies
through the build.

Reported by:	bapt
Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43417
2024-01-31 15:40:27 -05:00
Jessica Clarke
b771d5705f tools/build/make.py: Avoid Python 3.7+ subprocess.run capture_output
This is just a convenient alias for setting stdout and stderr to PIPE,
so substitute it for that to be compatible with Python 3.6.

Fixes:	69cfdc81ea ("tools/build/make.py: Keep bootstrapped bmake binary up-to-date")
2024-01-31 19:45:59 +00:00
Jung-uk Kim
81bee6d793 acpica: Fix build with ACPICA 20230331 and later
ACPICA is using flexible arrays since 20230331 and it broke aarch64
build.

--- acpi_iort.o ---
/usr/src/sys/arm64/acpica/acpi_iort.c:103:4: error: field 'data' with
variable sized type 'union (unnamed union at
/usr/src/sys/arm64/acpica/acpi_iort.c:98:2)' not at the end of a struct
or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
  103 |         } data;
      |           ^

Reported by:	bapt
Tested by:	bapt
2024-01-31 13:41:29 -05:00
Graham Perrin
712fd5ac91 intro.9: minor changes
A correction: 'and' -> 'an'. Plus, several tweaks for brevity or
clarity.

Reviewed by:	mhorne
MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/813
2024-01-31 14:31:32 -04:00
John Baldwin
18cb422356 timerfd: Move kern_timerfd_* prototypes to <sys/syscallsubr.h> 2024-01-31 09:30:12 -08:00
Bryan Venteicher
e6b8c1d780 virtio: Add more device IDs from the specification 2024-01-30 23:08:12 -06:00
Jung-uk Kim
07c64d7491 acpica: Import ACPICA 20230628
(cherry picked from commit ef3ba9d625)
2024-01-30 22:58:33 -05:00
Jung-uk Kim
722b16673c acpica: Import ACPICA 20230331
(cherry picked from commit 8e013e1e3b)
2024-01-30 22:16:36 -05:00
John Baldwin
a5a965d759 cxgbe tom: Enable ULP_MODE_TCPDDP on demand
Most ULP modes in cxgbe's TOE are enabled on the fly when a protocol
is needed (e.g. ULP_MODE_ISCSI is enabled by cxgbei when offloading a
connection using iSCSI, and ULP_MODE_TLS is enabled when RX TLS keys
are programmed for a TOE connection).  The one exception to this is
ULP_MODE_TCPDDP.

Currently the cxgbe driver enables ULP_MODE_TCPDDP when a TOE
connection is first created.  However, since DDP connections cannot be
converted to other connection types, this requires some special
handling in the driver.  For example, iSCSI daemons use the SO_NO_DDP
socket option to ensure TOE connections use ULP_MODE_NONE so they can
be converted to ULP_MODE_ISCSI.  Similarly, using TLS receive offload
(ULP_MODE_TLS) requires disabling TCP DDP for new connections by
default.

This commit changes cxgbe to instead switch a connection from
ULP_MODE_NONE to ULP_MODE_TCPDDP when a connection first attempts to
use TCP DDP via aio_read(2).  This permits connections to always start
as ULP_MODE_NONE and switch to a protocol-specific mode as needed.

Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D43670
2024-01-30 16:41:43 -08:00
John Baldwin
afaefb7737 cxgbe tom: Limit TOE connections to 2 reassembly islands always
Previously this was only limited on T6 cards to support switching from
ULP_MODE_NONE to ULP_MODE_TLS.  To support switching to
ULP_MODE_TCPDDP, enable this for all adapters.

Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D43669
2024-01-30 16:41:23 -08:00
John Baldwin
c3d4aea6c5 cxgbe: Add counters for POSIX async I/O requests handled by the driver
Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D43668
2024-01-30 16:40:31 -08:00
John Baldwin
14505c92bc syscallsubr.h: Sort kern_membarrier prototype alphabetically 2024-01-30 16:38:29 -08:00
Martin Matuska
fd45b686f9 zfs: merge openzfs/zfs@2e6b3c4d9
Notable upstream pull request merges:
 #15793 401c3563d libzfs: use zfs_strerror() in place of strerror()
 #15793 692f0daba libzfs: make userquota_propname_decode threadsafe
 #15798 0cbf13529 libnvpair.c: replace strstr() with strchr() for a single
                  character
 #15812 78e8c1f84 Remove list_size struct member from list implementation
 #15816 aeb33776f Update vdev devid and physpath if changed between imports
 #15818 8161b7327 Don't assert mg_initialized due to device addition race
 #15823 c3fd7a521 Update man pages to time(1) from time(2)
 #15825 884a48d99 zpool wait: print timestamp before the header

Obtained from:	OpenZFS
OpenZFS commit:	2e6b3c4d94
2024-01-31 00:06:04 +01:00
Konstantin Belousov
f76cb7bd08 sys/mount.h: use __inline
instead of plain inline, for C89

Reported by:	antoine
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-01-31 00:30:48 +02:00
Jessica Clarke
41eb4a4ca2 share/man: Add mandoc.db files to METALOG
Otherwise these are omitted for -DNO_ROOT builds, whether for disk
images or dist tarballs.

Reviewed by:	brooks, emaste
Differential Revision:	https://reviews.freebsd.org/D43676
2024-01-30 22:17:34 +00:00
Jessica Clarke
ce047ebf48 etc: Set DISTBASE during distribute for sub-makes
This is normally done by bsd.subdir.mk in its default distribute target,
but since etc overrides it we don't get that behaviour. Currently it's
not needed, but share/man's makedb (recursed into by etc's afterinstall)
will need it in the following commit. Technically this is only needed
for install, but do this for distribution too for completeness and
consistency.

Reviewed by:	brooks, emaste
Differential Revision:	https://reviews.freebsd.org/D43675
2024-01-30 22:17:28 +00:00
Igor Ostapenko
9d784da3a7 pf: uncomment counter asserts after mem leak fix
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D43657
2024-01-30 22:58:50 +01:00