Up to [cvs.NetBSD.org] / src / sys / kern
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.309 / (download) - annotate - [select for diffs], Sun Feb 11 13:01:29 2024 UTC (2 months, 1 week ago) by jdolecek
Branch: MAIN
CVS Tags: HEAD
Changes since 1.308: +13 -2
lines
Diff to previous 1.308 (colored) to selected 1.282 (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.308 / (download) - annotate - [select for diffs], Sat Feb 3 19:05:14 2024 UTC (2 months, 2 weeks ago) by jdolecek
Branch: MAIN
Changes since 1.307: +22 -15
lines
Diff to previous 1.307 (colored) to selected 1.282 (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 (5 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.282 (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 (6 months ago) by ad
Branch: MAIN
Changes since 1.305: +8 -25
lines
Diff to previous 1.305 (colored) to selected 1.282 (colored)
Use cv_fdrestart() to implement fo_restart.
Revision 1.305 / (download) - annotate - [select for diffs], Wed Oct 4 22:17:09 2023 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.304: +3 -3
lines
Diff to previous 1.304 (colored) to selected 1.282 (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 (7 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.303: +4 -4
lines
Diff to previous 1.303 (colored) to selected 1.282 (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 (8 months, 2 weeks ago) by andvar
Branch: MAIN
Changes since 1.302: +3 -3
lines
Diff to previous 1.302 (colored) to selected 1.282 (colored)
s/acccept/accept/ in comment.
Revision 1.302 / (download) - annotate - [select for diffs], Sat Apr 9 23:52:22 2022 UTC (2 years 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.282 (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, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.300: +4 -3
lines
Diff to previous 1.300 (colored) to selected 1.282 (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, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.299: +29 -2
lines
Diff to previous 1.299 (colored) to selected 1.282 (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, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.298: +4 -4
lines
Diff to previous 1.298 (colored) to selected 1.282 (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, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.297: +5 -5
lines
Diff to previous 1.297 (colored) to selected 1.282 (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, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.296: +6 -8
lines
Diff to previous 1.296 (colored) to selected 1.282 (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, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.295: +5 -5
lines
Diff to previous 1.295 (colored) to selected 1.282 (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, 8 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.282 (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.294 / (download) - annotate - [select for diffs], Fri Dec 11 03:00:09 2020 UTC (3 years, 4 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.282 (colored)
Use sel{record,remove}_knote().
Revision 1.293 / (download) - annotate - [select for diffs], Mon Nov 23 00:52:53 2020 UTC (3 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.292: +6 -6
lines
Diff to previous 1.292 (colored) to selected 1.282 (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, 6 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.282 (colored)
Setting a socket buffer size stops autoscaling. Add a sysctl to prevent this behaviour. The default is not changed.
Revision 1.291 / (download) - annotate - [select for diffs], Wed Aug 26 22:54:30 2020 UTC (3 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.290: +3 -2
lines
Diff to previous 1.290 (colored) to selected 1.282 (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, 10 months ago) by maxv
Branch: MAIN
Changes since 1.289: +6 -4
lines
Diff to previous 1.289 (colored) to selected 1.282 (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, 11 months ago) by jakllsch
Branch: MAIN
Changes since 1.288: +4 -5
lines
Diff to previous 1.288 (colored) to selected 1.282 (colored)
Implement SCTP bug fixes found by maxv@. Adding these seems to improve the SCTP situation.
Revision 1.288 / (download) - annotate - [select for diffs], Sat Feb 22 08:39:33 2020 UTC (4 years, 1 month 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.282 (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, 1 month ago) by joerg
Branch: MAIN
Changes since 1.286: +3 -3
lines
Diff to previous 1.286 (colored) to selected 1.282 (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, 2 months ago) by christos
Branch: MAIN
Changes since 1.285: +5 -2
lines
Diff to previous 1.285 (colored) to selected 1.282 (colored)
PR/54435: Valery Ushakov: Clear urgent status after reading urgent data, so that poll(2) works.
Revision 1.285 / (download) - annotate - [select for diffs], Mon Oct 14 16:27:03 2019 UTC (4 years, 6 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.282 (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, 6 months ago) by pgoyette
Branch: MAIN
Changes since 1.283: +3 -3
lines
Diff to previous 1.283 (colored) to selected 1.282 (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, 7 months ago) by mlelstv
Branch: MAIN
Changes since 1.282: +3 -3
lines
Diff to previous 1.282 (colored)
Fix build.
Revision 1.282 / (download) - annotate - [selected], Sat Sep 14 14:09:54 2019 UTC (4 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.281: +9 -10
lines
Diff to previous 1.281 (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, 9 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.282 (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.280 / (download) - annotate - [select for diffs], Sat Jun 1 15:20:51 2019 UTC (4 years, 10 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.282 (colored)
Add XXXs for SCTP bugs.
Revision 1.279 / (download) - annotate - [select for diffs], Wed May 8 14:05:18 2019 UTC (4 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.278: +6 -12
lines
Diff to previous 1.278 (colored) to selected 1.282 (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 (5 years 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.282 (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 (5 years ago) by pgoyette
Branch: MAIN
Changes since 1.276: +4 -2
lines
Diff to previous 1.276 (colored) to selected 1.282 (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 (5 years ago) by pgoyette
Branch: MAIN
Changes since 1.275: +4 -2
lines
Diff to previous 1.275 (colored) to selected 1.282 (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 (5 years ago) by pgoyette
Branch: MAIN
Changes since 1.274: +29 -54
lines
Diff to previous 1.274 (colored) to selected 1.282 (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 (5 years ago) by maxv
Branch: MAIN
Changes since 1.273: +6 -2
lines
Diff to previous 1.273 (colored) to selected 1.282 (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 (5 years ago) by maxv
Branch: MAIN
Changes since 1.272: +3 -2
lines
Diff to previous 1.272 (colored) to selected 1.282 (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 (5 years ago) by maxv
Branch: MAIN
Changes since 1.271: +9 -3
lines
Diff to previous 1.271 (colored) to selected 1.282 (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, 1 month ago) by maxv
Branch: MAIN
Changes since 1.270: +2 -12
lines
Diff to previous 1.270 (colored) to selected 1.282 (colored)
Remove getsombuf(), unused.
Revision 1.270 / (download) - annotate - [select for diffs], Thu Mar 7 12:22:43 2019 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.269: +96 -106
lines
Diff to previous 1.269 (colored) to selected 1.282 (colored)
style
Revision 1.269 / (download) - annotate - [select for diffs], Mon Feb 4 04:18:27 2019 UTC (5 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.268: +4 -2
lines
Diff to previous 1.268 (colored) to selected 1.282 (colored)
add a couple of fallthru comments.
Revision 1.268 / (download) - annotate - [select for diffs], Sat Dec 22 14:28:56 2018 UTC (5 years, 3 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.282 (colored)
Replace M_ALIGN and MH_ALIGN by m_align.
Revision 1.267 / (download) - annotate - [select for diffs], Wed Nov 7 09:58:19 2018 UTC (5 years, 5 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.282 (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, 5 months ago) by christos
Branch: MAIN
Changes since 1.265: +38 -2
lines
Diff to previous 1.265 (colored) to selected 1.282 (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.265 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (5 years, 7 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.282 (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.264 / (download) - annotate - [select for diffs], Wed Jun 6 09:46:46 2018 UTC (5 years, 10 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.282 (colored)
Separate receive socket errors from general socket errors.
Revision 1.263 / (download) - annotate - [select for diffs], Thu Apr 26 19:50:09 2018 UTC (5 years, 11 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.282 (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, 11 months ago) by maxv
Branch: MAIN
Changes since 1.261: +3 -3
lines
Diff to previous 1.261 (colored) to selected 1.282 (colored)
Remove unused mbuf argument from sbsavetimestamp.
Revision 1.261 / (download) - annotate - [select for diffs], Mon Mar 19 16:32:30 2018 UTC (6 years, 1 month 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.282 (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, 1 month ago) by roy
Branch: MAIN
Changes since 1.259: +3 -4
lines
Diff to previous 1.259 (colored) to selected 1.282 (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.259 / (download) - annotate - [select for diffs], Thu Jan 4 01:42:25 2018 UTC (6 years, 3 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.282 (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, 3 months ago) by christos
Branch: MAIN
Changes since 1.257: +8 -4
lines
Diff to previous 1.257 (colored) to selected 1.282 (colored)
make sure that we have enough space, don't require the exact size (Tom Ivar Helbekkmo)
Revision 1.257 / (download) - annotate - [select for diffs], Wed Oct 25 08:12:39 2017 UTC (6 years, 5 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.282 (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.256 / (download) - annotate - [select for diffs], Thu Jul 6 17:42:39 2017 UTC (6 years, 9 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.282 (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, 10 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.282 (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, 10 months ago) by christos
Branch: MAIN
Changes since 1.253: +10 -8
lines
Diff to previous 1.253 (colored) to selected 1.282 (colored)
switch to a switch
Revision 1.253 / (download) - annotate - [select for diffs], Mon May 1 10:00:43 2017 UTC (6 years, 11 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.282 (colored)
whitespace police
Revision 1.252 / (download) - annotate - [select for diffs], Thu Oct 13 19:10:23 2016 UTC (7 years, 6 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.282 (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, 6 months ago) by dholland
Branch: MAIN
Changes since 1.250: +3 -3
lines
Diff to previous 1.250 (colored) to selected 1.282 (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, 6 months ago) by dholland
Branch: MAIN
Changes since 1.249: +6 -6
lines
Diff to previous 1.249 (colored) to selected 1.282 (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.249 / (download) - annotate - [select for diffs], Sun Oct 2 19:26:46 2016 UTC (7 years, 6 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.282 (colored)
more MFREE -> m_free
Revision 1.248 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:15 2016 UTC (7 years, 10 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.282 (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.247 / (download) - annotate - [select for diffs], Tue Oct 13 21:28:35 2015 UTC (8 years, 6 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.282 (colored)
Add core networking support for SCTP.
Revision 1.246 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:26 2015 UTC (8 years, 7 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.282 (colored)
sprinkle _KERNEL_OPT
Revision 1.245 / (download) - annotate - [select for diffs], Sat May 9 15:22:47 2015 UTC (8 years, 11 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.282 (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, 11 months ago) by rtr
Branch: MAIN
Changes since 1.243: +3 -3
lines
Diff to previous 1.243 (colored) to selected 1.282 (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, 11 months ago) by rtr
Branch: MAIN
Changes since 1.242: +3 -3
lines
Diff to previous 1.242 (colored) to selected 1.282 (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, 11 months ago) by rtr
Branch: MAIN
Changes since 1.241: +3 -4
lines
Diff to previous 1.241 (colored) to selected 1.282 (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, 11 months ago) by rtr
Branch: MAIN
Changes since 1.240: +9 -4
lines
Diff to previous 1.240 (colored) to selected 1.282 (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, 11 months ago) by rtr
Branch: MAIN
Changes since 1.239: +11 -6
lines
Diff to previous 1.239 (colored) to selected 1.282 (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, 11 months ago) by rtr
Branch: MAIN
Changes since 1.238: +3 -3
lines
Diff to previous 1.238 (colored) to selected 1.282 (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.238 / (download) - annotate - [select for diffs], Sun Apr 5 23:19:56 2015 UTC (9 years 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.282 (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 (9 years ago) by rtr
Branch: MAIN
Changes since 1.236: +6 -2
lines
Diff to previous 1.236 (colored) to selected 1.282 (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 (9 years ago) by rtr
Branch: MAIN
Changes since 1.235: +3 -3
lines
Diff to previous 1.235 (colored) to selected 1.282 (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, 7 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.282 (colored)
Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get a correctly typed pointer.
Revision 1.234 / (download) - annotate - [select for diffs], Sat Aug 9 05:33:00 2014 UTC (9 years, 8 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.282 (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, 8 months ago) by rtr
Branch: MAIN
Changes since 1.232: +4 -6
lines
Diff to previous 1.232 (colored) to selected 1.282 (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, 8 months ago) by rtr
Branch: MAIN
Changes since 1.231: +4 -4
lines
Diff to previous 1.231 (colored) to selected 1.282 (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, 8 months ago) by rtr
Branch: MAIN
Changes since 1.230: +5 -5
lines
Diff to previous 1.230 (colored) to selected 1.282 (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, 8 months ago) by mrg
Branch: MAIN
Changes since 1.229: +3 -4
lines
Diff to previous 1.229 (colored) to selected 1.282 (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, 8 months ago) by rtr
Branch: MAIN
Changes since 1.228: +4 -6
lines
Diff to previous 1.228 (colored) to selected 1.282 (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, 8 months ago) by rtr
Branch: MAIN
Changes since 1.227: +3 -4
lines
Diff to previous 1.227 (colored) to selected 1.282 (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, 8 months ago) by rtr
Branch: MAIN
Changes since 1.226: +4 -6
lines
Diff to previous 1.226 (colored) to selected 1.282 (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, 8 months ago) by rtr
Branch: MAIN
Changes since 1.225: +9 -7
lines
Diff to previous 1.225 (colored) to selected 1.282 (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, 9 months ago) by rtr
Branch: MAIN
Changes since 1.224: +3 -4
lines
Diff to previous 1.224 (colored) to selected 1.282 (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.224 / (download) - annotate - [select for diffs], Mon May 19 02:51:24 2014 UTC (9 years, 11 months ago) by rmind
Branch: MAIN
Changes since 1.223: +17 -15
lines
Diff to previous 1.223 (colored) to selected 1.282 (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.223 / (download) - annotate - [select for diffs], Sun May 18 14:46:15 2014 UTC (9 years, 11 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.282 (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, 11 months ago) by rmind
Branch: MAIN
Changes since 1.221: +62 -56
lines
Diff to previous 1.221 (colored) to selected 1.282 (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, 1 month 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.282 (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.220 / (download) - annotate - [select for diffs], Sat Nov 2 20:09:33 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.219: +3 -3
lines
Diff to previous 1.219 (colored) to selected 1.282 (colored)
PR/48098: Brian Marcotte: panic: kernel diagnostic assertion "cred != NULL": Fix from Michael van Elst, tcpdrop crashes kernel on ebryonic connections.
Revision 1.219 / (download) - annotate - [select for diffs], Thu Oct 17 20:57:06 2013 UTC (10 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.218: +4 -3
lines
Diff to previous 1.218 (colored) to selected 1.282 (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, 6 months ago) by seanb
Branch: MAIN
Changes since 1.217: +3 -2
lines
Diff to previous 1.217 (colored) to selected 1.282 (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, 7 months ago) by rmind
Branch: MAIN
Changes since 1.216: +3 -7
lines
Diff to previous 1.216 (colored) to selected 1.282 (colored)
Remove SS_ISCONFIRMING, it is unused and TP4 will not come back.
Revision 1.216 / (download) - annotate - [select for diffs], Fri Aug 2 20:00:33 2013 UTC (10 years, 8 months ago) by spz
Branch: MAIN
Changes since 1.215: +3 -3
lines
Diff to previous 1.215 (colored) to selected 1.282 (colored)
Fix an inversion in checking for authorization to drop TCP connections found (and the obvious fix suggested) by Sander Bos.
Revision 1.215 / (download) - annotate - [select for diffs], Mon Apr 8 21:12:33 2013 UTC (11 years 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.282 (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, 1 month 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.282 (colored)
Add comment questioning lock asymmetry.
Revision 1.213 / (download) - annotate - [select for diffs], Thu Feb 14 21:57:58 2013 UTC (11 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.212: +4 -2
lines
Diff to previous 1.212 (colored) to selected 1.282 (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.212 / (download) - annotate - [select for diffs], Mon Oct 8 19:20:45 2012 UTC (11 years, 6 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.282 (colored)
put all kern socket sysctls in the same place
Revision 1.211 / (download) - annotate - [select for diffs], Mon Jul 9 04:35:13 2012 UTC (11 years, 9 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.282 (colored)
in soreceive(), handle uios larger than 31 bits. fixes the remaining problem in PR 43240.
Revision 1.210 / (download) - annotate - [select for diffs], Fri Mar 16 06:47:37 2012 UTC (12 years, 1 month 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.282 (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.209 / (download) - annotate - [select for diffs], Wed Feb 1 02:27:23 2012 UTC (12 years, 2 months 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.282 (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, 2 months ago) by para
Branch: MAIN
Changes since 1.207: +2 -20
lines
Diff to previous 1.207 (colored) to selected 1.282 (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, 2 months ago) by christos
Branch: MAIN
Changes since 1.206: +6 -3
lines
Diff to previous 1.206 (colored) to selected 1.282 (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, 4 months ago) by christos
Branch: MAIN
Changes since 1.205: +7 -5
lines
Diff to previous 1.205 (colored) to selected 1.282 (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.205 / (download) - annotate - [select for diffs], Sat Jul 2 17:53:50 2011 UTC (12 years, 9 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.282 (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, 9 months ago) by christos
Branch: MAIN
Changes since 1.203: +10 -5
lines
Diff to previous 1.203 (colored) to selected 1.282 (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.203 / (download) - annotate - [select for diffs], Tue Feb 1 01:39:20 2011 UTC (13 years, 2 months 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.282 (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, 3 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.282 (colored)
Include internal definitions (uvm/uvm.h) only where necessary.
Revision 1.201 / (download) - annotate - [select for diffs], Thu Oct 14 03:07:51 2010 UTC (13 years, 6 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.282 (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.200 / (download) - annotate - [select for diffs], Wed Dec 30 22:12:12 2009 UTC (14 years, 3 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.282 (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, 3 months ago) by elad
Branch: MAIN
Changes since 1.198: +3 -5
lines
Diff to previous 1.198 (colored) to selected 1.282 (colored)
Use credentials from the socket.
Revision 1.198 / (download) - annotate - [select for diffs], Tue Dec 29 04:23:43 2009 UTC (14 years, 3 months ago) by elad
Branch: MAIN
Changes since 1.197: +4 -2
lines
Diff to previous 1.197 (colored) to selected 1.282 (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, 3 months ago) by elad
Branch: MAIN
Changes since 1.196: +2 -4
lines
Diff to previous 1.196 (colored) to selected 1.282 (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, 4 months ago) by dsl
Branch: MAIN
Changes since 1.195: +33 -9
lines
Diff to previous 1.195 (colored) to selected 1.282 (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, 4 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.282 (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, 5 months ago) by cegger
Branch: MAIN
Changes since 1.193: +3 -3
lines
Diff to previous 1.193 (colored) to selected 1.282 (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, 6 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.282 (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, 6 months ago) by elad
Branch: MAIN
Changes since 1.191: +7 -2
lines
Diff to previous 1.191 (colored) to selected 1.282 (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, 6 months ago) by elad
Branch: MAIN
Changes since 1.190: +56 -2
lines
Diff to previous 1.190 (colored) to selected 1.282 (colored)
Move some of the socket policy back to the subsystem. Remove include we don't need in the secmodel code.
Revision 1.190 / (download) - annotate - [select for diffs], Fri Sep 11 22:06:29 2009 UTC (14 years, 7 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.282 (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.189 / (download) - annotate - [select for diffs], Thu Apr 30 20:41:33 2009 UTC (14 years, 11 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.282 (colored)
PR kern/41311: Mutex error: mutex_vector_enter: locking against myself
Revision 1.188 / (download) - annotate - [select for diffs], Sat Apr 4 10:12:51 2009 UTC (15 years 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.282 (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, 1 month ago) by cegger
Branch: MAIN
Changes since 1.186: +3 -3
lines
Diff to previous 1.186 (colored) to selected 1.282 (colored)
ansify function definitions
Revision 1.186 / (download) - annotate - [select for diffs], Fri Jan 23 15:40:19 2009 UTC (15 years, 2 months 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.282 (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, 3 months ago) by yamt
Branch: MAIN
Changes since 1.184: +3 -3
lines
Diff to previous 1.184 (colored) to selected 1.282 (colored)
restore the pre socket locking patch signal behaviour. this fixes a busy-loop in nfs_connect.
Revision 1.184 / (download) - annotate - [select for diffs], Mon Jan 19 02:27:57 2009 UTC (15 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.183: +9 -4
lines
Diff to previous 1.183 (colored) to selected 1.282 (colored)
Provide compatibility to the old timeval SCM_TIMESTAMP messages.
Revision 1.183 / (download) - annotate - [select for diffs], Thu Jan 15 15:29:10 2009 UTC (15 years, 3 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.282 (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, 3 months ago) by christos
Branch: MAIN
Changes since 1.181: +5 -5
lines
Diff to previous 1.181 (colored) to selected 1.282 (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, 3 months ago) by christos
Branch: MAIN
Changes since 1.180: +3 -5
lines
Diff to previous 1.180 (colored) to selected 1.282 (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, 3 months ago) by cegger
Branch: MAIN
Changes since 1.179: +4 -2
lines
Diff to previous 1.179 (colored) to selected 1.282 (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, 3 months ago) by christos
Branch: MAIN
Changes since 1.178: +49 -14
lines
Diff to previous 1.178 (colored) to selected 1.282 (colored)
version get/set send/recv timeout setsockopt.
Revision 1.178 / (download) - annotate - [select for diffs], Sun Dec 7 20:58:46 2008 UTC (15 years, 4 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.282 (colored)
Move some sysctl node creations away from linksets and into the constructors for subsystems. XXX: CTLFLAG_PERMANENT is non-sensible.
Revision 1.177 / (download) - annotate - [select for diffs], Tue Oct 14 13:45:26 2008 UTC (15 years, 6 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.282 (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, 6 months ago) by plunky
Branch: MAIN
Changes since 1.175: +40 -20
lines
Diff to previous 1.175 (colored) to selected 1.282 (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, 6 months ago) by tls
Branch: MAIN
Changes since 1.174: +2 -8
lines
Diff to previous 1.174 (colored) to selected 1.282 (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, 6 months ago) by pooka
Branch: MAIN
Changes since 1.173: +3 -2
lines
Diff to previous 1.173 (colored) to selected 1.282 (colored)
Move uidinfo to its own module in kern_uidinfo.c and include in rump. No functional change to uidinfo.
Revision 1.173 / (download) - annotate - [select for diffs], Fri Oct 10 19:49:49 2008 UTC (15 years, 6 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.282 (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, 6 months ago) by ad
Branch: MAIN
Changes since 1.171: +9 -6
lines
Diff to previous 1.171 (colored) to selected 1.282 (colored)
Redo 1.169 correctly (dsl's fix doesn't do what I intended, either!).
Revision 1.171 / (download) - annotate - [select for diffs], Wed Aug 6 15:01:23 2008 UTC (15 years, 8 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.282 (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, 8 months ago) by tls
Branch: MAIN
Changes since 1.169: +26 -2
lines
Diff to previous 1.169 (colored) to selected 1.282 (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.169 / (download) - annotate - [select for diffs], Fri Jul 25 22:45:58 2008 UTC (15 years, 8 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.282 (colored)
Remove all the pending connections in soclose(). 'continue' in 'do .. while (0)' doesn't do what ad@ intended.
Revision 1.168 / (download) - annotate - [select for diffs], Wed Jun 18 09:06:27 2008 UTC (15 years, 10 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.282 (colored)
merge yamt-pf42 branch. (import newer pf from OpenBSD 4.2) ok'ed by peter@. requested by core@
Revision 1.167 / (download) - annotate - [select for diffs], Wed May 28 21:01:42 2008 UTC (15 years, 10 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.282 (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, 10 months ago) by ad
Branch: MAIN
Changes since 1.165: +3 -2
lines
Diff to previous 1.165 (colored) to selected 1.282 (colored)
Use pool_cache for sockets.
Revision 1.165 / (download) - annotate - [select for diffs], Sat May 24 18:43:02 2008 UTC (15 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.164: +3 -4
lines
Diff to previous 1.164 (colored) to selected 1.282 (colored)
Coverity CID 5015: Remove unnecessary test; if l was null we would have crashed before when p = l->l_proc.
Revision 1.164 / (download) - annotate - [select for diffs], Thu May 1 09:21:56 2008 UTC (15 years, 11 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.282 (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, 11 months ago) by ad
Branch: MAIN
Changes since 1.162: +5 -3
lines
Diff to previous 1.162 (colored) to selected 1.282 (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, 11 months ago) by martin
Branch: MAIN
Changes since 1.161: +2 -9
lines
Diff to previous 1.161 (colored) to selected 1.282 (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, 11 months ago) by ad
Branch: MAIN
Changes since 1.160: +11 -3
lines
Diff to previous 1.160 (colored) to selected 1.282 (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, 11 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.282 (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 (16 years 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.282 (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.158 / (download) - annotate - [select for diffs], Fri Mar 28 12:12:20 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.157: +5 -2
lines
Diff to previous 1.157 (colored) to selected 1.282 (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 (16 years ago) by ad
Branch: MAIN
Changes since 1.156: +5 -5
lines
Diff to previous 1.156 (colored) to selected 1.282 (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 (16 years 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.282 (colored)
merge yamt-lazymbuf branch.
Revision 1.155 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (16 years, 1 month 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.282 (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, 1 month 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.282 (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.153 / (download) - annotate - [select for diffs], Sat Mar 1 14:16:51 2008 UTC (16 years, 1 month ago) by rmind
Branch: MAIN
Changes since 1.152: +4 -3
lines
Diff to previous 1.152 (colored) to selected 1.282 (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, 1 month ago) by matt
Branch: MAIN
Changes since 1.151: +4 -4
lines
Diff to previous 1.151 (colored) to selected 1.282 (colored)
Convert stragglers to ansi definitions from old-style definitons. Remember that func() is not ansi, func(void) is.
Revision 1.151 / (download) - annotate - [select for diffs], Wed Feb 6 21:57:54 2008 UTC (16 years, 2 months 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.282 (colored)
Don't lock the socket to set/clear FNONBLOCK. Just set it atomically.
Revision 1.150 / (download) - annotate - [select for diffs], Sun Dec 16 21:25:59 2007 UTC (16 years, 4 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.282 (colored)
Make solisten() take an lwp pointer like the rest, so it can be passed down to pr_usrreq.
Revision 1.149 / (download) - annotate - [select for diffs], Wed Dec 5 17:19:59 2007 UTC (16 years, 4 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.282 (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, 4 months ago) by ad
Branch: MAIN
Changes since 1.147: +3 -3
lines
Diff to previous 1.147 (colored) to selected 1.282 (colored)
Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written for Solaris.
Revision 1.147 / (download) - annotate - [select for diffs], Sat Nov 24 07:49:03 2007 UTC (16 years, 4 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.282 (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, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.145: +11 -11
lines
Diff to previous 1.145 (colored) to selected 1.282 (colored)
Eliminate common subexpressions, creating variables 'atomic' and 'dom'.
Revision 1.145 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:24 2007 UTC (16 years, 5 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.282 (colored)
Merge from vmlocking: - pool_cache changes. - Debugger/procfs locking fixes. - Other minor changes.
Revision 1.144 / (download) - annotate - [select for diffs], Fri Oct 5 02:40:25 2007 UTC (16 years, 6 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.282 (colored)
Cosmetic: KNF. Shorten a staircase. Indent a complicated if-condition. This code remains hard to read.
Revision 1.143 / (download) - annotate - [select for diffs], Tue Sep 25 14:04:07 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.142: +6 -2
lines
Diff to previous 1.142 (colored) to selected 1.282 (colored)
Use selinit() / seldestroy().
Revision 1.142 / (download) - annotate - [select for diffs], Wed Sep 19 04:33:43 2007 UTC (16 years, 7 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.282 (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.141 / (download) - annotate - [select for diffs], Mon Aug 6 11:41:52 2007 UTC (16 years, 8 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.282 (colored)
sosetopt: clear SB_AUTOSIZE when setting buffer size explicitly.
Revision 1.140 / (download) - annotate - [select for diffs], Wed May 2 20:40:23 2007 UTC (16 years, 11 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.282 (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.139 / (download) - annotate - [select for diffs], Sun Apr 15 05:25:48 2007 UTC (17 years ago) by yamt
Branch: MAIN
Changes since 1.138: +9 -3
lines
Diff to previous 1.138 (colored) to selected 1.282 (colored)
- soabort: don't leak a socket on error. - add an assertion.
Revision 1.138 / (download) - annotate - [select for diffs], Tue Apr 3 23:44:53 2007 UTC (17 years 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.282 (colored)
socreate: l cannot be NULL. CID: 4314
Revision 1.137 / (download) - annotate - [select for diffs], Thu Mar 15 16:28:31 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.136: +8 -9
lines
Diff to previous 1.136 (colored) to selected 1.282 (colored)
sodopendfreel: Getting a bit over ambitious.. Go to splvm() before calling pool_cache_put().
Revision 1.136 / (download) - annotate - [select for diffs], Mon Mar 12 21:33:08 2007 UTC (17 years, 1 month 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.282 (colored)
Use mutexes/condvars.
Revision 1.135 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:34 2007 UTC (17 years, 1 month 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.282 (colored)
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing the pool's lock.
Revision 1.134 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:11 2007 UTC (17 years, 1 month 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.282 (colored)
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
Revision 1.133 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:45 2007 UTC (17 years, 2 months 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.282 (colored)
TRUE -> true, FALSE -> false
Revision 1.132 / (download) - annotate - [select for diffs], Wed Jan 17 12:21:34 2007 UTC (17 years, 3 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.282 (colored)
Use KAUTH_ARG().
Revision 1.131 / (download) - annotate - [select for diffs], Fri Dec 8 00:23:08 2006 UTC (17 years, 4 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.282 (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, 4 months ago) by christos
Branch: MAIN
Changes since 1.129: +11 -6
lines
Diff to previous 1.129 (colored) to selected 1.282 (colored)
simplify linger code.
Revision 1.129 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:59 2006 UTC (17 years, 5 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.282 (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, 5 months ago) by elad
Branch: MAIN
Changes since 1.127: +4 -3
lines
Diff to previous 1.127 (colored) to selected 1.282 (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, 5 months ago) by elad
Branch: MAIN
Changes since 1.126: +6 -2
lines
Diff to previous 1.126 (colored) to selected 1.282 (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.126 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:19 2006 UTC (17 years, 6 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.282 (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, 6 months ago) by elad
Branch: MAIN
Changes since 1.124: +2 -7
lines
Diff to previous 1.124 (colored) to selected 1.282 (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, 6 months ago) by elad
Branch: MAIN
Changes since 1.123: +4 -4
lines
Diff to previous 1.123 (colored) to selected 1.282 (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, 6 months ago) by elad
Branch: MAIN
Changes since 1.122: +7 -2
lines
Diff to previous 1.122 (colored) to selected 1.282 (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.122 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:11 2006 UTC (17 years, 9 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.282 (colored)
Use the LWP cached credentials where sane.
Revision 1.121 / (download) - annotate - [select for diffs], Wed Jun 21 12:55:12 2006 UTC (17 years, 10 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.282 (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.120 / (download) - annotate - [select for diffs], Tue Jun 13 21:19:56 2006 UTC (17 years, 10 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.282 (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.119 / (download) - annotate - [select for diffs], Thu May 25 14:27:28 2006 UTC (17 years, 10 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.282 (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.118 / (download) - annotate - [select for diffs], Sun May 14 21:15:12 2006 UTC (17 years, 11 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.282 (colored)
integrate kauth.
Revision 1.117 / (download) - annotate - [select for diffs], Tue Apr 11 09:32:58 2006 UTC (18 years 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.282 (colored)
sodopendfree/sodopendfreel: remove unused "so" argument.
Revision 1.116 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:21 2006 UTC (18 years, 1 month 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.282 (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 / (download) - annotate - [select for diffs], Tue Dec 27 00:00:29 2005 UTC (18 years, 3 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.282 (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, 4 months ago) by christos
Branch: MAIN
Changes since 1.113: +33 -29
lines
Diff to previous 1.113 (colored) to selected 1.282 (colored)
merge ktrace-lwp.
Revision 1.113 / (download) - annotate - [select for diffs], Thu Dec 8 03:13:18 2005 UTC (18 years, 4 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.282 (colored)
Sprinkle static.
Revision 1.112 / (download) - annotate - [select for diffs], Fri Oct 21 17:40:03 2005 UTC (18 years, 6 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.282 (colored)
Check the argument to SO_LINGER.
Revision 1.111 / (download) - annotate - [select for diffs], Sun May 8 18:44:39 2005 UTC (18 years, 11 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.282 (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, 11 months ago) by christos
Branch: MAIN
Changes since 1.109: +6 -6
lines
Diff to previous 1.109 (colored) to selected 1.282 (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.109 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:37 2005 UTC (19 years 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.282 (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.108 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:55 2005 UTC (19 years, 1 month 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.282 (colored)
nuke trailing whitespace
Revision 1.107 / (download) - annotate - [select for diffs], Fri Sep 3 18:14:09 2004 UTC (19 years, 7 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.282 (colored)
add a per-socket counter for dropped UDP packets when the internal buffers are full.
Revision 1.106 / (download) - annotate - [select for diffs], Wed Aug 25 09:03:23 2004 UTC (19 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.105: +9 -2
lines
Diff to previous 1.105 (colored) to selected 1.282 (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.105 / (download) - annotate - [select for diffs], Thu Aug 19 12:48:42 2004 UTC (19 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.104: +2 -4
lines
Diff to previous 1.104 (colored) to selected 1.282 (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.104 / (download) - annotate - [select for diffs], Thu Jul 1 12:42:57 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.103: +4 -4
lines
Diff to previous 1.103 (colored) to selected 1.282 (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.103 / (download) - annotate - [select for diffs], Tue May 25 04:30:32 2004 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
Changes since 1.102: +5 -3
lines
Diff to previous 1.102 (colored) to selected 1.282 (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, 11 months ago) by jonathan
Branch: MAIN
Changes since 1.101: +21 -23
lines
Diff to previous 1.101 (colored) to selected 1.282 (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, 11 months ago) by matt
Branch: MAIN
Changes since 1.100: +6 -8
lines
Diff to previous 1.100 (colored) to selected 1.282 (colored)
Use EVCNT_ATTACH_STATIC
Revision 1.100 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:41 2004 UTC (19 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.99: +3 -6
lines
Diff to previous 1.99 (colored) to selected 1.282 (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 (20 years ago) by matt
Branch: MAIN
Changes since 1.98: +6 -6
lines
Diff to previous 1.98 (colored) to selected 1.282 (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 (20 years ago) by christos
Branch: MAIN
Changes since 1.97: +25 -9
lines
Diff to previous 1.97 (colored) to selected 1.282 (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 (20 years, 1 month 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.282 (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, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.95: +3 -3
lines
Diff to previous 1.95 (colored) to selected 1.282 (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, 1 month ago) by yamt
Branch: MAIN
Changes since 1.94: +40 -22
lines
Diff to previous 1.94 (colored) to selected 1.282 (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, 1 month ago) by yamt
Branch: MAIN
Changes since 1.93: +46 -2
lines
Diff to previous 1.93 (colored) to selected 1.282 (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, 1 month ago) by yamt
Branch: MAIN
Changes since 1.92: +110 -19
lines
Diff to previous 1.92 (colored) to selected 1.282 (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, 1 month ago) by yamt
Branch: MAIN
Changes since 1.91: +4 -26
lines
Diff to previous 1.91 (colored) to selected 1.282 (colored)
remove per-socket pendfree list.
Revision 1.91 / (download) - annotate - [select for diffs], Tue Oct 21 22:55:47 2003 UTC (20 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.90: +6 -2
lines
Diff to previous 1.90 (colored) to selected 1.282 (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, 7 months ago) by christos
Branch: MAIN
Changes since 1.89: +3 -13
lines
Diff to previous 1.89 (colored) to selected 1.282 (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, 7 months ago) by christos
Branch: MAIN
Changes since 1.88: +3 -2
lines
Diff to previous 1.88 (colored) to selected 1.282 (colored)
include <sys/poll.h>
Revision 1.88 / (download) - annotate - [select for diffs], Sun Sep 14 23:45:16 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.87: +6 -4
lines
Diff to previous 1.87 (colored) to selected 1.282 (colored)
provide some more ksiginfo info.
Revision 1.87 / (download) - annotate - [select for diffs], Sat Sep 6 22:03:10 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.86: +7 -4
lines
Diff to previous 1.86 (colored) to selected 1.282 (colored)
SA_SIGINFO changes.
Revision 1.86 / (download) - annotate - [select for diffs], Thu Sep 4 16:44:05 2003 UTC (20 years, 7 months ago) by wrstuden
Branch: MAIN
Changes since 1.85: +8 -3
lines
Diff to previous 1.85 (colored) to selected 1.282 (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, 8 months ago) by agc
Branch: MAIN
Changes since 1.84: +3 -7
lines
Diff to previous 1.84 (colored) to selected 1.282 (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, 9 months ago) by ragge
Branch: MAIN
Changes since 1.83: +7 -3
lines
Diff to previous 1.83 (colored) to selected 1.282 (colored)
Make somaxkva modifyable via sysctl (and compile-time) instead of hardcoding its size.
Revision 1.83 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:30 2003 UTC (20 years, 9 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.282 (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, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.81: +22 -24
lines
Diff to previous 1.81 (colored) to selected 1.282 (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, 10 months ago) by martin
Branch: MAIN
Changes since 1.80: +3 -2
lines
Diff to previous 1.80 (colored) to selected 1.282 (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, 11 months ago) by yamt
Branch: MAIN
Changes since 1.79: +45 -24
lines
Diff to previous 1.79 (colored) to selected 1.282 (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 (21 years ago) by thorpej
Branch: MAIN
Changes since 1.78: +24 -17
lines
Diff to previous 1.78 (colored) to selected 1.282 (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, 1 month ago) by matt
Branch: MAIN
Changes since 1.77: +11 -5
lines
Diff to previous 1.77 (colored) to selected 1.282 (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, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.76: +5 -2
lines
Diff to previous 1.76 (colored) to selected 1.282 (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, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.75: +4 -4
lines
Diff to previous 1.75 (colored) to selected 1.282 (colored)
Change ext_size to a size_t, and update the signature of ext_free.
Revision 1.75 / (download) - annotate - [select for diffs], Wed Nov 27 04:07:42 2002 UTC (21 years, 4 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.282 (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, 4 months ago) by itojun
Branch: MAIN
Changes since 1.73: +4 -2
lines
Diff to previous 1.73 (colored) to selected 1.282 (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, 4 months ago) by christos
Branch: MAIN
Changes since 1.72: +7 -7
lines
Diff to previous 1.72 (colored) to selected 1.282 (colored)
si_ -> sel_ to avoid conflicts with siginfo.
Revision 1.72 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:28 2002 UTC (21 years, 6 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.282 (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.71 / (download) - annotate - [select for diffs], Wed Aug 21 05:13:37 2002 UTC (21 years, 8 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.282 (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.70 / (download) - annotate - [select for diffs], Wed Jul 3 21:39:41 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.69: +5 -5
lines
Diff to previous 1.69 (colored) to selected 1.282 (colored)
Rename SB_UPDATE_TAIL() to SB_EMPTY_FIXUP(), per suggestion from Jonathan Stone.
Revision 1.69 / (download) - annotate - [select for diffs], Wed Jul 3 19:06:48 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.68: +71 -5
lines
Diff to previous 1.68 (colored) to selected 1.282 (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.68 / (download) - annotate - [select for diffs], Tue Jun 11 00:21:33 2002 UTC (21 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.67: +19 -2
lines
Diff to previous 1.67 (colored) to selected 1.282 (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, 10 months ago) by he
Branch: MAIN
Changes since 1.66: +22 -3
lines
Diff to previous 1.66 (colored) to selected 1.282 (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, 11 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.282 (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, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.64: +8 -19
lines
Diff to previous 1.64 (colored) to selected 1.282 (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, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.63: +278 -7
lines
Diff to previous 1.63 (colored) to selected 1.282 (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.63 / (download) - annotate - [select for diffs], Sat Apr 6 08:04:17 2002 UTC (22 years ago) by matt
Branch: MAIN
Changes since 1.62: +5 -5
lines
Diff to previous 1.62 (colored) to selected 1.282 (colored)
Don't use the tqh_ field names, instead use the correspond TAILQ_* macro.
Revision 1.62 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:41 2002 UTC (22 years, 1 month 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.282 (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.61 / (download) - annotate - [select for diffs], Thu Jan 3 01:16:02 2002 UTC (22 years, 3 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.282 (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, 3 months ago) by mrg
Branch: MAIN
Changes since 1.59: +3 -3
lines
Diff to previous 1.59 (colored) to selected 1.282 (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.59 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:32 2001 UTC (22 years, 5 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.282 (colored)
add RCSIDs
Revision 1.58 / (download) - annotate - [select for diffs], Sat Sep 29 14:16:19 2001 UTC (22 years, 6 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.282 (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.57 / (download) - annotate - [select for diffs], Mon Sep 17 18:59:29 2001 UTC (22 years, 7 months ago) by jdolecek
Branch: MAIN
Changes since 1.56: +3 -1
lines
Diff to previous 1.56 (colored) to selected 1.282 (colored)
soreceive(): do not ignore uiomove() error Problem reported and fix provided by Aaro Koskinen in kern/11692.
Revision 1.56 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:10 2001 UTC (23 years 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.282 (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.55 / (download) - annotate - [select for diffs], Wed Mar 21 19:22:29 2001 UTC (23 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.54: +3 -2
lines
Diff to previous 1.54 (colored) to selected 1.282 (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.54 / (download) - annotate - [select for diffs], Tue Feb 27 05:19:13 2001 UTC (23 years, 1 month 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.282 (colored)
convert to ANSI KNF
Revision 1.53 / (download) - annotate - [select for diffs], Wed Feb 7 12:20:43 2001 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.52: +2 -2
lines
Diff to previous 1.52 (colored) to selected 1.282 (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.52 / (download) - annotate - [select for diffs], Mon Jan 22 18:14:11 2001 UTC (23 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.51: +4 -3
lines
Diff to previous 1.51 (colored) to selected 1.282 (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.51 / (download) - annotate - [select for diffs], Sun Dec 10 23:16:28 2000 UTC (23 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.50: +3 -3
lines
Diff to previous 1.50 (colored) to selected 1.282 (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.50 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:14 2000 UTC (24 years 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.282 (colored)
Get rid of register declarations.
Revision 1.49 / (download) - annotate - [select for diffs], Mon Feb 7 18:43:26 2000 UTC (24 years, 2 months 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.282 (colored)
Make kernel SOMAXCONN patchable. Will add sysctl once we decide on namespace.
Revision 1.48 / (download) - annotate - [select for diffs], Tue Jun 8 02:39:57 1999 UTC (24 years, 10 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.282 (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, 11 months ago) by sommerfeld
Branch: MAIN
Changes since 1.46: +1 -10
lines
Diff to previous 1.46 (colored) to selected 1.282 (colored)
Delete test code.
Revision 1.46 / (download) - annotate - [select for diffs], Sat May 15 22:36:34 1999 UTC (24 years, 11 months ago) by sommerfeld
Branch: MAIN
Changes since 1.45: +20 -11
lines
Diff to previous 1.45 (colored) to selected 1.282 (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, 11 months ago) by tv
Branch: MAIN
Changes since 1.44: +78 -72
lines
Diff to previous 1.44 (colored) to selected 1.282 (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, 1 month 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.282 (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.43 / (download) - annotate - [select for diffs], Thu Jan 21 22:09:10 1999 UTC (25 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.42: +11 -7
lines
Diff to previous 1.42 (colored) to selected 1.282 (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, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.41: +3 -3
lines
Diff to previous 1.41 (colored) to selected 1.282 (colored)
Oops; previous was slightly broken.
Revision 1.41 / (download) - annotate - [select for diffs], Wed Jan 20 09:15:41 1999 UTC (25 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.40: +21 -13
lines
Diff to previous 1.40 (colored) to selected 1.282 (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, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +5 -1
lines
Diff to previous 1.39 (colored) to selected 1.282 (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, 6 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.282 (colored)
Fix spl problem in socreate (which lead to the corruption of the socket pool).
Revision 1.38 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:17 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.37: +3 -3
lines
Diff to previous 1.37 (colored) to selected 1.282 (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, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.36: +14 -3
lines
Diff to previous 1.36 (colored) to selected 1.282 (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, 8 months ago) by perry
Branch: MAIN
Changes since 1.35: +8 -8
lines
Diff to previous 1.35 (colored) to selected 1.282 (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, 10 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.282 (colored)
defopt COMPAT_SUNOS
Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 27 13:31:45 1998 UTC (25 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.33: +9 -7
lines
Diff to previous 1.33 (colored) to selected 1.282 (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 (26 years ago) by matt
Branch: MAIN
Changes since 1.32: +3 -1
lines
Diff to previous 1.32 (colored) to selected 1.282 (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, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.31: +2 -2
lines
Diff to previous 1.31 (colored) to selected 1.282 (colored)
Merge with Lite2 + local changes
Revision 1.31 / (download) - annotate - [select for diffs], Wed Jan 7 23:47:08 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +8 -6
lines
Diff to previous 1.30 (colored) to selected 1.282 (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, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +2 -2
lines
Diff to previous 1.29 (colored) to selected 1.282 (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.29 / (download) - annotate - [select for diffs], Wed Aug 27 07:10:01 1997 UTC (26 years, 7 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.282 (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, 10 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.282 (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, 10 months ago) by kleink
Branch: MAIN
Changes since 1.26: +2 -2
lines
Diff to previous 1.26 (colored) to selected 1.282 (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, 3 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.282 (colored)
Implement SO_TIMESTAMP socket option: receive a timeval timestamp as a control message with a datagram.
Revision 1.25 / (download) - annotate - [select for diffs], Wed Aug 14 05:53:18 1996 UTC (27 years, 8 months ago) by explorer
Branch: MAIN
Changes since 1.24: +2 -2
lines
Diff to previous 1.24 (colored) to selected 1.282 (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, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +3 -3
lines
Diff to previous 1.23 (colored) to selected 1.282 (colored)
And PRU_SEND.
Revision 1.23 / (download) - annotate - [select for diffs], Wed May 22 19:00:52 1996 UTC (27 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +3 -3
lines
Diff to previous 1.22 (colored) to selected 1.282 (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, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +35 -26
lines
Diff to previous 1.21 (colored) to selected 1.282 (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, 2 months 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.282 (colored)
First pass at prototyping
Revision 1.20 / (download) - annotate - [select for diffs], Sat Aug 12 23:59:11 1995 UTC (28 years, 8 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.282 (colored)
splnet --> splsoftnet
Revision 1.19 / (download) - annotate - [select for diffs], Tue May 23 00:19:30 1995 UTC (28 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.18: +2 -2
lines
Diff to previous 1.18 (colored) to selected 1.282 (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 (29 years ago) by christos
Branch: MAIN
Changes since 1.17: +6 -3
lines
Diff to previous 1.17 (colored) to selected 1.282 (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, 5 months ago) by cgd
Branch: MAIN
Changes since 1.16: +6 -6
lines
Diff to previous 1.16 (colored) to selected 1.282 (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, 9 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.282 (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, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +41 -20
lines
Diff to previous 1.14 (colored) to selected 1.282 (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, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +6 -1
lines
Diff to previous 1.13 (colored) to selected 1.282 (colored)
More return types...
Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 25 08:47:50 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.12: +3 -3
lines
Diff to previous 1.12 (colored) to selected 1.282 (colored)
Remove another bit of that.
Revision 1.12 / (download) - annotate - [select for diffs], Mon Apr 25 08:41:03 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.11: +3 -3
lines
Diff to previous 1.11 (colored) to selected 1.282 (colored)
Remove a piece of the previous patch.
Revision 1.11 / (download) - annotate - [select for diffs], Mon Apr 25 08:22:07 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.10: +10 -10
lines
Diff to previous 1.10 (colored) to selected 1.282 (colored)
Minor cleanup.
Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 23 06:06:27 1994 UTC (30 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +5 -1
lines
Diff to previous 1.9 (colored) to selected 1.282 (colored)
more COMPAT_SUNOS changes.
Revision 1.9 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:28 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +14 -14
lines
Diff to previous 1.8 (colored) to selected 1.282 (colored)
Canonicalize all #includes.
Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 5 23:00:27 1993 UTC (30 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.7: +3 -13
lines
Diff to previous 1.7 (colored) to selected 1.282 (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, 6 months ago) by cgd
Branch: MAIN
Changes since 1.6: +15 -3
lines
Diff to previous 1.6 (colored) to selected 1.282 (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 / (download) - annotate - [select for diffs], Wed Sep 8 21:12:49 1993 UTC (30 years, 7 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.282 (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, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +2 -2
lines
Diff to previous 1.4 (colored) to selected 1.282 (colored)
Nuke an extra `||' Chris inserted.
Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 3 01:36:10 1993 UTC (30 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.3: +2 -2
lines
Diff to previous 1.3 (colored) to selected 1.282 (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, 10 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.282 (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, 11 months ago) by cgd
Branch: MAIN
Changes since 1.1: +4 -6
lines
Diff to previous 1.1 (colored) to selected 1.282 (colored)
make kernel select interface be one-stop shopping & clean it all up.
Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN
Diff to selected 1.282 (colored)
Initial revision