Commit Graph

21698 Commits

Author SHA1 Message Date
Richard Scheffenegger
4012ef7754 tcp: Functional implementation of Accurate ECN
The AccECN handshake and TCP header flags are supported,
no support yet for the AccECN option. This minimalistic
implementation is sufficient to support DCTCP while
dramatically cutting the number of ACKs, and provide ECN
response from the receiver to the CC modules.

Reviewed By:		#transport, #manpages, rrs, pauamma
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D21011
2022-08-31 15:05:53 +02:00
Gleb Smirnoff
f1fb051716 divert(4): maintain own cb database and stop using inpcb KPI
Here go cons of using inpcb for divert:
- divert(4) uses only 16 bits (local port) out of struct inpcb,
  which is 424 bytes today.
- The inpcb KPI isn't able to provide hashing for divert(4),
  thus it uses global inpcb list for lookups.
- divert(4) uses INET-specific part of the KPI, making INET
  a requirement for IPDIVERT.

Maintain our own very simple hash lookup database instead.  It
has mutex protection for write and epoch protection for lookups.
Since now so->so_pcb no longer points to struct inpcb, don't
initialize protosw methods to methods that belong to PF_INET.
Also, drop support for setting options on a divert socket.  My
review of software in base and ports confirms that this has no
use and unlikely worked before.

Differential revision:	https://reviews.freebsd.org/D36382
2022-08-30 15:09:21 -07:00
Gleb Smirnoff
8624f4347e divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4.  It is a socket to
intercept packets from ipfw(4) to userland and re-inject them
back.  It can divert and re-inject IPv4 and IPv6 packets today,
but potentially it is not limited to these two protocols.  The
IPPROTO_DIVERT does not belong to known IP protocols, it
doesn't even fit into u_char.  I guess, the implementation of
divert(4) was done the way it is done basically because it was
easier to do it this way, back when protocols for sockets were
intertwined with IP protocols and domains were statically
compiled in.

Moving divert(4) out of inetsw accomplished two important things:

1) IPDIVERT is getting much closer to be not dependent on INET.
   This will be finalized in following changes.
2) Now divert socket no longer aliases with raw IPv4 socket.
   Domain/proto selection code won't need a hack for SOCK_RAW and
   multiple entries in inetsw implementing different flavors of
   raw socket can merge into one without requirement of raw IPv4
   being the last member of dom_protosw.

Differential revision:	https://reviews.freebsd.org/D36379
2022-08-30 15:09:21 -07:00
Eugene Grosbein
160a2f2cdd rc.conf(5): add <service>_umask to run the service using this value
None of tools working with login classes change umask(1)
and we had no ways to specify non-default umask for a service
not touching its startup script. This change makes in possible.

Some file-sharing services that create new files may benefit from it.

Differential:	https://reviews.freebsd.org/D36309
MFC-after:	3 days
2022-08-28 12:48:58 +07:00
Brooks Davis
c2e1544f59 m_get3: add an MLINK for the manpage
Reviewed by:	kp
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D36319
2022-08-23 22:34:07 +01:00
Mateusz Guzik
4c9c0b640b vfs: fix vaccess prototype in the manpage
Reported by:	des
2022-08-23 21:01:55 +00:00
Mateusz Guzik
96d1fbf367 vfs: fix VOP_UNLOCK prototype in the manpage
Note the manpage is woefully outdated, taking about "simple lock".

Reported by:	des
2022-08-23 20:55:20 +00:00
Dmitry Salychev
a070c11afe
Add dsl to the src committers and bz as my mentor
Approved by:		bz (mentor)
Differential Revision:	https://reviews.freebsd.org/D36276
2022-08-22 15:59:21 +02:00
Robert Wing
3454a7caa0 kqueue: retire knlist_init_rw_reader()
Last usage was removed in afa85850e7.

Reviewed by:	pauamma, melifaro, kib
Differential Revision:	https://reviews.freebsd.org/D36205
2022-08-20 21:17:39 -08:00
Li-Wen Hsu
2541dcaf44
development(7): Update URLs
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-08-18 09:24:53 +08:00
Jens Schweikhardt
3c405c7e83 Indicate which port gdb.1 and kgdb.1 come from. 2022-08-17 19:13:22 +02:00
Jens Schweikhardt
20f68c5f2d Indicate that xrefs to *roff,tbl,eqn et al are found in ports/textproc/groff. 2022-08-15 22:15:18 +02:00
Jens Schweikhardt
4ee44ffcca Indicate that kgdb.1 is from ports/devel/gdb. 2022-08-14 15:17:29 +02:00
Jens Schweikhardt
825225e52f For man page references found in ports, indicate the respective port. 2022-08-14 15:02:06 +02:00
Jens Schweikhardt
9356efa8c8 Indicate that X(7) cross refs are satisfied by ports/x11/xorg-docs. 2022-08-14 12:01:30 +02:00
Jens Schweikhardt
14e3d3248a Fix wrong capitalization in man page references. 2022-08-13 20:46:59 +02:00
Jens Schweikhardt
b4cea17bf6 Fix a broken man page reference. 2022-08-13 17:40:29 +02:00
Alex Richardson
ac175bd33a Install working pkgconfig .pc files for compat libraries
The default ones are install them to /usr/libdata/pkgconfig, and we can't
use this path for compat libraries, so we use /usr/lib<suffix>/pkgconfigi here.

Test Plan:	grep -rn libdir= ./usr/lib32/pkgconfig/*.pc
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D34939
2022-08-11 23:18:34 +01:00
Ed Maste
711ee05918 Add "heard" to the dictionary
PR:		265671
Reported by:	J.R. Oldroyd
MFC after:	3 days
2022-08-09 12:03:24 -04:00
Andres Ramirez
13e9d624f2 rtw88: correct a typo in man page
s/mmeory/memory/

MFC after:	1 week
2022-08-07 23:10:26 +00:00
Konstantin Belousov
08349b18ea tree.3: explain RB_FIND() and RB_NFIND()
In collaboration with:	dougm
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation (kib)
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D36001
2022-08-07 22:23:44 +03:00
Konstantin Belousov
624e5dc0ec tree.3: fix markup
Reviewed by:	alc, dougm
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D36001
2022-08-07 22:23:10 +03:00
Sergey A. Osokin
ffcec862aa bsd-family-tree: fix a typo for NetBSD 9.3 release date
Reported by:	Adrian Steinmann <ast@NetBSD.org>
Fixes:		a3d933cc4f
MFC after:	3 days
2022-08-07 09:59:55 -04:00
Sergey A. Osokin
a3d933cc4f bsd-family-tree: add NetBSD 9.3
Add NetBSD 9.3, it's been released two days ago.

MFC after:	3 days
2022-08-06 15:02:42 -04:00
Sergey A. Osokin
69893a0e8f bsd-family-tree: OpenBSD 7.1 and DragonFly BSD 6.2.2
Add two releases to the tree.

MFC after:	3 days
2022-08-06 14:58:00 -04:00
Mateusz Piotrowski
3c4f8adc79 hier.7: Document /var/db/freebsd-update
MFC after:	3 days
Sponsored by:	Klara, Inc.
2022-08-04 15:58:58 +02: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
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
Alan Somers
a043594c21 ip6(4): document IP_ORIGDSTADDR
The option was originally added in r313524, but with incomplete
documentation.

MFC after:	1 week
Reviewed by:	karels, gbe (manpages)
Differential Revision: https://reviews.freebsd.org/D35890
2022-07-29 09:06:19 -06:00
Brooks Davis
0c8ff61ee1 src.libnames.mk: NEED/WANT_COMPAT+static support
Look in _LIB_OBJTOP for all static libraries not just INTERNALLIBs. In
normal operation this is a no-op, but improves the consistency of this
file.

Reviewed by:	imp, jhb
Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D35822
2022-07-28 18:55:01 +01:00
Warner Losh
e2fa10e676 style: Tighten up one use of 'may'
Declarations of variables must be placed before the statements of a
block, by convention. Use 'must' instead of 'may' here and clarify
langauge.

Sponsored by:		Netflix
Reviewed by:		pstef, rpokala, hselasky
Differential Revision:	https://reviews.freebsd.org/D35959
2022-07-28 08:01:54 -06:00
Warner Losh
0cf5abd758 style: Use oxford comma in one place.
Suggested by:		pauamma
Sponsored by:		Netflix
2022-07-28 08:01:54 -06:00
Warner Losh
ea86fed519 Style(9): Strengthen statements about not using K&R function definitions
K&R function definitions will soon be obsolete. Work has been underway
to remove all K&R function definitions from the tree for a while now. A
future C version will remove this construct from the language. So
strengthen existing statements about K&R function definitions and
declarations.

While here, remove __P macro reference. It's not been in active use for
almost two decades apart from legacy contrib code.

Sponsored by:		Netflix
Reviewed by:		pauamma, rpokala, hselasky, kp, brooks, markm, emaste
Differential Revision:	https://reviews.freebsd.org/D35945
2022-07-28 08:01:54 -06:00
Julian Grajkowski
78ee8d1c4c qat: Import a new Intel (R) QAT driver
QAT in-tree driver ported from out-of-tree release available
from 01.org.

The driver exposes complete cryptography and data compression
API in the kernel and integrates with Open Crypto Framework.
Details of supported operations, devices and usage can be found
in man and on 01.org.

Patch co-authored by: Krzysztof Zdziarski <krzysztofx.zdziarski@intel.com>
Patch co-authored by: Michal Jaraczewski <michalx.jaraczewski@intel.com>
Patch co-authored by: Michal Gulbicki <michalx.gulbicki@intel.com>
Patch co-authored by: Julian Grajkowski <julianx.grajkowski@intel.com>
Patch co-authored by: Piotr Kasierski <piotrx.kasierski@intel.com>
Patch co-authored by: Adam Czupryna <adamx.czupryna@intel.com>
Patch co-authored by: Konrad Zelazny <konradx.zelazny@intel.com>
Patch co-authored by: Katarzyna Rucinska <katarzynax.kargol@intel.com>
Patch co-authored by: Lukasz Kolodzinski <lukaszx.kolodzinski@intel.com>
Patch co-authored by: Zbigniew Jedlinski <zbigniewx.jedlinski@intel.com>

Reviewed by:	markj, jhb (OCF integration)
Reviewed by:	debdrup, pauamma (docs)
Sponsored by:	Intel Corporation
Differential Revision: https://reviews.freebsd.org/D34632
2022-07-27 11:12:35 -04:00
Mark Johnston
f4f56ff43d qat: Rename to qat_c2xxx and remove support for modern chipsets
A replacement QAT driver will be imported, but this replacement does not
support Atom C2xxx hardware.  So, the existing driver will be kept
around to provide opencrypto offload support for those chipsets.

Reviewed by:	pauamma, emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35817
2022-07-27 11:10:52 -04:00
Ed Maste
05b6744c44 Add ELFCOMPRESS_ZSTD ELF compression constant
ELFCOMPRESS_ZSTD indicates that an ELF section is compressed with zstd.
It is the second compression type, after the existing ELFCOMPRESS_ZLIB.
Zstd generally provides a compelling tradeoff of speed and compression
(other algorithms may compress slightly better but take a lot longer,
or run faster but do not compress nearly as well).

See https://groups.google.com/g/generic-abi/c/satyPkuMisk for details.
ELFCOMPRESS_ZSTD will be supported in a future Clang/LLVM update.  ELF
Tool Chain tools also need updating.

Reviewed by:	Fangrui Song
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-07-25 10:01:54 -04:00
Baptiste Daroussin
94778fc738 hier(7): document libdata/pkgconfig 2022-07-25 11:14:50 +02:00
Mateusz Piotrowski
abfa92dee6 development.7: Remove CVS and SVN cross-references
Instead, point to the homepages of the projects.

MFC after:	1 week
2022-07-21 20:35:32 +02:00
Mateusz Piotrowski
d3d6092795 release.7: Remove Subversion references
MFC after:	1 week
2022-07-21 20:25:58 +02:00
Mateusz Piotrowski
6542fd4b95 release.7: Update EMDEDDEDPORTS documentation
EMDEDDEDPORTS does not contain devel/subversion anymore.

Fixes:	a03128832c In extra_chroot_setup(), use 'uname -U' to determine OSVERSION.
MFC after:	1 week
2022-07-21 20:21:44 +02:00
Mateusz Piotrowski
7c2ec6cdf5 tmpfs.5: Add fstab line example
MFC after:	3 days
2022-07-21 20:08:06 +02:00
Mateusz Piotrowski
2b693e4829 tmpfs.5: Fix typos and linter warnings
MFC after:	3 days
2022-07-21 20:08:06 +02:00
Ed Maste
f39f827222 vt.4: Provide a hint about Fn + K Scroll Lock combination
Many laptops do not have Scroll Lock and use a function key sequence
to access it.

MFC after:	1 week

Sponsored by:	The FreeBSD Foundation
2022-07-21 09:57:26 -04:00
Pau Amma
e5d24f634e Update share/misc/committers-*.dot comments for git.
Approved by: gjb (mentor), lwhsu, imp, eadler

Reviewed by: approvers above, carlavilla and jhb (earlier version)

Differential Revision: https://reviews.freebsd.org/D35803
2022-07-21 00:52:39 +02:00
Mike Karels
a795c6e934 tcp.4: Sort sysctl variables
In preparation for updates including missing variables, sort the
sysctl variables in the MIB variables section alphabetically.
Add a new "hostcache" entry for the hostcache node, containing the
intro text that was previously in hostcache.enable.  Also cleanups
per review comments.

Reviewed by:	transport(tuexen), manpages(bcr)
Differential Revision: https://reviews.freebsd.org/D35844
MFC after:	1 week

(cherry picked from commit 5cf709ce72c0b6eb4b4d57db015a65f8a84166d5)
2022-07-20 08:09:09 -05:00
Mike Karels
ace68b1f36 icmp.4 inet.4 udp.4: sort sysctl variables
Sort the sysctl(3)/sysctl(8) variables in the MIB Variables section
alphabetically.  This is in preparation for adding missing variables
(at least in inet.4 and icmp.4).  A few other touchups suggested in
review.

Reviewed by:	bcr
Differential Revision: https://reviews.freebsd.org/D35843
MFC after:	1 week

(cherry picked from commit 3b656d465127de066511b6ffd02fb9fef85c7a53)
2022-07-20 08:07:20 -05:00
Pau Amma
102f31bf36 New committer (doc): Pau Amma
Approved by:	gjb

Differential Revision: https://reviews.freebsd.org/D35768
2022-07-20 04:01:34 +02:00
Mitchell Horne
287d467c5d mac: add new mac_ddb(4) policy
Generally, access to the kernel debugger is considered to be unsafe from
a security perspective since it presents an unrestricted interface to
inspect or modify the system state, including sensitive data such as
signing keys.

However, having some access to debugger functionality on production
systems may be useful in determining the cause of a panic or hang.
Therefore, it is desirable to have an optional policy which allows
limited use of ddb(4) while disabling the functionality which could
reveal system secrets.

This loadable MAC module allows for the use of some ddb(4) commands
while preventing the execution of others. The commands have been broadly
grouped into three categories:
 - Those which are 'safe' and will not emit sensitive data (e.g. trace).
   Generally, these commands are deterministic and don't accept
   arguments.
 - Those which are definitively unsafe (e.g. examine <addr>, search
   <addr> <value>)
 - Commands which may be safe to execute depending on the arguments
   provided (e.g. show thread <addr>).

Safe commands have been flagged as such with the DB_CMD_MEMSAFE flag.

Commands requiring extra validation can provide a function to do so.
For example, 'show thread <addr>' can be used as long as addr can be
checked against the system's list of process structures.

The policy also prevents debugger backends other than ddb(4) from
executing, for example gdb(4).

Reviewed by:	markj, pauamma_gundo.com (manpages)
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D35371
2022-07-18 22:06:15 +00:00