The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.309 / (download) - annotate - [select for diffs], Sun Feb 11 13:01:29 2024 UTC (5 weeks, 1 day ago) by jdolecek
Branch: MAIN
CVS Tags: triaxx-drm, HEAD
Changes since 1.308: +13 -2 lines
Diff to previous 1.308 (colored) to selected 1.69 (colored)

make kqfilter() behave the same for PIPE_SOCKETPAIR pipe as it does
for standard one - refuse EVFILT_WRITE if the reader is already disconnected

fixes test failure for kernel/kqueue/write/t_pipe.c on PIPE_SOCKETPAIR kernel

PR kern/55690

Revision 1.302.4.1 / (download) - annotate - [select for diffs], Sun Feb 4 11:20:15 2024 UTC (6 weeks, 1 day ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4
Changes since 1.302: +22 -15 lines
Diff to previous 1.302 (colored) next main 1.303 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by jdolecek in ticket #583):

	sys/kern/uipc_socket.c: revision 1.308
	sys/kern/uipc_syscalls.c: revision 1.211
	sys/sys/socketvar.h: revision 1.168
	sys/net/if_gre.c: revision 1.185

fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete
use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()
this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690

Revision 1.308 / (download) - annotate - [select for diffs], Sat Feb 3 19:05:14 2024 UTC (6 weeks, 2 days ago) by jdolecek
Branch: MAIN
Changes since 1.307: +22 -15 lines
Diff to previous 1.307 (colored) to selected 1.69 (colored)

fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags'
passed when called via pipe2(2), fixing repeatable process hang during
compilation with 'gcc -pipe'

refactor fsocreate() to return the new socket and file pointers,
expect the caller to call fd_affix() once initialization is fully complete

use the new fsocreate() to replace the duplicate open-coded 'flags' handling
in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1()

this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed
on PIPE_SOCKETPAIR kernel

fixes PR kern/55690

Revision 1.307 / (download) - annotate - [select for diffs], Thu Nov 2 10:31:55 2023 UTC (4 months, 2 weeks ago) by martin
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.306: +25 -8 lines
Diff to previous 1.306 (colored) to selected 1.69 (colored)

Back out the following revisions on behalf of core:

	sys/sys/lwp.h: revision 1.228
	sys/sys/pipe.h: revision 1.40
	sys/kern/uipc_socket.c: revision 1.306
	sys/kern/kern_sleepq.c: revision 1.84
	sys/rump/librump/rumpkern/locks_up.c: revision 1.13
	sys/kern/sys_pipe.c: revision 1.165
	usr.bin/fstat/fstat.c: revision 1.119
	sys/rump/librump/rumpkern/locks.c: revision 1.87
	sys/ddb/db_xxx.c: revision 1.78
	sys/ddb/db_command.c: revision 1.187
	sys/sys/condvar.h: revision 1.18
	sys/ddb/db_interface.h: revision 1.42
	sys/sys/socketvar.h: revision 1.166
	sys/kern/uipc_syscalls.c: revision 1.209
	sys/kern/kern_condvar.c: revision 1.60

  Add cv_fdrestart() [...]
  Use cv_fdrestart() to implement fo_restart.
  Simplify/streamline pipes a little bit [...]

This changes have caused regressions and need to be debugged.
The cv_fdrestart() addition needs more discussion.

Revision 1.306 / (download) - annotate - [select for diffs], Fri Oct 13 18:50:39 2023 UTC (5 months ago) by ad
Branch: MAIN
Changes since 1.305: +8 -25 lines
Diff to previous 1.305 (colored) to selected 1.69 (colored)

Use cv_fdrestart() to implement fo_restart.

Revision 1.305 / (download) - annotate - [select for diffs], Wed Oct 4 22:17:09 2023 UTC (5 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.304: +3 -3 lines
Diff to previous 1.304 (colored) to selected 1.69 (colored)

kauth_cred_hold(): return cred verbatim so that donating a reference to
another data structure can be done more elegantly.

Revision 1.304 / (download) - annotate - [select for diffs], Thu Sep 7 20:12:33 2023 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.303: +4 -4 lines
Diff to previous 1.303 (colored) to selected 1.69 (colored)

Fix a ~16 year old perf regression: when creating a socket, add a reference
to the caller's credentials rather than copying them.  On an 80486DX2/66 this
seems to ~halve the time taken to create a socket.

Revision 1.303 / (download) - annotate - [select for diffs], Sat Aug 5 09:25:39 2023 UTC (7 months, 1 week ago) by andvar
Branch: MAIN
Changes since 1.302: +3 -3 lines
Diff to previous 1.302 (colored) to selected 1.69 (colored)

s/acccept/accept/ in comment.

Revision 1.302 / (download) - annotate - [select for diffs], Sat Apr 9 23:52:22 2022 UTC (23 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.301: +6 -2 lines
Diff to previous 1.301 (colored) to selected 1.69 (colored)

unix(4): Convert membar_exit to membar_release.

Use atomic_load_consume or atomic_load_relaxed where necessary.

Comment on why unlocked nonatomic access is valid where it is done.

Revision 1.301 / (download) - annotate - [select for diffs], Sat Mar 12 16:06:15 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.300: +4 -3 lines
Diff to previous 1.300 (colored) to selected 1.69 (colored)

kern: m_copym(M_DONTWAIT) can fail; handle that case gracefully.

Not sure if this should truncate the result or just fail with nonzero
error code (ENOBUFS?).  Feel free to change this the other way if you
know better!

Reported-by: syzbot+54c34f25d1e4124eb85d@syzkaller.appspotmail.com

Revision 1.300 / (download) - annotate - [select for diffs], Sat Oct 23 01:28:33 2021 UTC (2 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.299: +29 -2 lines
Diff to previous 1.299 (colored) to selected 1.69 (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.299 / (download) - annotate - [select for diffs], Mon Oct 11 01:07:36 2021 UTC (2 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.298: +4 -4 lines
Diff to previous 1.298 (colored) to selected 1.69 (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.298 / (download) - annotate - [select for diffs], Wed Sep 29 13:15:45 2021 UTC (2 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.297: +5 -5 lines
Diff to previous 1.297 (colored) to selected 1.69 (colored)

The kq filterops that interact with sockets are MPSAFE.

Revision 1.297 / (download) - annotate - [select for diffs], Wed Sep 29 02:47:22 2021 UTC (2 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.296: +6 -8 lines
Diff to previous 1.296 (colored) to selected 1.69 (colored)

- Change selremove_knote() from returning void to bool, and return
  true if the last knote was removed and there are no more knotes
  on the selinfo.
- Use this new return value in filt_sordetach(), filt_sowdetach(),
  filt_fifordetach(), and filt_fifowdetach() to know when to clear
  SB_KOTE without having to know select/kqueue implementation details.

Revision 1.296 / (download) - annotate - [select for diffs], Sun Sep 26 01:16:10 2021 UTC (2 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.295: +5 -5 lines
Diff to previous 1.295 (colored) to selected 1.69 (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.295 / (download) - annotate - [select for diffs], Tue Aug 3 20:27:08 2021 UTC (2 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-futex2-base, thorpej-futex2
Changes since 1.294: +3 -2 lines
Diff to previous 1.294 (colored) to selected 1.69 (colored)

in sbsavetimestamp(), initialize struct timeval to 0 with memset() so that
the implicit padding is initialized.  this avoids later copying uninitialized
memory out to user space.  detected by KMSAN.

Revision 1.292.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:14 2020 UTC (3 years, 3 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.292: +13 -13 lines
Diff to previous 1.292 (colored) next main 1.293 (colored) to selected 1.69 (colored)

Sync w/ HEAD.

Revision 1.294 / (download) - annotate - [select for diffs], Fri Dec 11 03:00:09 2020 UTC (3 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.293: +9 -9 lines
Diff to previous 1.293 (colored) to selected 1.69 (colored)

Use sel{record,remove}_knote().

Revision 1.293 / (download) - annotate - [select for diffs], Mon Nov 23 00:52:53 2020 UTC (3 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.292: +6 -6 lines
Diff to previous 1.292 (colored) to selected 1.69 (colored)

Restore correct functioning of SIOCATMARK by removing the previous
change that was done to fix poll(POLLPRI | POLLRDBAND) and instead
add a separate flag to track when poll() should indicate that a
MSG_OOB byte is available.  Re-fixes PR 54435 properly.

Revision 1.292 / (download) - annotate - [select for diffs], Sat Oct 17 09:06:15 2020 UTC (3 years, 5 months ago) by mlelstv
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.291: +18 -4 lines
Diff to previous 1.291 (colored) to selected 1.69 (colored)

Setting a socket buffer size stops autoscaling. Add a sysctl to
prevent this behaviour. The default is not changed.

Revision 1.281.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 18:39:01 2020 UTC (3 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.281.2.2: +3 -2 lines
Diff to previous 1.281.2.2 (colored) to branchpoint 1.281 (colored) next main 1.282 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by christos in ticket #1091):

	sys/kern/uipc_socket.c: revision 1.291
	sys/kern/uipc_usrreq.c: revision 1.199
	sys/kern/uipc_socket2.c: revision 1.138

add socket info for user and group for unix sockets in fstat.

Revision 1.291 / (download) - annotate - [select for diffs], Wed Aug 26 22:54:30 2020 UTC (3 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.290: +3 -2 lines
Diff to previous 1.290 (colored) to selected 1.69 (colored)

add socket info for user and group for unix sockets in fstat.

Revision 1.290 / (download) - annotate - [select for diffs], Sun Jun 7 15:19:05 2020 UTC (3 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.289: +6 -4 lines
Diff to previous 1.289 (colored) to selected 1.69 (colored)

Fix bohr bug triggered only once by syzkaller 2,5 months ago.

In sockopt_alloc(), 'sopt' may already have been initialized with
'sopt->sopt_data = sopt->sopt_buf'. If the allocation fails, we
end up with 'sopt->sopt_data = NULL', and later try to free this
NULL pointer in sockopt_destroy().

Fix that by not modifying 'sopt_data' if the allocation failed.

Difficult to reproduce in normal times, but fault(4) makes it
easy.

Reported-by: syzbot+380cb5d518742f063ad2@syzkaller.appspotmail.com

Revision 1.289 / (download) - annotate - [select for diffs], Sun Apr 26 14:21:14 2020 UTC (3 years, 10 months ago) by jakllsch
Branch: MAIN
Changes since 1.288: +4 -5 lines
Diff to previous 1.288 (colored) to selected 1.69 (colored)

Implement SCTP bug fixes found by maxv@.

Adding these seems to improve the SCTP situation.

Revision 1.264.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.264.2.2: +22 -10 lines
Diff to previous 1.264.2.2 (colored) to branchpoint 1.264 (colored) next main 1.265 (colored) to selected 1.69 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.264.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:52 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.264.2.1: +7 -3 lines
Diff to previous 1.264.2.1 (colored) to branchpoint 1.264 (colored) to selected 1.69 (colored)

Merge changes from current as of 20200406

Revision 1.285.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:03 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.285: +7 -3 lines
Diff to previous 1.285 (colored) next main 1.286 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.255.2.5 / (download) - annotate - [select for diffs], Tue Feb 25 19:12:14 2020 UTC (4 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.255.2.4: +3 -2 lines
Diff to previous 1.255.2.4 (colored) to branchpoint 1.255 (colored) next main 1.256 (colored) to selected 1.69 (colored)

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

	sys/kern/uipc_socket.c: revision 1.288

Zero out 'tv', to prevent uninitialized bytes in its padding from leaking
to userland. Found by kMSan.

Revision 1.281.2.2 / (download) - annotate - [select for diffs], Tue Feb 25 19:10:51 2020 UTC (4 years ago) by martin
Branch: netbsd-9
Changes since 1.281.2.1: +3 -2 lines
Diff to previous 1.281.2.1 (colored) to branchpoint 1.281 (colored) to selected 1.69 (colored)

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

	sys/kern/uipc_socket.c: revision 1.288

Zero out 'tv', to prevent uninitialized bytes in its padding from leaking
to userland. Found by kMSan.

Revision 1.288 / (download) - annotate - [select for diffs], Sat Feb 22 08:39:33 2020 UTC (4 years ago) by maxv
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.287: +3 -2 lines
Diff to previous 1.287 (colored) to selected 1.69 (colored)

Zero out 'tv', to prevent uninitialized bytes in its padding from leaking
to userland. Found by kMSan.

Reported-by: syzbot+8134380511a82c8f5fd7@syzkaller.appspotmail.com

Revision 1.287 / (download) - annotate - [select for diffs], Fri Feb 21 00:26:22 2020 UTC (4 years ago) by joerg
Branch: MAIN
Changes since 1.286: +3 -3 lines
Diff to previous 1.286 (colored) to selected 1.69 (colored)

Explicitly cast pointers to uintptr_t before casting to enums. They are
not necessarily the same size. Don't cast pointers to bool, check for
NULL instead.

Revision 1.286 / (download) - annotate - [select for diffs], Tue Feb 18 00:40:50 2020 UTC (4 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.285: +5 -2 lines
Diff to previous 1.285 (colored) to selected 1.69 (colored)

PR/54435: Valery Ushakov: Clear urgent status after reading urgent data, so
that poll(2) works.

Revision 1.281.2.1 / (download) - annotate - [select for diffs], Mon Oct 21 20:06:17 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.281: +3 -3 lines
Diff to previous 1.281 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by pgoyette in ticket #339):

	sys/compat/common/kern_uipc_socket_50.c: revision 1.3
	sys/sys/compat_stub.h: revision 1.19
	sys/kern/uipc_socket.c: revision 1.284

Actually return the updated pointer-to-mbuf-pointer to the caller
rather than discarding-after-assignment.  Introduced from the
[pgoyette-compat] branch work.

Revision 1.285 / (download) - annotate - [select for diffs], Mon Oct 14 16:27:03 2019 UTC (4 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.284: +5 -3 lines
Diff to previous 1.284 (colored) to selected 1.69 (colored)

Add a check before the memcpy. memcpy is defined to never take NULL as
second argument, and the compiler is free to perform optimizations knowing
that this argument is never NULL.

In this particular case, it was harmless. But still good to fix.

Reported-by: syzbot+6f504255accb795eb6b7@syzkaller.appspotmail.com

Revision 1.284 / (download) - annotate - [select for diffs], Fri Sep 27 00:32:03 2019 UTC (4 years, 5 months ago) by pgoyette
Branch: MAIN
Changes since 1.283: +3 -3 lines
Diff to previous 1.283 (colored) to selected 1.69 (colored)

Actually return the updated pointer-to-mbuf-pointer to the caller
rather than discarding-after-assignment.  Introduced from the
[pgoyette-compat] branch work.

Welcome to 9.99.14 !!!  (Module hook routine prototype changed.)

Found by the lgtm bot, reported via private Email from maxv@

Revision 1.283 / (download) - annotate - [select for diffs], Sat Sep 14 15:06:33 2019 UTC (4 years, 6 months ago) by mlelstv
Branch: MAIN
Changes since 1.282: +3 -3 lines
Diff to previous 1.282 (colored) to selected 1.69 (colored)

Fix build.

Revision 1.282 / (download) - annotate - [select for diffs], Sat Sep 14 14:09:54 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.281: +9 -10 lines
Diff to previous 1.281 (colored) to selected 1.69 (colored)

PT/54527: Anthony Mallet: Don't clear socket errors for MSG_PEEK.

Revision 1.281 / (download) - annotate - [select for diffs], Tue Jul 16 22:57:55 2019 UTC (4 years, 8 months ago) by pgoyette
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.280: +13 -2 lines
Diff to previous 1.280 (colored) to selected 1.69 (colored)

Move the assignment of SCTP-specific function hooks/pointers.

Without this, a rumpkernel (appropriately modified) built with SCTP
enabled will try to assign the function pointers, but the targets
are only available in rumpnet.  We cannot link the rumpkernel against
rumpnet because rumpnet is already linked against rumpkernel and we
would end up with a circular dependency.

As reported in private Email by rjs@

Revision 1.264.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:04 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.264: +176 -185 lines
Diff to previous 1.264 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.280 / (download) - annotate - [select for diffs], Sat Jun 1 15:20:51 2019 UTC (4 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.279: +5 -2 lines
Diff to previous 1.279 (colored) to selected 1.69 (colored)

Add XXXs for SCTP bugs.

Revision 1.279 / (download) - annotate - [select for diffs], Wed May 8 14:05:18 2019 UTC (4 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.278: +6 -12 lines
Diff to previous 1.278 (colored) to selected 1.69 (colored)

PR/54176: Anthony Mallet:
getsockopt(2) does not silently truncate returned optval

Revision 1.278 / (download) - annotate - [select for diffs], Mon Apr 15 10:53:17 2019 UTC (4 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.277: +10 -28 lines
Diff to previous 1.277 (colored) to selected 1.69 (colored)

Clean up this mess and simplify, so that all the socket options get
handled correctly whether or not the compat_50 module is loaded.

Revision 1.277 / (download) - annotate - [select for diffs], Mon Apr 15 03:58:29 2019 UTC (4 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.276: +4 -2 lines
Diff to previous 1.276 (colored) to selected 1.69 (colored)

If the compat code successfully handled an option, don't return an error.

Revision 1.276 / (download) - annotate - [select for diffs], Mon Apr 15 02:35:28 2019 UTC (4 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.275: +4 -2 lines
Diff to previous 1.275 (colored) to selected 1.69 (colored)

Actually update the timeout value for the compability sockops

Revision 1.275 / (download) - annotate - [select for diffs], Mon Apr 15 02:07:11 2019 UTC (4 years, 11 months ago) by pgoyette
Branch: MAIN
Changes since 1.274: +29 -54 lines
Diff to previous 1.274 (colored) to selected 1.69 (colored)

Split the COMPAT_50 socket-timeout stuff out of kern/uipc_socket.c
and into its own source file, which is now included in the compat_50
module.

(Not sure how this got missed during the original [pgoyette-compat] work)

Revision 1.274 / (download) - annotate - [select for diffs], Sun Apr 14 09:09:55 2019 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.273: +6 -2 lines
Diff to previous 1.273 (colored) to selected 1.69 (colored)

Add more checks, if the values are negative we hit a KASSERT later in the
timeout.

Reported-by: syzbot+662dbeb526303f458255@syzkaller.appspotmail.com

Revision 1.273 / (download) - annotate - [select for diffs], Mon Apr 8 18:38:45 2019 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.272: +3 -2 lines
Diff to previous 1.272 (colored) to selected 1.69 (colored)

Reset so_cred to NULL after freeing it, because close() may leave the PCB
in pcblist, and we don't want a future lookup (via eg netstat) to read
freed data.

Detected by KASAN, reported by Alexander Nasonov.

Revision 1.272 / (download) - annotate - [select for diffs], Sun Mar 31 19:54:36 2019 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.271: +9 -3 lines
Diff to previous 1.271 (colored) to selected 1.69 (colored)

Also check for MT_CONTROL, and end the receive operation if we see one. It
is possible to get an MT_CONTROL if we sleep in MSG_WAITALL. The other BSDs
do the same.

Reported-by: syzbot+e8aa26ad551c649227b4@syzkaller.appspotmail.com

Revision 1.271 / (download) - annotate - [select for diffs], Thu Mar 7 12:29:14 2019 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.270: +2 -12 lines
Diff to previous 1.270 (colored) to selected 1.69 (colored)

Remove getsombuf(), unused.

Revision 1.270 / (download) - annotate - [select for diffs], Thu Mar 7 12:22:43 2019 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.269: +96 -106 lines
Diff to previous 1.269 (colored) to selected 1.69 (colored)

style

Revision 1.269 / (download) - annotate - [select for diffs], Mon Feb 4 04:18:27 2019 UTC (5 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.268: +4 -2 lines
Diff to previous 1.268 (colored) to selected 1.69 (colored)

add a couple of fallthru comments.

Revision 1.259.2.6 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:04 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.259.2.5: +3 -3 lines
Diff to previous 1.259.2.5 (colored) to branchpoint 1.259 (colored) next main 1.260 (colored) to selected 1.69 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.268 / (download) - annotate - [select for diffs], Sat Dec 22 14:28:56 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored) to selected 1.69 (colored)

Replace M_ALIGN and MH_ALIGN by m_align.

Revision 1.259.2.5 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:50 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.259.2.4: +42 -2 lines
Diff to previous 1.259.2.4 (colored) to branchpoint 1.259 (colored) to selected 1.69 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.255.2.4 / (download) - annotate - [select for diffs], Mon Nov 12 09:43:19 2018 UTC (5 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.255.2.3: +6 -2 lines
Diff to previous 1.255.2.3 (colored) to branchpoint 1.255 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by hannken in ticket #1089):

	external/bsd/nsd/include/config.h: revision 1.5
	sys/kern/uipc_syscalls.c: revision 1.198
	sys/kern/uipc_syscalls.c: revision 1.199
	sys/kern/uipc_socket.c: revision 1.267

Update getsockopt(SO_ERROR) to behave like soreceive() and
return and clear so->so_rerror if so->so_error is zero.

Ok: christos@

 -

Don't defer errors from sendmmsg().  This matches the linux manpage.

Defer errors from recvmmsg() through so_rerror and
tests and return a deferred error on entry.

Ok: christos@

 -

sys_recvmmsg: don't defer an error that already gets returned.

 -

Re-enable {send,recv}mmsg now they are working.

Revision 1.267 / (download) - annotate - [select for diffs], Wed Nov 7 09:58:19 2018 UTC (5 years, 4 months ago) by hannken
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.266: +6 -2 lines
Diff to previous 1.266 (colored) to selected 1.69 (colored)

Update getsockopt(SO_ERROR) to behave like soreceive() and
return and clear so->so_rerror if so->so_error is zero.

Ok: christos@

Revision 1.266 / (download) - annotate - [select for diffs], Sun Nov 4 16:30:29 2018 UTC (5 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.265: +38 -2 lines
Diff to previous 1.265 (colored) to selected 1.69 (colored)

- Introduce a new SO_RERROR socket option to explicitly turn on
  receive overflow errors re-instating the default behavior to
  silently ignore them as before 2018-03-19.
- Introduce a new kern.sooptions sysctl to control the default
  behavior of socket options. Setting this to 0x4000 (SO_RERROR),
  turns on receive overflow error reporting for all sockets.
- Change dhcpcd to turn on SO_RERROR on all its sockets.

As discussed in tech-net.

Revision 1.259.2.4 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:42 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.259.2.3: +3 -3 lines
Diff to previous 1.259.2.3 (colored) to branchpoint 1.259 (colored) to selected 1.69 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.265 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (5 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.264: +3 -3 lines
Diff to previous 1.264 (colored) to selected 1.69 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.259.2.3 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:04 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.259.2.2: +13 -7 lines
Diff to previous 1.259.2.2 (colored) to branchpoint 1.259 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.255.2.3 / (download) - annotate - [select for diffs], Sat Jun 9 15:16:30 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.255.2.2: +13 -7 lines
Diff to previous 1.255.2.2 (colored) to branchpoint 1.255 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by roy in ticket #868):

	sys/sys/socketvar.h: revision 1.156
	sys/kern/uipc_socket2.c: revision 1.130
	sys/kern/uipc_socket.c: revision 1.264

Separate receive socket errors from general socket errors.

Revision 1.264 / (download) - annotate - [select for diffs], Wed Jun 6 09:46:46 2018 UTC (5 years, 9 months ago) by roy
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.263: +13 -7 lines
Diff to previous 1.263 (colored) to selected 1.69 (colored)

Separate receive socket errors from general socket errors.

Revision 1.259.2.2 / (download) - annotate - [select for diffs], Wed May 2 07:20:22 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.259.2.1: +6 -6 lines
Diff to previous 1.259.2.1 (colored) to branchpoint 1.259 (colored) to selected 1.69 (colored)

Synch with HEAD

Revision 1.263 / (download) - annotate - [select for diffs], Thu Apr 26 19:50:09 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0521, pgoyette-compat-0502
Changes since 1.262: +5 -5 lines
Diff to previous 1.262 (colored) to selected 1.69 (colored)

Stop using m_copy(), use m_copym() directly. m_copy is useless,
undocumented and confusing.

Revision 1.262 / (download) - annotate - [select for diffs], Thu Apr 26 19:22:17 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.261: +3 -3 lines
Diff to previous 1.261 (colored) to selected 1.69 (colored)

Remove unused mbuf argument from sbsavetimestamp.

Revision 1.255.2.2 / (download) - annotate - [select for diffs], Mon Apr 9 13:34:10 2018 UTC (5 years, 11 months ago) by bouyer
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.255.2.1: +5 -6 lines
Diff to previous 1.255.2.1 (colored) to branchpoint 1.255 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by roy in ticket #724):
	tests/net/icmp/t_ping.c: revision 1.19
	sys/netinet6/raw_ip6.c: revision 1.166
	sys/netinet6/ip6_input.c: revision 1.195
	sys/net/raw_usrreq.c: revision 1.59
	sys/sys/socketvar.h: revision 1.151
	sys/kern/uipc_socket2.c: revision 1.128
	tests/lib/libc/sys/t_recvmmsg.c: revision 1.2
	lib/libc/sys/recv.2: revision 1.38
	sys/net/rtsock.c: revision 1.239
	sys/netinet/udp_usrreq.c: revision 1.246
	sys/netinet6/icmp6.c: revision 1.224
	tests/net/icmp/t_ping.c: revision 1.20
	sys/netipsec/keysock.c: revision 1.63
	sys/netinet/raw_ip.c: revision 1.172
	sys/kern/uipc_socket.c: revision 1.260
	tests/net/icmp/t_ping.c: revision 1.22
	sys/kern/uipc_socket.c: revision 1.261
	tests/net/icmp/t_ping.c: revision 1.23
	sys/netinet/ip_mroute.c: revision 1.155
	sbin/route/route.c: revision 1.159
	sys/netinet6/ip6_mroute.c: revision 1.123
	sys/netatalk/ddp_input.c: revision 1.31
	sys/netcan/can.c: revision 1.3
	sys/kern/uipc_usrreq.c: revision 1.184
	sys/netinet6/udp6_usrreq.c: revision 1.138
	tests/net/icmp/t_ping.c: revision 1.18
socket: report receive buffer overflows
Add soroverflow() which increments the overflow counter, sets so_error
to ENOBUFS and wakes the receive socket up.
Replace all code that manually increments this counter with soroverflow().
Add soroverflow() to raw_input().
This allows userland to detect route(4) overflows so it can re-sync
with the current state.
socket: clear error even when peeking
The error has already been reported and it's pointless requiring another
recv(2) call just to clear it.
socket: remove now incorrect comment that so_error is only udp
As it can be affected by route(4) sockets which are raw.
rtsock: log dropped messages that we cannot report to userland
Handle ENOBUFS when receiving messages.
Don't send messages if the receiver has died.
Sprinkle more soroverflow().
Handle ENOBUFS in recv
Handle ENOBUFS in sendto
Note value received. Harden another sendto for ENOBUFS.
Handle the routing socket overflowing gracefully.
Allow a valid sendto .... duh
Handle errors better.
Fix test for checking we sent all the data we asked to.

Revision 1.259.2.1 / (download) - annotate - [select for diffs], Thu Mar 22 01:44:50 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.259: +5 -6 lines
Diff to previous 1.259 (colored) to selected 1.69 (colored)

Synch with HEAD, resolve conflicts

Revision 1.261 / (download) - annotate - [select for diffs], Mon Mar 19 16:32:30 2018 UTC (6 years ago) by roy
Branch: MAIN
CVS Tags: pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Changes since 1.260: +4 -4 lines
Diff to previous 1.260 (colored) to selected 1.69 (colored)

socket: remove now incorrect comment that so_error is only udp

As it can be affected by route(4) sockets which are raw.

Revision 1.260 / (download) - annotate - [select for diffs], Mon Mar 19 16:31:24 2018 UTC (6 years ago) by roy
Branch: MAIN
Changes since 1.259: +3 -4 lines
Diff to previous 1.259 (colored) to selected 1.69 (colored)

socket: clear error even when peeking

The error has already been reported and it's pointless requiring another
recv(2) call just to clear it.

Revision 1.255.2.1 / (download) - annotate - [select for diffs], Sun Mar 18 10:57:01 2018 UTC (6 years ago) by martin
Branch: netbsd-8
Changes since 1.255: +11 -4 lines
Diff to previous 1.255 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by tih in ticket #639):
	sys/kern/uipc_socket.c: revision 1.258
	sys/kern/uipc_socket.c: revision 1.259
	sys/netinet/ip_input.c: revision 1.364 (via patch)
	sys/netinet/ip_output.c: revision 1.289
	sys/netinet/in.h: revision 1.102
	sys/netinet/in_pcb.c: revision 1.181
	share/man/man9/sockopt.9: revision 1.11
	sys/netinet/in_pcb.h: revision 1.65
	sys/sys/socketvar.h: revision 1.146
	sys/kern/uipc_syscalls.c: revision 1.189
	sys/netinet/ip_output.c: revision 1.290
	share/man/man4/ip.4: revision 1.41
	share/man/man4/ip.4: revision 1.42
	sys/kern/uipc_syscalls.c: revision 1.190

pass valsize for getsockopt like we do for setsockopt
make sure that we have enough space, don't require the exact size
(Tom Ivar Helbekkmo)

1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
   IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
   the parameter it's supplied with:
   - If it's sizeof(int), assume it's being used as in Linux:
     - If it's non-zero, turn on the IP_RECVPKTINFO option.
     - If it's zero, turn off the IP_RECVPKTINFO option.
   - If it's sizeof(struct in_pktinfo), assume it's being used as in
     Solaris, to set a default for the source interface and/or
     source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
   on data size, and just added a fallback to a Linux (and current NetBSD)
   compatible value if the size is unknown (as it is now), or,
   in the future, if the calling application specifies a receiving
   buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo

new sentence-new line

Remove comment now that the getsockopt code passes the size.

Add a new sockopt member to keep track of the actual size of the option
that should be returned to the caller in getsockopt(2).
(Tom Ivar Helbekkmo)

Revision 1.259 / (download) - annotate - [select for diffs], Thu Jan 4 01:42:25 2018 UTC (6 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.258: +5 -2 lines
Diff to previous 1.258 (colored) to selected 1.69 (colored)

Add a new sockopt member to keep track of the actual size of the option
that should be returned to the caller in getsockopt(2).

(Tom Ivar Helbekkmo)

Revision 1.258 / (download) - annotate - [select for diffs], Mon Jan 1 00:45:12 2018 UTC (6 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.257: +8 -4 lines
Diff to previous 1.257 (colored) to selected 1.69 (colored)

make sure that we have enough space, don't require the exact size
(Tom Ivar Helbekkmo)

Revision 1.211.2.5 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.211.2.4: +149 -60 lines
Diff to previous 1.211.2.4 (colored) next main 1.212 (colored) to selected 1.69 (colored)

update from HEAD

Revision 1.257 / (download) - annotate - [select for diffs], Wed Oct 25 08:12:39 2017 UTC (6 years, 4 months ago) by maya
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.256: +22 -8 lines
Diff to previous 1.256 (colored) to selected 1.69 (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.235.2.7 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.235.2.6: +56 -25 lines
Diff to previous 1.235.2.6 (colored) to branchpoint 1.235 (colored) next main 1.236 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.209.2.1.4.3 / (download) - annotate - [select for diffs], Fri Jul 21 03:55:56 2017 UTC (6 years, 7 months ago) by snj
Branch: netbsd-6-0
Changes since 1.209.2.1.4.2: +4 -2 lines
Diff to previous 1.209.2.1.4.2 (colored) to branchpoint 1.209.2.1 (colored) next main 1.209.2.2 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1453):
	sys/kern/uipc_socket.c: revision 1.213
	sys/kern/uipc_syscalls.c: revision 1.160
PR/47569: Valery Ushakov: SOCK_NONBLOCK does not work because it does not
set SS_NBIO.
XXX: there are too many flags that mean the same thing in too many places,
and too many flags that mean the same thing and are different.

Revision 1.256 / (download) - annotate - [select for diffs], Thu Jul 6 17:42:39 2017 UTC (6 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.255: +29 -2 lines
Diff to previous 1.255 (colored) to selected 1.69 (colored)

move the timestamp stuff to uipc_socket.c because it already has the compat
includes.

Revision 1.255 / (download) - annotate - [select for diffs], Sat May 27 21:02:56 2017 UTC (6 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.254: +3 -2 lines
Diff to previous 1.254 (colored) to selected 1.69 (colored)

merge the bouyer-socketcan branch to HEAD.

CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.

Revision 1.254 / (download) - annotate - [select for diffs], Thu May 25 20:42:36 2017 UTC (6 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.253: +10 -8 lines
Diff to previous 1.253 (colored) to selected 1.69 (colored)

switch to a switch

Revision 1.252.2.1 / (download) - annotate - [select for diffs], Thu May 25 18:52:24 2017 UTC (6 years, 9 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.252: +4 -4 lines
Diff to previous 1.252 (colored) next main 1.253 (colored) to selected 1.69 (colored)

Allow any user to bind to CAN sockets.
Maybe a better security model is needed.

Revision 1.252.6.1 / (download) - annotate - [select for diffs], Tue May 2 03:19:22 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.252: +24 -23 lines
Diff to previous 1.252 (colored) next main 1.253 (colored) to selected 1.69 (colored)

Sync with HEAD - tag prg-localcount2-base1

Revision 1.253 / (download) - annotate - [select for diffs], Mon May 1 10:00:43 2017 UTC (6 years, 10 months ago) by ryo
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1
Changes since 1.252: +24 -23 lines
Diff to previous 1.252 (colored) to selected 1.69 (colored)

whitespace police

Revision 1.248.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:17 2016 UTC (7 years, 4 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.248: +5 -8 lines
Diff to previous 1.248 (colored) next main 1.249 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.252 / (download) - annotate - [select for diffs], Thu Oct 13 19:10:23 2016 UTC (7 years, 5 months ago) by uwe
Branch: MAIN
CVS Tags: prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base
Branch point for: prg-localcount2, bouyer-socketcan
Changes since 1.251: +7 -7 lines
Diff to previous 1.251 (colored) to selected 1.69 (colored)

Revert to revision 1.249 to undo changes from PR 49636.

Marking up some zeroes with a type suffix, while not marking others in
the very same function does nothing but places cognitive burden on the
reader.

Spelling "clear bits" as "&~" is actually not uncommon (and some say
is more readable).

Revision 1.251 / (download) - annotate - [select for diffs], Mon Oct 10 01:22:51 2016 UTC (7 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.250: +3 -3 lines
Diff to previous 1.250 (colored) to selected 1.69 (colored)

foo & ~bar, not foo &~ bar. From Henning Petersen in PR 49636.

Revision 1.250 / (download) - annotate - [select for diffs], Mon Oct 10 01:22:08 2016 UTC (7 years, 5 months ago) by dholland
Branch: MAIN
Changes since 1.249: +6 -6 lines
Diff to previous 1.249 (colored) to selected 1.69 (colored)

PR 49636 Henning Petersen: use "0L" to return 0 from a function returning
long, and test its returned value against "0L" instead of "0".

This is not especially necessary, but it's also harmless.

Revision 1.235.2.6 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:03 2016 UTC (7 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.235.2.5: +5 -8 lines
Diff to previous 1.235.2.5 (colored) to branchpoint 1.235 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.249 / (download) - annotate - [select for diffs], Sun Oct 2 19:26:46 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004
Changes since 1.248: +5 -8 lines
Diff to previous 1.248 (colored) to selected 1.69 (colored)

more MFREE -> m_free

Revision 1.235.2.5 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:20 2016 UTC (7 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.235.2.4: +3 -3 lines
Diff to previous 1.235.2.4 (colored) to branchpoint 1.235 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.248 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:15 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.247: +3 -3 lines
Diff to previous 1.247 (colored) to selected 1.69 (colored)

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.235.2.4 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:05 2015 UTC (8 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.235.2.3: +43 -7 lines
Diff to previous 1.235.2.3 (colored) to branchpoint 1.235 (colored) to selected 1.69 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.247 / (download) - annotate - [select for diffs], Tue Oct 13 21:28:35 2015 UTC (8 years, 5 months ago) by rjs
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.246: +43 -7 lines
Diff to previous 1.246 (colored) to selected 1.69 (colored)

Add core networking support for SCTP.

Revision 1.235.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.235.2.2: +4 -2 lines
Diff to previous 1.235.2.2 (colored) to branchpoint 1.235 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.246 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:26 2015 UTC (8 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.245: +4 -2 lines
Diff to previous 1.245 (colored) to selected 1.69 (colored)

sprinkle _KERNEL_OPT

Revision 1.235.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:22 2015 UTC (8 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.235.2.1: +20 -15 lines
Diff to previous 1.235.2.1 (colored) to branchpoint 1.235 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.245 / (download) - annotate - [select for diffs], Sat May 9 15:22:47 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.244: +5 -9 lines
Diff to previous 1.244 (colored) to selected 1.69 (colored)

change sosend() to accept sockaddr * instead of mbuf * for nam.

bump to 7.99.16

Revision 1.244 / (download) - annotate - [select for diffs], Sun May 3 04:18:45 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.243: +3 -3 lines
Diff to previous 1.243 (colored) to selected 1.69 (colored)

flip (NULL == addr) to (addr == NULL) use in conditional from previous
commit.

Revision 1.243 / (download) - annotate - [select for diffs], Sat May 2 23:46:04 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.242: +3 -3 lines
Diff to previous 1.242 (colored) to selected 1.69 (colored)

compare mbuf * pointer to NULL instead of 0

Revision 1.242 / (download) - annotate - [select for diffs], Sat May 2 21:15:33 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.241: +3 -4 lines
Diff to previous 1.241 (colored) to selected 1.69 (colored)

remove unnecessary check that nam != NULL before deref in soconnect()
(added in previous commit).

sockargs copyin() makes sure we don't get NULL here

Revision 1.241 / (download) - annotate - [select for diffs], Sat May 2 20:10:26 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.240: +9 -4 lines
Diff to previous 1.240 (colored) to selected 1.69 (colored)

make soconnect() fail with EAFNOSUPPORT if the domain of the socket does
not match family received in the sockaddr.

* connect() now fails as documented in connect(2).
* atf test t_connect:connect_foreign_family now passes.

Revision 1.240 / (download) - annotate - [select for diffs], Sat May 2 17:18:03 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.239: +11 -6 lines
Diff to previous 1.239 (colored) to selected 1.69 (colored)

make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

* bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect}

Revision 1.239 / (download) - annotate - [select for diffs], Fri Apr 24 22:32:37 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.238: +3 -3 lines
Diff to previous 1.238 (colored) to selected 1.69 (colored)

make accept, getsockname and getpeername syscalls use sockaddr_big and modify
pr_{accept,sockname,peername} nam parameter type from mbuf * to sockaddr *.

* retained use of mbuftypes[MT_SONAME] for now.
* bump to netbsd version 7.99.12 for parameter type change.

patch posted to tech-net@ 2015/04/19

Revision 1.235.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:20 2015 UTC (8 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.235: +7 -3 lines
Diff to previous 1.235 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.238 / (download) - annotate - [select for diffs], Sun Apr 5 23:19:56 2015 UTC (8 years, 11 months ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.237: +3 -3 lines
Diff to previous 1.237 (colored) to selected 1.69 (colored)

change return from EINVAL to EAFNOSUPPORT when the domain of the socket
does not match the family of the address to be bound.

fixes atf test lib/libc/sys/t_bind bind_foreign_family

Revision 1.237 / (download) - annotate - [select for diffs], Sun Apr 5 02:26:39 2015 UTC (8 years, 11 months ago) by rtr
Branch: MAIN
Changes since 1.236: +6 -2 lines
Diff to previous 1.236 (colored) to selected 1.69 (colored)

make bind() fail with EINVAL if the address family of the provided
socket does not match the address family of the sockaddr received.

Revision 1.236 / (download) - annotate - [select for diffs], Fri Apr 3 20:01:07 2015 UTC (8 years, 11 months ago) by rtr
Branch: MAIN
Changes since 1.235: +3 -3 lines
Diff to previous 1.235 (colored) to selected 1.69 (colored)

* change pr_bind to accept struct sockaddr * instead of struct mbuf *
* update protocol bind implementations to use/expect sockaddr *
  instead of mbuf *
* introduce sockaddr_big struct for storage of addr data passed via
  sys_bind; sockaddr_big is of sufficient size and alignment to
  accommodate all addr data sizes received.
* modify sys_bind to allocate sockaddr_big instead of using an mbuf.
* bump kernel version to 7.99.9 for change to pr_bind() parameter type.

Patch posted to tech-net@
  http://mail-index.netbsd.org/tech-net/2015/03/15/msg005004.html

The choice to use a new structure sockaddr_big has been retained since
changing sockaddr_storage size would lead to unnecessary ABI change. The
use of the new structure does not preclude future work that increases
the size of sockaddr_storage and at that time sockaddr_big may be
trivially replaced.

Tested by mrg@ and myself, discussed with rmind@, posted to tech-net@

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

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

Revision 1.211.2.4 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.211.2.3: +94 -100 lines
Diff to previous 1.211.2.3 (colored) to selected 1.69 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.221.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.221: +91 -90 lines
Diff to previous 1.221 (colored) next main 1.222 (colored) to selected 1.69 (colored)

Rebase.

Revision 1.234 / (download) - annotate - [select for diffs], Sat Aug 9 05:33:00 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, 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, netbsd-7-0, netbsd-7
Changes since 1.233: +3 -4 lines
Diff to previous 1.233 (colored) to selected 1.69 (colored)

split PRU_CONNECT2 & PRU_PURGEIF function out of pr_generic() usrreq
switches and put into separate functions

  - always KASSERT(solocked(so)) even if not implemented
    (for PRU_CONNECT2 only)

  - replace calls to pr_generic() with req = PRU_CONNECT2 with calls to
    pr_connect2()

  - replace calls to pr_generic() with req = PRU_PURGEIF with calls to
    pr_purgeif()

put common code from unp_connect2() (used by unp_connect() into
unp_connect1() and call out to it when needed

patch only briefly reviewed by rmind@

Revision 1.233 / (download) - annotate - [select for diffs], Fri Aug 8 03:05:45 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.232: +4 -6 lines
Diff to previous 1.232 (colored) to selected 1.69 (colored)

split PRU_RCVD function out of pr_generic() usrreq switches and put into
separate functions

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_RCVD with calls to
    pr_rcvd()

Revision 1.232 / (download) - annotate - [select for diffs], Tue Aug 5 07:55:31 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.231: +4 -4 lines
Diff to previous 1.231 (colored) to selected 1.69 (colored)

split PRU_SEND function out of pr_generic() usrreq switches and put into
separate functions

   xxx_send(struct socket *, struct mbuf *, struct mbuf *,
       struct mbuf *, struct lwp *)

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_SEND with calls to
    pr_send()

rename existing functions that operate on PCB for consistency (and to
free up their names for xxx_send() PRUs

  - l2cap_send() -> l2cap_send_pcb()
  - sco_send() -> sco_send_pcb()
  - rfcomm_send() -> rfcomm_send_pcb()

patch reviewed by rmind

Revision 1.231 / (download) - annotate - [select for diffs], Tue Aug 5 05:24:26 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.230: +5 -5 lines
Diff to previous 1.230 (colored) to selected 1.69 (colored)

revert the removal of struct lwp * parameter from bind, listen and connect
user requests.

this should resolve the issue relating to nfs client hangs presented
recently by wiz on current-users@

Revision 1.230 / (download) - annotate - [select for diffs], Thu Jul 31 20:28:59 2014 UTC (9 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.229: +3 -4 lines
Diff to previous 1.229 (colored) to selected 1.69 (colored)

call ->pr_abort(so) now instead of generic PRU_ABORT.
fixes kern/49056, and appears to remove the only missed PRU_ABORT call.

Revision 1.229 / (download) - annotate - [select for diffs], Thu Jul 31 03:39:35 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.228: +4 -6 lines
Diff to previous 1.228 (colored) to selected 1.69 (colored)

split PRU_DISCONNECT, PRU_SHUTDOWN and PRU_ABORT function out of
pr_generic() usrreq switches and put into separate functions

   xxx_disconnect(struct socket *)
   xxx_shutdown(struct socket *)
   xxx_abort(struct socket *)

   - always KASSERT(solocked(so)) even if not implemented
   - replace calls to pr_generic() with req =
PRU_{DISCONNECT,SHUTDOWN,ABORT}
     with calls to pr_{disconnect,shutdown,abort}() respectively

rename existing internal functions used to implement above functionality
to permit use of the names for xxx_{disconnect,shutdown,abort}().

   - {l2cap,sco,rfcomm}_disconnect() ->
{l2cap,sco,rfcomm}_disconnect_pcb()
   - {unp,rip,tcp}_disconnect() -> {unp,rip,tcp}_disconnect1()
   - unp_shutdown() -> unp_shutdown1()

patch reviewed by rmind

Revision 1.228 / (download) - annotate - [select for diffs], Wed Jul 30 10:04:26 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.227: +3 -4 lines
Diff to previous 1.227 (colored) to selected 1.69 (colored)

split PRU_CONNECT function out of pr_generic() usrreq switches and put
into seaparate functions

  xxx_listen(struct socket *, struct mbuf *)

  - always KASSERT(solocked(so)) and KASSERT(nam != NULL)
  - replace calls to pr_generic() with req = PRU_CONNECT with
    pr_connect()
  - rename existin {l2cap,sco,rfcomm}_connect() to
    {l2cap,sco,rfcomm}_connect_pcb() respectively to permit
    naming consistency with other protocols functions.
  - drop struct lwp * parameter from unp_connect() and at_pcbconnect()
    and use curlwp instead where appropriate.

patch reviewed by rmind

Revision 1.227 / (download) - annotate - [select for diffs], Thu Jul 24 15:12:03 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.226: +4 -6 lines
Diff to previous 1.226 (colored) to selected 1.69 (colored)

split PRU_BIND and PRU_LISTEN function out of pr_generic() usrreq
switches and put into separate functions
  xxx_bind(struct socket *, struct mbuf *)
  xxx_listen(struct socket *)

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_BIND with call to
    pr_bind()

  - replace calls to pr_generic() with req = PRU_LISTEN with call to
    pr_listen()

  - drop struct lwp * parameter from at_pcbsetaddr(), in_pcbbind() and
    unp_bind() and always use curlwp.

rename existing functions that operate on PCB for consistency (and to
free up their names for xxx_{bind,listen}() PRUs

  - l2cap_{bind,listen}() -> l2cap_{bind,listen}_pcb()
  - sco_{bind,listen}() -> sco_{bind,listen}_pcb()
  - rfcomm_{bind,listen}() -> rfcomm_{bind,listen}_pcb()

patch reviewed by rmind

welcome to netbsd 6.99.48

Revision 1.226 / (download) - annotate - [select for diffs], Wed Jul 23 13:17:18 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.225: +9 -7 lines
Diff to previous 1.225 (colored) to selected 1.69 (colored)

split PRU_SENDOOB and PRU_RCVOOB function out of pr_generic() usrreq
switches and put into separate functions
  xxx_sendoob(struct socket *, struct mbuf *, struct mbuf *)
  xxx_recvoob(struct socket *, struct mbuf *, int)

  - always KASSERT(solocked(so)) even if request is not implemented

  - replace calls to pr_generic() with req = PRU_{SEND,RCV}OOB with
    calls to pr_{send,recv}oob() respectively.

there is still some tweaking of m_freem(m) and m_freem(control) to come
for consistency.  not performed with this commit for clarity.

reviewed by rmind

Revision 1.225 / (download) - annotate - [select for diffs], Wed Jul 9 14:41:42 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.224: +3 -4 lines
Diff to previous 1.224 (colored) to selected 1.69 (colored)

* split PRU_ACCEPT function out of pr_generic() usrreq switches and put
  into a separate function xxx_accept(struct socket *, struct mbuf *)

note: future cleanup will take place to remove struct mbuf parameter
type and replace it with a more appropriate type.

patch reviewed by rmind

Revision 1.205.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.205.2.2: +10 -16 lines
Diff to previous 1.205.2.2 (colored) to branchpoint 1.205 (colored) next main 1.206 (colored) to selected 1.69 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.224 / (download) - annotate - [select for diffs], Mon May 19 02:51:24 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.223: +17 -15 lines
Diff to previous 1.223 (colored) to selected 1.69 (colored)

- Split off PRU_ATTACH and PRU_DETACH logic into separate functions.
- Replace malloc with kmem and eliminate M_PCB while here.
- Sprinkle more asserts.

Revision 1.215.4.4 / (download) - annotate - [select for diffs], Sun May 18 17:46:08 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.215.4.3: +21 -34 lines
Diff to previous 1.215.4.3 (colored) to branchpoint 1.215 (colored) next main 1.216 (colored) to selected 1.69 (colored)

sync with head

Revision 1.223 / (download) - annotate - [select for diffs], Sun May 18 14:46:15 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.222: +26 -25 lines
Diff to previous 1.222 (colored) to selected 1.69 (colored)

Add struct pr_usrreqs with a pr_generic function and prepare for the
dismantling of pr_usrreq in the protocols; no functional change intended.
PRU_ATTACH/PRU_DETACH changes will follow soon.

Bump for struct protosw.  Welcome to 6.99.62!

Revision 1.222 / (download) - annotate - [select for diffs], Sat May 17 23:27:59 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.221: +62 -56 lines
Diff to previous 1.221 (colored) to selected 1.69 (colored)

- fsocreate: set SS_NBIO before the file descriptor is affixed as there is
  a theoretical race condition (hard to trigger, though); remove the LWP
  parameter and clean up the code a little.
- Sprinkle few comments.
- Remove M_SOOPTS while here.

Revision 1.221 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:11 2014 UTC (10 years ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.220: +2 -7 lines
Diff to previous 1.220 (colored) to selected 1.69 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.209.2.2.2.2 / (download) - annotate - [select for diffs], Mon Nov 25 08:27:06 2013 UTC (10 years, 3 months ago) by bouyer
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE
Changes since 1.209.2.2.2.1: +3 -3 lines
Diff to previous 1.209.2.2.2.1 (colored) to branchpoint 1.209.2.2 (colored) next main 1.209.2.3 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by spz in ticket #988):
	sys/kern/uipc_socket.c: revision 1.220
PR/48098: Brian Marcotte: panic: kernel diagnostic assertion "cred != NULL":
Fix from Michael van Elst, tcpdrop crashes kernel on ebryonic connections.

Revision 1.209.2.1.4.2 / (download) - annotate - [select for diffs], Mon Nov 25 08:27:01 2013 UTC (10 years, 3 months ago) by bouyer
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE
Changes since 1.209.2.1.4.1: +3 -3 lines
Diff to previous 1.209.2.1.4.1 (colored) to branchpoint 1.209.2.1 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by spz in ticket #988):
	sys/kern/uipc_socket.c: revision 1.220
PR/48098: Brian Marcotte: panic: kernel diagnostic assertion "cred != NULL":
Fix from Michael van Elst, tcpdrop crashes kernel on ebryonic connections.

Revision 1.209.2.4 / (download) - annotate - [select for diffs], Mon Nov 25 08:26:33 2013 UTC (10 years, 3 months ago) by bouyer
Branch: netbsd-6
Changes since 1.209.2.3: +3 -3 lines
Diff to previous 1.209.2.3 (colored) to branchpoint 1.209 (colored) next main 1.210 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by spz in ticket #988):
	sys/kern/uipc_socket.c: revision 1.220
PR/48098: Brian Marcotte: panic: kernel diagnostic assertion "cred != NULL":
Fix from Michael van Elst, tcpdrop crashes kernel on ebryonic connections.

Revision 1.220 / (download) - annotate - [select for diffs], Sat Nov 2 20:09:33 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.219: +3 -3 lines
Diff to previous 1.219 (colored) to selected 1.69 (colored)

PR/48098: Brian Marcotte: panic: kernel diagnostic assertion "cred != NULL":
Fix from Michael van Elst, tcpdrop crashes kernel on ebryonic connections.

Revision 1.215.4.3 / (download) - annotate - [select for diffs], Fri Oct 18 02:32:12 2013 UTC (10 years, 5 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.215.4.2: +28 -8 lines
Diff to previous 1.215.4.2 (colored) to branchpoint 1.215 (colored) to selected 1.69 (colored)

Add soref() and sounref().

Revision 1.219 / (download) - annotate - [select for diffs], Thu Oct 17 20:57:06 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.218: +4 -3 lines
Diff to previous 1.218 (colored) to selected 1.69 (colored)

initialize a variable, hi gcc again!

Revision 1.218 / (download) - annotate - [select for diffs], Tue Oct 8 14:54:29 2013 UTC (10 years, 5 months ago) by seanb
Branch: MAIN
Changes since 1.217: +3 -2 lines
Diff to previous 1.217 (colored) to selected 1.69 (colored)

POSIX says getsockopt(s, SOL_SOCKET, SO_ACCEPTCONN,,) needs to work.

Revision 1.217 / (download) - annotate - [select for diffs], Thu Aug 29 17:49:21 2013 UTC (10 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.216: +3 -7 lines
Diff to previous 1.216 (colored) to selected 1.69 (colored)

Remove SS_ISCONFIRMING, it is unused and TP4 will not come back.

Revision 1.215.4.2 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:35 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.215.4.1: +3 -3 lines
Diff to previous 1.215.4.1 (colored) to branchpoint 1.215 (colored) to selected 1.69 (colored)

sync with head

Revision 1.215.4.1 / (download) - annotate - [select for diffs], Wed Aug 28 15:21:48 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.215: +88 -77 lines
Diff to previous 1.215 (colored) to selected 1.69 (colored)

Checkpoint work in progress:
- Initial split of the protocol user-request method into the following
  methods: pr_attach, pr_detach and pr_generic for old the pr_usrreq.
- Adjust socreate(9) and sonewconn(9) to call pr_attach without the
  socket lock held (as a preparation for the locking scheme adjustment).
- Adjust all pr_attach routines to assert that PCB is not set.
- Sprinkle various comments, document some routines and their locking.
- Remove M_PCB, replace with kmem(9).
- Fix few bugs spotted on the way.

Revision 1.209.2.1.4.1 / (download) - annotate - [select for diffs], Fri Aug 2 20:23:11 2013 UTC (10 years, 7 months ago) by martin
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-3-RELEASE
Changes since 1.209.2.1: +3 -3 lines
Diff to previous 1.209.2.1 (colored) to selected 1.69 (colored)

Pullup ticket #927:

sys/kern/uipc_socket.c		1.216

	Fix an inversion in checking for authorization to drop TCP connections
	found (and the obvious fix suggested) by Sander Bos.

Requested by spz.

Revision 1.209.2.2.2.1 / (download) - annotate - [select for diffs], Fri Aug 2 20:18:48 2013 UTC (10 years, 7 months ago) by martin
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE
Changes since 1.209.2.2: +3 -3 lines
Diff to previous 1.209.2.2 (colored) to selected 1.69 (colored)

Pullup ticket #927:

sys/kern/uipc_socket.c                          1.216

	Fix an inversion in checking for authorization to drop TCP connections
	found (and the obvious fix suggested) by Sander Bos.

Requested by spz.

Revision 1.209.2.3 / (download) - annotate - [select for diffs], Fri Aug 2 20:12:30 2013 UTC (10 years, 7 months ago) by martin
Branch: netbsd-6
Changes since 1.209.2.2: +3 -3 lines
Diff to previous 1.209.2.2 (colored) to branchpoint 1.209 (colored) to selected 1.69 (colored)

Pullup ticket #927:

sys/kern/uipc_socket.c				1.216

	Fix an inversion in checking for authorization to drop TCP connections
	found (and the obvious fix suggested) by Sander Bos.

Requested by spz.

Revision 1.216 / (download) - annotate - [select for diffs], Fri Aug 2 20:00:33 2013 UTC (10 years, 7 months ago) by spz
Branch: MAIN
Changes since 1.215: +3 -3 lines
Diff to previous 1.215 (colored) to selected 1.69 (colored)

Fix an inversion in checking for authorization to drop TCP connections
found (and the obvious fix suggested) by Sander Bos.

Revision 1.211.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:58 2013 UTC (10 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.211.2.2: +3 -4 lines
Diff to previous 1.211.2.2 (colored) to selected 1.69 (colored)

resync from head

Revision 1.215 / (download) - annotate - [select for diffs], Mon Apr 8 21:12:33 2013 UTC (10 years, 11 months ago) by skrll
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.214: +2 -4 lines
Diff to previous 1.214 (colored) to selected 1.69 (colored)

Remove some set but unused variables

Revision 1.214 / (download) - annotate - [select for diffs], Thu Mar 14 19:13:17 2013 UTC (11 years ago) by gdt
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.213: +3 -2 lines
Diff to previous 1.213 (colored) to selected 1.69 (colored)

Add comment questioning lock asymmetry.

Revision 1.211.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:55 2013 UTC (11 years ago) by tls
Branch: tls-maxphys
Changes since 1.211.2.1: +4 -2 lines
Diff to previous 1.211.2.1 (colored) to selected 1.69 (colored)

resync with head

Revision 1.209.2.2 / (download) - annotate - [select for diffs], Thu Feb 14 22:13:59 2013 UTC (11 years, 1 month 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
Branch point for: netbsd-6-1
Changes since 1.209.2.1: +4 -2 lines
Diff to previous 1.209.2.1 (colored) to branchpoint 1.209 (colored) to selected 1.69 (colored)

Pull up revisions:
  src/sys/kern/uipc_socket.c revision 1.213
  src/sys/kern/uipc_syscalls.c revision 1.160
(requested by christos in ticket #822).

PR/47569: Valery Ushakov: SOCK_NONBLOCK does not work because it does not
set SS_NBIO.
XXX: there are too many flags that mean the same thing in too many places=
,
and too many flags that mean the same thing and are different.

Revision 1.213 / (download) - annotate - [select for diffs], Thu Feb 14 21:57:58 2013 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.212: +4 -2 lines
Diff to previous 1.212 (colored) to selected 1.69 (colored)

PR/47569: Valery Ushakov: SOCK_NONBLOCK does not work because it does not
set SS_NBIO.
XXX: there are too many flags that mean the same thing in too many places,
and too many flags that mean the same thing and are different.

Revision 1.211.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:44 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.211: +37 -5 lines
Diff to previous 1.211 (colored) to selected 1.69 (colored)

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

Revision 1.205.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:37 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.205.2.1: +41 -8 lines
Diff to previous 1.205.2.1 (colored) to branchpoint 1.205 (colored) to selected 1.69 (colored)

sync with head

Revision 1.212 / (download) - annotate - [select for diffs], Mon Oct 8 19:20:45 2012 UTC (11 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.211: +37 -5 lines
Diff to previous 1.211 (colored) to selected 1.69 (colored)

put all kern socket sysctls in the same place

Revision 1.209.2.1 / (download) - annotate - [select for diffs], Thu Jul 12 17:11:17 2012 UTC (11 years, 8 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-0
Changes since 1.209: +6 -5 lines
Diff to previous 1.209 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by chs in ticket #408):
	sys/kern/uipc_socket.c: revision 1.211
in soreceive(), handle uios larger than 31 bits.
fixes the remaining problem in PR 43240.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Jul 9 04:35:13 2012 UTC (11 years, 8 months ago) by chs
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.210: +6 -5 lines
Diff to previous 1.210 (colored) to selected 1.69 (colored)

in soreceive(), handle uios larger than 31 bits.
fixes the remaining problem in PR 43240.

Revision 1.205.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:30 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.205: +16 -28 lines
Diff to previous 1.205 (colored) to selected 1.69 (colored)

sync with head

Revision 1.205.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:40 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.205.6.1: +3 -3 lines
Diff to previous 1.205.6.1 (colored) to branchpoint 1.205 (colored) next main 1.206 (colored) to selected 1.69 (colored)

sync to latest -current.

Revision 1.210 / (download) - annotate - [select for diffs], Fri Mar 16 06:47:37 2012 UTC (12 years ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.209: +3 -3 lines
Diff to previous 1.209 (colored) to selected 1.69 (colored)

Fix PR/49150.
Make listen(2) match the opengroup specification for what what errno to
return if the socket is connected when a listen(2) is attempted.

Revision 1.205.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:34 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.205: +15 -27 lines
Diff to previous 1.205 (colored) to selected 1.69 (colored)

merge to -current.

Revision 1.209 / (download) - annotate - [select for diffs], Wed Feb 1 02:27:23 2012 UTC (12 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.208: +6 -5 lines
Diff to previous 1.208 (colored) to selected 1.69 (colored)

When using socket loaning, make sure the KVA used for the loan has the same
color as the UVA being loaned.

Revision 1.208 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:40 2012 UTC (12 years, 1 month ago) by para
Branch: MAIN
Changes since 1.207: +2 -20 lines
Diff to previous 1.207 (colored) to selected 1.69 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.207 / (download) - annotate - [select for diffs], Wed Jan 25 00:28:36 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.206: +6 -3 lines
Diff to previous 1.206 (colored) to selected 1.69 (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.206 / (download) - annotate - [select for diffs], Tue Dec 20 23:56:28 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.205: +7 -5 lines
Diff to previous 1.205 (colored) to selected 1.69 (colored)

- Eliminate so_nbio and turn it into a bit SS_NBIO in so_state.
- Introduce MSG_NBIO so that we can turn non blocking i/o on a per call basis
- Use MSG_NBIO to fix the XXX: multi-threaded issues on the fifo sockets.
- Don't set SO_CANTRCVMORE, if we were interrupted (perhaps do it for all
  errors?).

Revision 1.177.4.3.2.1 / (download) - annotate - [select for diffs], Mon Aug 8 19:47:01 2011 UTC (12 years, 7 months ago) by riz
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.177.4.3: +48 -68 lines
Diff to previous 1.177.4.3 (colored) next main 1.177.4.4 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1644):
	sys/sys/socketvar.h: revision 1.126
	sys/kern/init_main.c: revision 1.433
	sys/kern/uipc_socket.c: revision 1.205
Fix kern/45093 as discussed on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html
The cause of the problem is that the so_pendfree is processed with
the softnet_lock held at one point, and processing the list
calls sodoloanfree() which may kpause(). As the thread sleeps with
softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
thread for details).
Although it should be possible to call sodopendfree() after releasing
the socket lock, it's not so easy to know where he socket lock is held and
where it's not, so we may hit the issue again later.
Add a kernel thread to handle the so_pendfree list, and wake up this
thread when adding mbufs to this list. Get rid of the various sodopendfree()
calls, hopefully fixing definitively the problem.

Revision 1.177.4.4 / (download) - annotate - [select for diffs], Mon Aug 8 19:45:57 2011 UTC (12 years, 7 months ago) by riz
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.177.4.3: +48 -68 lines
Diff to previous 1.177.4.3 (colored) to branchpoint 1.177 (colored) next main 1.178 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1644):
	sys/sys/socketvar.h: revision 1.126
	sys/kern/init_main.c: revision 1.433
	sys/kern/uipc_socket.c: revision 1.205
Fix kern/45093 as discussed on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html
The cause of the problem is that the so_pendfree is processed with
the softnet_lock held at one point, and processing the list
calls sodoloanfree() which may kpause(). As the thread sleeps with
softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
thread for details).
Although it should be possible to call sodopendfree() after releasing
the socket lock, it's not so easy to know where he socket lock is held and
where it's not, so we may hit the issue again later.
Add a kernel thread to handle the so_pendfree list, and wake up this
thread when adding mbufs to this list. Get rid of the various sodopendfree()
calls, hopefully fixing definitively the problem.

Revision 1.205 / (download) - annotate - [select for diffs], Sat Jul 2 17:53:50 2011 UTC (12 years, 8 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.204: +46 -66 lines
Diff to previous 1.204 (colored) to selected 1.69 (colored)

Fix kern/45093 as discussed on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html

The cause of the problem is that the so_pendfree is processed with
the softnet_lock held at one point, and processing the list
calls sodoloanfree() which may kpause(). As the thread sleeps with
softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
thread for details).
Although it should be possible to call sodopendfree() after releasing
the socket lock, it's not so easy to know where he socket lock is held and
where it's not, so we may hit the issue again later.
Add a kernel thread to handle the so_pendfree list, and wake up this
thread when adding mbufs to this list. Get rid of the various sodopendfree()
calls, hopefully fixing definitively the problem.

Revision 1.204 / (download) - annotate - [select for diffs], Sun Jun 26 16:42:42 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.203: +10 -5 lines
Diff to previous 1.203 (colored) to selected 1.69 (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.201.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:39 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.201: +8 -5 lines
Diff to previous 1.201 (colored) next main 1.202 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.177.4.2.2.1.2.2 / (download) - annotate - [select for diffs], Wed May 25 23:58:48 2011 UTC (12 years, 9 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.177.4.2.2.1.2.1: +6 -5 lines
Diff to previous 1.177.4.2.2.1.2.1 (colored) to branchpoint 1.177.4.2.2.1 (colored) next main 1.177.4.3 (colored) to selected 1.69 (colored)

Make uvm_map recognize UVM_FLAG_COLORMATCH which tells uvm_map that the
'align' argument specifies the starting color of the KVA range to be returned.

When calling uvm_km_alloc with UVM_KMF_VAONLY, also specify the starting
color of the kva range returned (UMV_KMF_COLORMATCH) and pass those to
uvm_map.

In uvm_pglistalloc, make sure the pages being returned have sequentially
advancing colors (so they can be mapped in a contiguous address range).
Add a few missing UVM_FLAG_COLORMATCH flags to uvm_pagealloc calls.

Make the socket and pipe loan color-safe.

Make the mips pmap enforce strict page color (color(VA) == color(PA)).

Revision 1.200.4.1 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:24 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.200: +9 -6 lines
Diff to previous 1.200 (colored) next main 1.201 (colored) to selected 1.69 (colored)

sync with head

Revision 1.202.2.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:00 2011 UTC (13 years, 1 month ago) by bouyer
Branch: bouyer-quota2
Changes since 1.202: +5 -4 lines
Diff to previous 1.202 (colored) next main 1.203 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.203 / (download) - annotate - [select for diffs], Tue Feb 1 01:39:20 2011 UTC (13 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.202: +5 -4 lines
Diff to previous 1.202 (colored) to selected 1.69 (colored)

Add a new AF/PF_ROUTE which is 64-bit clean which makes the routing socket
interface (and its associated sysctls) act identically for both 32 and 64 bit
programs.  The old unclean one remains for backward compatibility.

Revision 1.202 / (download) - annotate - [select for diffs], Mon Jan 17 07:13:32 2011 UTC (13 years, 2 months ago) by uebayasi
Branch: MAIN
Branch point for: bouyer-quota2
Changes since 1.201: +5 -3 lines
Diff to previous 1.201 (colored) to selected 1.69 (colored)

Include internal definitions (uvm/uvm.h) only where necessary.

Revision 1.200.2.1 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:30 2010 UTC (13 years, 4 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored) next main 1.201 (colored) to selected 1.69 (colored)

Sync with HEAD (-D20101022).

Revision 1.201 / (download) - annotate - [select for diffs], Thu Oct 14 03:07:51 2010 UTC (13 years, 5 months ago) by oki
Branch: MAIN
CVS Tags: uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored) to selected 1.69 (colored)

Wait for freeing mbuf cluster in sosend() causes freeze network stack.
Don't wait for it.
problem was found by iij seil team.
it is similar to OpenBSD uipc_socket.c rev.1.72.

Revision 1.177.4.2.2.1.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:18 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.177.4.2.2.1: +2 -2 lines
Diff to previous 1.177.4.2.2.1 (colored) to selected 1.69 (colored)

sync to netbsd-5

Revision 1.160.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:20 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.160.2.3: +97 -14 lines
Diff to previous 1.160.2.3 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored) to selected 1.69 (colored)

sync with head

Revision 1.200 / (download) - annotate - [select for diffs], Wed Dec 30 22:12:12 2009 UTC (14 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.199: +2 -3 lines
Diff to previous 1.199 (colored) to selected 1.69 (colored)

Don't bother caching egid. It'll be removed soon.

Revision 1.199 / (download) - annotate - [select for diffs], Wed Dec 30 06:58:50 2009 UTC (14 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.198: +3 -5 lines
Diff to previous 1.198 (colored) to selected 1.69 (colored)

Use credentials from the socket.

Revision 1.198 / (download) - annotate - [select for diffs], Tue Dec 29 04:23:43 2009 UTC (14 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.197: +4 -2 lines
Diff to previous 1.197 (colored) to selected 1.69 (colored)

Add credentials to to sockets.

We don't need any deferred free etc. because we no longer free the
credentials in interrupt context.

Tons of help from matt@, thanks!

Revision 1.197 / (download) - annotate - [select for diffs], Tue Dec 29 03:48:18 2009 UTC (14 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.196: +2 -4 lines
Diff to previous 1.196 (colored) to selected 1.69 (colored)

Remove commented-out code that should not have gone in.

Revision 1.196 / (download) - annotate - [select for diffs], Sun Dec 20 09:36:06 2009 UTC (14 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.195: +33 -9 lines
Diff to previous 1.195 (colored) to selected 1.69 (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.195 / (download) - annotate - [select for diffs], Wed Dec 9 21:32:59 2009 UTC (14 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.194: +8 -10 lines
Diff to previous 1.194 (colored) to selected 1.69 (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.194 / (download) - annotate - [select for diffs], Sat Nov 7 07:27:49 2009 UTC (14 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.193: +3 -3 lines
Diff to previous 1.193 (colored) to selected 1.69 (colored)

Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.

Revision 1.193 / (download) - annotate - [select for diffs], Sat Oct 3 03:59:39 2009 UTC (14 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.192: +8 -3 lines
Diff to previous 1.192 (colored) to selected 1.69 (colored)

Move KAUTH_NETWORK_BIND::KAUTH_REQ_NETWORK_BIND_PORT policy back to the
subsystem (or close to it).

Note: Revisit KAUTH_REQ_NETWORK_BIND_PRIVPORT.

Revision 1.192 / (download) - annotate - [select for diffs], Sat Oct 3 01:41:39 2009 UTC (14 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.191: +7 -2 lines
Diff to previous 1.191 (colored) to selected 1.69 (colored)

Finish moving socket policy to the subsystem.

Revision 1.191 / (download) - annotate - [select for diffs], Fri Oct 2 23:50:16 2009 UTC (14 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.190: +56 -2 lines
Diff to previous 1.190 (colored) to selected 1.69 (colored)

Move some of the socket policy back to the subsystem.

Remove include we don't need in the secmodel code.

Revision 1.160.2.3 / (download) - annotate - [select for diffs], Wed Sep 16 13:38:01 2009 UTC (14 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.160.2.2: +15 -2 lines
Diff to previous 1.160.2.2 (colored) to branchpoint 1.160 (colored) to selected 1.69 (colored)

sync with head

Revision 1.190 / (download) - annotate - [select for diffs], Fri Sep 11 22:06:29 2009 UTC (14 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.189: +15 -2 lines
Diff to previous 1.189 (colored) to selected 1.69 (colored)

Make ifconfig(8) set and display preference numbers for IPv6
addresses.  Make the kernel support SIOC[SG]IFADDRPREF for IPv6
interface addresses.

In in6ifa_ifpforlinklocal(), consult preference numbers before
making an otherwise arbitrary choice of in6_ifaddr.  Otherwise,
preference numbers are *not* consulted by the kernel, but that will
be rather easy for somebody with a little bit of free time to fix.

Please note that setting the preference number for a link-local
IPv6 address does not work right, yet, but that ought to be fixed
soon.

In support of the changes above,

1 Add a method to struct domain for "externalizing" a sockaddr, and
  provide an implementation for IPv6.  Expect more work in this area: it
  may be more proper to say that the IPv6 implementation "internalizes"
  a sockaddr.  Add sockaddr_externalize().

2 Add a subroutine, sofamily(), that returns a struct socket's address
  family or AF_UNSPEC.

3 Make a lot of IPv4-specific code generic, and move it from
  sys/netinet/ to sys/net/ for re-use by IPv6 parts of the kernel and
  ifconfig(8).

Revision 1.186.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:58 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.186: +20 -6 lines
Diff to previous 1.186 (colored) next main 1.187 (colored) to selected 1.69 (colored)

Sync with HEAD.

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

Revision 1.160.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:49 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.160.2.1: +445 -155 lines
Diff to previous 1.160.2.1 (colored) to branchpoint 1.160 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.177.4.2.2.1 / (download) - annotate - [select for diffs], Sun May 3 13:26:34 2009 UTC (14 years, 10 months ago) by bouyer
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE, 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: matt-nb5-mips64
Changes since 1.177.4.2: +3 -3 lines
Diff to previous 1.177.4.2 (colored) next main 1.177.4.3 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by ad in ticket #731):
	sys/kern/uipc_socket.c: revision 1.189
PR kern/41311: Mutex error: mutex_vector_enter: locking against myself

Revision 1.177.4.3 / (download) - annotate - [select for diffs], Sun May 3 13:18:55 2009 UTC (14 years, 10 months ago) by bouyer
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.177.4.2: +3 -3 lines
Diff to previous 1.177.4.2 (colored) to branchpoint 1.177 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by ad in ticket #731):
	sys/kern/uipc_socket.c: revision 1.189
PR kern/41311: Mutex error: mutex_vector_enter: locking against myself

Revision 1.189 / (download) - annotate - [select for diffs], Thu Apr 30 20:41:33 2009 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, jymxensuspend-base, jym-xensuspend-base
Changes since 1.188: +3 -3 lines
Diff to previous 1.188 (colored) to selected 1.69 (colored)

PR kern/41311: Mutex error: mutex_vector_enter: locking against myself

Revision 1.177.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:01 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.177.2.2: +19 -5 lines
Diff to previous 1.177.2.2 (colored) to branchpoint 1.177 (colored) next main 1.178 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.177.4.2 / (download) - annotate - [select for diffs], Sat Apr 4 23:36:27 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4
Branch point for: netbsd-5-0
Changes since 1.177.4.1: +18 -4 lines
Diff to previous 1.177.4.1 (colored) to branchpoint 1.177 (colored) to selected 1.69 (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.188 / (download) - annotate - [select for diffs], Sat Apr 4 10:12:51 2009 UTC (14 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.187: +18 -4 lines
Diff to previous 1.187 (colored) to selected 1.69 (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.187 / (download) - annotate - [select for diffs], Sun Mar 15 17:14:40 2009 UTC (15 years ago) by cegger
Branch: MAIN
Changes since 1.186: +3 -3 lines
Diff to previous 1.186 (colored) to selected 1.69 (colored)

ansify function definitions

Revision 1.177.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:57 2009 UTC (15 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.177.2.1: +6 -4 lines
Diff to previous 1.177.2.1 (colored) to branchpoint 1.177 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.177.4.1 / (download) - annotate - [select for diffs], Mon Feb 2 21:04:45 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC3, netbsd-5-0-RC2
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by yamt in ticket #393):
	sys/kern/uipc_socket.c: revision 1.185
	sys/kern/uipc_socket2.c: revision 1.101
	sys/kern/uipc_syscalls.c: revision 1.135
	sys/miscfs/portal/portal_vnops.c: revision 1.81
	sys/netsmb/smb_trantcp.c: revision 1.40
	sys/nfs/nfs_socket.c: revision 1.177
	sys/sys/socketvar.h: revision 1.118
restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.

Revision 1.186 / (download) - annotate - [select for diffs], Fri Jan 23 15:40:19 2009 UTC (15 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.185: +5 -3 lines
Diff to previous 1.185 (colored) to selected 1.69 (colored)

solock() in compat code error branch to avoid panic

Revision 1.185 / (download) - annotate - [select for diffs], Wed Jan 21 06:59:29 2009 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored) to selected 1.69 (colored)

restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.

Revision 1.177.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:40 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.177: +66 -17 lines
Diff to previous 1.177 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.184 / (download) - annotate - [select for diffs], Mon Jan 19 02:27:57 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.183: +9 -4 lines
Diff to previous 1.183 (colored) to selected 1.69 (colored)

Provide compatibility to the old timeval SCM_TIMESTAMP messages.

Revision 1.151.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:20 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.151.6.4: +151 -77 lines
Diff to previous 1.151.6.4 (colored) to branchpoint 1.151 (colored) next main 1.152 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Jan 15 15:29:10 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.182: +4 -2 lines
Diff to previous 1.182 (colored) to selected 1.69 (colored)

check for error in the COMPAT_50 case.

Revision 1.182 / (download) - annotate - [select for diffs], Thu Jan 15 15:25:37 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.181: +5 -5 lines
Diff to previous 1.181 (colored) to selected 1.69 (colored)

reverse the polarity of the use of the error variable. Using a different
variable would be cleaner but it would require more ifdefs.

Revision 1.181 / (download) - annotate - [select for diffs], Wed Jan 14 23:28:23 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.180: +3 -5 lines
Diff to previous 1.180 (colored) to selected 1.69 (colored)

correct previous, fix reversed test, remove memset.

Revision 1.180 / (download) - annotate - [select for diffs], Wed Jan 14 20:33:19 2009 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.179: +4 -2 lines
Diff to previous 1.179 (colored) to selected 1.69 (colored)

make this compile: fix gcc warning about uninitialized use of tv.sec and tv.usec.

Revision 1.179 / (download) - annotate - [select for diffs], Wed Jan 14 18:09:00 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.178: +49 -14 lines
Diff to previous 1.178 (colored) to selected 1.69 (colored)

version get/set send/recv timeout setsockopt.

Revision 1.168.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:09 2008 UTC (15 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.168.2.1: +12 -5 lines
Diff to previous 1.168.2.1 (colored) to branchpoint 1.168 (colored) next main 1.169 (colored) to selected 1.69 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.178 / (download) - annotate - [select for diffs], Sun Dec 7 20:58:46 2008 UTC (15 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base
Changes since 1.177: +12 -5 lines
Diff to previous 1.177 (colored) to selected 1.69 (colored)

Move some sysctl node creations away from linksets and into the
constructors for subsystems.

XXX: CTLFLAG_PERMANENT is non-sensible.

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:29 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.168: +367 -145 lines
Diff to previous 1.168 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.177 / (download) - annotate - [select for diffs], Tue Oct 14 13:45:26 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.176: +46 -34 lines
Diff to previous 1.176 (colored) to selected 1.69 (colored)

Accept filters:

- Remove remaining #ifdef INET.
- Avoid holding locks so we don't need to do KM_NOSLEEP allocations.
- Use a rwlock to protect the accept filter list.
- Make it safe to unload accept filter modules.
- Minor KNF.

Revision 1.176 / (download) - annotate - [select for diffs], Sun Oct 12 09:26:50 2008 UTC (15 years, 5 months ago) by plunky
Branch: MAIN
Changes since 1.175: +40 -20 lines
Diff to previous 1.175 (colored) to selected 1.69 (colored)

fix problem pointed out by ad where sockopt may end up sleeping
inappropriately with the socket lock held.

    sockopt_init() may sleep

    sockopt_set() will not sleep

    sockopt_getmbuf() for legacy code will not sleep

Revision 1.175 / (download) - annotate - [select for diffs], Sat Oct 11 16:39:07 2008 UTC (15 years, 5 months ago) by tls
Branch: MAIN
Changes since 1.174: +2 -8 lines
Diff to previous 1.174 (colored) to selected 1.69 (colored)

Address problems with accept filters noted by ad in his source-changes
mail: http://mail-index.netbsd.org/source-changes/2008/10/10/msg211109.html

	* Scary-looking socket locking stubs (changed to KASSERT of locked)

	* depends on INET inappropriately (though now you must add new
	  accept filter names to the uipc_accf.c line in conf/files if
	  you aren't using dataready or httpready)

	* New code uses MALLOC/FREE -- changed to kmem_alloc/kmem_free;
	  could be pool_cache, these are all fixed-size allocations.

We need to verify that this works as expected with protocols with per-socket
locking, like PF_LOCAL.  I'm a little concerned about the case where the
lock on the listen socket isn't the same lock as on the eventual connected
socket.

Revision 1.174 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (15 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.173: +3 -2 lines
Diff to previous 1.173 (colored) to selected 1.69 (colored)

Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.

Revision 1.164.2.3 / (download) - annotate - [select for diffs], Fri Oct 10 22:34:14 2008 UTC (15 years, 5 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.164.2.2: +12 -9 lines
Diff to previous 1.164.2.2 (colored) to branchpoint 1.164 (colored) next main 1.165 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.173 / (download) - annotate - [select for diffs], Fri Oct 10 19:49:49 2008 UTC (15 years, 5 months ago) by plunky
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4
Changes since 1.172: +5 -5 lines
Diff to previous 1.172 (colored) to selected 1.69 (colored)

use kmem_alloc/kmem_free rather than malloc() for sockokpt

Revision 1.172 / (download) - annotate - [select for diffs], Fri Oct 10 11:20:15 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.171: +9 -6 lines
Diff to previous 1.171 (colored) to selected 1.69 (colored)

Redo 1.169 correctly (dsl's fix doesn't do what I intended, either!).

Revision 1.151.6.4 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:54 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.151.6.3: +330 -138 lines
Diff to previous 1.151.6.3 (colored) to branchpoint 1.151 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.164.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:44 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.164.2.1: +332 -140 lines
Diff to previous 1.164.2.1 (colored) to branchpoint 1.164 (colored) to selected 1.69 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Aug 6 15:01:23 2008 UTC (15 years, 7 months ago) by plunky
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.170: +315 -145 lines
Diff to previous 1.170 (colored) to selected 1.69 (colored)

Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core

Revision 1.170 / (download) - annotate - [select for diffs], Mon Aug 4 03:55:47 2008 UTC (15 years, 7 months ago) by tls
Branch: MAIN
Changes since 1.169: +26 -2 lines
Diff to previous 1.169 (colored) to selected 1.69 (colored)

Add accept filters, ported from FreeBSD by Coyote Point Systems.  Add inetd
support for specifying an accept filter for a service (mostly as a usage
example, but it can be handy for other things).  Manual pages to follow
in a day or so.

OK core@.

Revision 1.167.2.2 / (download) - annotate - [select for diffs], Mon Jul 28 14:37:36 2008 UTC (15 years, 7 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.167.2.1: +5 -7 lines
Diff to previous 1.167.2.1 (colored) to branchpoint 1.167 (colored) next main 1.168 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Jul 25 22:45:58 2008 UTC (15 years, 7 months ago) by dsl
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Changes since 1.168: +5 -7 lines
Diff to previous 1.168 (colored) to selected 1.69 (colored)

Remove all the pending connections in soclose().
'continue' in 'do .. while (0)' doesn't do what ad@ intended.

Revision 1.151.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.151.6.2: +2 -0 lines
Diff to previous 1.151.6.2 (colored) to branchpoint 1.151 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.164.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:52 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.164: +8 -5 lines
Diff to previous 1.164 (colored) to selected 1.69 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.167.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:35 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.167: +4 -2 lines
Diff to previous 1.167 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.168 / (download) - annotate - [select for diffs], Wed Jun 18 09:06:27 2008 UTC (15 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: haad-dm
Changes since 1.167: +4 -2 lines
Diff to previous 1.167 (colored) to selected 1.69 (colored)

merge yamt-pf42 branch.
(import newer pf from OpenBSD 4.2)

ok'ed by peter@.  requested by core@

Revision 1.159.2.3 / (download) - annotate - [select for diffs], Fri Jun 6 20:18:19 2008 UTC (15 years, 9 months ago) by christos
Branch: yamt-pf42
Changes since 1.159.2.2: +4 -2 lines
Diff to previous 1.159.2.2 (colored) to branchpoint 1.159 (colored) next main 1.160 (colored) to selected 1.69 (colored)

add so_egid and so_cpid for pf.

Revision 1.159.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:40 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.159.2.1: +6 -5 lines
Diff to previous 1.159.2.1 (colored) to branchpoint 1.159 (colored) to selected 1.69 (colored)

sync with head

Revision 1.151.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:13 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.151.6.1: +363 -198 lines
Diff to previous 1.151.6.1 (colored) to branchpoint 1.151 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.167 / (download) - annotate - [select for diffs], Wed May 28 21:01:42 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.166: +4 -3 lines
Diff to previous 1.166 (colored) to selected 1.69 (colored)

Disable zero copy if MULTIPROCESSOR, until it is fixed:

- The TLB coherency overhead on MP systems is really expensive.
- It triggers a race in the VM system (grep kpause uvm/*).

Revision 1.166 / (download) - annotate - [select for diffs], Mon May 26 17:21:18 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.165: +3 -2 lines
Diff to previous 1.165 (colored) to selected 1.69 (colored)

Use pool_cache for sockets.

Revision 1.165 / (download) - annotate - [select for diffs], Sat May 24 18:43:02 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.164: +3 -4 lines
Diff to previous 1.164 (colored) to selected 1.69 (colored)

Coverity CID 5015: Remove unnecessary test; if l was null we would have
crashed before when p = l->l_proc.

Revision 1.159.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:11 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.159: +259 -150 lines
Diff to previous 1.159 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:28 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.160: +13 -12 lines
Diff to previous 1.160 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.164 / (download) - annotate - [select for diffs], Thu May 1 09:21:56 2008 UTC (15 years, 10 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.163: +3 -5 lines
Diff to previous 1.163 (colored) to selected 1.69 (colored)

fix soabort(): sofree() wants to be called with the lock held
approved by ad

Revision 1.163 / (download) - annotate - [select for diffs], Tue Apr 29 17:35:31 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.162: +5 -3 lines
Diff to previous 1.162 (colored) to selected 1.69 (colored)

solisten: don't leak lock if the socket is busy.

Revision 1.162 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:05 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.161: +2 -9 lines
Diff to previous 1.161 (colored) to selected 1.69 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.161 / (download) - annotate - [select for diffs], Sun Apr 27 14:26:58 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.160: +11 -3 lines
Diff to previous 1.160 (colored) to selected 1.69 (colored)

Fix a use-after-free in soabort(). It would be better to kill SS_NOFDREF
and maintain a per-socket reference count, but SS_NOFDREF is slightly
more than a simple reference count and I don't want to break anything.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:36 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.159: +249 -141 lines
Diff to previous 1.159 (colored) to selected 1.69 (colored)

Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.

Revision 1.159 / (download) - annotate - [select for diffs], Mon Apr 14 15:42:20 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.158: +107 -52 lines
Diff to previous 1.158 (colored) to selected 1.69 (colored)

soreceive: dom_externalize/dom_dispose can block. If new messages are
appended while the receiver is blocked, the sockbuf will be corrupted.
Dequeue control messages from the sockbuf and sync its state in one
pass. Only then process the control messages. From FreeBSD.

Revision 1.151.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:05 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.151: +87 -50 lines
Diff to previous 1.151 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.158 / (download) - annotate - [select for diffs], Fri Mar 28 12:12:20 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.157: +5 -2 lines
Diff to previous 1.157 (colored) to selected 1.69 (colored)

Prevent listen() on a socket that is already connected - we already prevent
connect() on a listening socket.

Revision 1.157 / (download) - annotate - [select for diffs], Thu Mar 27 19:06:52 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.156: +5 -5 lines
Diff to previous 1.156 (colored) to selected 1.69 (colored)

Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.

Revision 1.156 / (download) - annotate - [select for diffs], Mon Mar 24 12:24:37 2008 UTC (15 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: ad-socklock-base1
Changes since 1.155: +14 -28 lines
Diff to previous 1.155 (colored) to selected 1.69 (colored)

merge yamt-lazymbuf branch.

Revision 1.111.2.15 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:02 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.14: +65 -18 lines
Diff to previous 1.111.2.14 (colored) to branchpoint 1.111 (colored) next main 1.112 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:14 2008 UTC (15 years, 11 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.151: +60 -6 lines
Diff to previous 1.151 (colored) next main 1.152 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.141.2.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:01 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.141.2.3: +63 -10 lines
Diff to previous 1.141.2.3 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored) to selected 1.69 (colored)

sync with HEAD

Revision 1.155 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14
Changes since 1.154: +11 -17 lines
Diff to previous 1.154 (colored) to selected 1.69 (colored)

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Mar 20 19:23:15 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Changes since 1.153: +56 -3 lines
Diff to previous 1.153 (colored) to selected 1.69 (colored)

- Extract the guts of soo_poll() into sopoll(), which takes a struct socket *.
  This is for netsmb which wants to poll sockets directly.
- When polling a socket, first check for pending I/O without acquring any
  locks. If no I/O seems to be pending, acquire locks/spl and check again
  doing selrecord() if necessary.

Revision 1.111.2.14 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:34 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.13: +6 -5 lines
Diff to previous 1.111.2.13 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.153 / (download) - annotate - [select for diffs], Sat Mar 1 14:16:51 2008 UTC (16 years ago) by rmind
Branch: MAIN
Changes since 1.152: +4 -3 lines
Diff to previous 1.152 (colored) to selected 1.69 (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.152 / (download) - annotate - [select for diffs], Wed Feb 27 19:55:59 2008 UTC (16 years ago) by matt
Branch: MAIN
Changes since 1.151: +4 -4 lines
Diff to previous 1.151 (colored) to selected 1.69 (colored)

Convert stragglers to ansi definitions from old-style definitons.
Remember that func() is not ansi, func(void) is.

Revision 1.111.2.13 / (download) - annotate - [select for diffs], Wed Feb 27 09:24:06 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.12: +6 -18 lines
Diff to previous 1.111.2.12 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

drop lazy mapping of mbuf external storage for now, because:
	- it's currently broken wrt asm code.  (cpu_in_cksum)
	- there are other approaches worth to consider.  eg. sf_buf

Revision 1.144.4.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:48 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.144.4.3: +5 -6 lines
Diff to previous 1.144.4.3 (colored) to branchpoint 1.144 (colored) next main 1.145 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.111.2.12 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:58 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.11: +5 -6 lines
Diff to previous 1.111.2.11 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.151 / (download) - annotate - [select for diffs], Wed Feb 6 21:57:54 2008 UTC (16 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.150: +5 -6 lines
Diff to previous 1.150 (colored) to selected 1.69 (colored)

Don't lock the socket to set/clear FNONBLOCK. Just set it atomically.

Revision 1.111.2.11 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:30 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.10: +4 -4 lines
Diff to previous 1.111.2.10 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head

Revision 1.141.2.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:28 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.141.2.2: +18 -18 lines
Diff to previous 1.141.2.2 (colored) to branchpoint 1.141 (colored) to selected 1.69 (colored)

sync with HEAD

Revision 1.149.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:21 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.149: +4 -4 lines
Diff to previous 1.149 (colored) next main 1.150 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.144.4.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:16 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.144.4.2: +4 -4 lines
Diff to previous 1.144.4.2 (colored) to branchpoint 1.144 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.147.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:47 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.147.2.1: +4 -4 lines
Diff to previous 1.147.2.1 (colored) to branchpoint 1.147 (colored) next main 1.148 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.150 / (download) - annotate - [select for diffs], Sun Dec 16 21:25:59 2007 UTC (16 years, 3 months ago) by elad
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.149: +4 -4 lines
Diff to previous 1.149 (colored) to selected 1.69 (colored)

Make solisten() take an lwp pointer like the rest, so it can be passed down
to pr_usrreq.

Revision 1.140.6.6 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:27 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.140.6.5: +4 -4 lines
Diff to previous 1.140.6.5 (colored) to branchpoint 1.140 (colored) next main 1.141 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.144.4.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:42 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.144.4.1: +16 -16 lines
Diff to previous 1.144.4.1 (colored) to branchpoint 1.144 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.147.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:49 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.147: +4 -4 lines
Diff to previous 1.147 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.111.2.10 / (download) - annotate - [select for diffs], Fri Dec 7 17:33:17 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.9: +16 -16 lines
Diff to previous 1.111.2.9 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head

Revision 1.149 / (download) - annotate - [select for diffs], Wed Dec 5 17:19:59 2007 UTC (16 years, 3 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.148: +3 -3 lines
Diff to previous 1.148 (colored) to selected 1.69 (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.148 / (download) - annotate - [select for diffs], Wed Dec 5 07:06:55 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.147: +3 -3 lines
Diff to previous 1.147 (colored) to selected 1.69 (colored)

Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.

Revision 1.140.6.5 / (download) - annotate - [select for diffs], Tue Nov 27 19:38:14 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.140.6.4: +14 -14 lines
Diff to previous 1.140.6.4 (colored) to branchpoint 1.140 (colored) to selected 1.69 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Nov 24 07:49:03 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Changes since 1.146: +5 -5 lines
Diff to previous 1.146 (colored) to selected 1.69 (colored)

Pass the mbuf type (e.g., MT_SONAME, MT_SOOPTS) as the second
argument to getsockmbuf().

Revision 1.146 / (download) - annotate - [select for diffs], Sat Nov 24 07:46:11 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.145: +11 -11 lines
Diff to previous 1.145 (colored) to selected 1.69 (colored)

Eliminate common subexpressions, creating variables 'atomic' and
'dom'.

Revision 1.144.4.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:58 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.144: +3 -6 lines
Diff to previous 1.144 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.111.2.9 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:56 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.8: +3 -6 lines
Diff to previous 1.111.2.8 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.144.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:35 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.144: +3 -6 lines
Diff to previous 1.144 (colored) next main 1.145 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.140.6.4 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:17 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.140.6.3: +3 -6 lines
Diff to previous 1.140.6.3 (colored) to branchpoint 1.140 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.141.2.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:10 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.141.2.1: +3 -6 lines
Diff to previous 1.141.2.1 (colored) to branchpoint 1.141 (colored) to selected 1.69 (colored)

sync with -HEAD

Revision 1.145 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:24 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.144: +3 -6 lines
Diff to previous 1.144 (colored) to selected 1.69 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:32:41 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.141: +236 -192 lines
Diff to previous 1.141 (colored) to selected 1.69 (colored)

sync with HEAD

Revision 1.111.2.8 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:38 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.7: +236 -192 lines
Diff to previous 1.111.2.7 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.134.2.6 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:32 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.134.2.5: +236 -192 lines
Diff to previous 1.134.2.5 (colored) next main 1.135 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.140.6.3 / (download) - annotate - [select for diffs], Sun Oct 7 13:25:08 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.140.6.2: +59 -59 lines
Diff to previous 1.140.6.2 (colored) to branchpoint 1.140 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.142.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:46 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.142: +63 -59 lines
Diff to previous 1.142 (colored) next main 1.143 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.144 / (download) - annotate - [select for diffs], Fri Oct 5 02:40:25 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.143: +59 -59 lines
Diff to previous 1.143 (colored) to selected 1.69 (colored)

Cosmetic: KNF.  Shorten a staircase.  Indent a complicated
if-condition.  This code remains hard to read.

Revision 1.140.6.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:06 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.140.6.1: +179 -135 lines
Diff to previous 1.140.6.1 (colored) to branchpoint 1.140 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Sep 25 14:04:07 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.142: +6 -2 lines
Diff to previous 1.142 (colored) to selected 1.69 (colored)

Use selinit() / seldestroy().

Revision 1.142 / (download) - annotate - [select for diffs], Wed Sep 19 04:33:43 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.141: +175 -135 lines
Diff to previous 1.141 (colored) to selected 1.69 (colored)

1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that
   tells a socket that it should both add a protocol header to tx'd
   datagrams and remove the header from rx'd datagrams:

        int onoff = 1, s = socket(...);
        setsockopt(s, SOL_SOCKET, SO_NOHEADER, &onoff);

2) Add an implementation of (SOL_SOCKET, SO_NOHEADER) for raw IPv4
   sockets.

3) Reorganize the protocols' pr_ctloutput implementations a bit.
   Consistently return ENOPROTOOPT when an option is unsupported,
   and EINVAL if a supported option's arguments are incorrect.
   Reorganize the flow of code so that it's more clear how/when
   options are passed down the stack until they are handled.

   Shorten some pr_ctloutput staircases for readability.

4) Extract common mbuf code into subroutines, add new sockaddr
   methods, and introduce a new subroutine, fsocreate(), for reuse
   later; use it first in sys_socket():

struct mbuf *m_getsombuf(struct socket *so)

        Create an mbuf and make its owner the socket `so'.

struct mbuf *m_intopt(struct socket *so, int val)

        Create an mbuf, make its owner the socket `so', put the
        int `val' into it, and set its length to sizeof(int).


int fsocreate(..., int *fd)

        Create a socket, a la socreate(9), put the socket into the
        given LWP's descriptor table, return the descriptor at `fd'
        on success.

void *sockaddr_addr(struct sockaddr *sa, socklen_t *slenp)
const void *sockaddr_const_addr(const struct sockaddr *sa, socklen_t *slenp)

        Extract a pointer to the address part of a sockaddr.  Write
        the length of the address  part at `slenp', if `slenp' is
        not NULL.

socklen_t sockaddr_getlen(const struct sockaddr *sa)

        Return the length of a sockaddr.  This just evaluates to
        sa->sa_len.  I only add this for consistency with code that
        appears in a portable userland library that I am going to
        import.

const struct sockaddr *sockaddr_any(const struct sockaddr *sa)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

const void *sockaddr_anyaddr(const struct sockaddr *sa, socklen_t *slenp)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

Revision 1.111.2.7 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:18 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.6: +95 -117 lines
Diff to previous 1.111.2.6 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.134.2.5 / (download) - annotate - [select for diffs], Sat Sep 1 12:56:49 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.134.2.4: +3 -6 lines
Diff to previous 1.134.2.4 (colored) to selected 1.69 (colored)

Update for pool_cache API changes.

Revision 1.134.2.4 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:41 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.134.2.3: +7 -5 lines
Diff to previous 1.134.2.3 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:18 2007 UTC (16 years, 7 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.140: +7 -5 lines
Diff to previous 1.140 (colored) next main 1.141 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.140.6.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:21 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.140: +7 -5 lines
Diff to previous 1.140 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.141.4.2 / (download) - annotate - [select for diffs], Mon Aug 6 11:41:53 2007 UTC (16 years, 7 months ago) by yamt
Branch: matt-mips64
Changes since 1.141.4.1: +1813 -0 lines
Diff to previous 1.141.4.1 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored) to selected 1.69 (colored)

sosetopt: clear SB_AUTOSIZE when setting buffer size explicitly.

Revision 1.141.4.1, Mon Aug 6 11:41:52 2007 UTC (16 years, 7 months ago) by yamt
Branch: matt-mips64
Changes since 1.141: +0 -1813 lines
FILE REMOVED

file uipc_socket.c was added on branch matt-mips64 on 2007-08-06 11:41:53 +0000

Revision 1.141 / (download) - annotate - [select for diffs], Mon Aug 6 11:41:52 2007 UTC (16 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, matt-mips64-base
Branch point for: matt-mips64, matt-armv6
Changes since 1.140: +7 -5 lines
Diff to previous 1.140 (colored) to selected 1.69 (colored)

sosetopt: clear SB_AUTOSIZE when setting buffer size explicitly.

Revision 1.135.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:18 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.135: +80 -105 lines
Diff to previous 1.135 (colored) next main 1.136 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.134.2.3 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:27 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.134.2.2: +47 -49 lines
Diff to previous 1.134.2.2 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.129.2.1 / (download) - annotate - [select for diffs], Sun May 13 21:23:47 2007 UTC (16 years, 10 months ago) by pavel
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, 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, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.129: +7 -1 lines
Diff to previous 1.129 (colored) next main 1.130 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by yamt in ticket #621):
	sys/kern/uipc_syscalls.c: revision 1.108-1.109 via patch
	sys/kern/uipc_socket.c: revision 1.139 via patch
- soabort: don't leak a socket on error.
- add an assertion.

sys_accept: don't leak a socket on error.

sys_accept: fix usecount botch and double soclose in rev.1.108.

Revision 1.132.2.5 / (download) - annotate - [select for diffs], Mon May 7 10:55:48 2007 UTC (16 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.132.2.4: +41 -49 lines
Diff to previous 1.132.2.4 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.140 / (download) - annotate - [select for diffs], Wed May 2 20:40:23 2007 UTC (16 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, nick-csl-alignment-base, mjf-ufs-trans-base, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.139: +41 -49 lines
Diff to previous 1.139 (colored) to selected 1.69 (colored)

Eliminate address family-specific route caches (struct route, struct
route_in6, struct route_iso), replacing all caches with a struct
route.

The principle benefit of this change is that all of the protocol
families can benefit from route cache-invalidation, which is
necessary for correct routing.  Route-cache invalidation fixes an
ancient PR, kern/3508, at long last; it fixes various other PRs,
also.

Discussions with and ideas from Joerg Sonnenberger influenced this
work tremendously.  Of course, all design oversights and bugs are
mine.

DETAILS

1 I added to each address family a pool of sockaddrs.  I have
  introduced routines for allocating, copying, and duplicating,
  and freeing sockaddrs:

        struct sockaddr *sockaddr_alloc(sa_family_t af, int flags);
        struct sockaddr *sockaddr_copy(struct sockaddr *dst,
                                       const struct sockaddr *src);
        struct sockaddr *sockaddr_dup(const struct sockaddr *src, int flags);
        void sockaddr_free(struct sockaddr *sa);

  sockaddr_alloc() returns either a sockaddr from the pool belonging
  to the specified family, or NULL if the pool is exhausted.  The
  returned sockaddr has the right size for that family; sa_family
  and sa_len fields are initialized to the family and sockaddr
  length---e.g., sa_family = AF_INET and sa_len = sizeof(struct
  sockaddr_in).  sockaddr_free() puts the given sockaddr back into
  its family's pool.

  sockaddr_dup() and sockaddr_copy() work analogously to strdup()
  and strcpy(), respectively.  sockaddr_copy() KASSERTs that the
  family of the destination and source sockaddrs are alike.

  The 'flags' argumet for sockaddr_alloc() and sockaddr_dup() is
  passed directly to pool_get(9).

2 I added routines for initializing sockaddrs in each address
  family, sockaddr_in_init(), sockaddr_in6_init(), sockaddr_iso_init(),
  etc.  They are fairly self-explanatory.

3 structs route_in6 and route_iso are no more.  All protocol families
  use struct route.  I have changed the route cache, 'struct route',
  so that it does not contain storage space for a sockaddr.  Instead,
  struct route points to a sockaddr coming from the pool the sockaddr
  belongs to.  I added a new method to struct route, rtcache_setdst(),
  for setting the cache destination:

        int rtcache_setdst(struct route *, const struct sockaddr *);

  rtcache_setdst() returns 0 on success, or ENOMEM if no memory is
  available to create the sockaddr storage.

  It is now possible for rtcache_getdst() to return NULL if, say,
  rtcache_setdst() failed.  I check the return value for NULL
  everywhere in the kernel.

4 Each routing domain (struct domain) has a list of live route
  caches, dom_rtcache.  rtflushall(sa_family_t af) looks up the
  domain indicated by 'af', walks the domain's list of route caches
  and invalidates each one.

Revision 1.132.2.4 / (download) - annotate - [select for diffs], Sun Apr 15 16:03:52 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.132.2.3: +10 -8 lines
Diff to previous 1.132.2.3 (colored) to branchpoint 1.132 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.139 / (download) - annotate - [select for diffs], Sun Apr 15 05:25:48 2007 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.138: +9 -3 lines
Diff to previous 1.138 (colored) to selected 1.69 (colored)

- soabort: don't leak a socket on error.
- add an assertion.

Revision 1.134.2.2 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:42 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.134.2.1: +9 -14 lines
Diff to previous 1.134.2.1 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.138 / (download) - annotate - [select for diffs], Tue Apr 3 23:44:53 2007 UTC (16 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.137: +3 -7 lines
Diff to previous 1.137 (colored) to selected 1.69 (colored)

socreate: l cannot be NULL.
CID: 4314

Revision 1.132.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:06 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.132.2.2: +36 -54 lines
Diff to previous 1.132.2.2 (colored) to branchpoint 1.132 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.136.2.1 / (download) - annotate - [select for diffs], Sun Mar 18 00:06:45 2007 UTC (17 years ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.136: +8 -9 lines
Diff to previous 1.136 (colored) next main 1.137 (colored) to selected 1.69 (colored)

First attempt to bring branch in sync with HEAD

Revision 1.137 / (download) - annotate - [select for diffs], Thu Mar 15 16:28:31 2007 UTC (17 years ago) by ad
Branch: MAIN
Changes since 1.136: +8 -9 lines
Diff to previous 1.136 (colored) to selected 1.69 (colored)

sodopendfreel: Getting a bit over ambitious.. Go to splvm() before calling
pool_cache_put().

Revision 1.134.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:58 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.134: +30 -47 lines
Diff to previous 1.134 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Mar 12 21:33:08 2007 UTC (17 years ago) by ad
Branch: MAIN
Branch point for: reinoud-bufcleanup
Changes since 1.135: +28 -46 lines
Diff to previous 1.135 (colored) to selected 1.69 (colored)

Use mutexes/condvars.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:34 2007 UTC (17 years ago) by ad
Branch: MAIN
Branch point for: mjf-ufs-trans
Changes since 1.134: +4 -3 lines
Diff to previous 1.134 (colored) to selected 1.69 (colored)

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

Revision 1.132.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:45 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.132.2.1: +11 -11 lines
Diff to previous 1.132.2.1 (colored) to branchpoint 1.132 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.134 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:11 2007 UTC (17 years ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.133: +11 -11 lines
Diff to previous 1.133 (colored) to selected 1.69 (colored)

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

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:34 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored) to selected 1.69 (colored)

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

Revision 1.111.2.6 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:20 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.5: +8 -7 lines
Diff to previous 1.111.2.5 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:45 2007 UTC (17 years ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored) to selected 1.69 (colored)

TRUE -> true, FALSE -> false

Revision 1.122.4.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:39 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.122.4.2: +7 -6 lines
Diff to previous 1.122.4.2 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.132 / (download) - annotate - [select for diffs], Wed Jan 17 12:21:34 2007 UTC (17 years, 2 months ago) by elad
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.131: +7 -6 lines
Diff to previous 1.131 (colored) to selected 1.69 (colored)

Use KAUTH_ARG().

Revision 1.122.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:07 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.122.4.1: +14 -8 lines
Diff to previous 1.122.4.1 (colored) to branchpoint 1.122 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.111.2.5 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:07 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.4: +20 -9 lines
Diff to previous 1.111.2.4 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.122.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:46 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.122.6.1: +26 -16 lines
Diff to previous 1.122.6.1 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.131 / (download) - annotate - [select for diffs], Fri Dec 8 00:23:08 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.130: +6 -5 lines
Diff to previous 1.130 (colored) to selected 1.69 (colored)

- make so_linger unsigned short to double the range
- return 1 or 0 for the flag being set instead of the flag value
- check for range properly

Revision 1.130 / (download) - annotate - [select for diffs], Wed Dec 6 20:49:02 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.129: +11 -6 lines
Diff to previous 1.129 (colored) to selected 1.69 (colored)

simplify linger code.

Revision 1.122.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:23 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.122: +7 -2 lines
Diff to previous 1.122 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.129 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:59 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.128: +9 -10 lines
Diff to previous 1.128 (colored) to selected 1.69 (colored)

remove some __unused from function parameters.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Oct 30 16:53:48 2006 UTC (17 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.127: +4 -3 lines
Diff to previous 1.127 (colored) to selected 1.69 (colored)

Use integers, not pointers to integers, for KAUTH_REQ_NETWORK_SOCKET_OPEN.

Reminded by yamt@, thanks!

Revision 1.127 / (download) - annotate - [select for diffs], Wed Oct 25 22:49:23 2006 UTC (17 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.126: +6 -2 lines
Diff to previous 1.126 (colored) to selected 1.69 (colored)

Introduce KAUTH_REQ_NETWORK_SOCKET_OPEN, to check if opening a socket is
allowed. It takes three int * arguments indicating domain, type, and
protocol. Replace previous KAUTH_REQ_NETWORK_SOCKET_RAWSOCK with it (but
keep it still).

Places that used to explicitly check for privileged context now don't
need it anymore, so I replaced these with XXX comment indiacting it for
future reference.

Documented and updated examples as well.

Revision 1.108.2.3 / (download) - annotate - [select for diffs], Wed Oct 25 12:58:56 2006 UTC (17 years, 4 months ago) by ghen
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.108.2.2: +3 -12 lines
Diff to previous 1.108.2.2 (colored) to branchpoint 1.108 (colored) next main 1.109 (colored) to selected 1.69 (colored)

Back out ticket #1568, it breaks source and binary compatibility.
Noted by pavel.

Revision 1.108.2.2 / (download) - annotate - [select for diffs], Wed Oct 25 07:53:19 2006 UTC (17 years, 4 months ago) by ghen
Branch: netbsd-3
Changes since 1.108.2.1: +12 -3 lines
Diff to previous 1.108.2.1 (colored) to branchpoint 1.108 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by ginsbach in ticket #1568):
	sys/kern/uipc_socket.c: revision 1.120
	lib/libc/sys/socket.2: revision 1.32
	lib/libc/sys/socket.2: revision 1.33
Sort ERRORS.  Bump date.
Add EAFNOSUPPORT as a possible error if the address family is not
supported.  This adds further differentiation between which argument to
socket(2) caused the error.  No longer are invalid domain (address family)
errors classified as ENOPROTOSUPPORT errors.  This should make socket(2)
conform to current POSIX and X/Open standards.  Fixes PR/33676.

Revision 1.122.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:11 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.122: +10 -9 lines
Diff to previous 1.122 (colored) to selected 1.69 (colored)

sync with head

Revision 1.126 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:19 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.125: +10 -9 lines
Diff to previous 1.125 (colored) to selected 1.69 (colored)

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

Revision 1.125 / (download) - annotate - [select for diffs], Tue Oct 3 11:15:04 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.124: +2 -7 lines
Diff to previous 1.124 (colored) to selected 1.69 (colored)

Back out socket credentials for now, until we figure a better way of
handling the reference counting from interrupt context.

Revision 1.124 / (download) - annotate - [select for diffs], Mon Oct 2 09:22:34 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored) to selected 1.69 (colored)

Move the kauth_cred_free() call above the "is connected" check to not
leak credentials.

Pointed out by yamt@, thanks!

Revision 1.123 / (download) - annotate - [select for diffs], Mon Oct 2 00:02:04 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.122: +7 -2 lines
Diff to previous 1.122 (colored) to selected 1.69 (colored)

Add credentials to sockets, 'so_cred'.

Brought up on tech-kern@ some ~2 months ago, didn't seem to be an
objection; brought up again recently and no objection either... this is
not too intrusive and I've been running with this for a while.

Revision 1.115.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:17 2006 UTC (17 years, 6 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.115: +58 -33 lines
Diff to previous 1.115 (colored) next main 1.116 (colored) to selected 1.69 (colored)

sync with head

Revision 1.116.2.4 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:47 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.116.2.3: +3 -3 lines
Diff to previous 1.116.2.3 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored) to selected 1.69 (colored)

sync with head

Revision 1.122 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:11 2006 UTC (17 years, 7 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.121: +3 -3 lines
Diff to previous 1.121 (colored) to selected 1.69 (colored)

Use the LWP cached credentials where sane.

Revision 1.120.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:51 2006 UTC (17 years, 8 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.120: +7 -8 lines
Diff to previous 1.120 (colored) next main 1.121 (colored) to selected 1.69 (colored)

Merge from HEAD.

Revision 1.111.2.4 / (download) - annotate - [select for diffs], Fri Jul 7 12:30:51 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.3: +3 -3 lines
Diff to previous 1.111.2.3 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

- fix typos and compilation problems in uipc_mbuf.c rev.1.100.2.8.
- m_ext_free: fix the recursive call case.
- change return value of mcl_dec_and_test_reference.
- tweak assertions.

Revision 1.116.2.3 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:57 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.116.2.2: +44 -18 lines
Diff to previous 1.116.2.2 (colored) to branchpoint 1.116 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.111.2.3 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:39 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.2: +104 -71 lines
Diff to previous 1.111.2.2 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.121 / (download) - annotate - [select for diffs], Wed Jun 21 12:55:12 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6
Changes since 1.120: +7 -8 lines
Diff to previous 1.120 (colored) to selected 1.69 (colored)

bump default so_snd.sb_lowat to increase chance to use loaning.

the idea to tweak the watermark from Jonathan Stone.
reviewed by Bill Studenmund.

Revision 1.118.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:07:16 2006 UTC (17 years, 9 months ago) by chap
Branch: chap-midi
Changes since 1.118: +39 -12 lines
Diff to previous 1.118 (colored) next main 1.119 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.120 / (download) - annotate - [select for diffs], Tue Jun 13 21:19:56 2006 UTC (17 years, 9 months ago) by ginsbach
Branch: MAIN
CVS Tags: gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.119: +12 -3 lines
Diff to previous 1.119 (colored) to selected 1.69 (colored)

Add EAFNOSUPPORT as a possible error if the address family is not
supported.  This adds further differentiation between which argument to
socket(2) caused the error.  No longer are invalid domain (address family)
errors classified as ENOPROTOSUPPORT errors.  This should make socket(2)
conform to current POSIX and X/Open standards.  Fixes PR/33676.

Revision 1.115.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:09 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.115.6.1: +31 -12 lines
Diff to previous 1.115.6.1 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.119 / (download) - annotate - [select for diffs], Thu May 25 14:27:28 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: simonb-timecounters-base
Changes since 1.118: +27 -9 lines
Diff to previous 1.118 (colored) to selected 1.69 (colored)

move wait points for kva from upper layers to vm_map.  PR/33185 #1.

XXX there is a concern about interaction with kva fragmentation.
see: http://mail-index.NetBSD.org/tech-kern/2006/05/11/0000.html

Revision 1.116.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:41 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.116: +13 -12 lines
Diff to previous 1.116 (colored) next main 1.117 (colored) to selected 1.69 (colored)

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

Revision 1.116.2.2 / (download) - annotate - [select for diffs], Wed May 24 10:58:42 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.116.2.1: +4 -3 lines
Diff to previous 1.116.2.1 (colored) to branchpoint 1.116 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.118 / (download) - annotate - [select for diffs], Sun May 14 21:15:12 2006 UTC (17 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Changes since 1.117: +2 -1 lines
Diff to previous 1.117 (colored) to selected 1.69 (colored)

integrate kauth.

Revision 1.116.4.3 / (download) - annotate - [select for diffs], Sat May 6 23:31:31 2006 UTC (17 years, 10 months ago) by christos
Branch: elad-kernelauth
Changes since 1.116.4.2: +3 -2 lines
Diff to previous 1.116.4.2 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored) to selected 1.69 (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.115.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:59 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.115: +14 -16 lines
Diff to previous 1.115 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.116.4.2 / (download) - annotate - [select for diffs], Wed Apr 19 05:14:00 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.116.4.1: +11 -11 lines
Diff to previous 1.116.4.1 (colored) to branchpoint 1.116 (colored) to selected 1.69 (colored)

sync with head.

Revision 1.116.2.1 / (download) - annotate - [select for diffs], Tue Apr 11 11:55:48 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.116: +11 -11 lines
Diff to previous 1.116 (colored) to selected 1.69 (colored)

sync with head

Revision 1.117 / (download) - annotate - [select for diffs], Tue Apr 11 09:32:58 2006 UTC (17 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, elad-kernelauth-base
Changes since 1.116: +11 -11 lines
Diff to previous 1.116 (colored) to selected 1.69 (colored)

sodopendfree/sodopendfreel: remove unused "so" argument.

Revision 1.116.4.1 / (download) - annotate - [select for diffs], Wed Mar 8 00:53:41 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored) to selected 1.69 (colored)

Adapt to kernel authorization KPI.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:21 2006 UTC (18 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.115: +5 -7 lines
Diff to previous 1.115 (colored) to selected 1.69 (colored)

merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.

Revision 1.115.2.4 / (download) - annotate - [select for diffs], Sun Jan 15 10:44:52 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.115.2.3: +1 -1 lines
Diff to previous 1.115.2.3 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored) to selected 1.69 (colored)

rename VMSPACE_IS_KERNEL to VMSPACE_IS_KERNEL_P.  ("predicate")
suggested by Matt Thomas.

Revision 1.115.2.3 / (download) - annotate - [select for diffs], Sat Dec 31 11:34:26 2005 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.115.2.2: +1 -1 lines
Diff to previous 1.115.2.2 (colored) to branchpoint 1.115 (colored) to selected 1.69 (colored)

redo the previous correctly.

Revision 1.115.2.2 / (download) - annotate - [select for diffs], Sat Dec 31 11:21:51 2005 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.115.2.1: +1 -1 lines
Diff to previous 1.115.2.1 (colored) to branchpoint 1.115 (colored) to selected 1.69 (colored)

use VMSPACE_IS_KERNEL.

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Sat Dec 31 11:14:01 2005 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.115: +5 -7 lines
Diff to previous 1.115 (colored) to selected 1.69 (colored)

uio_segflg/uio_lwp -> uio_vmspace.

Revision 1.115 / (download) - annotate - [select for diffs], Tue Dec 27 00:00:29 2005 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.114: +9 -8 lines
Diff to previous 1.114 (colored) to selected 1.69 (colored)

socreate: fix a null dereference on nfs reconnect, introduced by ktrace-lwp.

Revision 1.114 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:30 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.113: +33 -29 lines
Diff to previous 1.113 (colored) to selected 1.69 (colored)

merge ktrace-lwp.

Revision 1.83.2.11 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:12 2005 UTC (18 years, 3 months ago) by christos
Branch: ktrace-lwp
Changes since 1.83.2.10: +12 -14 lines
Diff to previous 1.83.2.10 (colored) next main 1.84 (colored) to selected 1.69 (colored)

Sync with head.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Dec 8 03:13:18 2005 UTC (18 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.112: +12 -14 lines
Diff to previous 1.112 (colored) to selected 1.69 (colored)

Sprinkle static.

Revision 1.83.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:45 2005 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.9: +12 -7 lines
Diff to previous 1.83.2.9 (colored) to selected 1.69 (colored)

Sync with HEAD. Here we go again...

Revision 1.97.2.2 / (download) - annotate - [select for diffs], Mon Oct 31 13:37:33 2005 UTC (18 years, 4 months ago) by tron
Branch: netbsd-2-0
Changes since 1.97.2.1: +7 -2 lines
Diff to previous 1.97.2.1 (colored) to branchpoint 1.97 (colored) next main 1.98 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by nathanw in ticket #5939):
	sys/kern/uipc_socket.c: revision 1.112
Check the argument to SO_LINGER.

Revision 1.97.2.1.2.2.2.1 / (download) - annotate - [select for diffs], Mon Oct 31 13:36:41 2005 UTC (18 years, 4 months ago) by tron
Branch: netbsd-2-1
Changes since 1.97.2.1.2.2: +7 -2 lines
Diff to previous 1.97.2.1.2.2 (colored) next main 1.97.2.1.2.3 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by nathanw in ticket #5939):
	sys/kern/uipc_socket.c: revision 1.112
Check the argument to SO_LINGER.

Revision 1.97.2.1.2.3 / (download) - annotate - [select for diffs], Fri Oct 28 19:26:22 2005 UTC (18 years, 4 months ago) by jmc
Branch: netbsd-2
Changes since 1.97.2.1.2.2: +7 -2 lines
Diff to previous 1.97.2.1.2.2 (colored) to branchpoint 1.97.2.1 (colored) next main 1.97.2.2 (colored) to selected 1.69 (colored)

"Pullup revs 1.011-1.112 (requested by nathanw in ticket #5939)
 Check the argument to SO_LINGER."

Revision 1.111.4.1 / (download) - annotate - [select for diffs], Wed Oct 26 08:32:51 2005 UTC (18 years, 4 months ago) by yamt
Branch: yamt-vop
Changes since 1.111: +7 -2 lines
Diff to previous 1.111 (colored) next main 1.112 (colored) to selected 1.69 (colored)

sync with head

Revision 1.108.2.1 / (download) - annotate - [select for diffs], Sat Oct 22 03:54:33 2005 UTC (18 years, 5 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, 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
Changes since 1.108: +7 -2 lines
Diff to previous 1.108 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by nathanw in ticket #911):
	sys/kern/uipc_socket.c: revision 1.112
Check the argument to SO_LINGER.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Oct 21 17:40:03 2005 UTC (18 years, 5 months ago) by nathanw
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
Changes since 1.111: +7 -2 lines
Diff to previous 1.111 (colored) to selected 1.69 (colored)

Check the argument to SO_LINGER.

Revision 1.97.2.1.2.2 / (download) - annotate - [select for diffs], Tue Sep 13 23:23:56 2005 UTC (18 years, 6 months ago) by riz
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4
Branch point for: netbsd-2-1
Changes since 1.97.2.1.2.1: +2 -0 lines
Diff to previous 1.97.2.1.2.1 (colored) to branchpoint 1.97.2.1 (colored) to selected 1.69 (colored)

Back out ticket #5598, it causes netboot problems for (at least) sparc.

Revision 1.97.2.1.2.1 / (download) - annotate - [select for diffs], Mon Aug 22 21:42:19 2005 UTC (18 years, 7 months ago) by riz
Branch: netbsd-2
CVS Tags: netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1
Changes since 1.97.2.1: +2 -4 lines
Diff to previous 1.97.2.1 (colored) to selected 1.69 (colored)

Pull up following revision(s) (requested by christos in ticket #5598):
	sys/kern/uipc_socket.c: revision 1.105 via patch
PR/26210: Matthew Mondor: Since revision 1.14 when net-2 was merged,
the code to do receive packet accounting has been disabled for no apparent
reason. Re-enable it.

Revision 1.111.2.2 / (download) - annotate - [select for diffs], Thu Jul 7 12:42:25 2005 UTC (18 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111.2.1: +8 -6 lines
Diff to previous 1.111.2.1 (colored) to branchpoint 1.111 (colored) to selected 1.69 (colored)

defer mapping only when defined(__HAVE_LAZY_MBUF).

Revision 1.111.2.1 / (download) - annotate - [select for diffs], Thu Jul 7 12:07:38 2005 UTC (18 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.111: +27 -31 lines
Diff to previous 1.111 (colored) to selected 1.69 (colored)

sosend_loan: defer mapping of mbuf external data pages.
mtod: map mbuf external data pages if needed.

Revision 1.111 / (download) - annotate - [select for diffs], Sun May 8 18:44:39 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base
Branch point for: yamt-vop, yamt-lazymbuf
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored) to selected 1.69 (colored)

Panic strings should not end with \n.

Revision 1.110 / (download) - annotate - [select for diffs], Sat May 7 17:42:09 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.109: +6 -6 lines
Diff to previous 1.109 (colored) to selected 1.69 (colored)

PR/30154: YAMAMOTO Takashi: tcp_close locking botch
chgsbsize() as mentioned in the PR can be called from an interrupt context
via tcp_close(). Avoid calling uid_find() in chgsbsize().
- Instead of storing so_uid in struct socketvar, store *so_uidinfo
- Add a simple lock to struct uidinfo.

Revision 1.107.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:24 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.107: +9 -9 lines
Diff to previous 1.107 (colored) next main 1.108 (colored) to selected 1.69 (colored)

sync with -current

Revision 1.83.2.9 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:57 2005 UTC (18 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.8: +4 -4 lines
Diff to previous 1.83.2.8 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:37 2005 UTC (18 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.108: +4 -4 lines
Diff to previous 1.108 (colored) to selected 1.69 (colored)

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.107.6.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:12 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.107.6.1: +7 -7 lines
Diff to previous 1.107.6.1 (colored) to branchpoint 1.107 (colored) next main 1.108 (colored) to selected 1.69 (colored)

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

Revision 1.83.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:52:02 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.7: +7 -7 lines
Diff to previous 1.83.2.7 (colored) to selected 1.69 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.108 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (19 years ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.107: +7 -7 lines
Diff to previous 1.107 (colored) to selected 1.69 (colored)

nuke trailing whitespace

Revision 1.107.6.1 / (download) - annotate - [select for diffs], Tue Jan 25 12:59:35 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.107: +4 -4 lines
Diff to previous 1.107 (colored) to selected 1.69 (colored)

convert to new apis.

Revision 1.83.2.7 / (download) - annotate - [select for diffs], Mon Jan 24 14:34:28 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.6: +5 -7 lines
Diff to previous 1.83.2.6 (colored) to selected 1.69 (colored)

Don't deref a NULL struct lwp *

Revision 1.83.2.6 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:17 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.5: +32 -26 lines
Diff to previous 1.83.2.5 (colored) to selected 1.69 (colored)

Fix the sync with head I botched.

Revision 1.83.2.5 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:04 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.4: +30 -32 lines
Diff to previous 1.83.2.4 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Sep 3 18:14:09 2004 UTC (19 years, 6 months ago) by darrenr
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.106: +6 -2 lines
Diff to previous 1.106 (colored) to selected 1.69 (colored)

add a per-socket counter for dropped UDP packets when the internal buffers
are full.

Revision 1.83.2.4 / (download) - annotate - [select for diffs], Fri Sep 3 12:45:39 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.3: +9 -2 lines
Diff to previous 1.83.2.3 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.106 / (download) - annotate - [select for diffs], Wed Aug 25 09:03:23 2004 UTC (19 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.105: +9 -2 lines
Diff to previous 1.105 (colored) to selected 1.69 (colored)

bug reported by millert@openbsd:
> Call dom_dispose() for any SCM_RIGHTS message that went through the
> read path rather than recv.  Previously, if an fd was passed via
> sendmsg() but was consumed by the receiver via read() the ref count
> was incremented and never decremented and so the ref count would
> never reach zero even when there was no long any processes holding
> the file open (this was especially bad for locked fds).

Revision 1.83.2.3 / (download) - annotate - [select for diffs], Wed Aug 25 06:58:58 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.2: +2 -4 lines
Diff to previous 1.83.2.2 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Aug 19 12:48:42 2004 UTC (19 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.104: +2 -4 lines
Diff to previous 1.104 (colored) to selected 1.69 (colored)

PR/26210: Matthew Mondor: Since revision 1.14 when net-2 was merged,
the code to do receive packet accounting has been disabled for no apparent
reason. Re-enable it.

Revision 1.83.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:57 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.1: +264 -102 lines
Diff to previous 1.83.2.1 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.104 / (download) - annotate - [select for diffs], Thu Jul 1 12:42:57 2004 UTC (19 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored) to selected 1.69 (colored)

bump sb_timeo from short to int to allow longer timeouts.
especially when hz is high.

while i'm here, bump sb_flags to int, as suggested by
Jason Thorpe and Bill Studenmund.

ride on 2.0G.

Revision 1.97.2.1 / (download) - annotate - [select for diffs], Wed May 26 20:14:40 2004 UTC (19 years, 9 months ago) by he
Branch: netbsd-2-0
CVS Tags: netbsd-2-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
Branch point for: netbsd-2
Changes since 1.97: +5 -3 lines
Diff to previous 1.97 (colored) to selected 1.69 (colored)

Pull up revision 1.103 (requested by atatat in ticket #388):
  Add remaining sysctl descriptions under kern subtree.

Revision 1.103 / (download) - annotate - [select for diffs], Tue May 25 04:30:32 2004 UTC (19 years, 9 months ago) by atatat
Branch: MAIN
Changes since 1.102: +5 -3 lines
Diff to previous 1.102 (colored) to selected 1.69 (colored)

Remaining sysctl descriptions under kern subtree

Revision 1.102 / (download) - annotate - [select for diffs], Sat May 22 22:52:13 2004 UTC (19 years, 10 months ago) by jonathan
Branch: MAIN
Changes since 1.101: +21 -23 lines
Diff to previous 1.101 (colored) to selected 1.69 (colored)

Eliminate several uses of `curproc' from the socket-layer code and from NFS.

Add a new explicit `struct proc *p' argument to socreate(), sosend().
Use that argument instead of curproc. Follow-on changes to pass that
argument to socreate(), sosend(), and (*so->so_send)() calls.
These changes reviewed and independently recoded  by Matt Thomas.

Changes to soreceive() and (*dom->dom_exernalize() from Matt Thomas:
pass soreceive()'s struct uio* uio->uio_procp to unp_externalize().
Eliminate curproc from unp_externalize.   Also, now soreceive() uses
its uio->uio_procp value, pass that same value downward to
((pr->pru_usrreq)() calls for consistency, instead of (struct proc * )0.

Similar changes in sys/nfs to eliminate (most) uses of curproc,
either via the req-> r_procp field of a struct nfsreq *req argument,
or by passing down new explicit struct proc * arguments.

Reviewed by: Matt Thomas, posted to tech-kern.
NB: The (*pr->pru_usrreq)() change should be tested on more (all!) protocols.

Revision 1.101 / (download) - annotate - [select for diffs], Sat May 1 02:24:38 2004 UTC (19 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.100: +6 -8 lines
Diff to previous 1.100 (colored) to selected 1.69 (colored)

Use EVCNT_ATTACH_STATIC

Revision 1.100 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:41 2004 UTC (19 years, 10 months ago) by simonb
Branch: MAIN
Changes since 1.99: +3 -6 lines
Diff to previous 1.99 (colored) to selected 1.69 (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.99 / (download) - annotate - [select for diffs], Thu Apr 22 01:01:40 2004 UTC (19 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.98: +6 -6 lines
Diff to previous 1.98 (colored) to selected 1.69 (colored)

Constify protosw arrays.  This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Apr 17 15:15:29 2004 UTC (19 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.97: +25 -9 lines
Diff to previous 1.97 (colored) to selected 1.69 (colored)

PR/9347: Eric E. Fair: socket buffer pool exhaustion leads to system deadlock
and unkillable processes.
1. Introduce new SBSIZE resource limit from FreeBSD to limit socket buffer
   size resource.
2. make sokvareserve interruptible, so processes ltsleeping on it can be
   killed.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:53 2004 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.96: +10 -3 lines
Diff to previous 1.96 (colored) to selected 1.69 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Mar 21 00:54:46 2004 UTC (20 years ago) by mycroft
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.69 (colored)

Remove part of a very old change that caused NFS to not enforce socket buffer
limits.  No idea why it was done in the first place.

Don't remember who reported this, but I think it was yamt.

Revision 1.95 / (download) - annotate - [select for diffs], Wed Mar 17 10:30:18 2004 UTC (20 years ago) by yamt
Branch: MAIN
Changes since 1.94: +40 -22 lines
Diff to previous 1.94 (colored) to selected 1.69 (colored)

sokvaalloc: unreserve kva if uvm_km_valloc_wait failed.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Mar 17 10:21:59 2004 UTC (20 years ago) by yamt
Branch: MAIN
Changes since 1.93: +46 -2 lines
Diff to previous 1.93 (colored) to selected 1.69 (colored)

- move kern.somaxkva sysctl stuff from init_sysctl.c to uipc_socket.c.
- when changing its value, wakeup sokva waiters.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Mar 17 10:03:26 2004 UTC (20 years ago) by yamt
Branch: MAIN
Changes since 1.92: +110 -19 lines
Diff to previous 1.92 (colored) to selected 1.69 (colored)

- fix locking of sosend kva allocation.
- some comments.

Revision 1.92 / (download) - annotate - [select for diffs], Wed Mar 17 09:58:15 2004 UTC (20 years ago) by yamt
Branch: MAIN
Changes since 1.91: +4 -26 lines
Diff to previous 1.91 (colored) to selected 1.69 (colored)

remove per-socket pendfree list.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Oct 21 22:55:47 2003 UTC (20 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.90: +6 -2 lines
Diff to previous 1.90 (colored) to selected 1.69 (colored)

Cache the "adjusted" value of sb_max when sb_max is changed, in order
to avoid doing quad math in sbreserve().

Change suggested by Simon Burge, and code inspired by a similar change
in FreeBSD.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Sep 22 12:59:58 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.89: +3 -13 lines
Diff to previous 1.89 (colored) to selected 1.69 (colored)

- pass signo to fownsignal [ok by jd]
- make urg signal handling use fownsignal
- remove out of band detection in sowakeup

Revision 1.89 / (download) - annotate - [select for diffs], Mon Sep 15 00:22:20 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.88: +3 -2 lines
Diff to previous 1.88 (colored) to selected 1.69 (colored)

include <sys/poll.h>

Revision 1.88 / (download) - annotate - [select for diffs], Sun Sep 14 23:45:16 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.87: +6 -4 lines
Diff to previous 1.87 (colored) to selected 1.69 (colored)

provide some more ksiginfo info.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Sep 6 22:03:10 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.86: +7 -4 lines
Diff to previous 1.86 (colored) to selected 1.69 (colored)

SA_SIGINFO changes.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Sep 4 16:44:05 2003 UTC (20 years, 6 months ago) by wrstuden
Branch: MAIN
Changes since 1.85: +8 -3 lines
Diff to previous 1.85 (colored) to selected 1.69 (colored)

Adjust struct sockbuf and sorflush() so that we don't zero out
every field; some need to stay around.

Fixes a bug where by calling shutdown() on a socket with knotes
will cause the kernel to panic when the kernel closes the socket.
Other access, such as calling kevent() may also trigger the panic.

Debugged with help from Jason and Allen. Patch reviewed by same plus
Itojun and Matt Thomas.

This problem seems to be the same one that FreeBSD saw in their PR
number 54331.

Kernel version _not_ bumped as we will piggyback the bump earlier today.

Revision 1.85 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:59 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.84: +3 -7 lines
Diff to previous 1.84 (colored) to selected 1.69 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Jul 2 20:07:45 2003 UTC (20 years, 8 months ago) by ragge
Branch: MAIN
Changes since 1.83: +7 -3 lines
Diff to previous 1.83 (colored) to selected 1.69 (colored)

Make somaxkva modifyable via sysctl (and compile-time) instead of
hardcoding its size.

Revision 1.83.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:44 2003 UTC (20 years, 8 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.83: +22 -24 lines
Diff to previous 1.83 (colored) to selected 1.69 (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.83 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:30 2003 UTC (20 years, 8 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.82: +22 -20 lines
Diff to previous 1.82 (colored) to selected 1.69 (colored)

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

Revision 1.82 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:58 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.81: +22 -24 lines
Diff to previous 1.81 (colored) to selected 1.69 (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.81 / (download) - annotate - [select for diffs], Mon Jun 23 11:02:07 2003 UTC (20 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.80: +3 -2 lines
Diff to previous 1.80 (colored) to selected 1.69 (colored)

Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.80 / (download) - annotate - [select for diffs], Sat May 3 17:53:17 2003 UTC (20 years, 10 months ago) by yamt
Branch: MAIN
Changes since 1.79: +45 -24 lines
Diff to previous 1.79 (colored) to selected 1.69 (colored)

export some of sosend loan routines for nfsd.

Revision 1.79 / (download) - annotate - [select for diffs], Wed Apr 9 18:38:03 2003 UTC (20 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.78: +24 -17 lines
Diff to previous 1.78 (colored) to selected 1.69 (colored)

* Use a pool_cache constructor to record the physical address of mbufs
  in the mbuf header.
* Use the new cached paddr feature of the pool_cache API to record
  the physical address of mbuf clusters.  (We cannot use a ctor for
  clusters, since clusters have no constructed form; they are merely
  buffers).

Bus_dma back-ends may use the cached physical addresses to save having to
extract the physical address from virtual.

* Provide space in m_ext recording the vm_page *'s for an SOSEND_LOAN_CHUNK-
  sized non-cluster external buffer.  Use this in the sosend_loan code to
  save having to extract the physical address from virtual and then look
  up the vm_page *'s.

* Provide an indication that an external buffer is mapped read-only at
  the MMU.  Set this flag for the external buffer in the sosend_loan
  case, since loaned pages are always mapped read-only.  Bus_dma back-ends
  may use this information to save cache flushing, since a cache flush of
  a read-only mapping is redundant on some architectures (the cache would
  have already been flushed when making the mapping read-only).

Part 2 in a series of simple patches contributed by Wasabi Systems
to improve network performance.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Feb 26 06:31:11 2003 UTC (21 years ago) by matt
Branch: MAIN
Changes since 1.77: +11 -5 lines
Diff to previous 1.77 (colored) to selected 1.69 (colored)

Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.77 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:44 2003 UTC (21 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.76: +5 -2 lines
Diff to previous 1.76 (colored) to selected 1.69 (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.76 / (download) - annotate - [select for diffs], Fri Jan 31 05:00:24 2003 UTC (21 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.75: +4 -4 lines
Diff to previous 1.75 (colored) to selected 1.69 (colored)

Change ext_size to a size_t, and update the signature of ext_free.

Revision 1.54.2.18 / (download) - annotate - [select for diffs], Wed Dec 11 06:43:10 2002 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.54.2.17: +8 -6 lines
Diff to previous 1.54.2.17 (colored) next main 1.55 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Nov 27 04:07:42 2002 UTC (21 years, 3 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored) to selected 1.69 (colored)

"tv->tv_sec * hz" could overflow a long.  millert@openbsd

Revision 1.74 / (download) - annotate - [select for diffs], Wed Nov 27 03:36:04 2002 UTC (21 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.73: +4 -2 lines
Diff to previous 1.73 (colored) to selected 1.69 (colored)

small SO_RCVTIMEO values are mistakenly taken to be zero.  FreeBSD PR kern/32827.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Nov 26 18:44:35 2002 UTC (21 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.72: +7 -7 lines
Diff to previous 1.72 (colored) to selected 1.69 (colored)

si_ -> sel_ to avoid conflicts with siginfo.

Revision 1.54.2.17 / (download) - annotate - [select for diffs], Mon Nov 11 22:14:07 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.16: +117 -0 lines
Diff to previous 1.54.2.16 (colored) to selected 1.69 (colored)

Catch up to -current

Revision 1.66.4.2 / (download) - annotate - [select for diffs], Fri Nov 8 09:31:35 2002 UTC (21 years, 4 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.66.4.1: +17 -0 lines
Diff to previous 1.66.4.1 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored) to selected 1.69 (colored)

Pull up revision 1.68 (requested by thorpej in ticket #429):
Fix 2 bugs with MSG_WAITALL.  The first is to not block forever if one is
trying to MSG_PEEK for more than the socket can hold.  The second is that
before sleeping waiting for more data, upcall the protocol telling it you
have just received data so it can kick itself to re-fill the just drained
socket buffer.

Revision 1.72 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:28 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.71: +119 -2 lines
Diff to previous 1.71 (colored) to selected 1.69 (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.50.4.5 / (download) - annotate - [select for diffs], Wed Sep 18 16:04:53 2002 UTC (21 years, 6 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.50.4.4: +2 -2 lines
Diff to previous 1.50.4.4 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored) to selected 1.69 (colored)

sys/kern/uipc_socket.c				1.53

  Return ECONNABORTED, if the socket (tcp connection for example)
  is disconnected by RST right before accept(2).  Fixes PR#10698/12027.
  Checked with SUSv2, XNET 5.2, and Stevens (Unix Network Programming
  vol 1 2nd ed) section 5.11.

Revision 1.56.2.7 / (download) - annotate - [select for diffs], Fri Sep 6 08:48:16 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.56.2.6: +74 -8 lines
Diff to previous 1.56.2.6 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored) to selected 1.69 (colored)

sync kqueue branch with HEAD

Revision 1.66.2.3 / (download) - annotate - [select for diffs], Thu Aug 29 05:23:14 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.66.2.2: +5 -5 lines
Diff to previous 1.66.2.2 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored) to selected 1.69 (colored)

catch up with -current.

Revision 1.54.2.16 / (download) - annotate - [select for diffs], Tue Aug 27 23:47:35 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.15: +3 -3 lines
Diff to previous 1.54.2.15 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Aug 21 05:13:37 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, gehenna-devsw-base
Changes since 1.70: +5 -5 lines
Diff to previous 1.70 (colored) to selected 1.69 (colored)

Make use of page loaning for large socket writes the default.  The
SOSEND_NO_LOAN option can be used to go back to the old behavior.

Revision 1.54.2.15 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:27 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.14: +71 -5 lines
Diff to previous 1.54.2.14 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.54.2.14 / (download) - annotate - [select for diffs], Mon Jul 15 20:04:45 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.13: +3 -3 lines
Diff to previous 1.54.2.13 (colored) to selected 1.69 (colored)

Whitespace.

Revision 1.66.2.2 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:41 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.66.2.1: +71 -5 lines
Diff to previous 1.66.2.1 (colored) to branchpoint 1.66 (colored) to selected 1.69 (colored)

catch up with -current.

Revision 1.54.2.13 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:22 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.12: +2 -3 lines
Diff to previous 1.54.2.12 (colored) to selected 1.69 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Jul 3 21:39:41 2002 UTC (21 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (colored)

Rename SB_UPDATE_TAIL() to SB_EMPTY_FIXUP(), per suggestion from
Jonathan Stone.

Revision 1.69 / (download) - annotate - [selected], Wed Jul 3 19:06:48 2002 UTC (21 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.68: +71 -5 lines
Diff to previous 1.68 (colored)

Make insertion of data into socket buffers O(C):
* Keep pointers to the first and last mbufs of the last record in the
  socket buffer.
* Use the sb_lastrecord pointer in the sbappend*() family of functions
  to avoid traversing the packet chain to find the last record.
* Add a new sbappend_stream() function for stream protocols which
  guarantee that there will never be more than one record in the
  socket buffer.  This function uses the sb_mbtail pointer to perform
  the data insertion.  Make TCP use sbappend_stream().

On a profiling run, this makes sbappend of a TCP transmission using
a 1M socket buffer go from 50% of the time to .02% of the time.

Thanks to Bill Sommerfeld and YAMAMOTO Takashi for their debugging
assistance!

Revision 1.54.2.12 / (download) - annotate - [select for diffs], Mon Jun 24 22:11:03 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.11: +5 -5 lines
Diff to previous 1.54.2.11 (colored) to selected 1.69 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.56.2.6 / (download) - annotate - [select for diffs], Sun Jun 23 17:49:40 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.56.2.5: +309 -11 lines
Diff to previous 1.56.2.5 (colored) to branchpoint 1.56 (colored) to selected 1.69 (colored)

catch up with -current on kqueue branch

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Thu Jun 20 16:02:22 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.66: +39 -3 lines
Diff to previous 1.66 (colored) to selected 1.69 (colored)

catch up with -current.

Revision 1.54.2.11 / (download) - annotate - [select for diffs], Thu Jun 20 03:47:25 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.10: +306 -8 lines
Diff to previous 1.54.2.10 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.50.4.4 / (download) - annotate - [select for diffs], Wed Jun 12 20:41:45 2002 UTC (21 years, 9 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.50.4.3: +21 -2 lines
Diff to previous 1.50.4.3 (colored) to branchpoint 1.50 (colored) to selected 1.69 (colored)

Pull up revision 1.67 (via patch, requested by he):
  Make sure to preserve atomicity of receive operation when instructed
  to do so.  Make sure to drop rest of partial record if an error
  occurs.  Fixes PR#16990.

Revision 1.66.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 01:59:49 2002 UTC (21 years, 9 months ago) by lukem
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Changes since 1.66: +22 -3 lines
Diff to previous 1.66 (colored) to selected 1.69 (colored)

Pull up revision 1.67 (requested by he in ticket #238):
In soreceive(), if any part of a received record has been freed,
and an error occurs, make sure the socket doesn't retain a partial
copy by dropping the rest of the record.
This would otherwise trigger a panic("receive 1a") under DIAGNOSTIC.
Fixes PR#16990, suggested fix adapted.
Reviewed by Matt Thomas.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jun 11 00:21:33 2002 UTC (21 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.67: +19 -2 lines
Diff to previous 1.67 (colored) to selected 1.69 (colored)

Fix 2 bugs with MSG_WAITALL.  The first is to not block forever if one is
trying to MSG_PEEK for more than the socket can hold.  The second is that
before sleeping waiting for more data, upcall the protocol telling it you
have just received data so it can kick itself to re-fill the just drained
socket buffer.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jun 10 20:43:16 2002 UTC (21 years, 9 months ago) by he
Branch: MAIN
Changes since 1.66: +22 -3 lines
Diff to previous 1.66 (colored) to selected 1.69 (colored)

In soreceive(), if any part of a received record has been freed,
and an error occurs, make sure the socket doesn't retain a partial
copy by dropping the rest of the record.

This would otherwise trigger a panic("receive 1a") under DIAGNOSTIC.

Fixes PR#16990, suggested fix adapted.

Reviewed by Matt Thomas.

Revision 1.66 / (download) - annotate - [select for diffs], Tue May 7 08:06:35 2002 UTC (21 years, 10 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.65: +6 -4 lines
Diff to previous 1.65 (colored) to selected 1.69 (colored)

In soreceive(), don't call sopendfree() if MSG_DONTWAIT is set
since it may sleep.  nfsrv_rcv() tries to do its jobs in softintr
handler as far as possible.

Revision 1.65 / (download) - annotate - [select for diffs], Fri May 3 00:35:14 2002 UTC (21 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.64: +8 -19 lines
Diff to previous 1.64 (colored) to selected 1.69 (colored)

Let the sosend_loan() path be selected at run-time; patch the variable
use_sosend_loan to enable/disable it.  The SOSEND_LOAN kernel option
now causes it to default to 1.

Revision 1.64 / (download) - annotate - [select for diffs], Thu May 2 17:55:51 2002 UTC (21 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.63: +278 -7 lines
Diff to previous 1.63 (colored) to selected 1.69 (colored)

Add some experimental page-loaning for writes on sockets.  It is disabled
by default, and can be enabled by adding the SOSEND_LOAN option to your
kernel config.  The SOSEND_COUNTERS option can be used to provide some
instrumentation.

Use of this option, combined with an application that does large enough
writes, gets us zero-copy on the TCP and UDP transmit path.

Revision 1.54.2.10 / (download) - annotate - [select for diffs], Wed Apr 17 00:06:19 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.9: +3 -3 lines
Diff to previous 1.54.2.9 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Apr 6 08:04:17 2002 UTC (21 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored) to selected 1.69 (colored)

Don't use the tqh_ field names, instead use the correspond TAILQ_* macro.

Revision 1.54.2.9 / (download) - annotate - [select for diffs], Mon Apr 1 07:48:01 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.8: +3 -3 lines
Diff to previous 1.54.2.8 (colored) to selected 1.69 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.56.2.5 / (download) - annotate - [select for diffs], Sat Mar 16 16:01:52 2002 UTC (22 years ago) by jdolecek
Branch: kqueue
Changes since 1.56.2.4: +3 -3 lines
Diff to previous 1.56.2.4 (colored) to branchpoint 1.56 (colored) to selected 1.69 (colored)

Catch up with -current.

Revision 1.56.2.4 / (download) - annotate - [select for diffs], Fri Mar 15 21:36:11 2002 UTC (22 years ago) by jdolecek
Branch: kqueue
Changes since 1.56.2.3: +6 -24 lines
Diff to previous 1.56.2.3 (colored) to branchpoint 1.56 (colored) to selected 1.69 (colored)

no need to protect the kqueue SLIST manipulation with splnet - the
structures are never changed nor accessed from interrupt context
filt_solisten(): g/c the comment about what FreeBSD does, leave only
   comment what the code does (it was checked to be correct)

Revision 1.62 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:41 2002 UTC (22 years ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, eeh-devprop-base, eeh-devprop
Changes since 1.61: +3 -3 lines
Diff to previous 1.61 (colored) to selected 1.69 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.54.2.8 / (download) - annotate - [select for diffs], Thu Feb 28 04:14:47 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.7: +2 -2 lines
Diff to previous 1.54.2.7 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.54.2.7 / (download) - annotate - [select for diffs], Fri Jan 11 23:39:39 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.6: +2 -11 lines
Diff to previous 1.54.2.6 (colored) to selected 1.69 (colored)

More catchup.

Revision 1.56.2.3 / (download) - annotate - [select for diffs], Thu Jan 10 20:00:14 2002 UTC (22 years, 2 months ago) by thorpej
Branch: kqueue
Changes since 1.56.2.2: +11 -15 lines
Diff to previous 1.56.2.2 (colored) to branchpoint 1.56 (colored) to selected 1.69 (colored)

Sync kqueue branch with -current.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jan 3 01:16:02 2002 UTC (22 years, 2 months ago) by mrg
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.60: +2 -11 lines
Diff to previous 1.60 (colored) to selected 1.69 (colored)

fix previous: actually remove the COMPAT_SUNOS code, not just #if 0 it.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Jan 3 01:11:26 2002 UTC (22 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored) to selected 1.69 (colored)

move the COMPAT_SUNOS SO_BROADCAST hack out of uipc_socket.c into the
compat/sunos code.  besides being cleaner this allows the sunos LKM
to properly work without any special kernel hacks.

Revision 1.54.2.6 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:46 2001 UTC (22 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.5: +4 -1 lines
Diff to previous 1.54.2.5 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:59 2001 UTC (22 years, 4 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.58: +4 -1 lines
Diff to previous 1.58 (colored) next main 1.59 (colored) to selected 1.69 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:32 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.58: +4 -1 lines
Diff to previous 1.58 (colored) to selected 1.69 (colored)

add RCSIDs

Revision 1.54.2.5 / (download) - annotate - [select for diffs], Mon Oct 8 20:11:44 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.4: +7 -7 lines
Diff to previous 1.54.2.4 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.50.4.3 / (download) - annotate - [select for diffs], Mon Oct 8 19:47:51 2001 UTC (22 years, 5 months ago) by he
Branch: netbsd-1-5
Changes since 1.50.4.2: +3 -1 lines
Diff to previous 1.50.4.2 (colored) to branchpoint 1.50 (colored) to selected 1.69 (colored)

Pull up revision 1.57 (requested by jdolecek):
  In soreceive(): do not ignore uiomove() error.  Fixes PR#11692.

Revision 1.56.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:46:57 2001 UTC (22 years, 5 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.56: +9 -7 lines
Diff to previous 1.56 (colored) next main 1.57 (colored) to selected 1.69 (colored)

Catch up with -current.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Sep 29 14:16:19 2001 UTC (22 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.57: +7 -7 lines
Diff to previous 1.57 (colored) to selected 1.69 (colored)

Use lmin() instead of min(), and long for mlen & clen, to avoid integer
overflow on LP64 architectures. This fixes kern/10070 by Juergen Weiss.

Fix tested on NetBSD/alpha by Bernd Ernesti, on NetBSD/sparc64
by David Brownlee and Eduardo Horvath.

Revision 1.54.2.4 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:27 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.3: +3 -1 lines
Diff to previous 1.54.2.3 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Sep 17 18:59:29 2001 UTC (22 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.56: +3 -1 lines
Diff to previous 1.56 (colored) to selected 1.69 (colored)

soreceive(): do not ignore uiomove() error
Problem reported and fix provided by Aaro Koskinen in kern/11692.

Revision 1.56.2.2 / (download) - annotate - [select for diffs], Fri Sep 7 22:01:53 2001 UTC (22 years, 6 months ago) by thorpej
Branch: kqueue
Changes since 1.56.2.1: +4 -4 lines
Diff to previous 1.56.2.1 (colored) to branchpoint 1.56 (colored) to selected 1.69 (colored)

More const.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Tue Jul 10 13:48:47 2001 UTC (22 years, 8 months ago) by lukem
Branch: kqueue
Changes since 1.56: +142 -1 lines
Diff to previous 1.56 (colored) to selected 1.69 (colored)

add kqueue methods for filt_so*

Revision 1.54.2.3 / (download) - annotate - [select for diffs], Thu Jun 21 20:07:07 2001 UTC (22 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.2: +2 -2 lines
Diff to previous 1.54.2.2 (colored) to selected 1.69 (colored)

Catch up to -current.

Revision 1.48.2.6 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:31 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.48.2.5: +2 -2 lines
Diff to previous 1.48.2.5 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored) to selected 1.69 (colored)

Sync with HEAD

Revision 1.56 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:10 2001 UTC (22 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored) to selected 1.69 (colored)

Remove the use of splimp() from the NetBSD kernel.  splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Mon Apr 9 01:57:58 2001 UTC (22 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.54.2.1: +3 -2 lines
Diff to previous 1.54.2.1 (colored) to selected 1.69 (colored)

Catch up with -current.

Revision 1.48.2.5 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:25 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.48.2.4: +3 -2 lines
Diff to previous 1.48.2.4 (colored) to branchpoint 1.48 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Mar 21 19:22:29 2001 UTC (23 years ago) by thorpej
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored) to selected 1.69 (colored)

Add a protosw flag, PR_ABRTACPTDIS (Abort on Accept of Disconnected
Socket), and add it to the protocols that use that behavior (all
PR_LISTEN protocols except for PF_LOCAL stream sockets).

Revision 1.48.2.4 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:38 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.48.2.3: +89 -117 lines
Diff to previous 1.48.2.3 (colored) to branchpoint 1.48 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:49:46 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.54: +5 -4 lines
Diff to previous 1.54 (colored) to selected 1.69 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Feb 27 05:19:13 2001 UTC (23 years ago) by lukem
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.53: +89 -117 lines
Diff to previous 1.53 (colored) to selected 1.69 (colored)

convert to ANSI KNF

Revision 1.48.2.3 / (download) - annotate - [select for diffs], Sun Feb 11 19:16:50 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.48.2.2: +4 -3 lines
Diff to previous 1.48.2.2 (colored) to branchpoint 1.48 (colored) to selected 1.69 (colored)

Sync with HEAD.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Feb 7 12:20:43 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored) to selected 1.69 (colored)

return ECONNABORTED, if the socket (tcp connection for example)
is disconnected by RST right before accept(2).  fixes PR 10698/12027.
checked with SUSv2, XNET 5.2, and Stevens (unix network programming
vol 1 2nd ed) section 5.11.

Revision 1.50.4.2 / (download) - annotate - [select for diffs], Sat Feb 3 18:41:57 2001 UTC (23 years, 1 month ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.50.4.1: +4 -3 lines
Diff to previous 1.50.4.1 (colored) to branchpoint 1.50 (colored) to selected 1.69 (colored)

Pull up revision 1.52 (requested by itojun):
  Prevent bogus data from being returned from the kernel on accept(2)
  in case the peer already have disconnected.  Partial fix for
  PR#12027 and PR#10698.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jan 22 18:14:11 2001 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.51: +4 -3 lines
Diff to previous 1.51 (colored) to selected 1.69 (colored)

when the peer is disconnected before accept(2) is issued,
do not return junk data in mbuf (= sockaddr on accept(2)'s 2nd arg).
set the length zero.

behavior checked with bsdi and freebsd.
partial solution to PR 12027 and 10698 (need more investigation).

Revision 1.50.4.1 / (download) - annotate - [select for diffs], Fri Dec 15 00:08:53 2000 UTC (23 years, 3 months ago) by he
Branch: netbsd-1-5
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) to selected 1.69 (colored)

Pull up revision 1.51 (requested by fvdl):
  Fix NFS+tcp client hangs on server or network outage.  Again,
  please note that this introduces yet another kernel interface
  change: sobind() gains an argument.

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:23 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.48.2.1: +3 -3 lines
Diff to previous 1.48.2.1 (colored) to branchpoint 1.48 (colored) to selected 1.69 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.51 / (download) - annotate - [select for diffs], Sun Dec 10 23:16:28 2000 UTC (23 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) to selected 1.69 (colored)

Make sobind() take a struct proc *. It already took curproc and
passed it down to the appropriate usrreq function, and this
allows usage for contexts that need to be explicitly different
from curproc (like in the NFS code when binding to a reserved port).

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:14 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.48: +31 -28 lines
Diff to previous 1.48 (colored) to selected 1.69 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.50 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:14 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.49: +27 -27 lines
Diff to previous 1.49 (colored) to selected 1.69 (colored)

Get rid of register declarations.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Feb 7 18:43:26 2000 UTC (24 years, 1 month ago) by jonathan
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.48: +5 -2 lines
Diff to previous 1.48 (colored) to selected 1.69 (colored)

Make kernel SOMAXCONN patchable.  Will add sysctl once we
decide on namespace.

Revision 1.44.6.3 / (download) - annotate - [select for diffs], Tue Nov 30 13:34:48 1999 UTC (24 years, 3 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.44.6.2: +84 -78 lines
Diff to previous 1.44.6.2 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored) to selected 1.69 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.44.6.2 / (download) - annotate - [select for diffs], Tue Jul 6 11:02:39 1999 UTC (24 years, 8 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990705
Changes since 1.44.6.1: +5 -29 lines
Diff to previous 1.44.6.1 (colored) to branchpoint 1.44 (colored) to selected 1.69 (colored)

KAME/NetBSD 1.4, SNAP kit 1999/07/05.
NOTE: this branch is just for reference purposes (i.e. for taking cvs diff).
do not touch anything on the branch.  actual work must be done on HEAD branch.

Revision 1.44.6.1 / (download) - annotate - [select for diffs], Mon Jun 28 06:36:53 1999 UTC (24 years, 8 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990628
Changes since 1.44: +33 -5 lines
Diff to previous 1.44 (colored) to selected 1.69 (colored)

KAME/NetBSD 1.4 SNAP kit, dated 19990628.

NOTE: this branch (kame) is used just for refernce.  this may not compile
due to multiple reasons.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Mon Jun 21 14:46:36 1999 UTC (24 years, 9 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Changes since 1.44.2.1: +78 -72 lines
Diff to previous 1.44.2.1 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored) to selected 1.69 (colored)

pullup 1.44->1.47 (tv). We are now in total sync with version 1.48

Revision 1.44.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:24:05 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.44: +84 -74 lines
Diff to previous 1.44 (colored) next main 1.45 (colored) to selected 1.69 (colored)

Sync w/ -current.

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Fri Jun 18 17:14:35 1999 UTC (24 years, 9 months ago) by perry
Branch: netbsd-1-4
Changes since 1.44: +7 -3 lines
Diff to previous 1.44 (colored) to selected 1.69 (colored)

pullup 1.47->1.48 (thorpej)

Revision 1.48 / (download) - annotate - [select for diffs], Tue Jun 8 02:39:57 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: thorpej_scsipi
Changes since 1.47: +7 -3 lines
Diff to previous 1.47 (colored) to selected 1.69 (colored)

In sosend(), if so_error is set, clear it before returning the error to
the process (i.e. pre-Reno behavior).  The 4.4BSD behavior (introduced
in Reno) caused transient errors to stick incorrectly.

This is from PR #7640 (Havard Eidnes), cross-checked w/ FreeBSD, where
Bill Fenner committed the same fix (as described in a comment in the
Vat sources, by Van Jacobsen).

Revision 1.47 / (download) - annotate - [select for diffs], Sat May 15 22:37:22 1999 UTC (24 years, 10 months ago) by sommerfeld
Branch: MAIN
Changes since 1.46: +1 -10 lines
Diff to previous 1.46 (colored) to selected 1.69 (colored)

Delete test code.

Revision 1.46 / (download) - annotate - [select for diffs], Sat May 15 22:36:34 1999 UTC (24 years, 10 months ago) by sommerfeld
Branch: MAIN
Changes since 1.45: +20 -11 lines
Diff to previous 1.45 (colored) to selected 1.69 (colored)

Revise previous fix:
	1) protect socket flags under splsoftnet()
	2) avoid leaking memory on an error

Revision 1.45 / (download) - annotate - [select for diffs], Sat May 15 16:42:48 1999 UTC (24 years, 10 months ago) by tv
Branch: MAIN
Changes since 1.44: +78 -72 lines
Diff to previous 1.44 (colored) to selected 1.69 (colored)

Wow, that was much easier than I originally thought.  Fix PR kern/7583:
serious race condition in sosend().  Upon closer inspection, the appropriate
flags are checked within splsoftnet() for soreceive(), so no change needed
there.  Also a little KNFing in sosend().

Revision 1.44 / (download) - annotate - [select for diffs], Tue Mar 23 10:45:37 1999 UTC (25 years ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE
Branch point for: netbsd-1-4, kame, chs-ubc2
Changes since 1.43: +3 -1 lines
Diff to previous 1.43 (colored) to selected 1.69 (colored)

Ensure that you can only bind a more specific address when it is done by the
same uid or by root.

This code is from FreeBSD. (Whilst it was originally obtained from OpenBSD,
FreeBSD fixed it to work with multicast. To quote the commit message:
    - Don't bother checking for conflicting sockets if we're binding to a
      multicast address.
    - Don't return an error if we're binding to INADDR_ANY, the conflicting
      socket is bound to INADDR_ANY, and the conflicting socket has
      SO_REUSEPORT set.
)

Revision 1.29.4.2 / (download) - annotate - [select for diffs], Mon Jan 25 05:49:42 1999 UTC (25 years, 1 month ago) by cgd
Branch: netbsd-1-3
Changes since 1.29.4.1: +22 -10 lines
Diff to previous 1.29.4.1 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored) to selected 1.69 (colored)

Patch to fix select(2)/accept(2) race condition which permits DoS.  (mycroft)

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jan 21 22:09:10 1999 UTC (25 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.42: +11 -7 lines
Diff to previous 1.42 (colored) to selected 1.69 (colored)

Do remove sockets on so_q0, since select(2) and accept(2) do not (currently?)
return them.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jan 20 20:24:12 1999 UTC (25 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored) to selected 1.69 (colored)

Oops; previous was slightly broken.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jan 20 09:15:41 1999 UTC (25 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.40: +21 -13 lines
Diff to previous 1.40 (colored) to selected 1.69 (colored)

Do not remove sockets from the accept(2) queue on close.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Dec 16 00:26:10 1998 UTC (25 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +5 -1 lines
Diff to previous 1.39 (colored) to selected 1.69 (colored)

In the sosend() loop, if the residual count is > 0 before calling PRU_SEND,
set SS_MORETOCOME as a hint to the lower layer that more data is coming
on the next iteration of the loop.  Clear the flag after the PRU_SEND
call.

Suggested by Justin Walker <justin@apple.com> on the freebsd-net
mailing list.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Sep 25 23:32:27 1998 UTC (25 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.38: +5 -1 lines
Diff to previous 1.38 (colored) to selected 1.69 (colored)

Fix spl problem in socreate (which lead to the corruption of the
socket pool).

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Sat Aug 8 03:06:58 1998 UTC (25 years, 7 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.35: +8 -8 lines
Diff to previous 1.35 (colored) next main 1.36 (colored) to selected 1.69 (colored)

Revert cdevsw mmap routines to return int.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:17 1998 UTC (25 years, 7 months ago) by perry
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored) to selected 1.69 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.37 / (download) - annotate - [select for diffs], Sun Aug 2 04:53:12 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.36: +14 -3 lines
Diff to previous 1.36 (colored) to selected 1.69 (colored)

Use the pool allocator for sockets.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:52 1998 UTC (25 years, 7 months ago) by perry
Branch: MAIN
Changes since 1.35: +8 -8 lines
Diff to previous 1.35 (colored) to selected 1.69 (colored)

fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jun 25 23:41:20 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.34: +3 -1 lines
Diff to previous 1.34 (colored) to selected 1.69 (colored)

defopt COMPAT_SUNOS

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 27 13:31:45 1998 UTC (25 years, 10 months ago) by kleink
Branch: MAIN
Changes since 1.33: +9 -7 lines
Diff to previous 1.33 (colored) to selected 1.69 (colored)

In soshutdown(), decouple the evaluation of the `how' argument from FREAD
and FWRITE; use SHUT_{RD,WR,RDWR} instead.
Also, return EINVAL if `how' is invalid.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Apr 25 17:35:18 1998 UTC (25 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.32: +3 -1 lines
Diff to previous 1.32 (colored) to selected 1.69 (colored)

Hook for 0-copy (or other optimized) sends and receives

Revision 1.32 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:34 1998 UTC (26 years ago) by fvdl
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored) to selected 1.69 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:08 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +28 -12 lines
Diff to previous 1.1.1.2 (colored) to selected 1.69 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:09:51 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +75 -42 lines
Diff to previous 1.1.1.1 (colored) to selected 1.69 (colored)

Import 4.4BSD-Lite for reference

Revision 1.29.4.1 / (download) - annotate - [select for diffs], Fri Jan 30 19:24:12 1998 UTC (26 years, 1 month ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001
Changes since 1.29: +9 -7 lines
Diff to previous 1.29 (colored) to selected 1.69 (colored)

Pull up 1.30 and 1.31 (thorpej)

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jan 7 23:47:08 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +8 -6 lines
Diff to previous 1.30 (colored) to selected 1.69 (colored)

Make insertion and removal of sockets from the partial and incoming
connections queues O(C) rather than O(N).

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jan 5 09:12:29 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) to selected 1.69 (colored)

From 4.4BSD-Lite2 (noted by Frank van der Linden):
so_linger is used as an argument to tsleep(), so was stuffed with
clockticks for the TCP linger time.  However, so_linger is set directly from
l_linger if the linger time is specified, and l_linger is seconds (although
this is not currently documented anywhere).  Fix this to set the TCP
linger time in seconds, and multiply so_linger by hz when tsleep() is
called to actually perform the linger.

Revision 1.28.4.1 / (download) - annotate - [select for diffs], Thu Aug 28 00:12:14 1997 UTC (26 years, 6 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.28: +5 -3 lines
Diff to previous 1.28 (colored) next main 1.29 (colored) to selected 1.69 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Aug 27 07:10:01 1997 UTC (26 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-BETA, marc-pcmcia-base
Branch point for: netbsd-1-3
Changes since 1.28: +5 -3 lines
Diff to previous 1.28 (colored) to selected 1.69 (colored)

Fix a mbuf leak in sosend() when we have a negative residual count.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jun 24 20:04:45 1997 UTC (26 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.27: +27 -4 lines
Diff to previous 1.27 (colored) to selected 1.69 (colored)

In sosetopt():
- Disallow < 1 values for SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT, and
  SO_RCVLOWAT; return EINVAL if the user attempts to set <= 0.
  Inspired by PR #3770, from Havard Eidnes <he@vader.runit.sintef.no>.
- For SO_SNDLOWAT and SO_RCVLOWAT, don't let the low-water mark get
  set above the high-water mark.  Behavior is now consistent with
  BSD/OS: If such an attempt is made, silently truncate to the high-water
  value.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jun 11 10:04:09 1997 UTC (26 years, 9 months ago) by kleink
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored) to selected 1.69 (colored)

Calculate returned timeval correctly when using SO_SNDTIMEO/SO_RCVTIME;
from Koji Imada <koji@math.human.nagoya-u.ac.jp> in PR/3682.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jan 11 05:15:01 1997 UTC (27 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored) to selected 1.69 (colored)

Implement SO_TIMESTAMP socket option: receive a timeval timestamp
as a control message with a datagram.

Revision 1.21.4.2 / (download) - annotate - [select for diffs], Wed Dec 11 03:27:58 1996 UTC (27 years, 3 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.21.4.1: +35 -26 lines
Diff to previous 1.21.4.1 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored) to selected 1.69 (colored)

From trunk:
Eliminate SS_PRIV; instead, pass down a proc pointer to the usrreq methods
that need it.

Revision 1.21.4.1 / (download) - annotate - [select for diffs], Fri Dec 6 02:29:04 1996 UTC (27 years, 3 months ago) by rat
Branch: netbsd-1-2
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored) to selected 1.69 (colored)

Pullup request 1.24 -> 1.25 from Michael Graff <explorer@flame.org>

Fixes bug that caused kernel to crash when ``traceroute host 7000'' was
executed.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Aug 14 05:53:18 1996 UTC (27 years, 7 months ago) by explorer
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored) to selected 1.69 (colored)

This fixes a nasty little bug where traceroute (and other raw-ip sending
programs which attach their own header) can crash the machine.  The problem
in this case was:
	a variable "space" was set to the total data to copy,
	len was used to remember how much to copy in this chunk (mbuf),
	in one case, len = min(MCLBYTES - max_hdr, resid) but
		size -= MCLBYTES;
	 instead of
		size -= len;

Note that userland programs can still crash the machine by providing
bogus data in the ip->ip_len field I suspect.  I haven't verified this,
but will soon be doing so and applying a fix of some sort.  Probably
clamping the ip->ip_len value to the true packet size will be ok.

Revision 1.24 / (download) - annotate - [select for diffs], Wed May 22 19:06:07 1996 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored) to selected 1.69 (colored)

And PRU_SEND.

Revision 1.23 / (download) - annotate - [select for diffs], Wed May 22 19:00:52 1996 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored) to selected 1.69 (colored)

PRU_CONNECT also needs a proc pointer.

Revision 1.22 / (download) - annotate - [select for diffs], Wed May 22 13:54:58 1996 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +35 -26 lines
Diff to previous 1.21 (colored) to selected 1.69 (colored)

Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Feb 4 02:17:52 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.20: +38 -44 lines
Diff to previous 1.20 (colored) to selected 1.69 (colored)

First pass at prototyping

Revision 1.20 / (download) - annotate - [select for diffs], Sat Aug 12 23:59:11 1995 UTC (28 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.19: +13 -13 lines
Diff to previous 1.19 (colored) to selected 1.69 (colored)

splnet --> splsoftnet

Revision 1.19 / (download) - annotate - [select for diffs], Tue May 23 00:19:30 1995 UTC (28 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.69 (colored)

properly determine if send/rcv timeout values are out of range.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Apr 22 19:43:04 1995 UTC (28 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.17: +6 -3 lines
Diff to previous 1.17 (colored) to selected 1.69 (colored)

- new copyargs routine.
- use emul_xxx
- deprecate nsysent; use constant SYS_MAXSYSCALL instead.
- deprecate ep_setup
- call sendsig and setregs indirectly.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Oct 30 21:48:07 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.16: +6 -6 lines
Diff to previous 1.16 (colored) to selected 1.69 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jun 29 06:33:37 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored) to selected 1.69 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 13 06:01:37 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +41 -20 lines
Diff to previous 1.14 (colored) to selected 1.69 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.14 / (download) - annotate - [select for diffs], Wed May 4 11:24:06 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +6 -1 lines
Diff to previous 1.13 (colored) to selected 1.69 (colored)

More return types...

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 25 08:47:50 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.69 (colored)

Remove another bit of that.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Apr 25 08:41:03 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.69 (colored)

Remove a piece of the previous patch.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Apr 25 08:22:07 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +10 -10 lines
Diff to previous 1.10 (colored) to selected 1.69 (colored)

Minor cleanup.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 23 06:06:27 1994 UTC (30 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +5 -1 lines
Diff to previous 1.9 (colored) to selected 1.69 (colored)

more COMPAT_SUNOS changes.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:28 1993 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +14 -14 lines
Diff to previous 1.8 (colored) to selected 1.69 (colored)

Canonicalize all #includes.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Fri Dec 10 13:16:44 1993 UTC (30 years, 3 months ago) by pk
Branch: magnum
Changes since 1.6.2.2: +5 -1 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.69 (colored)

Always set BROADCAST flag in DGRAM sockets in SunOS emulation procs.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Sat Nov 6 00:07:55 1993 UTC (30 years, 4 months ago) by mycroft
Branch: magnum
Changes since 1.6.2.1: +30 -28 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) to selected 1.69 (colored)

Merge changes from trunk.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 5 23:00:27 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.7: +3 -13 lines
Diff to previous 1.7 (colored) to selected 1.69 (colored)

fix from david greenman, davidg@freefall.cdrom.com:
sosend was attempting to reserve space in an mbuf cluster for a datagram
header and because of bugs in the sosend's mbuf allocation algorithm,
sosend was calling uiomove twice as many times as was necessary. It turns
out that PREPEND does the right thing when a cluster is associated with
an mbuf header, so the datagram header allocation can be defered. This
also ends up additionally consuming one less mbuf for the TCP protocol
because TCP always allocates another header mbuf regardless if space is
available to prepend the protocol header. The net result of this fix is
that unix domain and pipe throughput is increased by a measured 10%.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Oct 26 22:36:25 1993 UTC (30 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.6: +15 -3 lines
Diff to previous 1.6 (colored) to selected 1.69 (colored)

BSDI official patch #14:
SUMMARY:
    Here is a patch for a kernel hang that can be provoked with a write
    or send of a negative amount.  The talk program is capable of exercising
    this bug.  This patch also includes a fix for a bug that caused data
    to be delivered to TCP in smaller chunks than desired, and which caused
    TCP to send a short packet when starting up.  Finally, there is a bug
    fix for MSG_PEEK with an oobmark pending.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Fri Sep 24 08:51:53 1993 UTC (30 years, 6 months ago) by mycroft
Branch: magnum
Changes since 1.6: +3 -1 lines
Diff to previous 1.6 (colored) to selected 1.69 (colored)

Make all files using spl*() #include cpu.h.  Changes from trunk.
init_main.c: New method of pseudo-device of initialization.
kern_clock.c: hardclock() and softclock() now take a pointer to a clockframe.
softclock() only does callouts.
kern_synch.c: Remove spurious declaration of endtsleep().  Adjust uses of
averunnable for new struct loadav.
subr_prf.c: Allow printf() formats in panic().
tty.c: averunnable changes.
vfs_subr.c: va_size and va_bytes are now quads.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Sep 8 21:12:49 1993 UTC (30 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored) to selected 1.69 (colored)

Patch from David Greenman to reduce CPU usage during network transmit.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 3 02:45:20 1993 UTC (30 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored) to selected 1.69 (colored)

Nuke an extra `||' Chris inserted.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 3 01:36:10 1993 UTC (30 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored) to selected 1.69 (colored)

fix from Garrett Wollman <wollman@emba.uvm.edu> to return EPROTONOTSUPP
if user tries to get a socket for a protocol with no usrreq function

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 27 06:08:15 1993 UTC (30 years, 8 months ago) by andrew
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.2: +34 -8 lines
Diff to previous 1.2 (colored) to selected 1.69 (colored)

* ansifications
* Yuval Yarom's socket recv(2) fixes, to prevent incorrect blocking and
  lack thereof with recv(2) and MSG_WAITALL.  Fixes a sbdrop() panic during
  some MSG_WAITALL recv(2) sleeps.  Access rights fix (also in
  uipc_syscalls.c) too.  A test program which shows these problems is
  available.

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 18 18:19:36 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.1: +4 -6 lines
Diff to previous 1.1 (colored) to selected 1.69 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.69 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: MAIN
Diff to selected 1.69 (colored)

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>