Commit Graph

277115 Commits

Author SHA1 Message Date
Doug Rabson
6e4dbb7fef pkgbase: split kerberos binaries and libs
Summary:
This allows installing packages that depend on kerberos libraries
without pulling in all the binaries. It also moves libgssapi to runtime
to allow installing kerbereos libraries without adding a dependancy on
the large utilities package. It makes sense to put libgssapi in runtime
rather than kerberos-lib since this is a plugin layer which is intended
to support any GSS-API mechanisms, not just kerberos.

A good example of a package which uses kerberos libraries without
needing the kerberos utilities is sshd. This uses the kerberos GSS-API
libraries to implement its GSSAPIAuthentication option.

MFC after: 2 weeks

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D36028
2022-08-03 11:02:28 +01:00
Alexander V. Chernikov
08bb0873ca routing: fix panic for p2p interfaces after 800c68469b.
Reported by:	cy
MFC after:	1 month
2022-08-03 08:21:08 +00:00
Felix Palmen
e21dc161b3 Add me as ports committer, update mentor/mentee
This completes step 7 from Committer's Guide.

Approved by:		tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D36014
2022-08-03 09:39:59 +02:00
Mark Johnston
6237c3e74f ctfconvert: Actually use the asprintf() helper
Fixes:	1165fc9a52 ("ctfconvert: Give bitfield types names distinct from the base type")
2022-08-02 20:49:50 -04:00
Mark Johnston
1165fc9a52 ctfconvert: Give bitfield types names distinct from the base type
CTF integers have an explicit width and so can be used to represent
bitfields.  Bitfield types emitted by ctfconvert(1) share the name of
the base integer type, so a struct field with type "unsigned int : 15"
will have a type named "unsigned int".

To avoid ambiguity when looking up types by name, add a suffix to names
of bitfield types to distinguish them from the base type.  Then, if
ctfmerge happens to order bitfield types before the corresponding base
type in a CTF file, a name lookup will return the base type, which is
always going to be the desired behaviour.

PR:		265403
Reported by:	cy
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-08-02 20:32:17 -04:00
Mark Johnston
6a05f14381 dtrace tests: Rename some test type names to avoid a conflict
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-08-02 20:32:08 -04:00
Mark Johnston
e1700a36a9 dtrace tests: Override RLIMIT_CORE for a test which triggers a core dump
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-08-02 20:32:04 -04:00
Mark Johnston
852695416c domain: Use designated constants for timeout periods
No functional change intended.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-08-02 20:31:29 -04:00
Alfredo Dal'Ava Junior
8b57548e9a powerpcspe: make GEOM_LABEL kernel built-in
Make powerpspe kernel config in sync with other targets making
GEOM_LABEL built-in to allow use of labels when mounting partitions.

MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
2022-08-02 18:17:09 -03:00
Konstantin Belousov
f04f3afbf5 linuxkpi: more precise need_resched() definition
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:10 +03:00
Konstantin Belousov
4a662c9064 ktrace: change AST handler to require AST flag set
When it was inline it made sense to depend on the existing nested check
in KTRUSERRET() rather than adding a new td_flags flag.  However, since
we now have a TDA_KTRACE flag anyway, we might as well check it and
avoid the call.

Suggested by:	jhb
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:10 +03:00
Konstantin Belousov
c46771a7b7 kern/subr_trap.c: cleanup no longer needed headers
Also bump Foundation' copyright year

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:10 +03:00
Konstantin Belousov
cc1ec77231 Adjust g_waitidle() visibility and definition
Explicitly pass the struct thread argument.
Move the function prototype from sys/systm.h to geom/geom.h, we do not
need almost each kernel source to see the prototype, it is now used
only by kern/vfs_mountroot.c outside geom/geom_event.c, where the
function is defined.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:10 +03:00
Konstantin Belousov
4fced8642f sigfastblock_setpend() and fastblock_mask can be static now
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:10 +03:00
Konstantin Belousov
c6d31b8306 AST: rework
Make most AST handlers dynamically registered.  This allows to have
subsystem-specific handler source located in the subsystem files,
instead of making subr_trap.c aware of it.  For instance, signal
delivery code on return to userspace is now moved to kern_sig.c.

Also, it allows to have some handlers designated as the cleanup (kclear)
type, which are called both at AST and on thread/process exit.  For
instance, ast(), exit1(), and NFS server no longer need to be aware
about UFS softdep processing.

The dynamic registration also allows third-party modules to register AST
handlers if needed.  There is one caveat with loadable modules: the
code does not make any effort to ensure that the module is not unloaded
before all threads processed through AST handler in it.  In fact, this
is already present behavior for hwpmc.ko and ufs.ko.  I do not think it
is worth the efforts and the runtime overhead to try to fix it.

Reviewed by:	markj
Tested by:	emaste (arm64), pho
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:09 +03:00
Konstantin Belousov
4a5ec55af6 amd64: expicitly re-init td_frame in copy_thread()
Otherwise we are using whatever the value was left from the previous
thread run on kernel entry from usermode. Typically it would be the
desired value as is, but it is not guaranteed.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
2022-08-02 21:11:09 +03:00
Doug Moore
b3fd5464a9 rb_tree: resolve name clash
Rename 'tmp' to 'rb_update_tmp' in a macro to avoid a shadow variable panic.

Reported by:	imb@protected-networks.net
Fixes:	35557a0d91
2022-08-02 11:47:17 -05:00
Doug Moore
35557a0d91 rb_tree: update augmentation after element change
For an augmented rb_tree, allow a faster alternative to removing an
element from the tree, tweaking it slightly, and inserting it back
into the tree, knowing that its relative position in the tree is
unchanged. Instead, just change the element and invoke
RB_UPDATE_AUGMENT to fix the augmentation data for all the nodes in
the tree.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36010
2022-08-02 11:23:12 -05:00
Mike Karels
3dce6f96e5 tcp.4: Add missing sysctls, other fixes
Add some of the missing sysctls to tcp.4, using references to other
man pages where they exist.  Added sysctls include recvbuf and sendbuf
controls for automatic buffer sizing.  Updated recvspace and sendspace.

Add sysctl.8 to "see also" and intro to variable section.  Rename
"MIB Variables" section to "MIB (sysctl) Variables", as most people
will associate with sysctl.

Reviewed by:	manpages(pauamma), tuexen
Differential Revision: https://reviews.freebsd.org/D36004
2022-08-02 09:51:03 -05:00
Mike Karels
cf2ca148d9 inet.4 icmp.4 udp.4: Add missing sysctls, other fixes
Add missing sysctls to inet.4 and icmp.4, using references to ip.4
for variables and groups documented there.  Add sysctl.8 to "see also"
and intro to variable section.  Rename "MIB Variables" section to
"MIB (sysctl) Variables", as most people will associate with sysctl.
Revise history: the ICMP implementation was in 4.2BSD.

Reviewed by:	manpages(pauamma)
Differential Revision: https://reviews.freebsd.org/D36003
2022-08-02 09:50:52 -05:00
Mike Karels
637f317c6d IPv6: fix problem with duplicate port assignment with v4-mapped addrs
In in_pcb_lport_dest(), if an IPv6 socket does not match any other IPv6
socket using in6_pcblookup_local(), and if the socket can also connect
to IPv4 (the INP_IPV4 vflag is set), check for IPv4 matches as well.
Otherwise, we can allocate a port that is used by an IPv4 socket
(possibly one created from IPv6 via the same procedure), and then
connect() can fail with EADDRINUSE, when it could have succeeded if
the bound port was not in use.

PR:		265064
Submitted by:	firk at cantconnect.ru (with modifications)
Reviewed by:	bz, melifaro
Differential Revision: https://reviews.freebsd.org/D36012
2022-08-02 09:49:46 -05:00
Tom Jones
190c4c2499 diff3: Use ranges for new and old diffedits in ed scripts
This should make the output logic easier to read. No functional change
intended.

Sponsored by:	Klara, Inc.
2022-08-02 14:38:11 +01:00
Tom Jones
c0e6ccb12a diff3: Use ranges for the old and new diffedits in A scripts
This makes the output logic easier to read. No functional change
intended.

Sponsored by:	Klara, Inc.
2022-08-02 14:37:05 +01:00
Tom Jones
264a559ac8 diff3: Simplify startmark calculation in Ascript
Remove redundant calculation for startmark.

Sponsored by:	Klara, Inc.
2022-08-02 14:36:05 +01:00
Alexander V. Chernikov
426afc8f52 recv: bump manpage date after be1f485d7d.
MFC after:	1 month
2022-08-02 13:24:14 +00:00
Michael Tuexen
1abc27dd52 tcp rack: simplify computation of rsm start and end
While there, also fix the setting of the SYN related flag.

Reviewed by:		rrs
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D35862
2022-08-02 12:45:56 +02:00
Gordon Bergling
93b8510c36 find.1: Correct the markup
- ASCII is an acronym and there is no ascii(8) manual page
- Reference ascii(7) in the SEE ALSO section

Reported by:	karels
X-MFC with:	321dc6ee7e
2022-08-02 08:33:20 +02:00
Bjoern A. Zeeb
d1f5aa5633 wtap: cleanup module Makefile
Remove comments and change whitespace.
Cleanup the opt_* and -nclude opt_global.h bits to avoid various warnings.
2022-08-01 19:49:59 +00:00
En-Wei Wu
fb1526ca27 wtap(4): Fix bug in wtap_node_write() and wtap_vap_create()
Originally, wtap_node_write() gets the wrong softc by iterating V_inet and
gets the ifp by string comparison, then gets softc by ifp->if_softc.
However, ifp->if_softc will not point to the correct softc owned by
ieee80211com, and thus causes a kernel panic.
Fix it by assigning softc to cdev's si_drv1 in wtap_vap_create()
and get the softc directly via dev->si_drv1 in wtap_node_write().

The cdev created by wtap_vap_create() use the name of ieee80211com
rather than the vap's name. It will cause the second vap based on
the same ieee80211com as first vap fail to create a device node
because the device node is already exists. Fix it by assigning
vap->iv_ifp->if_xname to cdev's name.

Sponsored by:	Google, Inc. (GSoC 2022)
Reviewed by:	adrian, cy, bz
Differential Revision: https://reviews.freebsd.org/D35752
2022-08-01 19:40:13 +00:00
Tom Jones
2c4276aaa2 diff3: Use variables for old and new in A scripts
This makes the code easier to follow, no functional changes intended

Sponsored by:	Klara, Inc.
2022-08-01 14:54:20 +01:00
Tom Jones
ca53a8445a diff3: Replace literal marker with variable
Sponsored by:	Klara, Inc.
2022-08-01 14:53:53 +01:00
Tom Jones
85d92faf43 diff3: Fix indentation
Sponsored by:	Klara, Inc.
2022-08-01 14:14:25 +01:00
Hans Petter Selasky
9f35dbfdc6 uftdi(4): Add new USB ID.
PR:		265514
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-08-01 13:26:58 +02:00
Alexander V. Chernikov
ae6bfd12c8 routing: refactor private KPI
* Make nhgrp_get_nhops() return const struct weightened_nhop to
 indicate that the list is immutable
* Make nhgrp_get_group() return the actual group, instead of
 group+weight.

MFC after:	2 weeks
2022-08-01 10:02:12 +00:00
Alexander V. Chernikov
f28532a0f3 tests: fix unix_passfd_dgram:rights_creds_payload after be1f485d7d
The test was failing due to the assert on lack of MSG_TRUNC flag in the
 output flags of recvmsg().
The code passed MSG_TRUNC, along with sufficient-size buffer to hold the
 message to-be-received to the recvmsg(), and expected MSG_TRUNC to be
 returned as well.

This is not exactly correct as a) MSG_TRUNC was not even a supported
 recvmsg() flag before be1f485d7d and b) it violates POSIX, as
 POSIX states it should be set only "If a message is too long to fit in
 the supplied buffers,".
The test was working before as the kernel copied input flags to the
 output flags. be1f485d7d changed that behaviour to clear MSG_TRUNC
 if it was present on the input.

Fix the test by checking POSIX-defined behaviour.

Discussed with:	glebius
2022-08-01 09:20:45 +00:00
Alexander V. Chernikov
5c23343b8c routing: convert remnants of DPRINTF to FIB_CTL_LOG().
Convert the last remaining pieces of old-style debug messages
 to the new debugging framework.

Differential Revision: https://reviews.freebsd.org/D35994
MFC after:	2 weeks
2022-08-01 08:55:07 +00:00
Alexander V. Chernikov
800c68469b routing: add nhop(9) kpi.
Differential Revision: https://reviews.freebsd.org/D35985
MFC after:	1 month
2022-08-01 08:52:26 +00:00
Alexander V. Chernikov
29029b06a6 routing: remove info argument from add/change_route_nhop().
Currently, rt_addrinfo(info) serves as a main "transport" moving
 state between various functions inside the routing subsystem.
As all of the fields are filled in directly by the customers, it
 is problematic to maintain consistency, resulting in repeated checks
 inside many functions. Additionally, there are multiple ways of
 specifying the same value (RTAX_IFP vs rti_ifp / rti_ifa) and so on.
With the upcoming nhop(9) kpi it is possible to store all of the
 required state in the nexthops in the consistent fashion, reducing the
 need to use "info" in the KPI calls.
Finally, rt_addrinfo structure format was derived from the rtsock wire
 format, which is different from other kernel routing users or netlink.

This cleanup simplifies upcoming nhop(9) kpi and netlink introduction.

Reviewed by:	zlei.huang@gmail.com
Differential Revision: https://reviews.freebsd.org/D35972
MFC after:	2 weeks
2022-08-01 07:41:07 +00:00
Alexander V. Chernikov
97ffaff859 net: constantify radix.c functions
Mark dst/mask public API functions fields as const to clearly
 indicate that these parameters are not modified or stored in
 the datastructure.

Differential Revision: https://reviews.freebsd.org/D35971
MFC after:	2 weeks
2022-08-01 07:32:40 +00:00
Alexander V. Chernikov
2717e958df routing: move route expiration time to its nexthop
Expiration time is actually a path property, not a route property.
Move its storage to nexthop to simplify upcoming nhop(9) KPI changes
 and netlink introduction.

Differential Revision: https://reviews.freebsd.org/D35970
MFC after:	2 weeks
2022-08-01 07:26:53 +00:00
Kirk McKusick
d22531d572 Identify each UFS/FFS superblock integrity check as a warning or fatal error.
Identify each of the superblock validation checks as either a
warning or a fatal error. Any integrity check that can cause a
system hang or crash is marked as fatal. Those that may simply
lead to poor file layoutor other less good operating conditions
are marked as warning.

Normally both fatal and warning are treated as errors and prevent
the superblock from being loaded. A new flag, UFS_NOWARNFAIL, is
added. When passed to ffs_sbget() it will note warnings that it
finds, but will still proceed with loading the superblock. Note
that when UFS_NOWARNFAIL is used, it also includes UFS_NOHASHFAIL.

No legitimate superblocks should fail as a result of these changes.
2022-07-31 22:07:20 -07:00
Kirk McKusick
184e3118c1 Updates to UFS/FFS superblock integrity checks when reading a superblock.
Further updates based on analysis of the way the fields are used
in the various filesystem macros defined in fs.h.

Eliminate several checks for non-negative values where the fields
are checked for specific values. Since these specific values are
non-negative, if the value is a verified positive value then it
cannot be negative and such a check is redundant and unnecessary.

No legitimate superblocks should fail as a result of these changes.
2022-07-31 20:29:08 -07:00
Xin LI
0404b8c88f Deprecate minigzip(1) in preparation of removing it from base system.
Reviewed by:	emaste, pauamma
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D36000
2022-07-31 15:16:22 -07:00
Kirk McKusick
3e40d2cc61 Fix for 548045b a too aggressive UFS superblock integrity check.
Reported by: Jenkins
2022-07-31 07:49:50 -07:00
Gordon Bergling
321dc6ee7e find.1: Fix mandoc warnings and mention a useful manpage
- new sentence, new line
- unknown AT&T UNIX version: At v7
- no blank before trailing delimiter
- reference the ASCII(8) manual page

MFC after:	5 days
2022-07-31 16:38:10 +02:00
Gordon Bergling
b131efe3e5 sh.1: Fix a mandoc warning
- new sentence, new line

MFC after:	3 days
2022-07-31 16:23:27 +02:00
Gordon Bergling
2bf1b9984f uhsoctl.1: Fix the man page date
- STYLE: normalizing date format to: August 12, 2009

MFC after:	3 days
2022-07-31 12:27:10 +02:00
Gordon Bergling
98b610b506 uefi(8): Fix a typo in a source code comment
- s/intrrupt/interrupt/

MFC after:	3 days
2022-07-31 12:14:54 +02:00
Gordon Bergling
e24fd6d664 bluetooth(3): Fix a typo in a source code comment
- s/intrrupt/interrupt/

MFC after:	3 days
2022-07-31 12:13:13 +02:00
Gordon Bergling
37519e3ff3 qlnxe(4): Fix a typo in a source code comment
- s/pedning/pending/

MFC after:	3 days
2022-07-31 11:35:07 +02:00