The NetBSD Project

CVS log for src/sys/kern/kern_event.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.146 / (download) - annotate - [select for diffs], Sun Jul 24 19:23:44 2022 UTC (6 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

kern_event.c: Mark KASSERT-only static function as __diagused.

Otherwise clang objects with -Wunneeded-internal-declaration.

Revision 1.145 / (download) - annotate - [select for diffs], Tue Jul 19 01:03:05 2022 UTC (6 months, 2 weeks ago) by thorpej
Branch: MAIN
Changes since 1.144: +169 -16 lines
Diff to previous 1.144 (colored)

Fix a problem whereby detaching a device that has open kevent
registrations can result in a UAF: When a device detaches, it
calls seldestroy(), which calls knote_fini(), and when that
returns, the softc that contained the selinfo and klist are freed.
However, any knotes that were registered still linger on with the
kq descriptor they're were associated with, and when the file
descriptors close, those knotes will be f_detach'd, which will
call into the driver instance that no longer exists.

Address this problem by adding a "foplock" mutex to the knote.
This foplock must be held when calling into filter_attach(),
filter_detach(), and filter_event() (XXX not filter_touch();
see code for details).  Now, in klist_fini(), for each knote
that is on the klist that's about to be blown away, acquire
the foplock, replace the knote's filterops with a do-nothing
stub, and release the foplock.

The end result is that:
==> The foplock ensures that calls into filter_*() will get EITHER
    the real backing object's filterops OR the nop stubs.
==> Holing the foplock across the filter_*() calls ensures that
    klist_fini() will not complete until there are no callers inside
    the filterops that are about to be blown away.

Revision 1.144 / (download) - annotate - [select for diffs], Tue Jul 19 00:46:00 2022 UTC (6 months, 2 weeks ago) by thorpej
Branch: MAIN
Changes since 1.143: +50 -27 lines
Diff to previous 1.143 (colored)

Make some knote implementation details private to kern_event.c.  NFC, and
no ABI change for kevent providers.

Revision 1.143 / (download) - annotate - [select for diffs], Wed Jul 13 14:11:46 2022 UTC (6 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.142: +40 -2 lines
Diff to previous 1.142 (colored)

Move klist_{init,fini,insert,remove}() into kern_event.c.  NFC.

Revision 1.142 / (download) - annotate - [select for diffs], Wed Jul 13 03:23:07 2022 UTC (6 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.141: +27 -11 lines
Diff to previous 1.141 (colored)

Funnel knote alloc/free into a single pair of functions.  NFCI.

Revision 1.141 / (download) - annotate - [select for diffs], Tue May 24 20:50:19 2022 UTC (8 months, 1 week ago) by andvar
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

fix various typos in comment, documentation and log messages.

Revision 1.140 / (download) - annotate - [select for diffs], Sat Feb 12 15:51:29 2022 UTC (11 months, 2 weeks ago) by thorpej
Branch: MAIN
Changes since 1.139: +5 -5 lines
Diff to previous 1.139 (colored)

Add inline functions to manipulate the klists that link up knotes
via kn_selnext:

- klist_init()
- klist_fini()
- klist_insert()
- klist_remove()

These provide some API insulation from the implementation details of these
lists (but not completely; see vn_knote_attach() and vn_knote_detach()).
Currently just a wrapper around SLIST(9).

This will make it significantly easier to switch kn_selnext linkage
to a different kind of list.

Revision 1.139 / (download) - annotate - [select for diffs], Sat Jan 1 10:54:21 2022 UTC (13 months ago) by msaitoh
Branch: MAIN
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored)

s/aquire/acquire/ in comment.

Revision 1.138 / (download) - annotate - [select for diffs], Sat Oct 23 18:46:26 2021 UTC (15 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.137: +6 -7 lines
Diff to previous 1.137 (colored)

Fix a regression introduced in kern_event.c,v 1.129 that would cause
"udata" to get clobbered on ONESHOT events, and add a unit test for it.
Reported by martin@ (manifested in his case as a KASSERT() firing when
running unit tests in COMPAT_NETBSD32).

Revision 1.137 / (download) - annotate - [select for diffs], Sat Oct 23 01:28:33 2021 UTC (15 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.136: +3 -2 lines
Diff to previous 1.136 (colored)

Add support for the EVFILT_EMPTY filter, which is activated when the
write buffer associated with the file descriptor is empty.  This is
currently implemented only for sockets, and is intended primarily to
provide visibility to applications that all previously written data
has been acknowledged by the TCP layer on the receiver.  Compatible
with the same filter in FreeBSD.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Oct 22 04:49:24 2021 UTC (15 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.135: +93 -8 lines
Diff to previous 1.135 (colored)

Support modifying an existing timer without having to delete it first.
Semantics match FreeBSD.

Revision 1.135 / (download) - annotate - [select for diffs], Thu Oct 21 02:34:03 2021 UTC (15 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.134: +17 -10 lines
Diff to previous 1.134 (colored)

Allow the f_touch() filter op to return an error, specifically in
the EVENT_REGISTER case.

Revision 1.134 / (download) - annotate - [select for diffs], Thu Oct 21 01:11:21 2021 UTC (15 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.133: +80 -44 lines
Diff to previous 1.133 (colored)

Re-factor the code that computes the EVFILT_TIMER value into its own
function.

NFC.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Oct 21 00:54:15 2021 UTC (15 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.132: +34 -32 lines
Diff to previous 1.132 (colored)

- Don't use a separate kqueue_timer_lock; just protect those knotes
  with the kq->kq_lock.
- Re-factor the guts of knote_activate() into knote_activate_locked(),
  and use it in a few places to avoid a few unlock-the-immediately-lock
  cycles.
- Define a FILT_TIMER_NOSCHED macro, rather than hard-coding (uintptr_t)-1
  in a bunch of difference place.

NFC.

Revision 1.132 / (download) - annotate - [select for diffs], Wed Oct 13 04:57:19 2021 UTC (15 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.131: +76 -14 lines
Diff to previous 1.131 (colored)

Add support for the NOTE_SECONDS, NOTE_MSECONDS, NOTE_USECONDS,
NOTE_NSECONDS, and NOTE_ABSTIME filter flags to EVFILT_TIMER,
API-compatible with the same in FreeBSD.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Oct 11 01:07:36 2021 UTC (15 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.130: +29 -2 lines
Diff to previous 1.130 (colored)

Setting EV_EOF requires modifying kn->kn_flags.  However, that relies on
holding the kq_lock of that note's kq.  Rather than exposing this directly,
add new knote_set_eof() and knote_clear_eof() functions that handle the
necessary locking and don't leak as many implementation details to modules.

NetBSD 9.99.91

Revision 1.130 / (download) - annotate - [select for diffs], Sun Oct 10 19:11:56 2021 UTC (15 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.129: +4 -2 lines
Diff to previous 1.129 (colored)

Check _KERNEL_OPT before including opt_ddb.h.

Revision 1.129 / (download) - annotate - [select for diffs], Sun Oct 10 18:07:51 2021 UTC (15 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.128: +689 -101 lines
Diff to previous 1.128 (colored)

Changes to make EVFILT_PROC MP-safe:

Because the locking protocol around processes is somewhat complex
compared to other events that can be posted on kqueues, introduce
new functions for posting NOTE_EXEC, NOTE_EXIT, and NOTE_FORK,
rather than just using the generic knote() function.  These functions
KASSERT() their locking expectations, and deal with other complexities
for each situation.

knote_proc_fork(), in particiular, needs to handle NOTE_TRACK, which
requires allocation of a new knote to attach to the child process.  We
don't want to be allocating memory while holding the parent's p_lock.
Furthermore, we also have to attach the tracking note to the child
process, which means we have to acquire the child's p_lock.

So, to handle all this, we introduce some additional synchronization
infrastructure around the 'knote' structure:

- Add the ability to mark a knote as being in a state of flux.  Knotes
  in this state are guaranteed not to be detached/deleted, thus allowing
  a code path drop other locks after putting a knote in this state.

- Code paths that wish to detach/delete a knote must first check if the
  knote is in-flux.  If so, they must wait for it to quiesce.  Because
  multiple threads of execution may attempt this concurrently, a mechanism
  exists for a single LWP to claim the detach responsibility; all other
  threads simply wait for the knote to disappear before they can make
  further progress.

- When kqueue_scan() encounters an in-flux knote, it simply treats the
  situation just like encountering another thread's queue marker -- wait
  for the flux to settle and continue on.

(The "in-flux knote" idea was inspired by FreeBSD, but this works differently
from their implementation, as the two kqueue implementations have diverged
quite a bit.)

knote_proc_fork() uses this infrastructure to implement NOTE_TRACK like so:

- Attempt to put the original tracking knote into a state of flux; if this
  fails (because the note has a detach pending), we skip all processing
  (the original process has lost interest, and we simply won the race).

- Once the note is in-flux, drop the kq and forking process's locks, and
  allocate 2 knotes: one to post the NOTE_CHILD event, and one to attach
  a new NOTE_TRACK to the child process.  Notably, we do NOT go through
  kqueue_register() to do this, but rather do all of the work directly
  and KASSERT() our assumptions; this allows us to directly control our
  interaction with locks.  All memory allocations here are performed with
  KM_NOSLEEP, in order to prevent holding the original knote in-flux
  indefinitely.

- Because the NOTE_TRACK use case adds knotes to kqueues through a
  sort of back-door mechanism, we must serialize with the closing of
  the destination kqueue's file descriptor, so steal another bit from
  the kq_count field to notify other threads that a kqueue is on its
  way out to prevent new knotes from being enqueued while the close
  path detaches them.

In addition to fixing EVFILT_PROC's reliance on KERNEL_LOCK, this also
fixes a long-standing bug whereby a NOTE_CHILD event could be dropped
if the child process exited before the interested process received the
NOTE_CHILD event (the same knote would be used to deliver the NOTE_EXIT
event, and would clobber the NOTE_CHILD's 'data' field).

Add a bunch of comments to explain what's going on in various critical
sections, and sprinkle additional KASSERT()s to validate assumptions
in several more locations.

Revision 1.128 / (download) - annotate - [select for diffs], Thu Sep 30 01:20:53 2021 UTC (16 months ago) by thorpej
Branch: MAIN
Changes since 1.127: +6 -3 lines
Diff to previous 1.127 (colored)

Make the info returned by kqueue_stat() a little less barren.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Sep 30 01:12:06 2021 UTC (16 months ago) by thorpej
Branch: MAIN
Changes since 1.126: +4 -5 lines
Diff to previous 1.126 (colored)

In knote(), don't call kn->kn_fop->f_event() directly; use filter_event()
to get the correct KERNEL_LOCK handling for the filter attached to that
specific note.

Revision 1.126 / (download) - annotate - [select for diffs], Sun Sep 26 23:37:40 2021 UTC (16 months ago) by thorpej
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored)

In kqueue_kqfilter(), return EINVAL instead of 1 if something other than
EVFILT_READ was requested.

Revision 1.125 / (download) - annotate - [select for diffs], Sun Sep 26 23:34:46 2021 UTC (16 months ago) by thorpej
Branch: MAIN
Changes since 1.124: +24 -10 lines
Diff to previous 1.124 (colored)

- Rename kqueue_misc_lock -> kqueue_timer_lock, since EVFILT_TIMER is
  now its only user.  Also initialize it as IPL_SOFTCLOCK; there is no
  practical difference in how it operates (it is still an adaptive lock),
  but this serves as a visual reminder that we are interlocking against
  a callout.
- Add some comments that describe why we don't need to hold kqueue_timer_lock
  when detaching an EVFILT_TIMER due to guarantees made by callout_halt().
- Mark timer_filtops as MPSAFE.

Revision 1.124 / (download) - annotate - [select for diffs], Sun Sep 26 21:29:38 2021 UTC (16 months ago) by thorpej
Branch: MAIN
Changes since 1.123: +4 -52 lines
Diff to previous 1.123 (colored)

Fix the locking around EVFILT_FS.  Previously, the code would walk the
fs_klist and take the kqueue_misc_lock inside the event callback.
However, that list can be modified by the attach and detach callbacks,
which could result in the walker stepping right off a cliff.

Instead, we give the fs_klist it's own lock, and hold it while we
call knote(), using the NOTE_SUBMIT protocol.  Also, fs_filtops
into vfs_syscalls.c so all of the locking logic is contained in one
file (there is precedence with sig_filtops).  fs_filtops is now marked
MPSAFE.

Revision 1.123 / (download) - annotate - [select for diffs], Sun Sep 26 18:13:58 2021 UTC (16 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.122: +5 -5 lines
Diff to previous 1.122 (colored)

Mark kqread_filtops, user_filtops, and seltrue_filtops as MPSAFE.

Revision 1.122 / (download) - annotate - [select for diffs], Sun Sep 26 03:12:50 2021 UTC (16 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.121: +81 -21 lines
Diff to previous 1.121 (colored)

- Define a new filterops flag FILTEROP_MPSAFE, which states that the
  kqueue filter does not require the KERNEL_LOCK to be held.
- Add wrappers around the calls into the filterops that take care of
  the locking requirements.

No functional change, since no filterops yet define FILTEROP_MPSAFE.

Revision 1.121 / (download) - annotate - [select for diffs], Sun Sep 26 01:16:10 2021 UTC (16 months, 1 week ago) by thorpej
Branch: MAIN
Changes since 1.120: +16 -15 lines
Diff to previous 1.120 (colored)

Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89

Revision 1.120 / (download) - annotate - [select for diffs], Tue Sep 21 14:54:02 2021 UTC (16 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

undo previous, wrong file.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Sep 21 14:52:40 2021 UTC (16 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.118: +4 -4 lines
Diff to previous 1.118 (colored)

don't opencode kauth_cred_get()

Revision 1.117.4.1 / (download) - annotate - [select for diffs], Thu May 13 00:47:32 2021 UTC (20 months, 3 weeks ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.117: +32 -22 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

Sync with HEAD.

Revision 1.118 / (download) - annotate - [select for diffs], Sun May 2 19:13:43 2021 UTC (21 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.117: +32 -22 lines
Diff to previous 1.117 (colored)

implement fo_restart hook for kqueue descriptors, so that close(2)
on the descriptor won't block indefinitely if other thread is currently
blocked on the same kqueue in kevent(2)

done similarily to pipes and sockets, i.e. using flag on the potentially
shared kqueue structure hooked off file_t - this is somewhat suboptimal
if the application dup(2)ped the descriptor, but this should be rare
enough to not really matter

usually this causes the kevent(2) to end up returning EBADF since
on the syscall restart the descriptor is not there anymore; if
dup(2)ped the kevent(2) call can continue successfully if the closed
kqueue descriptor was other than the one used for the kevent(2)
call

PR kern/46248 by Julian Fagir

Revision 1.108.2.3 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:00 2021 UTC (22 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.108.2.2: +50 -35 lines
Diff to previous 1.108.2.2 (colored) next main 1.109 (colored)

Sync with HEAD.

Revision 1.104.4.2 / (download) - annotate - [select for diffs], Sun Feb 7 16:42:41 2021 UTC (23 months, 3 weeks ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Changes since 1.104.4.1: +4 -2 lines
Diff to previous 1.104.4.1 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored)

Apply additional patch, requested by jdolecek in ticket #1191:

	sys/kern/kern_event.c				1.110-1.115 (via patch)

Fix merge botch for the EV_ONESHOT branch.

Revision 1.104.4.1 / (download) - annotate - [select for diffs], Thu Feb 4 16:57:25 2021 UTC (23 months, 4 weeks ago) by martin
Branch: netbsd-9
Changes since 1.104: +133 -112 lines
Diff to previous 1.104 (colored)

Pullup the following (requested by jdolecek in ticket #1191):

	sys/kern/kern_event.c	r1.110-1.115 (via patch)

fix a race in kqueue_scan() - when multiple threads check the same
kqueue, it could happen other thread seen empty kqueue while kevent
was being checked for re-firing and re-queued

make sure to keep retrying if there are outstanding kevents even
if no kevent is found on first pass through the queue, and only
kq_count when actually completely done with the kevent

PR kern/50094 by Christof Meerwal

Also fixes timer latency in Go, as reported in
https://github.com/golang/go/issues/42515 by Michael Pratt

Revision 1.117 / (download) - annotate - [select for diffs], Wed Jan 27 06:59:08 2021 UTC (2 years ago) by skrll
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs
Branch point for: thorpej-i2c-spi-conf
Changes since 1.116: +3 -4 lines
Diff to previous 1.116 (colored)

Fix non-DIAGNOSTIC build

Revision 1.116 / (download) - annotate - [select for diffs], Tue Jan 26 19:09:18 2021 UTC (2 years ago) by jdolecek
Branch: MAIN
Changes since 1.115: +6 -11 lines
Diff to previous 1.115 (colored)

call f_touch with kq_lock held, and without KERNEL_LOCK() - for this
adjust EVFILT_USER, which is the only filter actually using that hook

kqueue_scan() now doesn't need to exit/enter the kq_lock when calling
f_touch, which removes another possible race

part of PR kern/50094

Revision 1.115 / (download) - annotate - [select for diffs], Mon Jan 25 19:57:05 2021 UTC (2 years ago) by jdolecek
Branch: MAIN
Changes since 1.114: +17 -7 lines
Diff to previous 1.114 (colored)

put back clearing of KN_QUEUED and check for re-queue - as rev. 1.53 notes,
it's necessary for correct function

fixes PR kern/55946, thanks to Paul Goyette for testing

part of PR kern/50094 fix

Revision 1.114 / (download) - annotate - [select for diffs], Sun Jan 24 11:31:47 2021 UTC (2 years ago) by jdolecek
Branch: MAIN
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored)

don't check signals while waiting for other kqueue scans to finish

reportedly somewhat improves behaviour for PR kern/55946

part of PR kern/50094 fix

Revision 1.113 / (download) - annotate - [select for diffs], Thu Jan 21 19:37:23 2021 UTC (2 years ago) by jdolecek
Branch: MAIN
Changes since 1.112: +2 -3 lines
Diff to previous 1.112 (colored)

remove stray debug #define DEBUG

Revision 1.112 / (download) - annotate - [select for diffs], Thu Jan 21 18:09:23 2021 UTC (2 years ago) by jdolecek
Branch: MAIN
Changes since 1.111: +7 -8 lines
Diff to previous 1.111 (colored)

adjust kq_check() (enabled with DEBUG) to new reality - it's now perfectly
normal to have kq_count bigger than number of the linked entries
on the kqueue

PR kern/50094, problem pointed out by Chuck Silvers

Revision 1.111 / (download) - annotate - [select for diffs], Wed Jan 20 21:39:09 2021 UTC (2 years ago) by jdolecek
Branch: MAIN
Changes since 1.110: +40 -27 lines
Diff to previous 1.110 (colored)

fix a race in kqueue_scan() - when multiple threads check the same
kqueue, it could happen other thread seen empty kqueue while kevent
was being checked for re-firing and re-queued

make sure to keep retrying if there are outstanding kevents even
if no kevent is found on first pass through the queue, and only
drop the KN_QUEUED flag and kq_count when actually completely done
with the kevent

change is inspired by the FreeBSD in-flux handling, but without
introducing the reference counting

PR kern/50094 by Christof Meerwald

Revision 1.108.2.2 / (download) - annotate - [select for diffs], Sun Jan 3 16:35:04 2021 UTC (2 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.108.2.1: +126 -123 lines
Diff to previous 1.108.2.1 (colored)

Sync w/ HEAD.

Revision 1.110 / (download) - annotate - [select for diffs], Sun Dec 27 12:45:33 2020 UTC (2 years, 1 month ago) by jdolecek
Branch: MAIN
Changes since 1.109: +126 -123 lines
Diff to previous 1.109 (colored)

reduce indentation for the main processing loop in kqueue_scan(), this also
makes the code more similar to FreeBSD; NFCI

part of PR kern/50094

Revision 1.108.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:13 2020 UTC (2 years, 1 month ago) by thorpej
Branch: thorpej-futex
Changes since 1.108: +4 -4 lines
Diff to previous 1.108 (colored)

Sync w/ HEAD.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Dec 11 03:00:09 2020 UTC (2 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.108: +4 -4 lines
Diff to previous 1.108 (colored)

Use sel{record,remove}_knote().

Revision 1.108 / (download) - annotate - [select for diffs], Sat Oct 31 01:08:32 2020 UTC (2 years, 3 months ago) by christos
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.107: +179 -34 lines
Diff to previous 1.107 (colored)

PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2)

Revision 1.107 / (download) - annotate - [select for diffs], Sat May 23 23:42:43 2020 UTC (2 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.106: +5 -5 lines
Diff to previous 1.106 (colored)

Move proc_lock into the data segment.  It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.

Revision 1.103.4.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:03 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.103.4.2: +5 -2 lines
Diff to previous 1.103.4.2 (colored) to branchpoint 1.103 (colored) next main 1.104 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.103.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:51 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.103.4.1: +3 -3 lines
Diff to previous 1.103.4.1 (colored) to branchpoint 1.103 (colored)

Merge changes from current as of 20200406

Revision 1.105.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:02 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored) next main 1.106 (colored)

Sync with head.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Feb 1 02:23:04 2020 UTC (3 years ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

Load struct filedesc::fd_dt with atomic_load_consume.

Exceptions: when fd_refcnt <= 1, or when holding fd_lock.

While here:

- Restore KASSERT(mutex_owned(&fdp->fd_lock)) in fd_unused.
  => This is used only in fd_close and fd_abort, where it holds.
- Move bounds check assertion in fd_putfile to where it matters.
- Store fd_dt with atomic_store_release.
- Move load of fd_dt under lock in knote_fdclose.
- Omit membar_consumer in fdesc_readdir.
  => atomic_load_consume serves the same purpose now.
  => Was needed only on alpha anyway.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Oct 18 19:43:49 2019 UTC (3 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.104: +7 -4 lines
Diff to previous 1.104 (colored)

print which process asked for an unsupported event so we can fix it.

Revision 1.103.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:03 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.103: +3 -2 lines
Diff to previous 1.103 (colored)

Sync with HEAD

Revision 1.103.2.1 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:50 2018 UTC (4 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.103: +3 -2 lines
Diff to previous 1.103 (colored) next main 1.104 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.80.2.1.2.2 / (download) - annotate - [select for diffs], Wed Nov 21 12:14:29 2018 UTC (4 years, 2 months ago) by martin
Branch: netbsd-7-0
Changes since 1.80.2.1.2.1: +3 -2 lines
Diff to previous 1.80.2.1.2.1 (colored) to branchpoint 1.80.2.1 (colored) next main 1.80.2.2 (colored)

Pull up following revision(s) (requested by maxv in ticket #1653):

	sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.80.2.1.6.2 / (download) - annotate - [select for diffs], Wed Nov 21 12:13:08 2018 UTC (4 years, 2 months ago) by martin
Branch: netbsd-7-1
Changes since 1.80.2.1.6.1: +3 -2 lines
Diff to previous 1.80.2.1.6.1 (colored) to branchpoint 1.80.2.1 (colored) next main 1.80.2.2 (colored)

Pull up following revision(s) (requested by maxv in ticket #1653):

	sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.80.2.3 / (download) - annotate - [select for diffs], Wed Nov 21 12:12:15 2018 UTC (4 years, 2 months ago) by martin
Branch: netbsd-7
Changes since 1.80.2.2: +3 -2 lines
Diff to previous 1.80.2.2 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored)

Pull up following revision(s) (requested by maxv in ticket #1653):

	sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.91.2.3 / (download) - annotate - [select for diffs], Wed Nov 21 12:05:09 2018 UTC (4 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.91.2.2: +3 -2 lines
Diff to previous 1.91.2.2 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored)

Pull up following revision(s) (requested by maxv in ticket #1102):

	sys/kern/kern_event.c: revision 1.104

Fix kernel info leak. There are 4 bytes of padding in struct kevent.
[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.104 / (download) - annotate - [select for diffs], Tue Nov 13 06:58:14 2018 UTC (4 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.103: +3 -2 lines
Diff to previous 1.103 (colored)

Fix kernel info leak. There are 4 bytes of padding in struct kevent.

[  287.537676] kleak: Possible leak in copyout: [len=40, leaked=4]
[  287.537676] #0 0xffffffff80b7c41a in kleak_note <netbsd>
[  287.547673] #1 0xffffffff80b7c49a in kleak_copyout <netbsd>
[  287.557677] #2 0xffffffff80b1d32d in kqueue_scan.isra.1.constprop.2 <netbsd>
[  287.557677] #3 0xffffffff80b1dc6a in kevent1 <netbsd>
[  287.567683] #4 0xffffffff80b1dcb0 in sys___kevent50 <netbsd>
[  287.567683] #5 0xffffffff8025ab3c in sy_call <netbsd>
[  287.577688] #6 0xffffffff8025ad6e in sy_invoke <netbsd>
[  287.587693] #7 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.91.2.2 / (download) - annotate - [select for diffs], Tue Jan 16 13:26:12 2018 UTC (5 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.91.2.1: +8 -2 lines
Diff to previous 1.91.2.1 (colored) to branchpoint 1.91 (colored)

Pull up following revision(s) (requested by christos in ticket #501):
	sys/kern/kern_event.c: revision 1.103
Set EV_ONESHOT to prevent rescheduling
XXX: pullup-8

Revision 1.103 / (download) - annotate - [select for diffs], Fri Jan 12 17:58:51 2018 UTC (5 years ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.102: +8 -2 lines
Diff to previous 1.102 (colored)

Set EV_ONESHOT to prevent rescheduling
XXX: pullup-8

Revision 1.102 / (download) - annotate - [select for diffs], Tue Jan 9 03:31:13 2018 UTC (5 years ago) by christos
Branch: MAIN
Changes since 1.101: +52 -2 lines
Diff to previous 1.101 (colored)

Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet

Revision 1.76.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:44 2017 UTC (5 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.76.2.3: +172 -78 lines
Diff to previous 1.76.2.3 (colored) to branchpoint 1.76 (colored) next main 1.77 (colored)

update from HEAD

Revision 1.101 / (download) - annotate - [select for diffs], Thu Nov 30 20:25:55 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.100: +8 -6 lines
Diff to previous 1.100 (colored)

add fo_name so we can identify the fileops in a simple way.

Revision 1.100 / (download) - annotate - [select for diffs], Thu Nov 30 14:19:27 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.99: +9 -2 lines
Diff to previous 1.99 (colored)

Put previous removed diagnostic back as debug. It has caught in the past
(and now) different kqueue behavior between NetBSD and other kqueue
implementations that depend on specific file types. If 3rd party programs
trigger this it is probably because we are doing something different.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Nov 30 05:52:40 2017 UTC (5 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.98: +2 -8 lines
Diff to previous 1.98 (colored)

Remove spammy kevent failure printf.

Maybe this was once useful for debugging the kernel, but it's just
console spam triggered by buggy or malicious userland programs now.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Nov 11 03:58:01 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.97: +8 -4 lines
Diff to previous 1.97 (colored)

Don't add kevents to closing file descriptors (from riastradh)

Revision 1.97 / (download) - annotate - [select for diffs], Tue Nov 7 18:35:57 2017 UTC (5 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.96: +3 -5 lines
Diff to previous 1.96 (colored)

Add two utility functions to help use kmem with strings: kmem_strdupsize,
kmem_strfree.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Oct 25 08:12:39 2017 UTC (5 years, 3 months ago) by maya
Branch: MAIN
Changes since 1.95: +35 -12 lines
Diff to previous 1.95 (colored)

Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- 	{ a, b, c, d
+ 	{
+ 	.f_isfd = a,
+ 	.f_attach = b,
+ 	.f_detach = c,
+ 	.f_event = d,
};

Revision 1.95 / (download) - annotate - [select for diffs], Wed Oct 25 06:02:40 2017 UTC (5 years, 3 months ago) by riastradh
Branch: MAIN
Changes since 1.94: +22 -3 lines
Diff to previous 1.94 (colored)

Document lock order and locking rules.

Revision 1.94 / (download) - annotate - [select for diffs], Sat Sep 16 23:55:16 2017 UTC (5 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.93: +21 -13 lines
Diff to previous 1.93 (colored)

more debug info

Revision 1.82.2.6 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.82.2.5: +37 -23 lines
Diff to previous 1.82.2.5 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored)

Sync with HEAD

Revision 1.80.2.2 / (download) - annotate - [select for diffs], Sat Jul 8 16:53:24 2017 UTC (5 years, 6 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.80.2.1: +76 -40 lines
Diff to previous 1.80.2.1 (colored) to branchpoint 1.80 (colored)

Pull up following revision(s) (requested by christos in ticket #1442):
	sys/kern/kern_event.c: revision 1.92 via patch
	sys/miscfs/genfs/genfs_vnops.c: revision 1.198 via patch
	sys/sys/event.h: revision 1.30 via patch
Provide EVFILT_WRITE; this is what FreeBSD does and go wants it.
Makes go unit tests pass.
--
fix file descriptor locking (from joerg).
fixes kernel crashes by running go

Revision 1.80.2.1.6.1 / (download) - annotate - [select for diffs], Sat Jul 8 16:52:27 2017 UTC (5 years, 6 months ago) by snj
Branch: netbsd-7-1
CVS Tags: netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE
Changes since 1.80.2.1: +76 -40 lines
Diff to previous 1.80.2.1 (colored)

Pull up following revision(s) (requested by christos in ticket #1442):
	sys/kern/kern_event.c: revision 1.92 via patch
	sys/miscfs/genfs/genfs_vnops.c: revision 1.198 via patch
	sys/sys/event.h: revision 1.30 via patch
Provide EVFILT_WRITE; this is what FreeBSD does and go wants it.
Makes go unit tests pass.
--
fix file descriptor locking (from joerg).
fixes kernel crashes by running go

Revision 1.80.2.1.2.1 / (download) - annotate - [select for diffs], Sat Jul 8 16:51:56 2017 UTC (5 years, 6 months ago) by snj
Branch: netbsd-7-0
Changes since 1.80.2.1: +76 -40 lines
Diff to previous 1.80.2.1 (colored)

Pull up following revision(s) (requested by christos in ticket #1442):
	sys/kern/kern_event.c: revision 1.92 via patch
	sys/miscfs/genfs/genfs_vnops.c: revision 1.198 via patch
	sys/sys/event.h: revision 1.30 via patch
Provide EVFILT_WRITE; this is what FreeBSD does and go wants it.
Makes go unit tests pass.
--
fix file descriptor locking (from joerg).
fixes kernel crashes by running go

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Wed Jul 5 20:04:40 2017 UTC (5 years, 6 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.91: +23 -8 lines
Diff to previous 1.91 (colored)

Pull up following revision(s) (requested by christos in ticket #91):
	sys/kern/kern_event.c: revision 1.92
	sys/miscfs/genfs/genfs_vnops.c: revision 1.198
	sys/sys/event.h: revision 1.30
Provide EVFILT_WRITE; this is what FreeBSD does and go wants it.
Makes go unit tests pass.
--
fix file descriptor locking (from joerg).
fixes kernel crashes by running go

Revision 1.93 / (download) - annotate - [select for diffs], Mon Jul 3 00:53:33 2017 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.92: +5 -6 lines
Diff to previous 1.92 (colored)

Nix trailing whitespace.  No functional change.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Jul 1 20:08:56 2017 UTC (5 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.91: +23 -8 lines
Diff to previous 1.91 (colored)

fix file descriptor locking (from joerg).
fixes kernel crashes by running go
XXX: pullup-7

Revision 1.88.8.4 / (download) - annotate - [select for diffs], Fri May 19 00:22:57 2017 UTC (5 years, 8 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.88.8.3: +2 -2 lines
Diff to previous 1.88.8.3 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored)

Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.88.8.3 / (download) - annotate - [select for diffs], Wed May 17 01:42:17 2017 UTC (5 years, 8 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.88.8.2: +5 -4 lines
Diff to previous 1.88.8.2 (colored) to branchpoint 1.88 (colored)

Import fix from HEAD for NULL deref

Revision 1.91 / (download) - annotate - [select for diffs], Thu May 11 23:50:17 2017 UTC (5 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.90: +5 -4 lines
Diff to previous 1.90 (colored)

protect against NULL, from PaulG

Revision 1.88.8.2 / (download) - annotate - [select for diffs], Thu May 11 02:58:40 2017 UTC (5 years, 8 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.88.8.1: +4 -3 lines
Diff to previous 1.88.8.1 (colored) to branchpoint 1.88 (colored)

Sync with HEAD

Revision 1.90 / (download) - annotate - [select for diffs], Tue May 9 21:18:51 2017 UTC (5 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base2
Changes since 1.89: +4 -3 lines
Diff to previous 1.89 (colored)

fp == NULL in the DIAGNOSTIC, so use the real fp and also print the errno.

Revision 1.88.8.1 / (download) - annotate - [select for diffs], Tue May 2 03:19:22 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.88: +15 -17 lines
Diff to previous 1.88 (colored)

Sync with HEAD - tag prg-localcount2-base1

Revision 1.89 / (download) - annotate - [select for diffs], Thu Apr 27 16:52:22 2017 UTC (5 years, 9 months ago) by abhinav
Branch: MAIN
CVS Tags: prg-localcount2-base1
Changes since 1.88: +15 -17 lines
Diff to previous 1.88 (colored)

Rearrange the if conditions in order to get rid of unnecessary indentation.

No functional change intended. ok christos@

Revision 1.82.2.5 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:02 2016 UTC (6 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.82.2.4: +8 -7 lines
Diff to previous 1.82.2.4 (colored) to branchpoint 1.82 (colored)

Sync with HEAD

Revision 1.88 / (download) - annotate - [select for diffs], Thu Jul 14 18:16:51 2016 UTC (6 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: prg-localcount2
Changes since 1.87: +4 -6 lines
Diff to previous 1.87 (colored)

make sure we cleanup properly when fd is too big.

Revision 1.87 / (download) - annotate - [select for diffs], Thu Jul 14 06:22:17 2016 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.86: +5 -2 lines
Diff to previous 1.86 (colored)

From tedu at openbsd:

kevent validates that ident is a valid fd by getting the file. one sad
quirk: uint64 to int32 truncation can lead to false positives, and then
later in the array sizing code, very big mallocs panic the kernel.
add a check that the ident isn't larger than INT_MAX in the fd case.
reported by Tim Newsham

Revision 1.82.2.4 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:16 2016 UTC (6 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.82.2.3: +4 -3 lines
Diff to previous 1.82.2.3 (colored) to branchpoint 1.82 (colored)

Sync with HEAD

Revision 1.86 / (download) - annotate - [select for diffs], Mon Apr 4 20:47:57 2016 UTC (6 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422
Changes since 1.85: +4 -3 lines
Diff to previous 1.85 (colored)

Split p_xstat (composite wait(2) status code, or signal number depending
on context) into:
1. p_xexit:		exit code
2. p_xsig:		signal number
3. p_sflag & WCOREFLAG	bit to indicated that the process core-dumped.

Fix the documentation of the flag bits in <sys/proc.h>

Revision 1.82.2.3 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:31 2016 UTC (6 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.82.2.2: +30 -16 lines
Diff to previous 1.82.2.2 (colored) to branchpoint 1.82 (colored)

Sync with HEAD

Revision 1.85 / (download) - annotate - [select for diffs], Sun Jan 31 04:40:01 2016 UTC (7 years ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319
Changes since 1.84: +30 -16 lines
Diff to previous 1.84 (colored)

PR/50730: Benny Siegert: Go kqueue test panics kernel.
- use a marker knote from the stack instead of allocating and freeing on
  each scan.
- add more KASSERTS
- introduce a KN_BUSY bit that indicates that the knote is currently being
  scanned, so that knote_detach does not end up deleting it when the file
  descriptor gets closed and we don't end up using/trashing free memory from
  the scan.

Revision 1.82.2.2 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.82.2.1: +9 -4 lines
Diff to previous 1.82.2.1 (colored) to branchpoint 1.82 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.84 / (download) - annotate - [select for diffs], Tue Dec 8 14:52:06 2015 UTC (7 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.83: +9 -4 lines
Diff to previous 1.83 (colored)

PR/50506: Tobias Nygren: kqueue(2) lacks EV_DISPATCH/EV_RECEIPT support

Revision 1.80.2.1 / (download) - annotate - [select for diffs], Tue Apr 14 04:39:58 2015 UTC (7 years, 9 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-1, netbsd-7-0
Changes since 1.80: +6 -2 lines
Diff to previous 1.80 (colored)

Pull up following revision(s) (requested by christos in ticket #677):
	lib/libc/sys/kqueue.2: revision 1.34
	sys/kern/kern_event.c: revision 1.83
put the exit code of the process in data, like FreeBSD does.
--
say that we put the exit code in data.

Revision 1.82.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:20 2015 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.82: +6 -2 lines
Diff to previous 1.82 (colored)

Sync with HEAD

Revision 1.83 / (download) - annotate - [select for diffs], Mon Mar 2 19:24:53 2015 UTC (7 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.82: +6 -2 lines
Diff to previous 1.82 (colored)

put the exit code of the process in data, like FreeBSD does.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Sep 5 09:20:59 2014 UTC (8 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.81: +12 -12 lines
Diff to previous 1.81 (colored)

Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Sep 5 05:57:21 2014 UTC (8 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.80: +4 -4 lines
Diff to previous 1.80 (colored)

Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

Revision 1.76.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:28 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.76.2.2: +3 -3 lines
Diff to previous 1.76.2.2 (colored) to branchpoint 1.76 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.79.10.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored) next main 1.80 (colored)

Rebase.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Jun 24 14:42:43 2014 UTC (8 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

Do not hardcode the value. Use KQ_NEVENTS.

Revision 1.76.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:50 2013 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.76.2.1: +16 -3 lines
Diff to previous 1.76.2.1 (colored) to branchpoint 1.76 (colored)

resync with head

Revision 1.72.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:43 2013 UTC (10 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.72.2.2: +30 -6 lines
Diff to previous 1.72.2.2 (colored) to branchpoint 1.72 (colored) next main 1.73 (colored)

sync with (a bit old) head

Revision 1.75.6.1 / (download) - annotate - [select for diffs], Sat Nov 24 21:40:07 2012 UTC (10 years, 2 months ago) by jdc
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE
Changes since 1.75: +16 -3 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Pull up revisions:
  src/sys/kern/kern_event.c revision 1.79
  src/sys/kern/kern_descrip.c revision 1.219
  src/lib/libc/sys/kqueue.2 revision 1.33
  src/tests/lib/libc/sys/t_kevent.c revision 1.2-1.5
(requested by christos in ticket #716).

- initialize kn_id
- in close, invalidate f_data and f_type early to prevent accidental re-use
- add a DIAGNOSTIC for when we use unsupported fd's and a KASSERT for f_event
  being NULL.

Return EOPNOTSUPP for fnullop_kqfilter to prevent registration of unsupported
fds. XXX: We should really fix the fd's to be supported in the future.
Unsupported fd's have a NULL f_event, so registering crashes the kernel with
a NULL function dereference of f_event.

mention that kevent returns now EOPNOTSUPP.

Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.

Add a (skipped for now) test case for PR 46463

adapt to new reality

Add a test for adding an event to an unsupported fd.

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Sat Nov 24 21:40:02 2012 UTC (10 years, 2 months ago) by jdc
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Changes since 1.75: +16 -3 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Pull up revisions:
  src/sys/kern/kern_event.c revision 1.79
  src/sys/kern/kern_descrip.c revision 1.219
  src/lib/libc/sys/kqueue.2 revision 1.33
  src/tests/lib/libc/sys/t_kevent.c revision 1.2-1.5
(requested by christos in ticket #716).

- initialize kn_id
- in close, invalidate f_data and f_type early to prevent accidental re-use
- add a DIAGNOSTIC for when we use unsupported fd's and a KASSERT for f_event
  being NULL.

Return EOPNOTSUPP for fnullop_kqfilter to prevent registration of unsupported
fds. XXX: We should really fix the fd's to be supported in the future.
Unsupported fd's have a NULL f_event, so registering crashes the kernel with
a NULL function dereference of f_event.

mention that kevent returns now EOPNOTSUPP.

Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.

Add a (skipped for now) test case for PR 46463

adapt to new reality

Add a test for adding an event to an unsupported fd.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Nov 24 15:14:32 2012 UTC (10 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-earlyentropy
Changes since 1.78: +16 -3 lines
Diff to previous 1.78 (colored)

- initialize kn_id
- in close, invalidate f_data and f_type early to prevent accidental re-use
- add a DIAGNOSTIC for when we use unsupported fd's and a KASSERT for f_event
  being NULL.

Revision 1.76.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:42 2012 UTC (10 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.76: +16 -5 lines
Diff to previous 1.76 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.78 / (download) - annotate - [select for diffs], Sun Nov 18 18:36:01 2012 UTC (10 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.77: +3 -4 lines
Diff to previous 1.77 (colored)

remove unused variable

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 17 21:55:24 2012 UTC (10 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.76: +15 -3 lines
Diff to previous 1.76 (colored)

Unbreak the NOTE_TRACK event of EVFILT_PROC. When attaching to the child
process, proc_find can't be used as the child is still in state SIDL.

Revision 1.72.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:28 2012 UTC (10 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.72.2.1: +2 -4 lines
Diff to previous 1.72.2.1 (colored) to branchpoint 1.72 (colored)

sync with head

Revision 1.76 / (download) - annotate - [select for diffs], Sat Jun 2 15:54:02 2012 UTC (10 years, 8 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.75: +2 -4 lines
Diff to previous 1.75 (colored)

Remove an unused variable

Revision 1.72.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:23 2012 UTC (10 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.72: +7 -6 lines
Diff to previous 1.72 (colored)

sync with head

Revision 1.74.4.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:27 2012 UTC (10 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored) next main 1.75 (colored)

merge to -current.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jan 25 00:28:35 2012 UTC (11 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: netbsd-6-0, netbsd-6
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

As discussed in tech-kern, provide the means to prevent delivery of SIGPIPE
on EPIPE for all file descriptor types:

- provide O_NOSIGPIPE for open,kqueue1,pipe2,dup3,fcntl(F_{G,S}ETFL) [NetBSD]
- provide SOCK_NOSIGPIPE for socket,socketpair [NetBSD]
- provide SO_NOSIGPIPE for {g,s}seckopt [NetBSD/FreeBSD/MacOSX]
- provide F_{G,S}ETNOSIGPIPE for fcntl [MacOSX]

Revision 1.60.6.1.2.2 / (download) - annotate - [select for diffs], Sat Nov 19 22:24:12 2011 UTC (11 years, 2 months ago) by sborrill
Branch: netbsd-5-0
Changes since 1.60.6.1.2.1: +4 -5 lines
Diff to previous 1.60.6.1.2.1 (colored) to branchpoint 1.60.6.1 (colored) next main 1.60.6.2 (colored)

Pull up the following revisions(s) (requested by rmind in ticket #1695):
	sys/kern/kern_event.c:	revision 1.74

kqueue_register: avoid calling fd_getfile() with filedesc_t::fd_lock held.
Fixes PR/45479 by KOGULE Ryo.

Revision 1.60.6.2.2.1 / (download) - annotate - [select for diffs], Sat Nov 19 22:22:56 2011 UTC (11 years, 2 months ago) by sborrill
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE
Changes since 1.60.6.2: +4 -5 lines
Diff to previous 1.60.6.2 (colored) next main 1.60.6.3 (colored)

Pull up the following revisions(s) (requested by rmind in ticket #1695):
	sys/kern/kern_event.c:	revision 1.74

kqueue_register: avoid calling fd_getfile() with filedesc_t::fd_lock held.
Fixes PR/45479 by KOGULE Ryo.

Revision 1.60.6.4 / (download) - annotate - [select for diffs], Sat Nov 19 21:57:12 2011 UTC (11 years, 2 months ago) by sborrill
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.60.6.3: +4 -5 lines
Diff to previous 1.60.6.3 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored)

Pull up the following revisions(s) (requested by rmind in ticket #1695):
	sys/kern/kern_event.c:	revision 1.74

kqueue_register: avoid calling fd_getfile() with filedesc_t::fd_lock held.
Fixes PR/45479 by KOGULE Ryo.

Revision 1.33.8.1 / (download) - annotate - [select for diffs], Sat Nov 19 14:37:09 2011 UTC (11 years, 2 months ago) by bouyer
Branch: netbsd-4-0
Changes since 1.33: +2 -0 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pull up following revision(s) (requested by christos in ticket #1438):
	sys/kern/kern_event.c: revision 1.73
PR/45618: Motoyuki OHMORI: kqueue EVFILT_TIMER with smaller timeout value
makes DIAGNOSTIC kernel panic:
        KASSERT((c->c_flags & CALLOUT_PENDING) !=3D 0);
If the computed ticks are <= 0 set it to 1

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Sat Nov 19 14:37:02 2011 UTC (11 years, 2 months ago) by bouyer
Branch: netbsd-4
Changes since 1.33: +2 -0 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pull up following revision(s) (requested by christos in ticket #1438):
	sys/kern/kern_event.c: revision 1.73
PR/45618: Motoyuki OHMORI: kqueue EVFILT_TIMER with smaller timeout value
makes DIAGNOSTIC kernel panic:
        KASSERT((c->c_flags & CALLOUT_PENDING) !=3D 0);
If the computed ticks are <= 0 set it to 1

Revision 1.60.6.3 / (download) - annotate - [select for diffs], Fri Nov 18 23:17:53 2011 UTC (11 years, 2 months ago) by sborrill
Branch: netbsd-5
Changes since 1.60.6.2: +4 -2 lines
Diff to previous 1.60.6.2 (colored) to branchpoint 1.60 (colored)

Pull up the following revisions(s) (requested by christos in ticket #1693):
	sys/kern/kern_event.c:	revision 1.73

PR/45618: Motoyuki OHMORI: kqueue EVFILT_TIMER with smaller timeout value
makes DIAGNOSTIC kernel panic. If the computed ticks are <= 0 set it to 1.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Nov 17 22:41:55 2011 UTC (11 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.73: +4 -5 lines
Diff to previous 1.73 (colored)

kqueue_register: avoid calling fd_getfile() with filedesc_t::fd_lock held.

Fixes PR/45479 by KOGULE Ryo.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Nov 17 01:19:37 2011 UTC (11 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.72: +4 -2 lines
Diff to previous 1.72 (colored)

PR/45618: Motoyuki OHMORI: kqueue EVFILT_TIMER with smaller timeout value
makes DIAGNOSTIC kernel panic:
	KASSERT((c->c_flags & CALLOUT_PENDING) != 0);
If the computed ticks are <= 0 set it to 1

Revision 1.72 / (download) - annotate - [select for diffs], Sun Jun 26 16:42:42 2011 UTC (11 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.71: +25 -5 lines
Diff to previous 1.71 (colored)

* Arrange for interfaces that create new file descriptors to be able to
  set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.

Revision 1.69.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:13 2011 UTC (11 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.69.4.1: +4 -4 lines
Diff to previous 1.69.4.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

sync with head

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:26 2010 UTC (12 years, 3 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.69.2.1: +2 -2 lines
Diff to previous 1.69.2.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

Sync with HEAD (-D20101022).

Revision 1.57.2.6 / (download) - annotate - [select for diffs], Sat Oct 9 03:32:31 2010 UTC (12 years, 3 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.57.2.5: +4 -4 lines
Diff to previous 1.57.2.5 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored)

sync with head

Revision 1.71 / (download) - annotate - [select for diffs], Fri Sep 10 10:23:46 2010 UTC (12 years, 4 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored)

make list traversing in knote() safe against removal of the entry
while the loop body is executed -- at least in the EVFILT_PROC / exit
case a race condition exists which can cause this
fixes a panic triggered eg by tests/kernel/kqueue/proc1

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:26 2010 UTC (12 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

Sync with HEAD.

Revision 1.57.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:38 2010 UTC (12 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.57.2.4: +3 -3 lines
Diff to previous 1.57.2.4 (colored) to branchpoint 1.57 (colored)

sync with head.

Revision 1.69.4.1 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:53 2010 UTC (12 years, 7 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

sync with head

Revision 1.70 / (download) - annotate - [select for diffs], Thu Jul 1 02:38:30 2010 UTC (12 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.

Revision 1.60.6.1.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:15 2010 UTC (12 years, 9 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.60.6.1: +3 -3 lines
Diff to previous 1.60.6.1 (colored) next main 1.60.6.2 (colored)

sync to netbsd-5

Revision 1.57.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:16 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.57.2.3: +31 -4 lines
Diff to previous 1.57.2.3 (colored) to branchpoint 1.57 (colored)

sync with head

Revision 1.60.6.1.2.1 / (download) - annotate - [select for diffs], Sat Jan 9 01:10:52 2010 UTC (13 years ago) by snj
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE
Changes since 1.60.6.1: +3 -3 lines
Diff to previous 1.60.6.1 (colored)

Pull up following revision(s) (requested by dsl in ticket #1208):
	sys/kern/kern_event.c: revision 1.69
Use sizeof correct type, not pointer to wrong type.
Fixes PR/42498.
This has been wrong since the initial import!

Revision 1.60.6.2 / (download) - annotate - [select for diffs], Sat Jan 9 01:08:39 2010 UTC (13 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, matt-nb5-pq3-base, matt-nb5-pq3
Branch point for: netbsd-5-1
Changes since 1.60.6.1: +3 -3 lines
Diff to previous 1.60.6.1 (colored) to branchpoint 1.60 (colored)

Pull up following revision(s) (requested by dsl in ticket #1208):
	sys/kern/kern_event.c: revision 1.69
Use sizeof correct type, not pointer to wrong type.
Fixes PR/42498.
This has been wrong since the initial import!

Revision 1.69 / (download) - annotate - [select for diffs], Tue Dec 22 20:50:46 2009 UTC (13 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Use sizeof correct type, not pointer to wrong type.
Fixes PR/42498.
This has been wrong since the initial import!

Revision 1.68 / (download) - annotate - [select for diffs], Sun Dec 20 09:36:05 2009 UTC (13 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

If a multithreaded app closes an fd while another thread is blocked in
read/write/accept, then the expectation is that the blocked thread will
exit and the close complete.
Since only one fd is affected, but many fd can refer to the same file,
the close code can only request the fs code unblock with ERESTART.
Fixed for pipes and sockets, ERESTART will only be generated after such
a close - so there should be no change for other programs.
Also rename fo_abort() to fo_restart() (this used to be fo_drain()).
Fixes PR/26567

Revision 1.67 / (download) - annotate - [select for diffs], Wed Dec 9 21:32:59 2009 UTC (13 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output
do drain' in many places, whereas fo_drain() was called in order to force
blocking read()/write() etc calls to return to userspace so that a close()
call from a different thread can complete.
In the sockets code comment out the broken code in the inner function,
it was being called from compat code.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Oct 3 00:14:07 2009 UTC (13 years, 4 months ago) by elad
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.65: +29 -2 lines
Diff to previous 1.65 (colored)

Move kevent policy back to the subsystem.

Revision 1.61.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:34 2009 UTC (13 years, 6 months ago) by jym
Branch: jym-xensuspend
Changes since 1.61.2.1: +7 -7 lines
Diff to previous 1.61.2.1 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

Sync with HEAD.

Revision 1.57.2.3 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:31 2009 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.57.2.2: +7 -7 lines
Diff to previous 1.57.2.2 (colored) to branchpoint 1.57 (colored)

sync with head

Revision 1.65 / (download) - annotate - [select for diffs], Sun May 24 21:41:26 2009 UTC (13 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.64: +7 -7 lines
Diff to previous 1.64 (colored)

More changes to improve kern_descrip.c.

- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:56 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.61: +22 -12 lines
Diff to previous 1.61 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.57.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:46 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.57.2.1: +32 -21 lines
Diff to previous 1.57.2.1 (colored) to branchpoint 1.57 (colored)

sync with head.

Revision 1.60.4.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:59 2009 UTC (13 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.60.4.1: +22 -12 lines
Diff to previous 1.60.4.1 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored)

Sync with HEAD.

Revision 1.60.6.1 / (download) - annotate - [select for diffs], Sat Apr 4 23:36:27 2009 UTC (13 years, 10 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-0, matt-nb5-mips64
Changes since 1.60: +15 -5 lines
Diff to previous 1.60 (colored)

Pull up following revision(s) (requested by ad in ticket #661):
	sys/arch/xen/xen/xenevt.c: revision 1.32
	sys/compat/svr4/svr4_net.c: revision 1.56
	sys/compat/svr4_32/svr4_32_net.c: revision 1.19
	sys/dev/dmover/dmover_io.c: revision 1.32
	sys/dev/putter/putter.c: revision 1.21
	sys/kern/kern_descrip.c: revision 1.190
	sys/kern/kern_drvctl.c: revision 1.23
	sys/kern/kern_event.c: revision 1.64
	sys/kern/sys_mqueue.c: revision 1.14
	sys/kern/sys_pipe.c: revision 1.109
	sys/kern/sys_socket.c: revision 1.59
	sys/kern/uipc_syscalls.c: revision 1.136
	sys/kern/vfs_vnops.c: revision 1.164
	sys/kern/uipc_socket.c: revision 1.188
	sys/net/bpf.c: revision 1.144
	sys/net/if_tap.c: revision 1.55
	sys/opencrypto/cryptodev.c: revision 1.47
	sys/sys/file.h: revision 1.67
	sys/sys/param.h: patch
	sys/sys/socketvar.h: revision 1.119
Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.
Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.
thr0	accept(fd, ...)
thr1	close(fd)

Revision 1.64 / (download) - annotate - [select for diffs], Sat Apr 4 10:12:51 2009 UTC (13 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.63: +15 -5 lines
Diff to previous 1.63 (colored)

Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.

Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.

thr0	accept(fd, ...)
thr1	close(fd)

Revision 1.63 / (download) - annotate - [select for diffs], Mon Mar 30 22:22:44 2009 UTC (13 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.62: +3 -2 lines
Diff to previous 1.62 (colored)

fix erroneously deleted assignment.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Mar 29 19:21:19 2009 UTC (13 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.61: +8 -9 lines
Diff to previous 1.61 (colored)

Move the internal poll/select related API's to use timespec instead
of timeval (rides the uvm bump).

Revision 1.60.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:38 2009 UTC (14 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.60: +8 -7 lines
Diff to previous 1.60 (colored)

Sync with HEAD.

Revision 1.47.6.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:18 2009 UTC (14 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.47.6.3: +6 -5 lines
Diff to previous 1.47.6.3 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored)

Sync with HEAD.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:52 2009 UTC (14 years ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.60: +8 -7 lines
Diff to previous 1.60 (colored)

merge christos-time_t

Revision 1.53.2.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:27 2008 UTC (14 years, 3 months ago) by christos
Branch: christos-time_t
Changes since 1.53.2.1: +17 -27 lines
Diff to previous 1.53.2.1 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored)

Sync with head.

Revision 1.59.2.3 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:42 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.59.2.2: +6 -6 lines
Diff to previous 1.59.2.2 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.47.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:13 2008 UTC (14 years, 7 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.47.6.2: +4 -4 lines
Diff to previous 1.47.6.2 (colored) to branchpoint 1.47 (colored)

Sync with HEAD.

Revision 1.59.4.1 / (download) - annotate - [select for diffs], Fri Jun 27 15:11:38 2008 UTC (14 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.59: +6 -6 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

Sync with head.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Jun 24 10:27:35 2008 UTC (14 years, 7 months ago) by gmcgarry
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.59: +6 -6 lines
Diff to previous 1.59 (colored)

Replace gcc-style designated initialisers with c99-style.

Revision 1.47.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:08 2008 UTC (14 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.47.6.1: +11 -21 lines
Diff to previous 1.47.6.1 (colored) to branchpoint 1.47 (colored)

Sync with HEAD.

Revision 1.53.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:07 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.53: +13 -23 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

sync with head.

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:24 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.57: +3 -13 lines
Diff to previous 1.57 (colored)

sync with head.

Revision 1.59.2.2 / (download) - annotate - [select for diffs], Wed May 14 01:35:12 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.59.2.1: +2 -3 lines
Diff to previous 1.59.2.1 (colored) to branchpoint 1.59 (colored)

Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:49:03 2008 UTC (14 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.

Revision 1.59 / (download) - annotate - [select for diffs], Mon May 5 17:11:17 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, simonb-wapbl
Changes since 1.58: +3 -6 lines
Diff to previous 1.58 (colored)

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
  and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (14 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.57: +2 -9 lines
Diff to previous 1.57 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.57 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:23 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.56: +7 -7 lines
Diff to previous 1.56 (colored)

Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:29 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.55: +5 -5 lines
Diff to previous 1.55 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Apr 22 12:04:22 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored)

Give callout_halt() an additional 'kmutex_t *interlock' argument. If there
is a need to block and wait for the callout to complete, and there is an
interlock, it will be dropped while waiting and reacquired before return.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Apr 22 11:44:24 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored)

Mark the callout MPSAFE and use callout_halt().

Revision 1.47.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:01 2008 UTC (14 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.47: +744 -638 lines
Diff to previous 1.47 (colored)

Sync with HEAD.

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:00 2008 UTC (14 years, 10 months ago) by christos
Branch: christos-time_t
Changes since 1.53: +8 -7 lines
Diff to previous 1.53 (colored)

Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Mar 26 13:32:32 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, ad-socklock-base1
Branch point for: yamt-pf42, christos-time_t
Changes since 1.52: +25 -30 lines
Diff to previous 1.52 (colored)

- kqueue_scan: work around problem noted by yamt@: if an event fires while
  we have unlocked the kqueue to check its state, leave it queued and
  re-check later.
- knote_dequeue: fold into knote_detach since nothing else uses it.
- Note a couple more problems.

Revision 1.23.2.11 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:01 2008 UTC (14 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.10: +746 -637 lines
Diff to previous 1.23.2.10 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

sync with head.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Mar 24 09:09:55 2008 UTC (14 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14
Changes since 1.51: +64 -3 lines
Diff to previous 1.51 (colored)

add some DEBUG checks.

Revision 1.47.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:13 2008 UTC (14 years, 10 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.47: +5 -3 lines
Diff to previous 1.47 (colored) next main 1.48 (colored)

sync with head.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Mar 23 22:39:48 2008 UTC (14 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.50: +13 -13 lines
Diff to previous 1.50 (colored)

kqueue_scan: skip markers correctly.

Revision 1.40.6.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:58 2008 UTC (14 years, 10 months ago) by matt
Branch: matt-armv6
Changes since 1.40.6.2: +9 -6 lines
Diff to previous 1.40.6.2 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

sync with HEAD

Revision 1.50 / (download) - annotate - [select for diffs], Sat Mar 22 10:24:17 2008 UTC (14 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.49: +4 -3 lines
Diff to previous 1.49 (colored)

wrap a long line.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Mar 21 21:53:35 2008 UTC (14 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.48: +684 -637 lines
Diff to previous 1.48 (colored)

File descriptor changes, discussed on tech-kern:

- Redo reference counting to be sane.  LWPs accessing files take a short
  term reference on the local file descriptor.  This is the most common
  case.  While a file is in a process descriptor table, a reference is
  held to the file.  The file reference count only changes during control
  operations like open() or close().  Code that comes at files from an
  unusual direction (i.e. foreign to the process) like procfs or sysctl
  takes a reference on the file (f_count), and not on a descriptor.

- Remove knowledge of reference counting and locking from most code that
  deals with files.

- Make the usual case of file descriptor lookup lockless.

- Make kqueue MP and MT safe. PR kern/38098, PR kern/38137.

- Fix numerous file handling bugs, and bugs in the descriptor code that
  affected multithreaded processes.

- Split descriptor system calls out into sys_descrip.c.

- A few stylistic changes: KNF, remove unused casts now that caddr_t is
  gone. Replace dumb gotos with loop control in a few places.

- Don't do redundant pointer passing (struct proc, lwp, filedesc *) unless
  the routine is likely to be inlined.  Most of the time it's about the
  current process.

Revision 1.23.2.10 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:32 2008 UTC (14 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.9: +5 -3 lines
Diff to previous 1.23.2.9 (colored) to branchpoint 1.23 (colored)

sync with head.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Mar 1 14:16:51 2008 UTC (14 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Changes since 1.47: +5 -3 lines
Diff to previous 1.47 (colored)

Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>

Revision 1.23.2.9 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:55 2008 UTC (14 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.8: +4 -2 lines
Diff to previous 1.23.2.8 (colored) to branchpoint 1.23 (colored)

sync with head.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Feb 18 22:41:13 2008 UTC (14 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.46: +4 -2 lines
Diff to previous 1.46 (colored)

knote_fdclose: acquire kernel_lock because many objects that can be
polled do not have locking of their own.

Revision 1.41.4.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:45 2008 UTC (14 years, 11 months ago) by mjf
Branch: mjf-devfs
Changes since 1.41.4.2: +5 -6 lines
Diff to previous 1.41.4.2 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored)

Sync with HEAD.

Revision 1.23.2.8 / (download) - annotate - [select for diffs], Mon Feb 4 09:24:10 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.7: +4 -5 lines
Diff to previous 1.23.2.7 (colored) to branchpoint 1.23 (colored)

sync with head.

Revision 1.43.4.3 / (download) - annotate - [select for diffs], Wed Jan 23 19:27:39 2008 UTC (15 years ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.43.4.2: +2 -3 lines
Diff to previous 1.43.4.2 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored)

Sync with HEAD.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jan 23 15:04:39 2008 UTC (15 years ago) by elad
Branch: MAIN
CVS Tags: mjf-devfs-base, bouyer-xeni386-nbase
Changes since 1.45: +4 -5 lines
Diff to previous 1.45 (colored)

Tons of process scope changes.

  - Add a KAUTH_PROCESS_SCHEDULER action, to handle scheduler related
    requests, and add specific requests for set/get scheduler policy and
    set/get scheduler parameters.

  - Add a KAUTH_PROCESS_KEVENT_FILTER action, to handle kevent(2) related
    requests.

  - Add a KAUTH_DEVICE_TTY_STI action to handle requests to TIOCSTI.

  - Add requests for the KAUTH_PROCESS_CANSEE action, indicating what
    process information is being looked at (entry itself, args, env,
    open files).

  - Add requests for the KAUTH_PROCESS_RLIMIT action indicating set/get.

  - Add requests for the KAUTH_PROCESS_CORENAME action indicating set/get.

  - Make bsd44 secmodel code handle the newly added rqeuests appropriately.

All of the above make it possible to issue finer-grained kauth(9) calls in
many places, removing some KAUTH_GENERIC_ISSUSER requests.

  - Remove the "CAN" from KAUTH_PROCESS_CAN{KTRACE,PROCFS,PTRACE,SIGNAL}.

Discussed with christos@ and yamt@.

Revision 1.23.2.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:02 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.6: +7 -7 lines
Diff to previous 1.23.2.6 (colored) to branchpoint 1.23 (colored)

sync with head

Revision 1.40.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:00 2008 UTC (15 years ago) by matt
Branch: matt-armv6
Changes since 1.40.6.1: +9 -9 lines
Diff to previous 1.40.6.1 (colored) to branchpoint 1.40 (colored)

sync with HEAD

Revision 1.43.4.2 / (download) - annotate - [select for diffs], Tue Jan 8 22:11:32 2008 UTC (15 years ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.43.4.1: +1 -1 lines
Diff to previous 1.43.4.1 (colored) to branchpoint 1.43 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Sat Jan 5 19:08:50 2008 UTC (15 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-base, bouyer-xeni386-base
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Use FILE_LOCK() and FILE_UNLOCK()

Revision 1.43.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:48 2008 UTC (15 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.43: +6 -6 lines
Diff to previous 1.43 (colored)

Sync with HEAD

Revision 1.41.4.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:45:57 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.41.4.1: +6 -6 lines
Diff to previous 1.41.4.1 (colored) to branchpoint 1.41 (colored)

Sync with HEAD.

Revision 1.42.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:38 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.42.2.1: +6 -6 lines
Diff to previous 1.42.2.1 (colored) to branchpoint 1.42 (colored) next main 1.43 (colored)

Sync with head.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Dec 20 23:03:07 2007 UTC (15 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.43: +6 -6 lines
Diff to previous 1.43 (colored)

Convert all the system call entry points from:
    int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.

Revision 1.40.4.2 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:15 2007 UTC (15 years, 1 month ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.40.4.1: +4 -4 lines
Diff to previous 1.40.4.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

Sync with HEAD.

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:26 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

Sync with HEAD.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:39 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

Sync with head.

Revision 1.23.2.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:32:39 2007 UTC (15 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.5: +4 -4 lines
Diff to previous 1.23.2.5 (colored) to branchpoint 1.23 (colored)

sync with head

Revision 1.43 / (download) - annotate - [select for diffs], Wed Dec 5 17:19:57 2007 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

Do not "return 1" from kqfilter for errors.  That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Dec 3 15:21:57 2007 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Some boys take a beautiful seltrue_filtops and hide her away from
the rest of the world - but let's not.

Revision 1.40.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:31:32 2007 UTC (15 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

sync with HEAD

Revision 1.23.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:21 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.4: +3 -3 lines
Diff to previous 1.23.2.4 (colored) to branchpoint 1.23 (colored)

sync with head.

Revision 1.40.4.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:29 2007 UTC (15 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.40.8.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:39 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored) next main 1.41 (colored)

sync with head.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Oct 8 15:12:07 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

Merge file descriptor locking, cwdi locking and cross-call changes
from the vmlocking branch.

Revision 1.23.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:40:45 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.3: +18 -14 lines
Diff to previous 1.23.2.3 (colored) to branchpoint 1.23 (colored)

sync with head.

Revision 1.37.2.4 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:29 2007 UTC (15 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.37.2.3: +3 -2 lines
Diff to previous 1.37.2.3 (colored) next main 1.38 (colored)

Sync with HEAD.

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:06 2007 UTC (15 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.39: +3 -2 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

Sync with HEAD.

Revision 1.40.10.2 / (download) - annotate - [select for diffs], Sat Jul 21 19:23:04 2007 UTC (15 years, 6 months ago) by ad
Branch: matt-mips64
Changes since 1.40.10.1: +1456 -0 lines
Diff to previous 1.40.10.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

+#include <sys/conf.h>

Revision 1.40.10.1, Sat Jul 21 19:23:03 2007 UTC (15 years, 6 months ago) by ad
Branch: matt-mips64
Changes since 1.40: +0 -1456 lines
FILE REMOVED

file kern_event.c was added on branch matt-mips64 on 2007-07-21 19:23:04 +0000

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 21 19:23:03 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.39: +3 -2 lines
Diff to previous 1.39 (colored)

+#include <sys/conf.h>

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:09:45 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.38: +9 -8 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Sync with head.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:51 2007 UTC (15 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.38: +9 -8 lines
Diff to previous 1.38 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.37.2.3 / (download) - annotate - [select for diffs], Sun Jul 1 21:50:38 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.37.2.2: +9 -8 lines
Diff to previous 1.37.2.2 (colored)

Adapt to callout API change.

Revision 1.35.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:00 2007 UTC (15 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.35.2.2: +6 -4 lines
Diff to previous 1.35.2.2 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

sync with head.

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Wed Mar 21 20:11:50 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.37.2.1: +3 -3 lines
Diff to previous 1.37.2.1 (colored)

- Replace more simple_locks, and fix up in a few places.
- Use condition variables.
- LOCK_ASSERT -> KASSERT.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:52 2007 UTC (15 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.37: +6 -4 lines
Diff to previous 1.37 (colored)

Sync with head.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:32 2007 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.37: +6 -4 lines
Diff to previous 1.37 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:33 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.35.2.1: +6 -6 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored)

Sync with HEAD.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:03 2007 UTC (15 years, 11 months ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.36: +6 -6 lines
Diff to previous 1.36 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:20 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.23.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:05 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.2: +4 -6 lines
Diff to previous 1.23.2.2 (colored) to branchpoint 1.23 (colored)

sync with head.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Feb 17 22:31:42 2007 UTC (15 years, 11 months ago) by pavel
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Branch point for: yamt-idlelwp
Changes since 1.34: +2 -4 lines
Diff to previous 1.34 (colored)

Merge newlock2 to head.

Revision 1.30.4.4 / (download) - annotate - [select for diffs], Tue Jan 30 13:51:40 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.30.4.3: +2 -3 lines
Diff to previous 1.30.4.3 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

Remove support for SA. Ok core@.

Revision 1.30.4.3 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:06 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.30.4.2: +3 -3 lines
Diff to previous 1.30.4.2 (colored) to branchpoint 1.30 (colored)

Sync with head.

Revision 1.34 / (download) - annotate - [select for diffs], Thu Jan 4 17:38:25 2007 UTC (16 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.23.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:05 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23.2.1: +44 -41 lines
Diff to previous 1.23.2.1 (colored) to branchpoint 1.23 (colored)

sync with head.

Revision 1.30.4.2 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:43 2006 UTC (16 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.30.4.1: +2 -3 lines
Diff to previous 1.30.4.1 (colored) to branchpoint 1.30 (colored)

Checkpoint work in progress.

Revision 1.30.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:44 2006 UTC (16 years, 1 month ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.30.6.1: +18 -20 lines
Diff to previous 1.30.6.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

sync with head.

Revision 1.30.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:21 2006 UTC (16 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.30: +29 -22 lines
Diff to previous 1.30 (colored)

Sync with head.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0, netbsd-4
Changes since 1.32: +18 -20 lines
Diff to previous 1.32 (colored)

remove some __unused from function parameters.

Revision 1.30.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:10 2006 UTC (16 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.30: +43 -34 lines
Diff to previous 1.30 (colored)

sync with head

Revision 1.32 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:14 2006 UTC (16 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.31: +20 -18 lines
Diff to previous 1.31 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.31 / (download) - annotate - [select for diffs], Sat Sep 30 02:39:18 2006 UTC (16 years, 4 months ago) by seanb
Branch: MAIN
Changes since 1.30: +25 -18 lines
Diff to previous 1.30 (colored)

- Avoid array overrun in kfilter_byname_user() when all user
  kfilter slots are used: no guarantee previously that last
  slot had a NULL name.
- Reuse previously deregistered user kfilter slots in
  kfilter_register().

Revision 1.25.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:16 2006 UTC (16 years, 4 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.25: +27 -31 lines
Diff to previous 1.25 (colored) next main 1.26 (colored)

sync with head

Revision 1.25.8.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:46 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.25.8.2: +17 -21 lines
Diff to previous 1.25.8.2 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

sync with head

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:11 2006 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.29: +12 -11 lines
Diff to previous 1.29 (colored)

Use the LWP cached credentials where sane.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jul 14 22:35:15 2006 UTC (16 years, 6 months ago) by kardel
Branch: MAIN
Changes since 1.28: +6 -11 lines
Diff to previous 1.28 (colored)

reduce sleep time by slept time for retrys

Revision 1.25.8.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:56 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.25.8.1: +4 -6 lines
Diff to previous 1.25.8.1 (colored) to branchpoint 1.25 (colored)

sync with head.

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:37 2006 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.23: +109 -75 lines
Diff to previous 1.23 (colored)

sync with head.

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:07:15 2006 UTC (16 years, 7 months ago) by chap
Branch: chap-midi
Changes since 1.27: +4 -6 lines
Diff to previous 1.27 (colored) next main 1.28 (colored)

Sync with head.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jun 7 22:33:39 2006 UTC (16 years, 8 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.27: +3 -5 lines
Diff to previous 1.27 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.25.6.3 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:07 2006 UTC (16 years, 8 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.25.6.2: +10 -8 lines
Diff to previous 1.25.6.2 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

Sync with head.

Revision 1.25.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:40 2006 UTC (16 years, 8 months ago) by tron
Branch: peter-altq
Changes since 1.25: +13 -11 lines
Diff to previous 1.25 (colored) next main 1.26 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.25.8.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:40 2006 UTC (16 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.25: +13 -11 lines
Diff to previous 1.25 (colored)

sync with head.

Revision 1.27 / (download) - annotate - [select for diffs], Sun May 14 21:15:11 2006 UTC (16 years, 8 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.26: +8 -6 lines
Diff to previous 1.26 (colored)

integrate kauth.

Revision 1.25.10.4 / (download) - annotate - [select for diffs], Thu May 11 23:30:14 2006 UTC (16 years, 8 months ago) by elad
Branch: elad-kernelauth
Changes since 1.25.10.3: +5 -5 lines
Diff to previous 1.25.10.3 (colored) to branchpoint 1.25 (colored) next main 1.26 (colored)

sync with head

Revision 1.25.10.3 / (download) - annotate - [select for diffs], Sat May 6 23:31:30 2006 UTC (16 years, 9 months ago) by christos
Branch: elad-kernelauth
Changes since 1.25.10.2: +3 -2 lines
Diff to previous 1.25.10.2 (colored) to branchpoint 1.25 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.25.6.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:58 2006 UTC (16 years, 9 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.25.6.1: +6 -5 lines
Diff to previous 1.25.6.1 (colored) to branchpoint 1.25 (colored)

Sync with head.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Apr 21 14:00:18 2006 UTC (16 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.25: +5 -5 lines
Diff to previous 1.25 (colored)

sprinkle some const and static.

Revision 1.25.10.2 / (download) - annotate - [select for diffs], Fri Mar 10 13:53:24 2006 UTC (16 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.25.10.1: +3 -3 lines
Diff to previous 1.25.10.1 (colored) to branchpoint 1.25 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.25.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:40 2006 UTC (16 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.25: +9 -8 lines
Diff to previous 1.25 (colored)

Adapt to kernel authorization KPI.

Revision 1.25.6.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:30:17 2006 UTC (17 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.25: +3 -6 lines
Diff to previous 1.25 (colored)

Adapt for timecounters: mostly use get*time() and use "time_second"
instead of "time.tv_sec".

Revision 1.25 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:29 2005 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.24: +35 -33 lines
Diff to previous 1.24 (colored)

merge ktrace-lwp.

Revision 1.16.2.9 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:44 2005 UTC (17 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.8: +70 -38 lines
Diff to previous 1.16.2.8 (colored) next main 1.17 (colored)

Sync with HEAD. Here we go again...

Revision 1.23.4.1 / (download) - annotate - [select for diffs], Wed Oct 26 08:32:51 2005 UTC (17 years, 3 months ago) by yamt
Branch: yamt-vop
Changes since 1.23: +66 -34 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

sync with head

Revision 1.24 / (download) - annotate - [select for diffs], Sun Oct 23 01:33:32 2005 UTC (17 years, 3 months ago) by cube
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.23: +66 -34 lines
Diff to previous 1.23 (colored)

- Split sys_kevent into kevent1 so that it can be used by COMPAT_NETBSD32
  code.

- To achieve COMPAT_NETBSD32 compatibility, introduce a parameter to
  kevent1 that points to functions that do the actual copyin/copyout
  operations.  This is similar to what was done in FreeBSD by Paul Saab.

- Add the COMPAT_NETBSD32 definitions and hooks.

Revision 1.23 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (17 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base
Branch point for: yamt-vop, yamt-lazymbuf
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored)

- add const.
- remove unnecessary casts.
- add __UNCONST casts and mark them with XXXUNCONST as necessary.

Revision 1.21.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:23 2005 UTC (17 years, 9 months ago) by kent
Branch: kent-audio2
Changes since 1.21: +17 -17 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

sync with -current

Revision 1.21.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:11 2005 UTC (17 years, 10 months ago) by yamt
Branch: yamt-km
Changes since 1.21: +17 -17 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.16.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:51:58 2005 UTC (17 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.7: +17 -17 lines
Diff to previous 1.16.2.7 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.22 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (17 years, 11 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Changes since 1.21: +17 -17 lines
Diff to previous 1.21 (colored)

nuke trailing whitespace

Revision 1.16.2.7 / (download) - annotate - [select for diffs], Thu Feb 24 17:22:33 2005 UTC (17 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.6: +3 -3 lines
Diff to previous 1.16.2.6 (colored)

Reduce diff to HEAD

Revision 1.16.2.6 / (download) - annotate - [select for diffs], Sat Dec 18 09:32:35 2004 UTC (18 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.5: +3 -3 lines
Diff to previous 1.16.2.5 (colored)

Sync with HEAD.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Nov 30 04:25:43 2004 UTC (18 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Cloning cleanup:
1. make fileops const
2. add 2 new negative errno's to `officially' support the cloning hack:
    - EDUPFD (used to overload ENODEV)
    - EMOVEFD (used to overload ENXIO)
3. Created an fdclone() function to encapsulate the operations needed for
   EMOVEFD, and made all cloners use it.
4. Centralize the local noop/badop fileops functions to:
   fnullop_fcntl, fnullop_poll, fnullop_kqfilter, fbadop_stat

Revision 1.16.2.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:03 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.4: +36 -34 lines
Diff to previous 1.16.2.4 (colored)

Fix the sync with head I botched.

Revision 1.16.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:02 2004 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.3: +34 -36 lines
Diff to previous 1.16.2.3 (colored)

Sync with HEAD.

Revision 1.16.2.3 / (download) - annotate - [select for diffs], Tue Aug 10 09:00:11 2004 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.2: +3 -3 lines
Diff to previous 1.16.2.2 (colored)

Reduce diff to HEAD

Revision 1.16.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:44 2004 UTC (18 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.16.2.1: +17 -24 lines
Diff to previous 1.16.2.1 (colored)

Sync with HEAD

Revision 1.20 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:41 2004 UTC (18 years, 9 months ago) by simonb
Branch: MAIN
Changes since 1.19: +4 -19 lines
Diff to previous 1.19 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 14 11:56:28 2004 UTC (18 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.18: +13 -6 lines
Diff to previous 1.18 (colored)

allocate wired memory for the marker kevent in kqueue_scan() instead
of using on-stack memory, so that this wouldn't eventually cause kernel
panic if the process get swapped out and another process runs kqueue_scan()
problem pointed out in kern/24220 by Stephan Uphoff

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jan 11 18:51:15 2004 UTC (19 years ago) by jdolecek
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

fix assertion - non-alive processes are in SZOMB state now
fixes PR kern/24033 by Martin Husemann

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jul 18 17:34:07 2003 UTC (19 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored)

Unlock kq_lock in the case of a timeout.

Revision 1.16.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:36 2003 UTC (19 years, 7 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.16: +37 -35 lines
Diff to previous 1.16 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:18 2003 UTC (19 years, 7 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.15: +33 -35 lines
Diff to previous 1.15 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:53 2003 UTC (19 years, 7 months ago) by darrenr
Branch: MAIN
Changes since 1.14: +37 -35 lines
Diff to previous 1.14 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jun 23 13:14:49 2003 UTC (19 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored)

add __KERNEL_RCSID()

Revision 1.13 / (download) - annotate - [select for diffs], Fri Mar 21 21:13:51 2003 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)

Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)

Revision 1.12 / (download) - annotate - [select for diffs], Sun Feb 23 22:05:35 2003 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.11: +29 -9 lines
Diff to previous 1.11 (colored)

Protect the event queue with a simple mutex; this only partially addresses
MP-safety issues in the event handling system.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Feb 23 21:44:26 2003 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.10: +9 -9 lines
Diff to previous 1.10 (colored)

Use splsched() instead of splhigh() to protect the triggered event queues.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Feb 23 14:37:34 2003 UTC (19 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.9: +7 -2 lines
Diff to previous 1.9 (colored)

Make updating a file's reference and use count MP-safe.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Feb 21 20:57:09 2003 UTC (19 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.8: +13 -16 lines
Diff to previous 1.8 (colored)

simplify timeout handling code in kqueue_scan()

Revision 1.8 / (download) - annotate - [select for diffs], Tue Feb 4 09:02:05 2003 UTC (20 years ago) by jdolecek
Branch: MAIN
Changes since 1.7: +74 -1 lines
Diff to previous 1.7 (colored)

Introduce EVFILT_TIMER, which allows a process to establish an
arbitrary number of timers, both oneshot and periodic.

from FreeBSD, only adapted to NetBSD kernel API - mstohz() instead
of tvtohz(), and takes advantage of callout_schedule() in filt_timerexpire()

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:42 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.6: +3 -1 lines
Diff to previous 1.6 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jan 18 10:06:25 2003 UTC (20 years ago) by thorpej
Branch: MAIN
Changes since 1.5: +8 -3 lines
Diff to previous 1.5 (colored)

Merge the nathanw_sa branch.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Wed Dec 18 01:06:06 2002 UTC (20 years, 1 month ago) by gmcgarry
Branch: gmcgarry_ucred
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

Merge pcred and ucred, and poolify.  TBD: check backward compatibility
and factor-out some higher-level functionality.

Revision 1.4.2.5 / (download) - annotate - [select for diffs], Wed Dec 11 06:43:02 2002 UTC (20 years, 1 month ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.4.2.4: +3 -3 lines
Diff to previous 1.4.2.4 (colored) next main 1.5 (colored)

Sync with HEAD.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 26 18:44:34 2002 UTC (20 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

si_ -> sel_ to avoid conflicts with siginfo.

Revision 1.4.2.4 / (download) - annotate - [select for diffs], Tue Nov 12 20:46:28 2002 UTC (20 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.4.2.3: +2 -1 lines
Diff to previous 1.4.2.3 (colored)

Include <sys/sa.h> for types for <sys/syscallargs.h>.

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Tue Nov 12 12:49:10 2002 UTC (20 years, 2 months ago) by skrll
Branch: nathanw_sa
Changes since 1.4.2.2: +7 -3 lines
Diff to previous 1.4.2.2 (colored)

LWPify.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Mon Nov 11 22:13:38 2002 UTC (20 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.4.2.1: +1319 -0 lines
Diff to previous 1.4.2.1 (colored)

Catch up to -current

Revision 1.4.2.1, Fri Nov 8 20:26:50 2002 UTC (20 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.4: +0 -1319 lines
FILE REMOVED

file kern_event.c was added on branch nathanw_sa on 2002-11-11 22:13:38 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Fri Nov 8 20:26:50 2002 UTC (20 years, 2 months ago) by jdolecek
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

kevent(2): if the specified timeout is >=1ns and <1us, perform a poll
  rather than waiting forever due to TIMESPEC_TO_TIMEVAL() conversion

Revision 1.3 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:14 2002 UTC (20 years, 3 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.2: +695 -276 lines
Diff to previous 1.2 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.1.1.1.2.18 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:05 2002 UTC (20 years, 3 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.17: +30 -1 lines
Diff to previous 1.1.1.1.2.17 (colored) to branchpoint 1.1.1.1 (colored) next main 1.2 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.1.1.1.2.17 / (download) - annotate - [select for diffs], Wed Oct 2 18:46:44 2002 UTC (20 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.16: +8 -9 lines
Diff to previous 1.1.1.1.2.16 (colored) to branchpoint 1.1.1.1 (colored)

Fix the error path of NOTE_FORK|NOTE_TRACK handling code to not cause kernel
panic.
Problem reported and fix provided by Peter Werner <Peter.Werner at wgsn dot com>

Revision 1.1.1.1.2.16 / (download) - annotate - [select for diffs], Tue Oct 1 20:29:33 2002 UTC (20 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.15: +10 -1 lines
Diff to previous 1.1.1.1.2.15 (colored) to branchpoint 1.1.1.1 (colored)

filt_procattach() when attaching knote to a process, check that the current
process has either same uid, or is run by superuser; this fixes botch
in the import of the code to NetBSD, when the permissions check was removed
from original FreeBSD code

Brought to my attention by report of diffent issue by
Peter Werner <Peter.Werner at wgsn dot com>.

Actual code for the check taken from OpenBSD; FreeBSD version of the check
is different enough to not be directly usable.

Revision 1.1.1.1.2.15 / (download) - annotate - [select for diffs], Wed Sep 18 20:48:55 2002 UTC (20 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.14: +5 -1 lines
Diff to previous 1.1.1.1.2.14 (colored) to branchpoint 1.1.1.1 (colored)

user_kqfilters[] could be NULL if no extra filter were registered; check
this in kfilter_byname_user()

Revision 1.1.1.1.2.14 / (download) - annotate - [select for diffs], Fri Jun 7 08:22:36 2002 UTC (20 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.13: +9 -7 lines
Diff to previous 1.1.1.1.2.13 (colored) to branchpoint 1.1.1.1 (colored)

kevent(2): change type of 'nchanges' and 'nevents' from int to size_t
change discussed on bsd-api list

Revision 1.1.1.1.2.13 / (download) - annotate - [select for diffs], Tue Apr 9 06:23:47 2002 UTC (20 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.12: +13 -1 lines
Diff to previous 1.1.1.1.2.12 (colored) to branchpoint 1.1.1.1 (colored)

Make sure knote is detached from watched process when it exits, to avoid
using already-freed memory under some circumstancies.

(this bug was not NetBSD specific)

Revision 1.1.1.1.2.12 / (download) - annotate - [select for diffs], Tue Apr 9 06:19:52 2002 UTC (20 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.11: +1 -23 lines
Diff to previous 1.1.1.1.2.11 (colored) to branchpoint 1.1.1.1 (colored)

g/c KFILTER_UNREGISTER, KFILTER_REGISTER

Revision 1.1.1.1.2.11 / (download) - annotate - [select for diffs], Sun Mar 17 19:53:07 2002 UTC (20 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.10: +31 -26 lines
Diff to previous 1.1.1.1.2.10 (colored) to branchpoint 1.1.1.1 (colored)

some more comment indentation fixes
kfilter_register(): use free() instead of FREE() - the memory is allocated
	using malloc(), not MALLOC()
filt_procdetach(): fix the KASSERT() to not fire spuriously

Revision 1.1.1.1.2.10 / (download) - annotate - [select for diffs], Sat Mar 16 16:01:47 2002 UTC (20 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.9: +3 -3 lines
Diff to previous 1.1.1.1.2.9 (colored) to branchpoint 1.1.1.1 (colored)

Catch up with -current.

Revision 1.1.1.1.2.9 / (download) - annotate - [select for diffs], Fri Mar 15 21:51:49 2002 UTC (20 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.8: +63 -57 lines
Diff to previous 1.1.1.1.2.8 (colored) to branchpoint 1.1.1.1 (colored)

no need to 'lock' the process in filt_procattach()/filt_procdetach() for now
	(XXXSMP comment added)
kqueue_poll(): no need to protect with splnet, KNOTE() is never called
	from interrupt context so far
knote_attach():
 * don't memcpy() old fdp->fd_knlist if it's NULL
 * use free() instead of FREE() for old fdp->fd_knlist - the memory
   is allocated using malloc(9)
make the indentation of comments less insane (brrrr)
g/c bogus ARGSUSED
add couple KASSERT()s

Revision 1.1.1.1.2.8 / (download) - annotate - [select for diffs], Thu Feb 21 20:36:12 2002 UTC (20 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.1.1.1.2.7: +6 -6 lines
Diff to previous 1.1.1.1.2.7 (colored) to branchpoint 1.1.1.1 (colored)

you ought to use FREE(), not free() when you use MALLOC()
sync comment for KFILTER_REGISTER/KFILTER_UNREGISTER with <sys/event.h>

Revision 1.1.1.1.2.7 / (download) - annotate - [select for diffs], Sat Sep 8 16:48:18 2001 UTC (21 years, 4 months ago) by thorpej
Branch: kqueue
Changes since 1.1.1.1.2.6: +19 -1 lines
Diff to previous 1.1.1.1.2.6 (colored) to branchpoint 1.1.1.1 (colored)

Add a filter which simulates seltrue() by setting kn->kn_data to 0,
and then saying "event is active".

Revision 1.1.1.1.2.6 / (download) - annotate - [select for diffs], Sat Sep 8 02:33:48 2001 UTC (21 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.1.1.1.2.5: +4 -7 lines
Diff to previous 1.1.1.1.2.5 (colored) to branchpoint 1.1.1.1 (colored)

Add a selnotify(), which does a selwakeup() + KNOTE(), rather than
requiring all callers to do both.

This may be a transitional step only, or it may stick.  I haven't
decided yet.

Revision 1.1.1.1.2.5 / (download) - annotate - [select for diffs], Fri Sep 7 22:01:52 2001 UTC (21 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.1.1.1.2.4: +23 -16 lines
Diff to previous 1.1.1.1.2.4 (colored) to branchpoint 1.1.1.1 (colored)

More const.

Revision 1.1.1.1.2.4 / (download) - annotate - [select for diffs], Fri Sep 7 21:16:03 2001 UTC (21 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.1.1.1.2.3: +41 -30 lines
Diff to previous 1.1.1.1.2.3 (colored) to branchpoint 1.1.1.1 (colored)

Sprinkle some const, and make a very tiny optimization to the lookup
of system-provided filters (the common case).

Revision 1.1.1.1.2.3 / (download) - annotate - [select for diffs], Fri Sep 7 15:57:41 2001 UTC (21 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.1.1.1.2.2: +5 -27 lines
Diff to previous 1.1.1.1.2.2 (colored) to branchpoint 1.1.1.1 (colored)

Remove a needless extra function call when allocating/freeing knotes.

Revision 1.1.1.1.2.2 / (download) - annotate - [select for diffs], Fri Sep 7 15:54:17 2001 UTC (21 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.1.1.1.2.1: +20 -25 lines
Diff to previous 1.1.1.1.2.1 (colored) to branchpoint 1.1.1.1 (colored)

Use a pool for kqueue structures.

Revision 1.1.1.1.2.1 / (download) - annotate - [select for diffs], Tue Jul 10 13:42:29 2001 UTC (21 years, 6 months ago) by lukem
Branch: kqueue
Changes since 1.1.1.1: +609 -240 lines
Diff to previous 1.1.1.1 (colored)

* update for differences between netbsd & freebsd WRT:
	- header files
	- struct locking
	- pool (& other memory) allocation
	- timeouts
* add kqueue_ioctl(), to support ioctl(2) operations on a kqueue fd.
* change the way that system filters are referenced to support name lookups
  and unimplemented (yet known about) filter types (such as EVFILT_AIO)
* add kfilter_register(9): register filter with given name to map to given
  filterops. filter must not exist
* add kfilter_unregister(9): unregister user filter
* add kfilter_byname(): lookup filter by name, which can be a system filter
  or a user-added filter
* add kfilter_byfilter(): lookup filter by filter number
* in kqueue_register(), use kfilter_byfilter() to determine filterops rather
  than using obscure ~ operation (which was now incorrect due to renumbering)
* cleanup whitespace, improve comments
* check return code of all copyouts()s

Revision 1.2, Tue Jul 10 11:59:50 2001 UTC (21 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base, thorpej-devvp, newlock-base, newlock, kqueue-base, ifpoll-base, gehenna-devsw-base, gehenna-devsw, eeh-devprop-base, eeh-devprop
Changes since 1.1: +0 -0 lines
FILE REMOVED

move to kqueue branch for now

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Fri Jul 6 08:01:32 2001 UTC (21 years, 7 months ago) by lukem
Branch: FreeBSD
CVS Tags: FreeBSD-20010710
Branch point for: kqueue
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

freebsd kqueue implementation

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jul 6 08:01:32 2001 UTC (21 years, 7 months ago) by lukem
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>