#
31b2ac4b |
| 16-Nov-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
select: replace reference counting with memory barriers in selfd
Refcounting was added to combat a race between selfdfree and doselwakup, but it adds avoidable overhead.
selfdfree detects it can fr
select: replace reference counting with memory barriers in selfd
Refcounting was added to combat a race between selfdfree and doselwakup, but it adds avoidable overhead.
selfdfree detects it can free the object by ->sf_si == NULL, thus we can ensure that the condition only holds after all accesses are completed.
show more ...
|
#
ea33cca9 |
| 05-Nov-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
poll/select: change selfd_zone into a malloc type
On a sample box vmstat -z shows:
ITEM SIZE LIMIT USED FREE REQ 64: 64, 0, 1043784, 436753
poll/select: change selfd_zone into a malloc type
On a sample box vmstat -z shows:
ITEM SIZE LIMIT USED FREE REQ 64: 64, 0, 1043784, 4367538,3698187229 selfd: 64, 0, 1520, 13726,182729008
But at the same time: vm.uma.selfd.keg.domain.1.pages: 121 vm.uma.selfd.keg.domain.0.pages: 121
Thus 242 pages got pulled even though the malloc zone would likely accomodate the load without using extra memory.
show more ...
|
Revision tags: release/12.2.0 |
|
#
6fed89b1 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
kern: clean up empty lines in .c and .h files
|
#
e2c0e292 |
| 16-Jul-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
b1607c87 |
| 15-Jul-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
poll: factor fd lookup out of scan and rescan
|
#
d8bc2a17 |
| 15-Jul-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: remove fd_lastfile
It keeps recalculated way more often than it is needed.
Provide a routine (fdlastfile) to get it if necessary.
Consumers may be better off with a bitmap iterator instead.
|
Revision tags: release/11.4.0 |
|
#
a90fb6cf |
| 15-Apr-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Cast all ioctl command arguments through uint32_t internally.
Hide debug print showing use of sign extended ioctl command argument under INVARIANTS. The print is available to all and can easily fill
Cast all ioctl command arguments through uint32_t internally.
Hide debug print showing use of sign extended ioctl command argument under INVARIANTS. The print is available to all and can easily fill up the logs.
No functional change intended.
MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|
#
bc02c18c |
| 07-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357408 through r357661.
|
#
52604ed7 |
| 03-Feb-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
fd: remove the seq argument from fget_unlocked
It is almost always NULL.
|
#
59abbffa |
| 31-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357270 through r357349.
|
#
3ff65f71 |
| 30-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
Remove duplicated empty lines from kern/*.c
No functional changes.
|
#
2856d85e |
| 08-Jan-2020 |
Kyle Evans <kevans@FreeBSD.org> |
posix_fallocate: push vnop implementation into the fileop layer
This opens the door for other descriptor types to implement posix_fallocate(2) as needed.
Reviewed by: kib, bcr (manpages) Differenti
posix_fallocate: push vnop implementation into the fileop layer
This opens the door for other descriptor types to implement posix_fallocate(2) as needed.
Reviewed by: kib, bcr (manpages) Differential Revision: https://reviews.freebsd.org/D23042
show more ...
|
Revision tags: release/12.1.0 |
|
#
8b3bc70a |
| 08-Oct-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352764 through r353315.
|
#
dfa8dae4 |
| 05-Oct-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
devfs: plug redundant bwillwrite avoidance
vn_write already checks for vnode type to see if bwillwrite should be called.
This effectively reverts r244643.
Reviewed by: kib Sponsored by: The FreeBS
devfs: plug redundant bwillwrite avoidance
vn_write already checks for vnode type to see if bwillwrite should be called.
This effectively reverts r244643.
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21905
show more ...
|
#
a63915c2 |
| 28-Jul-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @r350386
Sponsored by: The FreeBSD Foundation
|
#
f1cf2b9d |
| 21-Jul-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Check and avoid overflow when incrementing fp->f_count in fget_unlocked() and fhold().
On sufficiently large machine, f_count can be legitimately very large, e.g. malicious code can dup same fd up t
Check and avoid overflow when incrementing fp->f_count in fget_unlocked() and fhold().
On sufficiently large machine, f_count can be legitimately very large, e.g. malicious code can dup same fd up to the per-process filedescriptors limit, and then fork as much as it can. On some smaller machine, I see kern.maxfilesperproc: 939132 kern.maxprocperuid: 34203 which already overflows u_int. More, the malicious code can create transient references by sending fds over unix sockets.
I realized that this check is missed after reading https://secfault-security.com/blog/FreeBSD-SA-1902.fd.html
Reviewed by: markj (previous version), mjg Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20947
show more ...
|
Revision tags: release/11.3.0, release/12.0.0 |
|
#
2a22df74 |
| 04-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339813 through r340125.
|
#
78c2a980 |
| 02-Nov-2018 |
Conrad Meyer <cem@FreeBSD.org> |
kern_poll: Restore explanatory comment removed in r177374
The comment isn't stale. The check is bogus in the sense that poll(2) does not require pollfd entries to be unique in fd space, so there is
kern_poll: Restore explanatory comment removed in r177374
The comment isn't stale. The check is bogus in the sense that poll(2) does not require pollfd entries to be unique in fd space, so there is no reason there cannot be more pollfd entries than open or even allowed fds. The check is mostly a seatbelt against accidental misuse or abuse. FD_SETSIZE, while usually unrelated to poll, is used as an arbitrary floor for systems with very low kern.maxfilesperproc.
Additionally, document this possible EINVAL condition in the poll.2 manual.
No functional change.
Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D17671
show more ...
|
#
fda9adaf |
| 27-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339670 through r339812.
|
#
2384981b |
| 26-Oct-2018 |
Conrad Meyer <cem@FreeBSD.org> |
poll: Unify userspace pollfd pointer name
Some of the poll code used 'fds' and some used 'ufds' to refer to the uap->fds userspace pointer that was passed around to subroutines. Some of the poll co
poll: Unify userspace pollfd pointer name
Some of the poll code used 'fds' and some used 'ufds' to refer to the uap->fds userspace pointer that was passed around to subroutines. Some of the poll code used 'fds' to refer to the kernel memory pollfd arrays, which seemed unnecessarily confusing.
Unify on 'ufds' to refer to the userspace pollfd array.
Additionally, 'bits' is not an accurate description of the kernel pollfd array in kern_poll, so rename that to 'kfds'. Finally, clean up some logic with mallocarray() and nitems().
No functional change.
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D17670
show more ...
|
#
01d4e214 |
| 05-Oct-2018 |
Glen Barber <gjb@FreeBSD.org> |
MFH r338661 through r339200.
Sponsored by: The FreeBSD Foundation
|
#
ce44d808 |
| 27-Sep-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338731 through r338987.
|
#
d6fda03a |
| 21-Sep-2018 |
Mateusz Guzik <mjg@FreeBSD.org> |
select: stop doing zero-sized memsets
Approved by: re (kib)
|
Revision tags: release/11.2.0 |
|
#
d5cdcc3a |
| 10-May-2018 |
Andrew Gallatin <gallatin@FreeBSD.org> |
Fix the build after r333457
In r333457, the arguments to kern_pwritev() were accidentally re-ordered as part of ANSIfication, breaking the build.
|
#
cc3c9df8 |
| 10-May-2018 |
Ed Maste <emaste@FreeBSD.org> |
ANSIfy sys_generic.c
|