| 85c0f1a8 | 20-Mar-2026 |
Jake Freeland <jfree@FreeBSD.org> |
timerfd: Fix interval callout scheduling
When a timerfd interval callout misses its scheduled activation time, a differential is calculated based on the actual activation time and the scheduled acti
timerfd: Fix interval callout scheduling
When a timerfd interval callout misses its scheduled activation time, a differential is calculated based on the actual activation time and the scheduled activation time. This differential is divided by the timerfd's interval time and the quotient is added to the timerfd's counter.
Before this change, the next callout was scheduled to activate at: scheduled activation time + timerfd interval.
This change fixes the scheduling of the next callout to activate at: actual activation time + timerfd interval - remainder.
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55790 MFC after: 2 weeks
show more ...
|
| ded881f9 | 10-Mar-2026 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tests/kern/ssl_sendfile: fix 'random' and 'basic' flakyness
The read of c.sbytes needs to be synchronized with mutex. The problem was fixed for 'truncate' and 'grow' with 8a9508563542, but these tw
tests/kern/ssl_sendfile: fix 'random' and 'basic' flakyness
The read of c.sbytes needs to be synchronized with mutex. The problem was fixed for 'truncate' and 'grow' with 8a9508563542, but these two suffer from the same problem. Provide require_sbytes(), a locked wrapper around ATF_REQUIRE() to reduce copy and paste.
Submitted by: olivier Differential Revision: https://reviews.freebsd.org/D55781
show more ...
|
| 793e891f | 15-Feb-2026 |
Konstantin Belousov <kib@FreeBSD.org> |
pdrfork(2) tests: enable on x86
Use pfrfork_thread(3) instead of pdrfork(RFSPAWN) to make tests working on x86.
Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 w
pdrfork(2) tests: enable on x86
Use pfrfork_thread(3) instead of pdrfork(RFSPAWN) to make tests working on x86.
Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
show more ...
|
| 94e4de77 | 15-Feb-2026 |
Konstantin Belousov <kib@FreeBSD.org> |
pdrfork(2) tests: split basic_usage
into pdrfork(2) call itself, and basic_usage_tail() that checks the pdrfork(2) results.
Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MF
pdrfork(2) tests: split basic_usage
into pdrfork(2) call itself, and basic_usage_tail() that checks the pdrfork(2) results.
Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
show more ...
|
| 44843695 | 16-Feb-2026 |
Konstantin Belousov <kib@FreeBSD.org> |
pdrfork(2) tests: catch runaway child for EFAULT test
Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.fre
pdrfork(2) tests: catch runaway child for EFAULT test
Reported and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
show more ...
|
| d6bf2d14 | 15-Feb-2026 |
Konstantin Belousov <kib@FreeBSD.org> |
pdrfork(2) tests: do not rely on (int *)-1 being invalid address
Explicitly mmap guard and use it as the invalid address instead.
Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundat
pdrfork(2) tests: do not rely on (int *)-1 being invalid address
Explicitly mmap guard and use it as the invalid address instead.
Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D55306
show more ...
|
| 69f61cee | 14-Nov-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR
The pr_soreceive method first scans the buffer holding the both I/O sx(9) and socket buffer mutex(9) and after figuring out how m
unix/stream: fix a race with MSG_PEEK on SOCK_SEQPACKET with MSG_EOR
The pr_soreceive method first scans the buffer holding the both I/O sx(9) and socket buffer mutex(9) and after figuring out how much needs to be copied out drops the mutex. Since the other side may only append to the buffer, it is safe to continue the operation holding the sx(9) only. However, the code had a bug that it used pointer in the very last mbuf as marker of the place where to stop. This worked both in a case when we drain a buffer completely (marker points at NULL) and in a case when we wanted to stop at MSG_EOR (marker points at next mbuf after MSG_EOR). However, this pointer is not consistent after we dropped the socket buffer mutex.
Rewrite the logic to use the data length as bounds for the copyout cycle.
Provide a test case that reproduces the race. Note that the race is very hard to hit, thus test will pass on unmodified kernel as well. In a virtual machine I needed to add tsleep(9) for 10 nanoseconds into the middle of function to be able to reproduce.
PR: 290658 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53632 Fixes: d15792780760ef94647af9b377b5f0a80e1826bc
show more ...
|