|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0 |
|
| #
2e8d60c6 |
| 09-Apr-2024 |
Zhenlei Huang <[email protected]> |
ng_socket: Treat EEXIST from kern_kldload() as success
EEXIST is possible in a race condition.
Inspired by: ffc72591b1f5 (Don't worry if a module is already loaded ...) Reviewed by: glebius MFC aft
ng_socket: Treat EEXIST from kern_kldload() as success
EEXIST is possible in a race condition.
Inspired by: ffc72591b1f5 (Don't worry if a module is already loaded ...) Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44633
(cherry picked from commit f6f67f58c19db4f25f5c2cf4869efc7054493a55)
show more ...
|
|
Revision tags: release/13.3.0, release/14.0.0 |
|
| #
95ee2897 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
|
Revision tags: release/13.2.0, release/12.4.0 |
|
| #
e7d02be1 |
| 17-Aug-2022 |
Gleb Smirnoff <[email protected]> |
protosw: refactor protosw and domain static declaration and load
o Assert that every protosw has pr_attach. Now this structure is only for socket protocols declarations and nothing else. o Merge
protosw: refactor protosw and domain static declaration and load
o Assert that every protosw has pr_attach. Now this structure is only for socket protocols declarations and nothing else. o Merge struct pr_usrreqs into struct protosw. This was suggested in 1996 by wollman@ (see 7b187005d18ef), and later reiterated in 2006 by rwatson@ (see 6fbb9cf860dcd). o Make struct domain hold a variable sized array of protosw pointers. For most protocols these pointers are initialized statically. Those domains that may have loadable protocols have spacers. IPv4 and IPv6 have 8 spacers each (andre@ dff3237ee54ea). o For inetsw and inet6sw leave a comment noting that many protosw entries very likely are dead code. o Refactor pf_proto_[un]register() into protosw_[un]register(). o Isolate pr_*_notsupp() methods into uipc_domain.c
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D36232
show more ...
|
|
Revision tags: release/13.1.0 |
|
| #
74967928 |
| 09-May-2022 |
Gleb Smirnoff <[email protected]> |
ng_socket: don't assign NULL in C99 sparse initializer
|
| #
644ca084 |
| 03-Jan-2022 |
Gleb Smirnoff <[email protected]> |
domains: make domain_init() initialize only global state
Now that each module handles its global and VNET initialization itself, there is no VNET related stuff left to do in domain_init().
Differen
domains: make domain_init() initialize only global state
Now that each module handles its global and VNET initialization itself, there is no VNET related stuff left to do in domain_init().
Differential revision: https://reviews.freebsd.org/D33541
show more ...
|
|
Revision tags: release/12.3.0 |
|
| #
7045b160 |
| 28-Jul-2021 |
Roy Marples <[email protected]> |
socket: Implement SO_RERROR
SO_RERROR indicates that receive buffer overflows should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they
socket: Implement SO_RERROR
SO_RERROR indicates that receive buffer overflows should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages had been truncated because of overflows. Since programs historically do not expect to get receive overflow errors, this behavior is not the default.
This is really really important for programs that use route(4) to keep in sync with the system. If we loose a message then we need to reload the full system state, otherwise the behaviour from that point is undefined and can lead to chasing bogus bug reports.
Reviewed by: philip (network), kbowling (transport), gbe (manpages) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26652
show more ...
|
| #
f161d294 |
| 03-May-2021 |
Mark Johnston <[email protected]> |
Add missing sockaddr length and family validation to various protocols
Several protocol methods take a sockaddr as input. In some cases the sockaddr lengths were not being validated, or were valida
Add missing sockaddr length and family validation to various protocols
Several protocol methods take a sockaddr as input. In some cases the sockaddr lengths were not being validated, or were validated after some out-of-bounds accesses could occur. Add requisite checking to various protocol entry points, and convert some existing checks to assertions where appropriate.
Reported by: syzkaller+KASAN Reviewed by: tuexen, melifaro MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29519
show more ...
|
|
Revision tags: release/13.0.0 |
|
| #
924d1c9a |
| 08-Feb-2021 |
Alexander V. Chernikov <[email protected]> |
Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors." Wrong version of the change was pushed inadvertenly.
This reverts commit 4a01b854ca5c2e5124958363b3326708b913a
Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors." Wrong version of the change was pushed inadvertenly.
This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71.
show more ...
|
| #
4a01b854 |
| 07-Feb-2021 |
Alexander V. Chernikov <[email protected]> |
SO_RERROR indicates that receive buffer overflows should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages
SO_RERROR indicates that receive buffer overflows should be handled as errors. Historically receive buffer overflows have been ignored and programs could not tell if they missed messages or messages had been truncated because of overflows. Since programs historically do not expect to get receive overflow errors, this behavior is not the default.
This is really really important for programs that use route(4) to keep in sync with the system. If we loose a message then we need to reload the full system state, otherwise the behaviour from that point is undefined and can lead to chasing bogus bug reports.
show more ...
|
| #
3326f7e9 |
| 17-Dec-2020 |
Aleksandr Fedorov <[email protected]> |
[ng_socket] Don't take the SOCKBUF_LOCK() twice in the RX data path.
This is just a minor optimization, but it's sensitive. This gives an improvement of 30-50 kpps.
Reviewed by: kp, markj, glebius,
[ng_socket] Don't take the SOCKBUF_LOCK() twice in the RX data path.
This is just a minor optimization, but it's sensitive. This gives an improvement of 30-50 kpps.
Reviewed by: kp, markj, glebius, lutz_donnerhacke.de Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D27382
show more ...
|
|
Revision tags: release/12.2.0 |
|
| #
662c1305 |
| 01-Sep-2020 |
Mateusz Guzik <[email protected]> |
net: clean up empty lines in .c and .h files
|
|
Revision tags: release/11.4.0 |
|
| #
7029da5c |
| 26-Feb-2020 |
Pawel Biernacki <[email protected]> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
| #
039eb22c |
| 21-Feb-2020 |
Gleb Smirnoff <[email protected]> |
Rework second part of r357558. Unroll the macro and allocate memory in sleepable manner before entering the epoch for the send.
|
| #
be3d57e6 |
| 21-Feb-2020 |
Gleb Smirnoff <[email protected]> |
Revert one half of previous change r357558. Don't enter the epoch on sends to control socket. Control socket messages can run constructors of nodes and other stuff that is allowed to M_WAITOK.
PR:
Revert one half of previous change r357558. Don't enter the epoch on sends to control socket. Control socket messages can run constructors of nodes and other stuff that is allowed to M_WAITOK.
PR: 244241
show more ...
|
| #
940508a5 |
| 05-Feb-2020 |
Gleb Smirnoff <[email protected]> |
Enter the network epoch when ng_socket sends data or control from user land to the netgraph and potentially further down the network stack.
|
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0 |
|
| #
323b076e |
| 21-Apr-2016 |
Pedro F. Giffuni <[email protected]> |
sys: use our nitems() macro when param.h is available.
This should cover all the remaining cases in the kernel.
Discussed in: freebsd-current
|
| #
155d72c4 |
| 15-Apr-2016 |
Pedro F. Giffuni <[email protected]> |
sys/net* : for pointers replace 0 with NULL.
Mostly cosmetical, no functional change.
Found with devel/coccinelle.
|
|
Revision tags: release/10.3.0, release/10.2.0, release/10.1.0 |
|
| #
f0188618 |
| 21-Oct-2014 |
Hans Petter Selasky <[email protected]> |
Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.
- Wrong or missing "access" specifier. The "access" specifier sometimes included the SYSCTL type, which it
Fix multiple incorrect SYSCTL arguments in the kernel:
- Wrong integer type was specified.
- Wrong or missing "access" specifier. The "access" specifier sometimes included the SYSCTL type, which it should not, except for procedural SYSCTL nodes.
- Logical OR where binary OR was expected.
- Properly assert the "access" argument passed to all SYSCTL macros, using the CTASSERT macro. This applies to both static- and dynamically created SYSCTLs.
- Properly assert the the data type for both static and dynamic SYSCTLs. In the case of static SYSCTLs we only assert that the data pointed to by the SYSCTL data pointer has the correct size, hence there is no easy way to assert types in the C language outside a C-function.
- Rewrote some code which doesn't pass a constant "access" specifier when creating dynamic SYSCTL nodes, which is now a requirement.
- Updated "EXAMPLES" section in SYSCTL manual page.
MFC after: 3 days Sponsored by: Mellanox Technologies
show more ...
|
|
Revision tags: release/9.3.0 |
|
| #
37863816 |
| 22-May-2014 |
Alexander Motin <[email protected]> |
Use NG_WAITOK as ng_package_msg() argument instead of M_WAITOK.
Submitted by: Dmitry Luhtionov <[email protected]>
|
|
Revision tags: release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0 |
|
| #
8338a34a |
| 16-Feb-2012 |
Gleb Smirnoff <[email protected]> |
In ng_getsockaddr() allocate memory prior to obtaining lock.
Reported & tested by: Mykola Dzham <i levsha.me>
|
| #
dea55037 |
| 13-Feb-2012 |
Gleb Smirnoff <[email protected]> |
No need to optimise for a node with no hooks, my braino.
|
| #
48a47609 |
| 23-Jan-2012 |
Gleb Smirnoff <[email protected]> |
Provide a findhook method for ng_socket(4). The node stores a hash with names of its hooks. It starts with size of 16, and grows when number of hooks reaches twice the current size. A failure to grow
Provide a findhook method for ng_socket(4). The node stores a hash with names of its hooks. It starts with size of 16, and grows when number of hooks reaches twice the current size. A failure to grow (memory is allocated with M_NOWAIT) isn't fatal, however.
I used standard hash(9) function for the hash. With 25000 hooks named in the mpd (ports/net/mpd5) manner of "b%u", the distributions is the following: 72.1% entries consist of one element, 22.1% consist of two, 5.2% consist of three and 0.6% of four.
Speedup in a synthetic test that creates 25000 hooks and then runs through a long cyclce dereferencing them in a random order is over 25 times.
show more ...
|
| #
4b2b8a37 |
| 23-Jan-2012 |
Gleb Smirnoff <[email protected]> |
In ng_socket(4) expose less kernel internals to userland. This commit breaks ABI, but makes probability of ABI breakage in future less.
|
| #
abe5a2ce |
| 16-Jan-2012 |
Gleb Smirnoff <[email protected]> |
Remove some disabled NOTYET code. Probability of enabling it is low, if anyone wants, he/she can take it from svn.
|
|
Revision tags: release/9.0.0 |
|
| #
6472ac3d |
| 07-Nov-2011 |
Ed Schouten <[email protected]> |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else,
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
show more ...
|