- 26 Jun, 2022 8 commits
-
-
HardenedBSD Sync Service authored
-
Alexander V. Chernikov authored
Move pytest wrapper to the collection of the other atf wrappers in libexec. It solves the problem of combining bits & pieces from bsd.test.mk and bgs.prog.mk to address "test binary, but not the suite binary". Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D35604 MFC after: 2 weeks
-
HardenedBSD Sync Service authored
-
Aleksandr Rybalko authored
Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D32316
-
Aleksandr Rybalko authored
Add support for system wide and NUMA domain wide counters support. Add 3 new PMC classes for ARM DMC-620 and CMN-600 controllers PMU. Reviewed by: mhorne Sponsored By: ARM Sponsored By: Ampere Computing Differential Revision: https://reviews.freebsd.org/D35342
-
Alexander V. Chernikov authored
Move debug declaration out of COMPAT_FREEBSD32 in rtsock.c MFC after: 2 weeks
-
Alan Cox authored
Move a comment to the code that it describes. Improve the wording. Style fixes. MFC after: 2 weeks
-
HardenedBSD Sync Service authored
-
- 25 Jun, 2022 17 commits
-
-
Alexander V. Chernikov authored
- move debug headers out of COMPAT_FREEBSD32 in rtsock.c - remove accidentally-added LOG_ defines from syslog.h MFC after: 2 weeks
-
Alexander V. Chernikov authored
MFC after: 2 weeks
-
HardenedBSD Sync Service authored
-
Alexander V. Chernikov authored
MFC after: 2 weeks
-
Alexander V. Chernikov authored
Use unified guidelines for the severity across the routing subsystem. Update severity for some of the already-used messages to adhere the guidelines. Convert rtsock logging to the new FIB_ reporting format. MFC after: 2 weeks
-
Alexander V. Chernikov authored
route. Reporting logic assumed there is always some nhop change for every successful modification operation. Explicitly check that the changed nexthop indeed exists when reporting back to userland. MFC after: 2 weeks Reported by: Claudio Jeker <claudio.jeker@klarasystems.com> Tested by: Claudio Jeker <claudio.jeker@klarasystems.com>
-
Alexander V. Chernikov authored
Differential Revision: https://reviews.freebsd.org/D31084
-
Alexander V. Chernikov authored
Implementation consists of the pytest plugin implementing ATF format and a simple C++ wrapper, which reorders the provided arguments from ATF format to the format understandable by pytest. Each test has this wrapper specified after the shebang. When kyua executes the test, wrapper calls pytest, which loads atf plugin, does the work and returns the result. Additionally, a separate python "package", `/usr/tests/atf_python` has been added to collect code that may be useful across different tests. Current limitations: * Opaque metadata passing via X-Name properties. Require some fixtures to write * `-s srcdir` parameter passed by the runner is ignored. * No `atf-c-api(3)` or similar - relying on pytest framework & existing python libraries * No support for `atf_tc_<get|has>_config_var()` & `atf_tc_set_md_var()`. Can be probably implemented with env variables & autoload fixtures Differential Revision: https://reviews.freebsd.org/D31084 Reviewed by: kp, ngie
-
Alexander V. Chernikov authored
RTM_CHANGE operates on a single component of the multipath route (e.g. on a single nexthop). Search of this nexthop is peformed by iterating over each component from multipath (nexthop) group, using check_info_match_nhop. The problem with the current code that it incorrectly assumes that `check_info_match_nhop()` returns true value on match, while in reality it returns an error code on failure). Fix this by properly comparing the result with 0. Additionally, the followup code modified original necthop group instead of a new one. Fix this by targetting new nexthop group instead. Reported by: thj Tested by: Claudio Jeker <claudio.jeker@klarasystems.com> Differential Revision: https://reviews.freebsd.org/D35526 MFC after: 2 weeks
-
HardenedBSD Sync Service authored
-
HardenedBSD Sync Service authored
-
Hans Petter Selasky authored
To allow for a dynamic page size on arm64 remove the static value from libcuse. Differential Revision: https://reviews.freebsd.org/D35585 MFC after: 1 week Sponsored by: NVIDIA Networking
-
Hans Petter Selasky authored
In bus_dmamap_unload() on ARM, the counters for free_bpages and reserved_bpages appear to be vulnerable to unprotected read-modify-write operations that result in accounting that looks like a page leak. This was noticed on a 2GB quad core i.MX6 system that has more than one device attached via FTDI based USB serial connection. Submitted by: John Hein <jcfyecrayz@liamekaens.com> Differential Revision: https://reviews.freebsd.org/D35553 PR: 264836 MFC after: 3 days Sponsored by: NVIDIA Networking
-
Doug Moore authored
The RB_ROTATE macros begin with fetching a field via a pointer. In most cases, that value is one that has already been pulled into a register, and the compiler cannot infer that. So, to eliminate those needless fetches, have the caller of the RB_ROTATE macros present the data in the third macro parameter, rather than having the macro fetch it. Differential Revision: https://reviews.freebsd.org/D35520
-
Peter Holm authored
-
Peter Holm authored
PR: 165392
-
Alan Cox authored
Introduce fine-grained locking on the dmamap's list of map entries, replacing the use of the domain lock. This is not the most significant source of lock contention, but it is the easiest to address. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35557
-
- 24 Jun, 2022 15 commits
-
-
HardenedBSD Sync Service authored
-
Rick Macklem authored
The vnode_vtype() macro was used to make the code compatible with Mac OSX, for the Mac OSX port. For FreeBSD, this macro just obscured the code and, therefore, use of the macro has been deleted by previous commits. This commit deletes the, now unused, macro. This commit should not result in a semantics change.
-
Rick Macklem authored
The vnode_vtype() macro was used to make the code compatible with Mac OSX, for the Mac OSX port. For FreeBSD, this macro just obscured the code, so avoid using it to clean up the code. This commit should not result in a semantics change.
-
Gleb Smirnoff authored
Most test pass identically on different kinds of sockets. However, few edge cases work differently on stream and datagram sockets. We want to exercise this and document. Differential revision: https://reviews.freebsd.org/D35420
-
Gleb Smirnoff authored
This additional socket was created in 2e89951b and 240d5a9b to try workaround problems with classic PF_UNIX/SOCK_DGRAM sockets. With recent changes in kernel this trick is no longer needed, so the trick can be reverted. In syslogd(8) we would still create the socket for the next several major releases for compatibility. Differential revision: https://reviews.freebsd.org/D35305
-
Gleb Smirnoff authored
The "/dev/log" socket existed in pre-FreeBSD times. Later it was substituted to a compatibility symlink. The symlink creation was deprecated in FreeBSD 10.2 and 9-STABLE. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35304
-
Gleb Smirnoff authored
A one-to-many unix/dgram socket is a socket that has been bound with bind(2) and can get multiple connections. A typical example is /var/run/log bound by syslogd(8) and receiving multiple connections from libc syslog(3) API. Until now all of these connections shared the same receive socket buffer of the bound socket. This made the socket vulnerable to overflow attack. See 240d5a9b for a historical attempt to workaround the problem. This commit creates a per-connection socket buffer for every single connected socket and eliminates the problem. The new behavior will optimize seldom writers over frequent writers. See added test case scenarios and code comments for more detailed description of the new behavior. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35303
-
Gleb Smirnoff authored
o Use m_pkthdr.memlen from m_uiotombuf() o Modify unp_internalize() to keep track of allocated space and memory as well as pointer to the last buffer. o Modify unp_addsockcred() to keep track of allocated space and memory as well as pointer to the last buffer. o Record the datagram len/memlen/ctllen in the first (from) mbuf of the chain in uipc_sosend_dgram() and reuse it in uipc_soreceive_dgram(). Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35302
-
Gleb Smirnoff authored
Data allocated by m_uiotombuf() usually goes into a socket buffer. We are interested in the length of useful data to be added to sb_acc, as well as total memory used by mbufs. The later would be added to sb_mbcnt. Calculating this value at allocation time allows to save on extra traversal of the mbuf chain. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35301
-
Gleb Smirnoff authored
This change fully splits away PF_UNIX/SOCK_DGRAM from other socket buffer implementations, without any behavior changes. Generic socket implementation is reduced down to one STAILQ and very little code. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35300
-
Gleb Smirnoff authored
Split struct sockbuf into common shared fields and protocol specific union, where protocols are free to implement whatever buffer they want. Such protocols should mark themselves with PR_SOCKBUF and are expected to initialize their buffers in their pr_attach and tear them down in pr_detach. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35299
-
Gleb Smirnoff authored
Use this new version in unix/dgram socket when sending to a target address. This removes extra lock release/acquisition and possible counter-intuitive ENOTCONN. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35298
-
Gleb Smirnoff authored
This allows to remove one M_NOWAIT allocation and also makes it more clear what's going on. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35297
-
Gleb Smirnoff authored
With this second step PF_UNIX/SOCK_DGRAM has protocol specific implementation. This gives some possibility performance optimizations. However, it still operates on the same struct socket as all other sockets do. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35296
-
Gleb Smirnoff authored
Just remove one level of indentation as the case clause always match. Reviewed by: markj Differential revision: https://reviews.freebsd.org/D35295
-