#
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
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
67f938c5 |
| 02-Jun-2023 |
Mark Johnston <markj@FreeBSD.org> |
kevent: Make references to filter definitions const
Follow-up revisions can make individual filter definitions const. No functional change intended.
Reviewed by: kib MFC after: 2 weeks Differentia
kevent: Make references to filter definitions const
Follow-up revisions can make individual filter definitions const. No functional change intended.
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35842
show more ...
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
dac31024 |
| 01-Apr-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Rename kqueue1(2) to kqueuex(2) to avoid compat issues with NetBSD
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39377
|
#
61194e98 |
| 26-Mar-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Add kqueue1() syscall
It takes the flags argument. Immediate use is to provide the KQUEUE_CLOEXEC flag for kqueue(2).
Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 wee
Add kqueue1() syscall
It takes the flags argument. Immediate use is to provide the KQUEUE_CLOEXEC flag for kqueue(2).
Reviewed by: emaste, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39271
show more ...
|
Revision tags: release/12.4.0 |
|
#
3454a7ca |
| 21-Aug-2022 |
Robert Wing <rew@FreeBSD.org> |
kqueue: retire knlist_init_rw_reader()
Last usage was removed in afa85850e79c1839ec33efa1138206687b952cfa.
Reviewed by: pauamma, melifaro, kib Differential Revision: https://reviews.freebsd.org/D36
kqueue: retire knlist_init_rw_reader()
Last usage was removed in afa85850e79c1839ec33efa1138206687b952cfa.
Reviewed by: pauamma, melifaro, kib Differential Revision: https://reviews.freebsd.org/D36205
show more ...
|
#
c6d31b83 |
| 18-Jul-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
AST: rework
Make most AST handlers dynamically registered. This allows to have subsystem-specific handler source located in the subsystem files, instead of making subr_trap.c aware of it. For inst
AST: rework
Make most AST handlers dynamically registered. This allows to have subsystem-specific handler source located in the subsystem files, instead of making subr_trap.c aware of it. For instance, signal delivery code on return to userspace is now moved to kern_sig.c.
Also, it allows to have some handlers designated as the cleanup (kclear) type, which are called both at AST and on thread/process exit. For instance, ast(), exit1(), and NFS server no longer need to be aware about UFS softdep processing.
The dynamic registration also allows third-party modules to register AST handlers if needed. There is one caveat with loadable modules: the code does not make any effort to ensure that the module is not unloaded before all threads processed through AST handler in it. In fact, this is already present behavior for hwpmc.ko and ufs.ko. I do not think it is worth the efforts and the runtime overhead to try to fix it.
Reviewed by: markj Tested by: emaste (arm64), pho Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35888
show more ...
|
#
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 ...
|
#
524dadf7 |
| 25-May-2022 |
Mark Johnston <markj@FreeBSD.org> |
kevent: Fix an off-by-one in filt_timerexpire_l()
Suppose a periodic kevent timer fires close to its deadline, so that now - kc->next is small. Then delta ends up being 1, and the next timer deadli
kevent: Fix an off-by-one in filt_timerexpire_l()
Suppose a periodic kevent timer fires close to its deadline, so that now - kc->next is small. Then delta ends up being 1, and the next timer deadline is set to (delta + 1) * kc->to, where kc->to is the timer period. This means that the timer fires at half of the requested rate, and the value returned in kn_data is similarly inaccurate.
PR: 264131 Fixes: 7cb40543e964 ("filt_timerexpire: do not iterate over the interval") Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35313
show more ...
|
#
2479e381 |
| 19-May-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
kqueue: Trim trailing whitespace
MFC after: 1 week
|
Revision tags: release/13.1.0 |
|
#
91e7bdcd |
| 25-Apr-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Add timespecvalid_interval macro and use it.
Reviewed by: jhb, imp (early rev) Differential revision: https://reviews.freebsd.org/D34848 MFC after: 2 weeks
|
#
c3721292 |
| 09-Apr-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
kern: Remove a double word in a source code comment
- s/for for/for/
MFC after: 3 days
|
Revision tags: release/12.3.0 |
|
#
8e4a3add |
| 15-Nov-2021 |
Brooks Davis <brooks@FreeBSD.org> |
struct kevent_freebsd11 -> struct freebsd11_kevent
Rename to match the naming of syscalls and allow 32 to be appended without making an ugly name like kevent_freebsd1132.
While here, make the keven
struct kevent_freebsd11 -> struct freebsd11_kevent
Rename to match the naming of syscalls and allow 32 to be appended without making an ugly name like kevent_freebsd1132.
While here, make the kevent changelist argument const.
Reviewed by: kib
show more ...
|
#
2b68eb8e |
| 02-Oct-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: remove thread argument from VOP_STAT
and fo_stat.
|
#
2f4dbe27 |
| 01-Oct-2021 |
Kyle Evans <kevans@FreeBSD.org> |
kqueue: fix recent assertion
NOTE_ABSTIME may also have a zero timeout, which indicates that we should still fire immediately as an absolute time in the past. A test has been added for this one as
kqueue: fix recent assertion
NOTE_ABSTIME may also have a zero timeout, which indicates that we should still fire immediately as an absolute time in the past. A test has been added for this one as well.
Fixes: 9c999a259f00 ("kqueue: don't arbitrarily restrict long-past...") Point hat: kevans Reported by: syzbot+1c8d1154f560b3930042@syzkaller.appspotmail.com
show more ...
|
#
9c999a25 |
| 29-Sep-2021 |
Kyle Evans <kevans@FreeBSD.org> |
kqueue: don't arbitrarily restrict long-past values for NOTE_ABSTIME
NOTE_ABSTIME values are converted to values relative to boottime in filt_timervalidate(), and negative values are currently rejec
kqueue: don't arbitrarily restrict long-past values for NOTE_ABSTIME
NOTE_ABSTIME values are converted to values relative to boottime in filt_timervalidate(), and negative values are currently rejected. We don't reject times in the past in general, so clamp this up to 0 as needed such that the timer fires immediately rather than imposing what looks like an arbitrary restriction.
Another possible scenario is that the system clock had to be adjusted by ~minutes or ~hours and we have less than that in terms of uptime, making a reasonable short-timeout suddenly invalid. Firing it is still a valid choice in this scenario so that applications can at least expect a consistent behavior.
Reviewed by: kib, markj Discussed with: allanjude Differential Revision: https://reviews.freebsd.org/D32230
show more ...
|
#
0321a799 |
| 24-Sep-2021 |
Nathaniel Wesley Filardo <nfilardo@microsoft.com> |
kqueue: Add EV_KEEPUDATA flag
When this flag is set, operations that update an existing kevent will not change the udata field. This can be used to NOTE_TRIGGER or EV_{EN,DIS}ABLE events without ov
kqueue: Add EV_KEEPUDATA flag
When this flag is set, operations that update an existing kevent will not change the udata field. This can be used to NOTE_TRIGGER or EV_{EN,DIS}ABLE events without overwriting the stashed pointer.
Reviewed by: Domagoj Stolfa <domagoj.stolfa@gmail.com> Obtained from: CheriBSD Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D30286
show more ...
|
#
98168a6e |
| 06-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
kqueue: drain kqueue taskqueue if syscall tickled it
Otherwise return from the syscall and next syscall, which could be kevent(2) on the kqueue that should be notified, races with the kqueue taskque
kqueue: drain kqueue taskqueue if syscall tickled it
Otherwise return from the syscall and next syscall, which could be kevent(2) on the kqueue that should be notified, races with the kqueue taskqueue thread, and potentially misses the wakeup. This is reliably visible when kevent(2) only peeks into events using zeroed timeout.
PR: 258310 Reported by: arichardson, Jan Kokemüller <jan.kokemueller@gmail.com> Reviewed by: arichardson, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31858
show more ...
|
#
c511383d |
| 01-Sep-2021 |
Mark Johnston <markj@FreeBSD.org> |
kevent: Fix races between timer detach and kqtimer_proc_continue()
- When detaching a knote, we need to double check the enqueued flag after acquiring the process lock, as kqtimer_proc_continue()
kevent: Fix races between timer detach and kqtimer_proc_continue()
- When detaching a knote, we need to double check the enqueued flag after acquiring the process lock, as kqtimer_proc_continue() may have toggled it. - kqtimer_proc_continue() could in principle reschedule a stopped callout after filt_timerdetach() drains the callout. So, we need to re-check.
Reported by: syzbot+4a4cebb3ec07892cb040@syzkaller.appspotmail.com Reported by: syzbot+a9c04bc76078a3b7dd8d@syzkaller.appspotmail.com Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31772
show more ...
|
#
c9f8dcda |
| 02-Jun-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
kqueue: replace kq_ncallouts loop with atomic_fetchadd
|
#
e00bae5c |
| 27-May-2021 |
Mark Johnston <markj@FreeBSD.org> |
kevent: Prohibit negative change and event list lengths
Previously, a negative change list length would be treated the same as an empty change list. A negative event list length would result in bog
kevent: Prohibit negative change and event list lengths
Previously, a negative change list length would be treated the same as an empty change list. A negative event list length would result in bogus copyouts. Make kevent(2) return EINVAL for both cases so that application bugs are more easily found, and to be more robust against future changes to kevent internals.
Reviewed by: imp, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30480
show more ...
|
#
2cca77ee |
| 14-May-2021 |
Mark Johnston <markj@FreeBSD.org> |
kqueue timer: Remove detached knotes from the process stop queue
There are some scenarios where a timer event may be detached when it is on the process' kqueue timer stop queue. If kqtimer_proc_con
kqueue timer: Remove detached knotes from the process stop queue
There are some scenarios where a timer event may be detached when it is on the process' kqueue timer stop queue. If kqtimer_proc_continue() is called after that point, it will iterate over the queue and access freed timer structures.
It is also possible, at least in a multithreaded program, for a stopped timer event to be scheduled without removing it from the process' stop queue. Ensure that we do not doubly enqueue the event structure in this case.
Reported by: syzbot+cea0931bb4e34cd728bd@syzkaller.appspotmail.com Reported by: syzbot+9e1a2f3734652015998c@syzkaller.appspotmail.com Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30251
show more ...
|
#
7cb40543 |
| 28-Apr-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
filt_timerexpire: do not iterate over the interval
User-supplied data might make this loop too time-consuming. Divide directly, and handle both the possibility that we were woken up earlier, and ari
filt_timerexpire: do not iterate over the interval
User-supplied data might make this loop too time-consuming. Divide directly, and handle both the possibility that we were woken up earlier, and arithmetic overflows/underflows from the calculation.
Reported and tested by: pho (previous version) Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30069
show more ...
|
#
f1f98706 |
| 18-Apr-2021 |
Warner Losh <imp@FreeBSD.org> |
Minor style cleanup
We prefer 'while (0)' to 'while(0)' according to grep and stlye(9)'s space after keyword rule. Remove a few stragglers of the latter. Many of these usages were inconsistent withi
Minor style cleanup
We prefer 'while (0)' to 'while(0)' according to grep and stlye(9)'s space after keyword rule. Remove a few stragglers of the latter. Many of these usages were inconsistent within the file.
MFC After: 3 days Sponsored by: Netflix
show more ...
|