History log of /freebsd-10-stable/sys/kern/kern_event.c
Revision Date Author Comments
# 320293 23-Jun-2017 kib

MFC r320038:
Style.


# 317513 27-Apr-2017 emaste

MFC r315237 (kib): Hide kev_iovlen() definition under #ifdef KTRACE

Fixes build of kernel configs without KTRACE.

Sponsored by: The FreeBSD Foundation


# 315562 19-Mar-2017 kib

MFC r315155:
Ktracing kevent(2) calls with unusual arguments might leads to an
overly large allocation requests.

PR: 217435


# 311773 09-Jan-2017 kib

MFC r310615:
Change knlist_destroy() to assertion.


# 311048 02-Jan-2017 kib

MFC r310613:
Style.


# 311010 01-Jan-2017 kib

MFC r310554:
Some optimizations for kqueue timers.


# 311009 01-Jan-2017 kib

MFC r310552:
Some style.


# 310584 26-Dec-2016 kib

MFC r310302:
Do not clear KN_INFLUX when not owning influx state.

PR: 214923


# 310471 23-Dec-2016 kib

MFC r310159:
Switch from stdatomic.h to atomic.h for kernel.


# 310183 16-Dec-2016 kib

MFC r296775 (by gibbs):
Provide high precision conversion from ns,us,ms -> sbintime in kevent.

Tested by: ian


# 304894 27-Aug-2016 kib

MFC r264388 (by davide):
Define SBT_MAX.

MFC r267896 (by davide):
Improve r264388.

MFC note. The SBT_MAX definition already existed on stable/10, but without
the refinement from r267896. Also, consumers of SBT_MAX were not converted,
since r264388 was not merged properly.

Reviewed by: mav


# 303214 23-Jul-2016 kib

MFC r302936:
Explicitely check for the valid range of file descriptor values.


# 297977 14-Apr-2016 vangyzen

MFC r295012

kqueue EVFILT_PROC: avoid collision between NOTE_CHILD and NOTE_EXIT

NOTE_CHILD and NOTE_EXIT return something in kevent.data: the parent
pid (ppid) for NOTE_CHILD and the exit status for NOTE_EXIT.
Do not let the two events be combined, since one would overwrite
the other's data.

PR: 180385
Submitted by: David A. Bright <david_a_bright@dell.com>
Sponsored by: Dell Inc.


# 293545 09-Jan-2016 dchagin

MFC r283440:

For future use in the Linuxulator:

1. Add a kern_kqueue() counterpart for kqueue() with flags parameter.

2. Be a bit secure. To avoid a double fp lookup add a kern_kevent_fp()
counterpart for kern_kevent() with file pointer parameter instead
of file descriptor an pass the buck to it.

Suggested by: mjg [2]


# 287849 16-Sep-2015 kib

MFC r287366:
Use SLIST_FOREACH_SAFE() to fix iteration.


# 280258 19-Mar-2015 rwatson

Merge r263233 from HEAD to stable/10:

Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.

Sponsored by: Google, Inc.


# 275899 18-Dec-2014 kib

MFC r268843 (by bapt):
Extend kqueue's EVFILT_TIMER by adding precision unit flags support.


# 275898 18-Dec-2014 kib

MFC r259609 (by se):
Fix overflow for timeout values of more than 68 years, which is the maximum
covered by sbintime (LONG_MAX seconds).

MFC r259633 (by se):
Fix compilation on 32 bit architectures and use INT64_MAX instead of
LONG_MAX for the upper bound check.


# 273705 26-Oct-2014 ian

MFC r272528: Make kevent(2) periodic timer events more reliably periodic.


# 264368 12-Apr-2014 kib

MFC r264146:
Fix a race between kqueue_register() and kqueue_scan() setting KN_INFLUX
flag while knlist is not locked, which caused lost notifications from
parallel knote().


# 258324 18-Nov-2013 pjd

MFC r258148,r258149,r258150,r258152,r258153,r258154,r258181,r258182:

r258148:

Add a note that this file is compiled as part of the kernel and libc.

Requested by: kib

r258149:

Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
to the destination cap_rights_t structure.

This already matches manual page.

r258150:

Sync return value with actual implementation.

r258151:

Style.

r258152:

Precisely document capability rights here too (they are already documented
in rights(4)).

r258153:

The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without
the CAP_LOOKUP right, so include this rights.

r258154:

- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
in index 0 for the future.
- Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include
CAP_LOOKUP right in them.
- Shuffle the bits around so there are no gaps. This is last chance to do
that as all moved rights are not used yet.

r258181:

Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
a very hard time to fully understand) with much more intuitive rights:

CAP_EVENT - when set on descriptor, the descriptor can be monitored
with syscalls like select(2), poll(2), kevent(2).

CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the eventlist
argument set to non-NULL value; in other words the given
kqueue descriptor can be used to monitor other descriptors.
CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the changelist
argument set to non-NULL value; in other words it allows to
modify events monitored with the given kqueue descriptor.

Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and
CAP_KQUEUE_CHANGE.

Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT.

r258182:

Correct right names.

Sponsored by: The FreeBSD Foundation
Approved by: re (kib)


# 287849 16-Sep-2015 kib

MFC r287366:
Use SLIST_FOREACH_SAFE() to fix iteration.


# 280258 19-Mar-2015 rwatson

Merge r263233 from HEAD to stable/10:

Update kernel inclusions of capability.h to use capsicum.h instead; some
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.

Sponsored by: Google, Inc.


# 275899 18-Dec-2014 kib

MFC r268843 (by bapt):
Extend kqueue's EVFILT_TIMER by adding precision unit flags support.


# 275898 18-Dec-2014 kib

MFC r259609 (by se):
Fix overflow for timeout values of more than 68 years, which is the maximum
covered by sbintime (LONG_MAX seconds).

MFC r259633 (by se):
Fix compilation on 32 bit architectures and use INT64_MAX instead of
LONG_MAX for the upper bound check.


# 273705 26-Oct-2014 ian

MFC r272528: Make kevent(2) periodic timer events more reliably periodic.


# 264368 12-Apr-2014 kib

MFC r264146:
Fix a race between kqueue_register() and kqueue_scan() setting KN_INFLUX
flag while knlist is not locked, which caused lost notifications from
parallel knote().


# 258324 18-Nov-2013 pjd

MFC r258148,r258149,r258150,r258152,r258153,r258154,r258181,r258182:

r258148:

Add a note that this file is compiled as part of the kernel and libc.

Requested by: kib

r258149:

Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
to the destination cap_rights_t structure.

This already matches manual page.

r258150:

Sync return value with actual implementation.

r258151:

Style.

r258152:

Precisely document capability rights here too (they are already documented
in rights(4)).

r258153:

The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT,
CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without
the CAP_LOOKUP right, so include this rights.

r258154:

- Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room
in index 0 for the future.
- Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include
CAP_LOOKUP right in them.
- Shuffle the bits around so there are no gaps. This is last chance to do
that as all moved rights are not used yet.

r258181:

Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had
a very hard time to fully understand) with much more intuitive rights:

CAP_EVENT - when set on descriptor, the descriptor can be monitored
with syscalls like select(2), poll(2), kevent(2).

CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the eventlist
argument set to non-NULL value; in other words the given
kqueue descriptor can be used to monitor other descriptors.
CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2)
syscall can be called on this kqueue to with the changelist
argument set to non-NULL value; in other words it allows to
modify events monitored with the given kqueue descriptor.

Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and
CAP_KQUEUE_CHANGE.

Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT.

r258182:

Correct right names.

Sponsored by: The FreeBSD Foundation
Approved by: re (kib)