| #
fa77660a
|
| 21-Feb-2026 |
Mark Johnston <markj@FreeBSD.org> |
pipe: Avoid unnecessary priv_check() calls in pipespace_new()
Running out of pipe map KVA is a rare case, so reorder checks accordingly, presuming that calling priv_check() is more expensive than th
pipe: Avoid unnecessary priv_check() calls in pipespace_new()
Running out of pipe map KVA is a rare case, so reorder checks accordingly, presuming that calling priv_check() is more expensive than the calculation. In particular, priv_check() might not be cheap to evaluate if MAC hooks are installed.
Reviewed by: olce, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55378
show more ...
|
| #
36138969
|
| 16-Oct-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
knotes: kqueue: handle copy for trivial filters
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D52045
|
| #
d0a35ec0
|
| 05-Oct-2025 |
Mateusz Guzik <mjg@FreeBSD.org> |
pipe: consistently use PIPE_LOCK_ASSERT
|
| #
ff6abfec
|
| 22-Sep-2025 |
Mateusz Guzik <mjg@FreeBSD.org> |
pipe: sort out ino commentary on failed pipe creation
Implements pipe_destroy as a counterpart to pipe_create, no functional changes.
Arguably code could be refactored so that ino allocation only h
pipe: sort out ino commentary on failed pipe creation
Implements pipe_destroy as a counterpart to pipe_create, no functional changes.
Arguably code could be refactored so that ino allocation only happens after bufs are allocated.
show more ...
|
| #
02ffca40
|
| 20-Jun-2025 |
Ricardo Branco <rbranco@suse.de> |
kern: Add support for POSIX O_CLOFORK flag
Reviewed by: kib MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1698
|
| #
e60f608e
|
| 23-Feb-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
Add sysctl kern.proc.kqueue
reporting registered events in the specified kqueue.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.fre
Add sysctl kern.proc.kqueue
reporting registered events in the specified kqueue.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D49163
show more ...
|
| #
ef9ffb85
|
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
| #
a52b30ff
|
| 20-Sep-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf
Tested by: yasu Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
| #
40769168
|
| 20-Sep-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
pipespace_new(): decrease uidinfo pipebuf usage if reservation check failed
Submitted by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
| #
d6074f73
|
| 20-Sep-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
pipe: use pipe subsystem KVA counter instead of pipe_map size
to calculate the superuser-reserved amount of the pipe space
Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
| #
7672cbef
|
| 15-Sep-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
pipes: reserve configured percentage of buffers zone to superuser
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46619
|
| #
3458bbd3
|
| 10-Sep-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kernel: add RLIMIT_PIPEBUF
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46619
|
| #
d8ff42e8
|
| 17-Jul-2024 |
Ed Maste <emaste@FreeBSD.org> |
pipe: keep uio_iovcnt consistent
In pipe_build_write_buffer we increment uio_iov but did not update uio_iovcnt. This would not cause an OOB read (thanks to to uio_resid) but is inconsistent and cou
pipe: keep uio_iovcnt consistent
In pipe_build_write_buffer we increment uio_iov but did not update uio_iovcnt. This would not cause an OOB read (thanks to to uio_resid) but is inconsistent and could be an issue if other code changes are made in the future.
Reported by: Synacktiv Reviewed by: jhb, markj, brooks Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45999
show more ...
|
| #
a4469a0d
|
| 17-Jul-2024 |
Mateusz Guzik <mjg@FreeBSD.org> |
pipe: convert pipelock flag argument to bool
No functional changes, preparatory cleanup.
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| #
f28526e9
|
| 19-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kcmp(2): implement for generic file types
Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518
|
| #
fdafd315
|
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
9baa0817
|
| 15-Sep-2022 |
Warner Losh <imp@FreeBSD.org> |
SPDX: Not BSD-4-Clause
This license has 4 clauses, and shares some text with the BSD-4-Clause license. However, it omits the standard disclaimer and has 2 clauses all its own. Remove this tag, since
SPDX: Not BSD-4-Clause
This license has 4 clauses, and shares some text with the BSD-4-Clause license. However, it omits the standard disclaimer and has 2 clauses all its own. Remove this tag, since it was made in error and this doesn't match the SPDX copy of the BSD-4-Clause license.
Sponsored by: Netflix
show more ...
|
| #
545db925
|
| 18-Aug-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
pipe: fix EOF case for non-blocking fds
In particular unbreaks 'go build'.
|
| #
9ac6eda6
|
| 08-Aug-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
pipe: try to skip locking the pipe if a non-blocking fd is used
Reviewed by: markj (previous version) Differential Revision: https://reviews.freebsd.org/D36082
|
| #
8c309d48
|
| 17-Jun-2022 |
Damjan Jovanovic <damjan.jov@gmail.com> |
struct kinfo_file changes needed for lsof to work using only usermode APIs`
Add kf_pipe_buffer_[in/out/size] fields to kf_pipe, and populate them.
Add a kf_kqueue struct to the kf_un union, to allo
struct kinfo_file changes needed for lsof to work using only usermode APIs`
Add kf_pipe_buffer_[in/out/size] fields to kf_pipe, and populate them.
Add a kf_kqueue struct to the kf_un union, to allow querying kqueue state, and populate it.
Populate the kf_sock_rcv_sb_state and kf_sock_snd_sb_state fields in kf_sock for INET/INET6 sockets, and populate all other fields for all transport layer protocols, not just TCP.
Bump __FreeBSD_version.
Differential revision: https://reviews.freebsd.org/D34184 Reviewed by: jhb, kib, se MFC after: 1 week
show more ...
|
| #
e8955bd6
|
| 14-Jun-2022 |
Mark Johnston <markj@FreeBSD.org> |
pipe: Use a distinct wait channel for I/O serialization
Suppose a thread tries to read from an empty pipe. pipe_read() does the following:
1. pipelock(), possibly sleeping 2. check for buffered da
pipe: Use a distinct wait channel for I/O serialization
Suppose a thread tries to read from an empty pipe. pipe_read() does the following:
1. pipelock(), possibly sleeping 2. check for buffered data 3. pipeunlock() 4. set PIPE_WANTR and sleep 5. goto 1
pipelock() is an open-coded mutex; if a thread blocks in pipelock(), it sleeps until the lock holder calls pipeunlock().
Both sleeps use the same wait channel. So if there are multiple threads in pipe_read(), a thread T1 in step 3 can wake up a thread T2 sleeping in step 4. Then T1 goes to sleep in step 4, and T2 acquires and releases the pipelock, waking up T1 again. This can go on indefinitely, livelocking the process (and potentially starving a would-be writer).
Fix the problem by using a separate wait channel for pipelock().
Reported by: Paul Floyd <paulf2718@gmail.com> Reviewed by: mjg, kib PR: 264441 MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35415
show more ...
|
| #
36fb3722
|
| 13-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
kern: Move variables only used for MAC under #ifdef MAC.
|
| #
7259ca31
|
| 02-Oct-2021 |
Kyle Evans <kevans@FreeBSD.org> |
fifos: delegate unhandled kqueue filters to underlying filesystem
This gives the vfs layer a chance to provide handling for EVFILT_VNODE, for instance. Change pipe_specops to use the default vop_kq
fifos: delegate unhandled kqueue filters to underlying filesystem
This gives the vfs layer a chance to provide handling for EVFILT_VNODE, for instance. Change pipe_specops to use the default vop_kqfilter to accommodate fifoops that don't specify the method (i.e. all in-tree).
Based on a patch by Jan Kokemüller.
PR: 225934 Reviewed by: kib, markj (both pre-KASSERT) Differential Revision: https://reviews.freebsd.org/D32271
show more ...
|
| #
2b68eb8e
|
| 01-Oct-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove thread argument from VOP_STAT
and fo_stat.
|