Up to [cvs.NetBSD.org] / src / sys / kern
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.203 / (download) - annotate - [select for diffs], Sat May 28 22:08:46 2022 UTC (22 months, 2 weeks ago) by andvar
Branch: MAIN
CVS Tags: thorpej-ifq-base,
thorpej-ifq,
thorpej-altq-separation-base,
thorpej-altq-separation,
netbsd-10-base,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10,
bouyer-sunxi-drm-base,
bouyer-sunxi-drm,
HEAD
Changes since 1.202: +3 -3
lines
Diff to previous 1.202 (colored) to selected 1.170 (colored)
s/grabing/grabbing/ in comments.
Revision 1.202 / (download) - annotate - [select for diffs], Sat Apr 9 23:52:23 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.201: +8 -3
lines
Diff to previous 1.201 (colored) to selected 1.170 (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.201 / (download) - annotate - [select for diffs], Sun Aug 8 20:54:48 2021 UTC (2 years, 8 months ago) by nia
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base,
thorpej-i2c-spi-conf2
Changes since 1.200: +3 -3
lines
Diff to previous 1.200 (colored) to selected 1.170 (colored)
introduce a SOL_LOCAL for unix-domain socket level socket options as an alias of the current 0 used for these options, as in FreeBSD. reviewed by many.
Revision 1.200 / (download) - annotate - [select for diffs], Fri Nov 6 14:50:13 2020 UTC (3 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base,
thorpej-i2c-spi-conf,
thorpej-futex2-base,
thorpej-futex2,
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.199: +16 -10
lines
Diff to previous 1.199 (colored) to selected 1.170 (colored)
PR/55777: Ruslan Nikolaev: Move the unp_sysctl_create to uipc_usrreq.c to facilitate splitting rump modules and does not require a dummy function.
Revision 1.199 / (download) - annotate - [select for diffs], Wed Aug 26 22:54:30 2020 UTC (3 years, 7 months ago) by christos
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.198: +4 -2
lines
Diff to previous 1.198 (colored) to selected 1.170 (colored)
add socket info for user and group for unix sockets in fstat.
Revision 1.198 / (download) - annotate - [select for diffs], Tue Apr 21 21:42:47 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.197: +8 -13
lines
Diff to previous 1.197 (colored) to selected 1.170 (colored)
Revert the changes made in February to make cwdinfo use mostly lockless, which relied on taking extra vnode refs. Having benchmarked various experimental changes over the past few months it seems that it's better to avoid vnode refs as much as possible. cwdi_lock as a RW lock already did that to some extent for getcwd() and will permit the same for namei() too.
Revision 1.197 / (download) - annotate - [select for diffs], Sun Feb 23 22:14:03 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
is-mlppp-base,
is-mlppp,
bouyer-xenpvh-base1,
bouyer-xenpvh-base,
ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.196: +14 -9
lines
Diff to previous 1.196 (colored) to selected 1.170 (colored)
Merge from ad-namecache: - Have a stab at clustering the members of vnode_t and vnode_impl_t in a more cache-conscious way. With that done, go back to adjusting v_usecount with atomics and keep vi_lock directly in vnode_impl_t (saves KVA). - Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT(). Make sure LK_UPGRADE always comes with LK_NOWAIT. - Make cwdinfo use mostly lockless.
Revision 1.196 / (download) - annotate - [select for diffs], Sat Feb 1 02:23:23 2020 UTC (4 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.195: +3 -3
lines
Diff to previous 1.195 (colored) to selected 1.170 (colored)
Load struct fdfile::ff_file with atomic_load_consume. Exceptions: when we're only testing whether it's there, not about to dereference it. Note: We do not use atomic_store_release to set it because the preceding mutex_exit should be enough. (That said, it's not clear the mutex_enter/exit is needed unless refcnt > 0 already, in which case maybe it would be a win to switch from the membar implied by mutex_enter to the membar implied by atomic_store_release -- which I would generally expect to be much cheaper. And a little clearer without a long comment.)
Revision 1.195 / (download) - annotate - [select for diffs], Sat Feb 1 02:23:04 2020 UTC (4 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.194: +5 -3
lines
Diff to previous 1.194 (colored) to selected 1.170 (colored)
Load struct filedesc::fd_dt with atomic_load_consume. Exceptions: when fd_refcnt <= 1, or when holding fd_lock. While here: - Restore KASSERT(mutex_owned(&fdp->fd_lock)) in fd_unused. => This is used only in fd_close and fd_abort, where it holds. - Move bounds check assertion in fd_putfile to where it matters. - Store fd_dt with atomic_store_release. - Move load of fd_dt under lock in knote_fdclose. - Omit membar_consumer in fdesc_readdir. => atomic_load_consume serves the same purpose now. => Was needed only on alpha anyway.
Revision 1.194 / (download) - annotate - [select for diffs], Mon Jul 29 09:42:17 2019 UTC (4 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119,
netbsd-9-base,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
ad-namecache-base2,
ad-namecache-base1,
ad-namecache-base
Branch point for: netbsd-9,
ad-namecache
Changes since 1.193: +3 -2
lines
Diff to previous 1.193 (colored) to selected 1.170 (colored)
Fix info leak: the padding after the header causes uninitialized heap memory to be copied to userland in sys_recvmsg().
Revision 1.193 / (download) - annotate - [select for diffs], Mon Jun 3 06:04:20 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.192: +3 -3
lines
Diff to previous 1.192 (colored) to selected 1.170 (colored)
Fix typo in comment (s/seperate/separate/).
Revision 1.192 / (download) - annotate - [select for diffs], Fri Mar 1 11:06:57 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: MAIN
CVS Tags: isaki-audio2-base,
isaki-audio2
Changes since 1.191: +4 -4
lines
Diff to previous 1.191 (colored) to selected 1.170 (colored)
Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly discussed on irc. NFCI intended. Ride the earlier kernel bump - it;s getting crowded.
Revision 1.191 / (download) - annotate - [select for diffs], Wed Feb 20 09:59:39 2019 UTC (5 years, 1 month ago) by pgoyette
Branch: MAIN
Changes since 1.190: +6 -5
lines
Diff to previous 1.190 (colored) to selected 1.170 (colored)
compat70_ocreds_valid is not a pointer to a boolean, it is the boolean itself which controls whether or not we recognize the OCRED options. Should fix the panic identified in PR kern/53991 (awaiting confirmation from submitter).
Revision 1.190 / (download) - annotate - [select for diffs], Mon Feb 4 10:11:34 2019 UTC (5 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.189: +3 -4
lines
Diff to previous 1.189 (colored) to selected 1.170 (colored)
add or adjust fallthru comments.
Revision 1.189 / (download) - annotate - [select for diffs], Tue Jan 29 09:28:50 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: MAIN
Changes since 1.188: +4 -4
lines
Diff to previous 1.188 (colored) to selected 1.170 (colored)
Normalize all the compat hooks' names to the form <subsystem>_<function>_<version>_hook NFCI XXX Note that although this introduces a change in the kernel-to- XXX module interface, we are NOT bumping the kernel version number. XXX We will bump the version number once the interface stabilizes.
Revision 1.188 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:43 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: MAIN
Changes since 1.187: +34 -20
lines
Diff to previous 1.187 (colored) to selected 1.170 (colored)
Merge the [pgoyette-compat] branch
Revision 1.187 / (download) - annotate - [select for diffs], Thu Nov 8 04:30:37 2018 UTC (5 years, 5 months ago) by roy
Branch: MAIN
CVS Tags: pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126
Changes since 1.186: +7 -5
lines
Diff to previous 1.186 (colored) to selected 1.170 (colored)
Don't call soroverflow when we return the error to the sender. Thanks to thorpej@ for a sanity check.
Revision 1.186 / (download) - annotate - [select for diffs], Fri May 11 09:43:59 2018 UTC (5 years, 11 months ago) by roy
Branch: MAIN
CVS Tags: phil-wifi-base,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.185: +3 -3
lines
Diff to previous 1.185 (colored) to selected 1.170 (colored)
Increase the default size of some receive buffers from 8k to 16k. This mitigates recent reports of socket overflow errors and fixes PR bin/53247.
Revision 1.185 / (download) - annotate - [select for diffs], Sat May 5 19:58:08 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.184: +46 -3
lines
Diff to previous 1.184 (colored) to selected 1.170 (colored)
bump PIPSIZ from 4 to 8K like FreeBSD and provide the same sysctls
Revision 1.184 / (download) - annotate - [select for diffs], Mon Mar 19 16:26:26 2018 UTC (6 years ago) by roy
Branch: MAIN
CVS Tags: pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322
Changes since 1.183: +3 -3
lines
Diff to previous 1.183 (colored) to selected 1.170 (colored)
socket: report receive buffer overflows Add soroverflow() which increments the overflow counter, sets so_error to ENOBUFS and wakes the receive socket up. Replace all code that manually increments this counter with soroverflow(). Add soroverflow() to raw_input(). This allows userland to detect route(4) overflows so it can re-sync with the current state.
Revision 1.183 / (download) - annotate - [select for diffs], Sat Feb 17 20:19:36 2018 UTC (6 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-base,
pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.182: +30 -23
lines
Diff to previous 1.182 (colored) to selected 1.170 (colored)
fix LOCAL_PEEREID to not return the same info for both sides... XXX: pullup-{7,8}
Revision 1.182 / (download) - annotate - [select for diffs], Sat Dec 2 08:22:04 2017 UTC (6 years, 4 months ago) by mrg
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.181: +6 -2
lines
Diff to previous 1.181 (colored) to selected 1.170 (colored)
include opt_compat_netbsd.h, so that eg COMPAT_70 will be set.
Revision 1.181 / (download) - annotate - [select for diffs], Mon Oct 31 15:05:05 2016 UTC (7 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
nick-nhusb-base-20170825,
nick-nhusb-base-20170204,
nick-nhusb-base-20161204,
netbsd-8-base,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
jdolecek-ncq-base,
jdolecek-ncq,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.180: +3 -3
lines
Diff to previous 1.180 (colored) to selected 1.170 (colored)
Memory leak, found by Mootja. It is easily triggerable from userland.
Revision 1.180 / (download) - annotate - [select for diffs], Wed Apr 6 19:45:45 2016 UTC (8 years ago) by roy
Branch: MAIN
CVS Tags: pgoyette-localcount-base,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
nick-nhusb-base-20161004,
nick-nhusb-base-20160907,
nick-nhusb-base-20160529,
nick-nhusb-base-20160422,
localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.179: +36 -3
lines
Diff to previous 1.179 (colored) to selected 1.170 (colored)
Add sc_pid to sockcred so that SOCK_DGRAM and LOCAL_CREDS socket option can learn the process id of the AF_LOCAL sender. Add compat glue for old structure.
Revision 1.179 / (download) - annotate - [select for diffs], Sat May 2 17:18:03 2015 UTC (8 years, 11 months ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319,
nick-nhusb-base-20151226,
nick-nhusb-base-20150921,
nick-nhusb-base-20150606
Changes since 1.178: +5 -27
lines
Diff to previous 1.178 (colored) to selected 1.170 (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.178 / (download) - annotate - [select for diffs], Sun Apr 26 21:40:48 2015 UTC (8 years, 11 months ago) by rtr
Branch: MAIN
Changes since 1.177: +2 -38
lines
Diff to previous 1.177 (colored) to selected 1.170 (colored)
remove pr_generic from struct pr_usrreqs and all implementations of pr_generic in protocols. bump to 7.99.13 approved by rmind@
Revision 1.177 / (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.176: +17 -31
lines
Diff to previous 1.176 (colored) to selected 1.170 (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.176 / (download) - annotate - [select for diffs], Fri Apr 3 20:01:07 2015 UTC (9 years ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.175: +20 -4
lines
Diff to previous 1.175 (colored) to selected 1.170 (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.175 / (download) - annotate - [select for diffs], Sun Mar 1 01:14:41 2015 UTC (9 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.174: +10 -3
lines
Diff to previous 1.174 (colored) to selected 1.170 (colored)
PR/39918: ITOH Yasufumi: Replace KASSERT with continue, since the file descriptor can be closed since closef() does not pay attention to FDEFER. XXX: Pullup-7
Revision 1.174 / (download) - annotate - [select for diffs], Sat Feb 28 21:42:01 2015 UTC (9 years, 1 month ago) by rtr
Branch: MAIN
Changes since 1.173: +4 -3
lines
Diff to previous 1.173 (colored) to selected 1.170 (colored)
Place opening brace to function at column 0, like in the rest of the file.
Revision 1.173 / (download) - annotate - [select for diffs], Mon Feb 2 02:28:26 2015 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.172: +21 -13
lines
Diff to previous 1.172 (colored) to selected 1.170 (colored)
Handle LOCAL_PEERID for socketpair() connected sockets which connect through connect2(). 1. move the code that sets the peerid structure into connect1(). This handles so2. The datagram code calls connect2 twice with flipped so arguments so both sockets get set. 2. in connect2 copy the peerid structure from so2 to so, so that that both stream sockets get set.
Revision 1.172 / (download) - annotate - [select for diffs], Wed Oct 8 16:13:02 2014 UTC (9 years, 6 months ago) by taca
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.171: +2 -4
lines
Diff to previous 1.171 (colored) to selected 1.170 (colored)
Make behavior of getsockname(2) (and maybe getpeername(2)) as the same as NetBSD 6.1_STABLE and other operating system (OS X 10.9.5). * sa_len of sockaddr_un strucrure is always set to sizeof(sun_path). * pathname stored in sun_path is alwasys '\0' terminated (except length of sun_path is sizeof(sun_path)?). Should be fix PR kern/49247, runtime problem of lmtp service of dovecot2 on NetBSD current and NetBSD 7.0_BETA.
Revision 1.171 / (download) - annotate - [select for diffs], Fri Sep 5 09:20:59 2014 UTC (9 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.170: +5 -5
lines
Diff to previous 1.170 (colored)
Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get a correctly typed pointer.
Revision 1.170 / (download) - annotate - [selected], Fri Sep 5 05:57:21 2014 UTC (9 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.169: +7 -7
lines
Diff to previous 1.169 (colored)
Don't next structure and enum definitions. Don't use C++ keywords new, try, class, private, etc.
Revision 1.169 / (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-base
Branch point for: netbsd-7
Changes since 1.168: +104 -62
lines
Diff to previous 1.168 (colored) to selected 1.170 (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.168 / (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.167: +50 -39
lines
Diff to previous 1.167 (colored) to selected 1.170 (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.167 / (download) - annotate - [select for diffs], Tue Aug 5 08:52:10 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.166: +6 -6
lines
Diff to previous 1.166 (colored) to selected 1.170 (colored)
actually use the passed in struct lwp *l instead of curlwp in unp_connect()
Revision 1.166 / (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.165: +133 -117
lines
Diff to previous 1.165 (colored) to selected 1.170 (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.165 / (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.164: +9 -9
lines
Diff to previous 1.164 (colored) to selected 1.170 (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.164 / (download) - annotate - [select for diffs], Thu Jul 31 14:12:57 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.163: +24 -21
lines
Diff to previous 1.163 (colored) to selected 1.170 (colored)
* remove declarations of unp_bind, unp_discard, unp_disconnect1, unp_drop, unp_shutdown1, unp_internalize and unp_output functions from sys/un.h and instead declare them as static in uipc_usrreq.c with prototype declarations as necessary. * remove struct lwp * parameter from unp_output() while here and just use curlwp instead. as discussed with rmind
Revision 1.163 / (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.162: +48 -24
lines
Diff to previous 1.162 (colored) to selected 1.170 (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.162 / (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.161: +10 -13
lines
Diff to previous 1.161 (colored) to selected 1.170 (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.161 / (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.160: +34 -21
lines
Diff to previous 1.160 (colored) to selected 1.170 (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.160 / (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.159: +26 -13
lines
Diff to previous 1.159 (colored) to selected 1.170 (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.159 / (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.158: +67 -52
lines
Diff to previous 1.158 (colored) to selected 1.170 (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.158 / (download) - annotate - [select for diffs], Wed Jul 9 04:54:03 2014 UTC (9 years, 9 months ago) by rtr
Branch: MAIN
Changes since 1.157: +28 -10
lines
Diff to previous 1.157 (colored) to selected 1.170 (colored)
* split PRU_PEERADDR and PRU_SOCKADDR function out of pr_generic() usrreq switches and put into separate functions xxx_{peer,sock}addr(struct socket *, struct mbuf *). - KASSERT(solocked(so)) always in new functions even if request is not implemented - KASSERT(pcb != NULL) and KASSERT(nam) if the request is implemented and not for tcp. * for tcp roll #ifdef KPROF and #ifdef DEBUG code from tcp_usrreq() into easier to cut & paste functions tcp_debug_capture() and tcp_debug_trace() - functions provided by rmind - remaining use of PRU_{PEER,SOCK}ADDR #define to be removed in a future commit. * rename netbt functions to permit consistency of pru function names (as has been done with other requests already split out). - l2cap_{peer,sock}addr() -> l2cap_{peer,sock}_addr_pcb() - rfcomm_{peer,sock}addr() -> rfcomm_{peer,sock}_addr_pcb() - sco_{peer,sock}addr() -> sco_{peer,sock}_addr_pcb() * split/refactor do_sys_getsockname(lwp, fd, which, nam) into two functions do_sys_get{peer,sock}name(fd, nam). - move PRU_PEERADDR handling into do_sys_getpeername() from do_sys_getsockname() - have svr4_stream directly call do_sys_get{sock,peer}name() respectively instead of providing `which' & fix a DPRINTF string that incorrectly wrote "getpeername" when it meant "getsockname" - fix sys_getpeername() and sys_getsockname() to call do_sys_get{sock,peer}name() without `which' and `lwp' & adjust comments - bump kernel version for removal of lwp & which parameters from do_sys_getsockname() note: future cleanup to remove struct mbuf * abuse in xxx_{peer,sock}name() still to come, not done in this commit since it is easier to do post split. patch reviewed by rmind welcome to 6.99.47
Revision 1.157 / (download) - annotate - [select for diffs], Mon Jul 7 17:13:56 2014 UTC (9 years, 9 months ago) by rtr
Branch: MAIN
Changes since 1.156: +4 -2
lines
Diff to previous 1.156 (colored) to selected 1.170 (colored)
* sprinkle KASSERT(solocked(so)); in all pr_stat() functions. * fix remaining inconsistent struct socket parameter names.
Revision 1.156 / (download) - annotate - [select for diffs], Sun Jul 6 03:33:33 2014 UTC (9 years, 9 months ago) by rtr
Branch: MAIN
Changes since 1.155: +36 -26
lines
Diff to previous 1.155 (colored) to selected 1.170 (colored)
* split PRU_SENSE functionality out of xxx_usrreq() switches and place into separate xxx_stat(struct socket *, struct stat *) functions. * replace calls using pr_generic with req == PRU_SENSE with pr_stat(). further change will follow that cleans up the pattern used to extract the pcb and test for its presence. reviewed by rmind
Revision 1.155 / (download) - annotate - [select for diffs], Tue Jul 1 05:49:18 2014 UTC (9 years, 9 months ago) by rtr
Branch: MAIN
Changes since 1.154: +3 -4
lines
Diff to previous 1.154 (colored) to selected 1.170 (colored)
fix parameter types in pr_ioctl, called xx_control() functions and remove abuse of pointer to struct mbuf type. param2 changed to u_long type and uses parameter name 'cmd' (ioctl command) param3 changed to void * type and uses parameter name 'data' param4 changed to struct ifnet * and uses parameter name 'ifp' param5 has been removed (formerly struct lwp *) and uses of 'l' have been replaced with curlwp from curproc(9). callers have had (now unnecessary) casts to struct mbuf * removed, called code has had (now unnecessary) casts to u_long, void * and struct ifnet * respectively removed. reviewed by rmind@
Revision 1.154 / (download) - annotate - [select for diffs], Sun Jun 22 08:10:18 2014 UTC (9 years, 9 months ago) by rtr
Branch: MAIN
Changes since 1.153: +11 -5
lines
Diff to previous 1.153 (colored) to selected 1.170 (colored)
* split PRU_CONTROL functionality out of xxx_userreq() switches and place into separate xxx_ioctl() functions. * place KASSERT(req != PRU_CONTROL) inside xxx_userreq() as it is now inappropriate for req = PRU_CONTROL in xxx_userreq(). * replace calls to pr_generic() with req = PRU_CONTROL with pr_ioctl(). * remove & fixup references to PRU_CONTROL xxx_userreq() function comments. * fix various comments references for xxx_userreq() that mentioned PRU_CONTROL as xxx_userreq() no longer handles the request. a further change will follow to fix parameter and naming inconsistencies retained from original code. Reviewed by rmind@
Revision 1.153 / (download) - annotate - [select for diffs], Sun Jun 8 02:52:50 2014 UTC (9 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.152: +5 -2
lines
Diff to previous 1.152 (colored) to selected 1.170 (colored)
Handle race where the server closed the socket between us 'connecting' and sending data.
Revision 1.152 / (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.151: +53 -74
lines
Diff to previous 1.151 (colored) to selected 1.170 (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.151 / (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.150: +9 -6
lines
Diff to previous 1.150 (colored) to selected 1.170 (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.150 / (download) - annotate - [select for diffs], Thu Jan 23 10:13:56 2014 UTC (10 years, 2 months ago) by hannken
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.149: +3 -2
lines
Diff to previous 1.149 (colored) to selected 1.170 (colored)
Change vnode operations create, mknod, mkdir and symlink to return the resulting vnode *vpp unlocked. Discussed on tech-kern@ Welcome to 6.99.30
Revision 1.149 / (download) - annotate - [select for diffs], Fri Jan 17 10:55:02 2014 UTC (10 years, 3 months ago) by hannken
Branch: MAIN
Changes since 1.148: +4 -2
lines
Diff to previous 1.148 (colored) to selected 1.170 (colored)
Change vnode operations create, mknod, mkdir and symlink to keep the directory node dvp locked on return. Discussed on tech-kern@ Welcome to 6.99.29
Revision 1.148 / (download) - annotate - [select for diffs], Tue Oct 29 09:53:51 2013 UTC (10 years, 5 months ago) by hannken
Branch: MAIN
Changes since 1.147: +4 -3
lines
Diff to previous 1.147 (colored) to selected 1.170 (colored)
Vnode API cleanup pass 1. - Make these defines and functions private to vfs_vnode.c: VC_MASK, VC_LOCK, DOCLOSE, VI_IANCTREDO and VI_INACTNOW vclean() and vrelel() - Remove the long time unused lwp argument from vrecycle(). - Remove vtryget(), it is responsible for ugly hacks and doesn't look that effective. Presented on tech-kern. Welcome to 6.99.25
Revision 1.147 / (download) - annotate - [select for diffs], Fri Oct 25 19:55:22 2013 UTC (10 years, 5 months ago) by martin
Branch: MAIN
Changes since 1.146: +3 -5
lines
Diff to previous 1.146 (colored) to selected 1.170 (colored)
Eliminat an unused variable and simplify the KASSERT which used to use it
Revision 1.146 / (download) - annotate - [select for diffs], Tue Oct 8 17:21:24 2013 UTC (10 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.145: +27 -22
lines
Diff to previous 1.145 (colored) to selected 1.170 (colored)
Centralize the sockaddr_un allocation code. Set sun_len appropriately so that the address length returned is correct, not always 106. Note that we do things slightly differently than linux and explain why. Unit-tests to come.
Revision 1.145 / (download) - annotate - [select for diffs], Tue Oct 8 15:09:51 2013 UTC (10 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.144: +10 -4
lines
Diff to previous 1.144 (colored) to selected 1.170 (colored)
- Instead of having accept(2) return a zero-filled sockaddr for the case where accept(2) was called on a unix socket that called connect(2) and then close(2), before the connection was accepted, return the empty sockaddr_un. - Fix the length of the empty sockaddr_un socket so that it reflects reality.
Revision 1.144 / (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.143: +3 -3
lines
Diff to previous 1.143 (colored) to selected 1.170 (colored)
Remove SS_ISCONFIRMING, it is unused and TP4 will not come back.
Revision 1.143 / (download) - annotate - [select for diffs], Thu Aug 1 19:33:21 2013 UTC (10 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.142: +7 -5
lines
Diff to previous 1.142 (colored) to selected 1.170 (colored)
In unp_externalize, don't do anything if an SCM_RIGHTS control message was sent with zero file descriptors in it. Otherwise, a zero-length temporary storage would be allocated which triggers panic on DIAGNOSTIC kernels (but is harmless for release kernels). reviewed by Taylor R Campbell
Revision 1.142 / (download) - annotate - [select for diffs], Thu Jun 27 18:54:31 2013 UTC (10 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.141: +13 -39
lines
Diff to previous 1.141 (colored) to selected 1.170 (colored)
use sbcreatecontrol1() and m_add() instead of open-coding everything, and getting it slightly wrong.
Revision 1.141 / (download) - annotate - [select for diffs], Thu Feb 14 01:00:07 2013 UTC (11 years, 2 months ago) by riastradh
Branch: MAIN
CVS Tags: khorben-n900,
agc-symver-base,
agc-symver
Changes since 1.140: +18 -8
lines
Diff to previous 1.140 (colored) to selected 1.170 (colored)
Fix some screw cases in cmsg file descriptor passing. - Don't leave garbage in the control buffer if allocating file descriptors fails in unp_externalize. - Scrub the space between CMSG_LEN and CMSG_SPACE to avoid kernel memory disclosure in unp_externalize. - Don't read past cmsg_len when closing file descriptors that couldn't get delivered, in free_rights. ok christos
Revision 1.140 / (download) - annotate - [select for diffs], Sat Oct 6 22:58:08 2012 UTC (11 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6
Changes since 1.139: +21 -20
lines
Diff to previous 1.139 (colored) to selected 1.170 (colored)
Avoid crash dereferencing a NULL fp in fd_affix() in unp_externalize caused by the sequence of passing two fd's with two sendmsg()'s, then doing a read() and a recvmsg(). The read() calls dom_dispose() which discards both messages in the mbuf, and sets the fp's in the array to NULL. Linux dequeues only one message per read() so the second recvmsg() gets the fd from the second message. This fix just avoids the NULL pointer de-reference, making the second recvmsg() to fail. It is dubious to pass fd's with stream sockets and expect mixing read() and recvmsg() to work. Plus processing one control message per read() changes the current semantics and should be examined before applied. In addition there is a race between dom_externalize() and dom_dispose(): what happens in a multi-threaded network stack when one thread disposes where the other externalizes the same array? NB: Pullup to 6.
Revision 1.139 / (download) - annotate - [select for diffs], Mon Jul 30 10:45:03 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.138: +3 -4
lines
Diff to previous 1.138 (colored) to selected 1.170 (colored)
remove infinite loop on error, extra parens on return.
Revision 1.138 / (download) - annotate - [select for diffs], Mon Jul 30 10:42:24 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.137: +45 -42
lines
Diff to previous 1.137 (colored) to selected 1.170 (colored)
simplify unp_externalize(), some from gimpy, some from me.
Revision 1.137 / (download) - annotate - [select for diffs], Sat Jun 2 16:16:16 2012 UTC (11 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.136: +6 -3
lines
Diff to previous 1.136 (colored) to selected 1.170 (colored)
Stopgap fix for PR kern/46463: disallow passing of kqueue descriptors via SCM_RIGHT anxiliary socket messages.
Revision 1.136 / (download) - annotate - [select for diffs], Sun Jun 26 16:42:43 2011 UTC (12 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5,
yamt-pagecache-base4,
yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
netbsd-6-base,
jmcneill-usbmp-pre-base2,
jmcneill-usbmp-base9,
jmcneill-usbmp-base8,
jmcneill-usbmp-base7,
jmcneill-usbmp-base6,
jmcneill-usbmp-base5,
jmcneill-usbmp-base4,
jmcneill-usbmp-base3,
jmcneill-usbmp-base2,
jmcneill-usbmp-base10,
jmcneill-usbmp-base,
jmcneill-usbmp,
jmcneill-audiomp3-base,
jmcneill-audiomp3
Branch point for: yamt-pagecache,
netbsd-6
Changes since 1.135: +6 -4
lines
Diff to previous 1.135 (colored) to selected 1.170 (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.135 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:56 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.134: +7 -7
lines
Diff to previous 1.134 (colored) to selected 1.170 (colored)
Welcome to 5.99.53! Merge rmind-uvmplock branch: - Reorganize locking in UVM and provide extra serialisation for pmap(9). New lock order: [vmpage-owner-lock] -> pmap-lock. - Simplify locking in some pmap(9) modules by removing P->V locking. - Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs). - Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner. Add TLBSTATS option for x86 to collect statistics about TLB shootdowns. - Unify /dev/mem et al in MI code and provide required locking (removes kernel-lock on some ports). Also, avoid cache-aliasing issues. Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches formed the core changes of this branch.
Revision 1.134 / (download) - annotate - [select for diffs], Sun May 29 03:32:46 2011 UTC (12 years, 10 months ago) by manu
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase,
rmind-uvmplock-base,
cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.133: +40 -10
lines
Diff to previous 1.133 (colored) to selected 1.170 (colored)
Add SOCK_SEQPACKET to PL_LOCAL sockets. Based on patch from Jesse Off, submitted 8 years ago: http://mail-index.netbsd.org/tech-kern/2003/04/14/0006.html
Revision 1.133 / (download) - annotate - [select for diffs], Fri Nov 19 06:44:43 2010 UTC (13 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231,
jruoho-x86intr-base,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.132: +29 -9
lines
Diff to previous 1.132 (colored) to selected 1.170 (colored)
Introduce struct pathbuf. This is an abstraction to hold a pathname and the metadata required to interpret it. Callers of namei must now create a pathbuf and pass it to NDINIT (instead of a string and a uio_seg), then destroy the pathbuf after the namei session is complete. Update all namei call sites accordingly. Add a pathbuf(9) man page and update namei(9). The pathbuf interface also now appears in a couple of related additional places that were passing string/uio_seg pairs that were later fed into NDINIT. Update other call sites accordingly.
Revision 1.132 / (download) - annotate - [select for diffs], Thu Oct 21 11:14:39 2010 UTC (13 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: uebayasi-xip-base4,
uebayasi-xip-base3
Changes since 1.131: +3 -3
lines
Diff to previous 1.131 (colored) to selected 1.170 (colored)
unp_connect: fix an assertion
Revision 1.131 / (download) - annotate - [select for diffs], Thu Oct 21 11:13:43 2010 UTC (13 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.130: +3 -3
lines
Diff to previous 1.130 (colored) to selected 1.170 (colored)
unp_connect2: fix a comment.
Revision 1.130 / (download) - annotate - [select for diffs], Thu Jun 24 13:03:11 2010 UTC (13 years, 9 months ago) by hannken
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11,
yamt-nfs-mp-base10,
uebayasi-xip-base2
Changes since 1.129: +3 -3
lines
Diff to previous 1.129 (colored) to selected 1.170 (colored)
Clean up vnode lock operations pass 2: VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument. Welcome to 5.99.32. Discussed on tech-kern.
Revision 1.129 / (download) - annotate - [select for diffs], Tue Feb 9 23:05:16 2010 UTC (14 years, 2 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9,
uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.128: +3 -3
lines
Diff to previous 1.128 (colored) to selected 1.170 (colored)
Fix typo in comment.
Revision 1.128 / (download) - annotate - [select for diffs], Fri Jan 8 11:35:10 2010 UTC (14 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.127: +3 -3
lines
Diff to previous 1.127 (colored) to selected 1.170 (colored)
The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live years ago when the kernel was modified to not alter ABI based on DIAGNOSTIC, and now just call the respective function interfaces (in lowercase). Plenty of mix'n match upper/lowercase has creeped into the tree since then. Nuke the macros and convert all callsites to lowercase. no functional change
Revision 1.127 / (download) - annotate - [select for diffs], Wed Aug 26 22:34:47 2009 UTC (14 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8,
matt-premerge-20091211,
jym-xensuspend-nbase
Changes since 1.126: +20 -2
lines
Diff to previous 1.126 (colored) to selected 1.170 (colored)
In uipc_usrreq(PRU_ACCEPT), grab the unp_streamlock before unp_setpeerlocks(). This fixes a race where, for a short period of time, so->so_lock and so2->so_lock are not sync. This makes solocked2() and solocked() unreliable and cause DIAGNOSTIC kernel panics. This also fixes a possible panic in unp_setaddr() which expects the socket locked. Should fix kern/38968, fix proposed in http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005863.html
Revision 1.126 / (download) - annotate - [select for diffs], Sun May 24 21:41:26 2009 UTC (14 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7,
yamt-nfs-mp-base6,
yamt-nfs-mp-base5,
jymxensuspend-base
Changes since 1.125: +3 -3
lines
Diff to previous 1.125 (colored) to selected 1.170 (colored)
More changes to improve kern_descrip.c. - Avoid atomics in more places. - Remove the per-descriptor mutex, and just use filedesc_t::fd_lock. It was only being used to synchronize close, and in any case we needed to take fd_lock to free the descriptor slot. - Optimize certain paths for the <NDFDFILE case. - Sprinkle more comments and assertions. - Cache more stuff in filedesc_t. - Fix numerous minor bugs spotted along the way. - Restructure how the open files array is maintained, for clarity and so that we can eliminate the membar_consumer() call in fd_getfile(). This is mostly syntactic sugar; the main functional change is that fd_nfiles now lives alongside the open file array. Some measurements with libmicro: - simple file syscalls are like close() are between 1 to 10% faster. - some nice improvements, e.g. poll(1000) which is ~50% faster.
Revision 1.125 / (download) - annotate - [select for diffs], Mon May 4 06:02:40 2009 UTC (14 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4,
yamt-nfs-mp-base3,
jym-xensuspend-base
Changes since 1.124: +11 -7
lines
Diff to previous 1.124 (colored) to selected 1.170 (colored)
tweak some assertions on so_head to make them more meaningful.
Revision 1.124 / (download) - annotate - [select for diffs], Thu Apr 9 00:57:15 2009 UTC (15 years ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base4,
nick-hppapmap-base3,
nick-hppapmap-base
Changes since 1.123: +3 -3
lines
Diff to previous 1.123 (colored) to selected 1.170 (colored)
0 -> NULL
Revision 1.123 / (download) - annotate - [select for diffs], Thu Apr 9 00:44:32 2009 UTC (15 years ago) by yamt
Branch: MAIN
Changes since 1.122: +3 -3
lines
Diff to previous 1.122 (colored) to selected 1.170 (colored)
remove an unnecessary cast.
Revision 1.122 / (download) - annotate - [select for diffs], Thu Apr 9 00:37:32 2009 UTC (15 years ago) by yamt
Branch: MAIN
Changes since 1.121: +6 -6
lines
Diff to previous 1.121 (colored) to selected 1.170 (colored)
0 -> NULL where appropriate
Revision 1.121 / (download) - annotate - [select for diffs], Wed Mar 11 06:05:29 2009 UTC (15 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.120: +255 -193
lines
Diff to previous 1.120 (colored) to selected 1.170 (colored)
completely rework the way that orphaned sockets that are being fdpassed via SCM_RIGHTS messages are dealt with: 1. unp_gc: make this a kthread. 2. unp_detach: go not call unp_gc directly. instead, wake up unp_gc kthread. 3. unp_scan: do not close files here. instead, put them on a global list for unp_gc to close, along with a per-file "deferred close count". if file is already enqueued for close, just increment deferred close count. this eliminates the recursive calls. 3. unp_gc: scan files on global deferred close list. close each file N times, as specified by deferred close count in file. continue processing list until it becomes empty (closing may cause additional files to be queued for close). 4. unp_gc: add additional bit to mark files we are scanning. set during initial scan of global file list that currently clears FMARK/FDEFER. during later scans, never examine / garbage collect descriptors that we have not marked during the earlier scan. do not proceed with this initial scan until all deferred closes have been processed. be careful with locking to ensure no races are introduced between deferred close and file scan. 5. unp_gc: use dummy file_t to mark position in list when scanning. allow us to drop filelist_lock. in turn allows us to eliminate kmem_alloc() and safely close files, etc. 6. prohibit transfer of descriptors within SCM_RIGHTS messages if (num_files_in_transit > maxfiles / unp_rights_ratio) 7. fd_allocfile: ensure recycled filse don't get scanned. this is 97% work done by andrew doran, with a couple of minor bug fixes and a lot of testing by yours truly.
Revision 1.120 / (download) - annotate - [select for diffs], Sun Feb 8 16:38:12 2009 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.119: +3 -3
lines
Diff to previous 1.119 (colored) to selected 1.170 (colored)
Don't try to fd_putfile() descriptors we didn't manage to fd_getfile(). Fixes local DoS panic described in kern/40570.
Revision 1.119 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (15 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: netbsd-5-base,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
mjf-devfs2-base,
matt-mips64-base2,
haad-nbase2,
haad-dm-base2,
haad-dm-base1,
haad-dm-base,
ad-audiomp2-base,
ad-audiomp2
Branch point for: nick-hppapmap,
netbsd-5
Changes since 1.118: +3 -2
lines
Diff to previous 1.118 (colored) to selected 1.170 (colored)
Move uidinfo to its own module in kern_uidinfo.c and include in rump. No functional change to uidinfo.
Revision 1.118 / (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-4,
wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2
Changes since 1.117: +19 -31
lines
Diff to previous 1.117 (colored) to selected 1.170 (colored)
Convert socket options code to use a sockopt structure instead of laying everything into an mbuf. approved by core
Revision 1.117 / (download) - annotate - [select for diffs], Fri Jun 20 15:27:50 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
simonb-wapbl-nbase,
simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.116: +4 -3
lines
Diff to previous 1.116 (colored) to selected 1.170 (colored)
Also enforce that cm->cmsg_len >= CMSG_ALIGN(sizeof cmsghdr), from Michael van Elst
Revision 1.116 / (download) - annotate - [select for diffs], Fri Jun 20 15:18:38 2008 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.115: +3 -3
lines
Diff to previous 1.115 (colored) to selected 1.170 (colored)
Don't require cm->cmsg_len == control->m_len, just that the cm->cmsg_len <= control->m_len, like FreeBSD does. Idea from Taylor R Campbell.
Revision 1.115 / (download) - annotate - [select for diffs], Tue Jun 10 11:49:11 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4
Changes since 1.114: +5 -5
lines
Diff to previous 1.114 (colored) to selected 1.170 (colored)
There can be existing waiters on a socket's condition variables when we change socket::so_lock, and they rely on the old lock to synchronize. Wake them up whenever we change so_lock so they can restart their waits.
Revision 1.114 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:05 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base3,
yamt-pf42-base2,
yamt-nfs-mp-base2,
hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa,
simonb-wapbl
Changes since 1.113: +2 -9
lines
Diff to previous 1.113 (colored) to selected 1.170 (colored)
Remove clause 3 and 4 from TNF licenses
Revision 1.113 / (download) - annotate - [select for diffs], Sun Apr 27 11:29:12 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.112: +3 -2
lines
Diff to previous 1.112 (colored) to selected 1.170 (colored)
Add a comment.
Revision 1.112 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:36 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.111: +388 -99
lines
Diff to previous 1.111 (colored) to selected 1.170 (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.111 / (download) - annotate - [select for diffs], Sun Apr 20 07:47:18 2008 UTC (16 years ago) by mlelstv
Branch: MAIN
Changes since 1.110: +17 -18
lines
Diff to previous 1.110 (colored) to selected 1.170 (colored)
When unp_internalize fails (due to the sanity check or an out-of-memory condition), it leaves the control message with file descriptors. Calling unp_dispose() will interpret the message as containing file pointers and crash the system. This change removes unp_dispose() from this failure path and avoids using goto to jump into switch statements... The previous workaround to ignore such messages in unp_scan() is removed.
Revision 1.110 / (download) - annotate - [select for diffs], Sat Apr 19 22:26:52 2008 UTC (16 years ago) by mjf
Branch: MAIN
Changes since 1.109: +4 -3
lines
Diff to previous 1.109 (colored) to selected 1.170 (colored)
If cm->cmsg_len is not valid for unp_internalize do not use it to work out where the data is in unp_scan. Fixes PR/38391
Revision 1.109 / (download) - annotate - [select for diffs], Fri Mar 28 12:14:22 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.108: +24 -3
lines
Diff to previous 1.108 (colored) to selected 1.170 (colored)
Prevent overlapping calls to bind() and/or connect() on a Unix socket.
Revision 1.108 / (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.107: +9 -6
lines
Diff to previous 1.107 (colored) to selected 1.170 (colored)
merge yamt-lazymbuf branch.
Revision 1.107 / (download) - annotate - [select for diffs], Fri Mar 21 23:38:40 2008 UTC (16 years ago) by rmind
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15,
yamt-lazymbuf-base14
Changes since 1.106: +8 -4
lines
Diff to previous 1.106 (colored) to selected 1.170 (colored)
unp_gc: unlock filelist_lock in a case of restart.
Revision 1.106 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (16 years ago) by ad
Branch: MAIN
Changes since 1.105: +137 -147
lines
Diff to previous 1.105 (colored) to selected 1.170 (colored)
Catch up with descriptor handling changes. See kern_descrip.c revision 1.173 for details.
Revision 1.105 / (download) - annotate - [select for diffs], Fri Jan 25 14:32:14 2008 UTC (16 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: nick-net80211-sync-base,
nick-net80211-sync,
mjf-devfs-base,
matt-armv6-nbase,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-base
Branch point for: mjf-devfs2
Changes since 1.104: +2 -3
lines
Diff to previous 1.104 (colored) to selected 1.170 (colored)
Remove VOP_LEASE. Discussed on tech-kern.
Revision 1.104 / (download) - annotate - [select for diffs], Sat Jan 5 19:08:49 2008 UTC (16 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-base,
bouyer-xeni386-nbase,
bouyer-xeni386-base
Changes since 1.103: +18 -18
lines
Diff to previous 1.103 (colored) to selected 1.170 (colored)
Use FILE_LOCK() and FILE_UNLOCK()
Revision 1.103 / (download) - annotate - [select for diffs], Sat Dec 8 19:29:49 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-base3,
jmcneill-pm-base,
cube-autoconf-base,
cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.102: +5 -4
lines
Diff to previous 1.102 (colored) to selected 1.170 (colored)
Remove cn_lwp from struct componentname. curlwp should be used from on. The NDINIT() macro no longer takes the lwp parameter and associates the credentials of the calling thread with the namei structure.
Revision 1.102 / (download) - annotate - [select for diffs], Mon Nov 26 19:02:05 2007 UTC (16 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: vmlocking2-base2,
vmlocking2-base1,
vmlocking-nbase,
reinoud-bufcleanup-nbase,
reinoud-bufcleanup-base
Branch point for: vmlocking2
Changes since 1.101: +4 -4
lines
Diff to previous 1.101 (colored) to selected 1.170 (colored)
Remove the "struct lwp *" argument from all VFS and VOP interfaces. The general trend is to remove it from all kernel interfaces and this is a start. In case the calling lwp is desired, curlwp should be used. quick consensus on tech-kern
Revision 1.101 / (download) - annotate - [select for diffs], Mon Oct 8 15:12:08 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4,
yamt-x86pmap-base3,
vmlocking-base,
jmcneill-base,
bouyer-xenamd64-base2,
bouyer-xenamd64-base,
bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.100: +53 -29
lines
Diff to previous 1.100 (colored) to selected 1.170 (colored)
Merge file descriptor locking, cwdi locking and cross-call changes from the vmlocking branch.
Revision 1.100 / (download) - annotate - [select for diffs], Wed Sep 19 06:23:53 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base2,
yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.99: +3 -3
lines
Diff to previous 1.99 (colored) to selected 1.170 (colored)
Make uipc_ctloutput() return ENOPROTOOPT instead of EINVAL when it is passed a handle socket-option level that it does not care about.
Revision 1.99 / (download) - annotate - [select for diffs], Thu Aug 9 15:23:02 2007 UTC (16 years, 8 months ago) by he
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Branch point for: matt-armv6
Changes since 1.98: +28 -8
lines
Diff to previous 1.98 (colored) to selected 1.170 (colored)
Add a new socket option for unix domain sockets: LOCAL_PEEREID, to make it possible to get the pid, euid and egid of the process at the remote end at the time it did bind() or connect(). Add a new libc function, getpeereid() to easily get at the euid and egid. As a consequence, bump libc's minor number. Document the LOCAL_PEEREID socket option in unix(4). Based on contribution by Arne H. Juul, minor modifications by myself.
Revision 1.98 / (download) - annotate - [select for diffs], Fri Aug 3 20:49:45 2007 UTC (16 years, 8 months ago) by martin
Branch: MAIN
CVS Tags: matt-mips64-base
Branch point for: matt-mips64
Changes since 1.97: +7 -3
lines
Diff to previous 1.97 (colored) to selected 1.170 (colored)
PR kern/32842: do not leak file descriptors when sending a datagram with SCM_RIGHTS fails. Patch from Gary Thorpe, based on changes in FreeBSD and work from Christian Biere.
Revision 1.97 / (download) - annotate - [select for diffs], Sun Apr 22 08:30:00 2007 UTC (16 years, 11 months ago) by dsl
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.96: +4 -4
lines
Diff to previous 1.96 (colored) to selected 1.170 (colored)
Change the way that emulations locate files within the emulation root to avoid having to allocate space in the 'stackgap' - which is very LWP unfriendly. The additional code for non-emulation namei() is trivial, the reduction for the emulations is massive. The vnode for a processes emulation root is saved in the cwdi structure during process exec. If the emulation root the TRYEMULROOT flag are set, namei() will do an initial search for absolute pathnames in the emulation root, if that fails it will retry from the normal root. ".." at the emulation root will always go to the real root, even in the middle of paths and when expanding symlinks. Absolute symlinks found using absolute paths in the emulation root will be relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links inside the emulation root don't need changing). If the root of the emulation would be returned (for an emulation lookup), then the real root is returned instead (matching the behaviour of emul_lookup, but being a cheap comparison here) so that programs that scan "../.." looking for the root dircetory don't loop forever. The target for symbolic links is no longer mangled (it used to get the CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended). CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding TRYEMULROOT to the flags to NDINIT(). A lot of the emulation system call stubs could now be deleted.
Revision 1.96 / (download) - annotate - [select for diffs], Tue Apr 3 16:11:31 2007 UTC (17 years ago) by hannken
Branch: MAIN
CVS Tags: thorpej-atomic-base,
thorpej-atomic
Changes since 1.95: +5 -15
lines
Diff to previous 1.95 (colored) to selected 1.170 (colored)
Remove calls to now obsolete vn_start_write() and vn_finished_write().
Revision 1.95 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:11 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: reinoud-bufcleanup
Branch point for: vmlocking,
mjf-ufs-trans
Changes since 1.94: +8 -8
lines
Diff to previous 1.94 (colored) to selected 1.170 (colored)
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
Revision 1.94 / (download) - annotate - [select for diffs], Wed Nov 1 11:37:59 2006 UTC (17 years, 5 months ago) by cbiere
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5,
yamt-splraiseipl-base4,
yamt-splraiseipl-base3,
post-newlock2-merge,
newlock2-nbase,
newlock2-base,
netbsd-4-base,
ad-audiomp-base,
ad-audiomp
Branch point for: yamt-idlelwp,
wrstuden-fixsa,
netbsd-4
Changes since 1.93: +6 -6
lines
Diff to previous 1.93 (colored) to selected 1.170 (colored)
Pointing one element past an array is fine, pointing before it isn't.
Revision 1.93 / (download) - annotate - [select for diffs], Sun Sep 3 21:15:29 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2,
yamt-splraiseipl-base,
yamt-pdpolicy-base9,
rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl,
newlock2
Changes since 1.92: +6 -3
lines
Diff to previous 1.92 (colored) to selected 1.170 (colored)
use c99 initializers
Revision 1.92 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:12 2006 UTC (17 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8,
yamt-pdpolicy-base7,
abandoned-netbsd-4-base,
abandoned-netbsd-4
Changes since 1.91: +18 -18
lines
Diff to previous 1.91 (colored) to selected 1.170 (colored)
Use the LWP cached credentials where sane.
Revision 1.91 / (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-base6,
yamt-pdpolicy-base5,
simonb-timecounters-base,
gdamore-uart-base,
gdamore-uart,
chap-midi-nbase,
chap-midi-base,
chap-midi
Changes since 1.90: +13 -12
lines
Diff to previous 1.90 (colored) to selected 1.170 (colored)
integrate kauth.
Revision 1.90 / (download) - annotate - [select for diffs], Fri Apr 14 23:15:21 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.89: +9 -4
lines
Diff to previous 1.89 (colored) to selected 1.170 (colored)
Coverity CID 1089: Add more KASSERTs to prevent NULL deref.
Revision 1.89 / (download) - annotate - [select for diffs], Fri Apr 14 23:12:14 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.88: +3 -2
lines
Diff to previous 1.88 (colored) to selected 1.170 (colored)
Coverity CID 1088: Add KASSERT to prevent NULL pointer deref.
Revision 1.88 / (download) - annotate - [select for diffs], Thu Apr 13 04:58:31 2006 UTC (18 years ago) by matt
Branch: MAIN
Changes since 1.87: +3 -2
lines
Diff to previous 1.87 (colored) to selected 1.170 (colored)
Add a KASSERT to document a condition for the PRU_ABORT case.
Revision 1.87 / (download) - annotate - [select for diffs], Wed Mar 1 02:06:11 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5,
yamt-pdpolicy-base4,
yamt-pdpolicy-base3,
yamt-pdpolicy-base2,
yamt-pdpolicy-base,
peter-altq-base
Branch point for: yamt-pdpolicy,
peter-altq,
elad-kernelauth
Changes since 1.86: +6 -4
lines
Diff to previous 1.86 (colored) to selected 1.170 (colored)
PR/32856: Christian Biere: Don't panic if you send a control message with SCM_RIGHTS on an unconnected stream socket.
Revision 1.86 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:30 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace,
simonb-timecounters,
rpaulo-netinet-merge-pcb
Changes since 1.85: +24 -18
lines
Diff to previous 1.85 (colored) to selected 1.170 (colored)
merge ktrace-lwp.
Revision 1.85 / (download) - annotate - [select for diffs], Fri Nov 11 07:07:42 2005 UTC (18 years, 5 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-readahead-pervnode,
yamt-readahead-perfile,
yamt-readahead-base3,
yamt-readahead-base2,
yamt-readahead-base,
yamt-readahead,
ktrace-lwp-base
Changes since 1.84: +3 -5
lines
Diff to previous 1.84 (colored) to selected 1.170 (colored)
Call nanotime() directly, instead of doing the microtime()/TIMEVAL_TO_TIMESPEC() dance.
Revision 1.84 / (download) - annotate - [select for diffs], Tue Aug 30 15:03:04 2005 UTC (18 years, 7 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-vop-base3,
yamt-vop-base2,
yamt-vop-base,
yamt-vop,
thorpej-vnode-attr-base,
thorpej-vnode-attr
Changes since 1.83: +3 -3
lines
Diff to previous 1.83 (colored) to selected 1.170 (colored)
Honor the user's umask while creating local sockets. Several other systems do already this (such as FreeBSD, OpenBSD and Linux), so it will improve portability of some third-party programs. No objections in tech-kern@.
Revision 1.83 / (download) - annotate - [select for diffs], Thu Jun 16 14:36:42 2005 UTC (18 years, 10 months ago) by yamt
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.82: +5 -4
lines
Diff to previous 1.82 (colored) to selected 1.170 (colored)
uipc_usrreq: plug mbuf leak.
Revision 1.82 / (download) - annotate - [select for diffs], Sun May 29 22:24:15 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.81: +3 -3
lines
Diff to previous 1.81 (colored) to selected 1.170 (colored)
- add const. - remove unnecessary casts. - add __UNCONST casts and mark them with XXXUNCONST as necessary.
Revision 1.81 / (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.80: +4 -4
lines
Diff to previous 1.80 (colored) to selected 1.170 (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.80 / (download) - annotate - [select for diffs], Sat Feb 26 21:34:56 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4,
yamt-km-base3,
netbsd-3-base,
kent-audio2-base
Branch point for: netbsd-3
Changes since 1.79: +7 -7
lines
Diff to previous 1.79 (colored) to selected 1.170 (colored)
nuke trailing whitespace
Revision 1.79 / (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.78: +3 -2
lines
Diff to previous 1.78 (colored) to selected 1.170 (colored)
add a per-socket counter for dropped UDP packets when the internal buffers are full.
Revision 1.78 / (download) - annotate - [select for diffs], Sat May 22 22:52:13 2004 UTC (19 years, 10 months ago) by jonathan
Branch: MAIN
Changes since 1.77: +3 -4
lines
Diff to previous 1.77 (colored) to selected 1.170 (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.77 / (download) - annotate - [select for diffs], Sun Apr 18 22:20:32 2004 UTC (20 years ago) by matt
Branch: MAIN
Changes since 1.76: +7 -7
lines
Diff to previous 1.76 (colored) to selected 1.170 (colored)
Constify sun_noname.
Revision 1.76 / (download) - annotate - [select for diffs], Sun Apr 18 21:48:15 2004 UTC (20 years ago) by matt
Branch: MAIN
Changes since 1.75: +28 -68
lines
Diff to previous 1.75 (colored) to selected 1.170 (colored)
ANSI'fy.
Revision 1.75 / (download) - annotate - [select for diffs], Sat Apr 17 15:15:29 2004 UTC (20 years ago) by christos
Branch: MAIN
Changes since 1.74: +10 -4
lines
Diff to previous 1.74 (colored) to selected 1.170 (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.74 / (download) - annotate - [select for diffs], Tue Mar 23 13:22:05 2004 UTC (20 years ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-base,
netbsd-2-0-base,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-0,
netbsd-2
Changes since 1.73: +4 -4
lines
Diff to previous 1.73 (colored) to selected 1.170 (colored)
Nuke __P().
Revision 1.73 / (download) - annotate - [select for diffs], Mon Dec 29 22:08:02 2003 UTC (20 years, 3 months ago) by martin
Branch: MAIN
Changes since 1.72: +31 -23
lines
Diff to previous 1.72 (colored) to selected 1.170 (colored)
Avoid using m_clget() on a mbuf already in use, especially when we need the data in the mbuf later and m_clget() changes some fields overlaid to regular mbuf data. Instead, rearange code a bit, create data into a new allocated buffer and and use MEXTADD to attach it to the mbuf, if the mbuf internal space is not sufficient. This fixes a crash on sparc64 (and probably all other archs where sizeof(int) != sizeof(struct file *)) when running regress/sys/kern/unfdpass. Idea for solution from Matt Thomas, with additional input from YAMAMOTO Takashi.
Revision 1.72 / (download) - annotate - [select for diffs], Sat Nov 29 10:02:42 2003 UTC (20 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.71: +21 -4
lines
Diff to previous 1.71 (colored) to selected 1.170 (colored)
Restore a change that made AF_LOCAL sockets block on connect(2) until accepted. However, this time this behavor is not the default. Instead it must enabled by using the LOCAL_CONNWAIT socket option on either the connecting or accepting socket.
Revision 1.71 / (download) - annotate - [select for diffs], Sat Nov 29 06:08:29 2003 UTC (20 years, 4 months ago) by perry
Branch: MAIN
Changes since 1.70: +6 -18
lines
Diff to previous 1.70 (colored) to selected 1.170 (colored)
Revert a change that altered the semantics of AF_LOCAL sockets. Sadly this made us API incompatible with other Unixes.
Revision 1.70 / (download) - annotate - [select for diffs], Wed Oct 15 11:29:01 2003 UTC (20 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.69: +15 -5
lines
Diff to previous 1.69 (colored) to selected 1.170 (colored)
Add the gating of system calls that cause modifications to the underlying file system. The function vfs_write_suspend stops all new write operations to a file system, allows any file system modifying system calls already in progress to complete, then sync's the file system to disk and returns. The function vfs_write_resume allows the suspended write operations to complete. From FreeBSD with slight modifications. Approved by: Frank van der Linden <fvdl@netbsd.org>
Revision 1.69 / (download) - annotate - [select for diffs], Wed Sep 3 22:20:34 2003 UTC (20 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.68: +3 -3
lines
Diff to previous 1.68 (colored) to selected 1.170 (colored)
Fix typo.
Revision 1.68 / (download) - annotate - [select for diffs], Wed Sep 3 21:30:12 2003 UTC (20 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.67: +18 -6
lines
Diff to previous 1.67 (colored) to selected 1.170 (colored)
Change the behavor of AF_LOCAL connect() to sleep until the server has accepted the connection. This can prevent a client from overwhelming a server.
Revision 1.67 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:00 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.66: +32 -3
lines
Diff to previous 1.66 (colored) to selected 1.170 (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.66 / (download) - annotate - [select for diffs], Thu Jul 24 07:30:48 2003 UTC (20 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.65: +3 -10
lines
Diff to previous 1.65 (colored) to selected 1.170 (colored)
back rev 1.63 (the linux hack) off - no compat specific code in generic code, please we need to massage the passed linux cmsg anyway, linux uses different alignment for CMSG_DATA on at least some architectures
Revision 1.65 / (download) - annotate - [select for diffs], Wed Jul 23 22:17:54 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.64: +3 -5
lines
Diff to previous 1.64 (colored) to selected 1.170 (colored)
backout previous, there was a comment on LINUX_SOL_SOCKET=1
Revision 1.64 / (download) - annotate - [select for diffs], Wed Jul 23 21:42:31 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.63: +5 -3
lines
Diff to previous 1.63 (colored) to selected 1.170 (colored)
#define LINUX_SOL_SOCKET 1, so that we can answer "what the hell is this 1?" at ease.
Revision 1.63 / (download) - annotate - [select for diffs], Wed Jul 23 19:24:48 2003 UTC (20 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.62: +10 -3
lines
Diff to previous 1.62 (colored) to selected 1.170 (colored)
From Todd Vierling: Accept level == 1 for linux compat.
Revision 1.62 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:32 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.61: +17 -22
lines
Diff to previous 1.61 (colored) to selected 1.170 (colored)
Back out the lwp/ktrace changes. They contained a lot of colateral damage, and need to be examined and discussed more.
Revision 1.61 / (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.60: +24 -19
lines
Diff to previous 1.60 (colored) to selected 1.170 (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.60 / (download) - annotate - [select for diffs], Thu Apr 10 18:55:11 2003 UTC (21 years ago) by christos
Branch: MAIN
Changes since 1.59: +3 -3
lines
Diff to previous 1.59 (colored) to selected 1.170 (colored)
RP/21088: Jesse Off: Return ENOBUFS instead of EINVAL when sbappend fails.
Revision 1.59 / (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.58: +4 -4
lines
Diff to previous 1.58 (colored) to selected 1.170 (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.58 / (download) - annotate - [select for diffs], Tue Feb 25 09:56:15 2003 UTC (21 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.57: +4 -3
lines
Diff to previous 1.57 (colored) to selected 1.170 (colored)
Fix a simple_lock() mismatch in unp_internalize(). We may need to merge the passes over the files contained in the message as noted by enami tsugutomo on tech-smp.
Revision 1.57 / (download) - annotate - [select for diffs], Sun Feb 23 14:37:34 2003 UTC (21 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.56: +18 -9
lines
Diff to previous 1.56 (colored) to selected 1.170 (colored)
Make updating a file's reference and use count MP-safe.
Revision 1.56 / (download) - annotate - [select for diffs], Mon Nov 25 08:32:00 2002 UTC (21 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge,
nathanw_sa_base,
gmcgarry_ucred_base,
gmcgarry_ctxsw_base,
gmcgarry_ctxsw,
fvdl_fs64_base
Branch point for: gmcgarry_ucred
Changes since 1.55: +4 -10
lines
Diff to previous 1.55 (colored) to selected 1.170 (colored)
no need for error check after MEXTMALLOC - jdolecek
Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 25 06:32:38 2002 UTC (21 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.54: +10 -4
lines
Diff to previous 1.54 (colored) to selected 1.170 (colored)
MEXTMALLOC() can fail even if M_WAITOK, if arg is too big for malloc().
Revision 1.54 / (download) - annotate - [select for diffs], Wed Sep 4 01:32:45 2002 UTC (21 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: kqueue-beforemerge,
kqueue-base,
kqueue-aftermerge
Changes since 1.53: +8 -12
lines
Diff to previous 1.53 (colored) to selected 1.170 (colored)
Use the queue macros from <sys/queue.h> instead of referring to the queue members directly. Use *_FOREACH whenever possible.
Revision 1.53 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:34 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base,
newlock-base,
newlock,
netbsd-1-6-base,
netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1,
netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002,
netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001,
netbsd-1-6,
ifpoll-base,
gehenna-devsw-base,
gehenna-devsw,
eeh-devprop-base,
eeh-devprop
Changes since 1.52: +4 -1
lines
Diff to previous 1.52 (colored) to selected 1.170 (colored)
add RCSIDs
Revision 1.52 / (download) - annotate - [select for diffs], Thu Oct 18 20:17:24 2001 UTC (22 years, 6 months ago) by thorpej
Branch: MAIN
Branch point for: thorpej-mips-cache
Changes since 1.51: +2 -2
lines
Diff to previous 1.51 (colored) to selected 1.170 (colored)
Deprecate the "m_act" alias of "m_nextpkt" (m_act is a historical name), and just use m_nextpkt everywhere.
Revision 1.51 / (download) - annotate - [select for diffs], Thu Jun 14 20:32:47 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-devvp-base3,
thorpej-devvp-base2,
thorpej-devvp-base,
thorpej-devvp,
pre-chs-ubcperf,
post-chs-ubcperf
Branch point for: kqueue
Changes since 1.50: +2 -4
lines
Diff to previous 1.50 (colored) to selected 1.170 (colored)
Fix a partial construction problem that can cause race conditions between creation of a file descriptor and close(2) when using kernel assisted threads. What we do is stick descriptors in the table, but mark them as "larval". This causes essentially everything to treat it as a non-existent descriptor, except for fdalloc(), which sees a filled slot so that it won't (incorrectly) allocate it again. When a descriptor is fully constructed, the code that has constructed it marks it as "mature" (which actually clears the "larval" flag), and things continue to work as normal. While here, gather all the code that gets a descriptor from the table into a fd_getfile() function, and call it, rather than having the same (sometimes incorrect) code copied all over the place.
Revision 1.50 / (download) - annotate - [select for diffs], Thu Jun 7 01:29:16 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.49: +52 -24
lines
Diff to previous 1.49 (colored) to selected 1.170 (colored)
Rework fdalloc() even further: split fdalloc() into fdalloc() and fdexpand(). The former will return ENOSPC if there is not space in the current filedesc table. The latter performs the expansion of the filedesc table. This means that fdalloc() won't ever block, and it gives callers an opportunity to clean up before the potentially-blocking fdexpand() call. Update all fdalloc() callers to deal with the need-to-fdexpand() case. Rewrite unp_externalize() to use fdalloc() and fdexpand() in a safe way, using an algorithm suggested by Bill Sommerfeld: - Use a temporary array of integers to hold the new filedesc table indexes. This allows us to repeat the loop if necessary. - Loop through the array of file *'s, assigning them to filedesc table slots. If fdalloc() indicates expansion is necessary, undo the assignments we've done so far, expand, and retry the whole process. - Once all file *'s have been assigned to slots, update the f_msgcount and unp_rights counters. - Right before we return, copy the temporary integer array to the message buffer, and trim the length as before. Note that once locking is added to the filedesc array, this entire operation will be `atomic', in that the lock will be held while file *'s are assigned to embryonic table slots, thus preventing anything else from using them.
Revision 1.49 / (download) - annotate - [select for diffs], Wed Jun 6 17:00:00 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.48: +9 -4
lines
Diff to previous 1.48 (colored) to selected 1.170 (colored)
Change fdalloc() to return ERESTART if we had to reallocate the descriptor array, which may have blocked. Change callers of fdalloc() to restart whatever they\'re doing if this condition happens. (XXX unp_externalize() needs some work, but that will be tackled later.) Change finishdup() to close the descriptor in the `new\' slot if one exists, and change sys_dup2() accordingly. Closes a race condition when using kernel-assisted user threads. While here, garbage-collect UF_MAPPED -- it is not used anywhere.
Revision 1.48 / (download) - annotate - [select for diffs], Mon Jun 5 16:29:45 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase,
thorpej_scsipi_beforemerge,
thorpej_scsipi_base,
netbsd-1-5-base,
netbsd-1-5-RELEASE,
netbsd-1-5-BETA2,
netbsd-1-5-BETA,
netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5,
nathanw_sa
Changes since 1.47: +7 -6
lines
Diff to previous 1.47 (colored) to selected 1.170 (colored)
Oops, missed a couple of places where CMSG_*() should be used. No functional change in this case, but the code is now correct.
Revision 1.47 / (download) - annotate - [select for diffs], Mon Jun 5 06:06:07 2000 UTC (23 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.46: +28 -35
lines
Diff to previous 1.46 (colored) to selected 1.170 (colored)
- Fix file descriptor passing AGAIN. This has apparently been broken on LP64 systems (and probably the SPARC) since the __cmsg_alignbytes() changes went in. - Change file descriptor passing to use CMSG_DATA(), not (cm + 1). This pretty much has to be done in order to make it work properly on LP64, and considering that it's been broken this long... - Use CMSG_SPACE() to determine the mbuf length needed for a given control message, and CMSG_LEN() to stash in the cmsg_len member.
Revision 1.46 / (download) - annotate - [select for diffs], Thu Mar 30 09:27:14 2000 UTC (24 years ago) by augustss
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.45: +31 -31
lines
Diff to previous 1.45 (colored) to selected 1.170 (colored)
Get rid of register declarations.
Revision 1.45 / (download) - annotate - [select for diffs], Thu Jun 17 23:17:45 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-newbase,
chs-ubc2-base
Branch point for: thorpej_scsipi
Changes since 1.44: +4 -3
lines
Diff to previous 1.44 (colored) to selected 1.170 (colored)
Um, hi, let's initialize pointers before we use them.
Revision 1.44 / (download) - annotate - [select for diffs], Wed May 5 20:01:10 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +11 -3
lines
Diff to previous 1.43 (colored) to selected 1.170 (colored)
Add "use counting" to file entries. When closing a file, and it's reference count is 0, wait for use count to drain before finishing the close. This is necessary in order for multiple processes to safely share file descriptor tables.
Revision 1.43 / (download) - annotate - [select for diffs], Wed May 5 19:05:43 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.42: +2 -2
lines
Diff to previous 1.42 (colored) to selected 1.170 (colored)
Fix alignment problem in the garbage-collection code path.
Revision 1.42 / (download) - annotate - [select for diffs], Fri Apr 30 18:43:00 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +3 -3
lines
Diff to previous 1.41 (colored) to selected 1.170 (colored)
Break cdir/rdir/cmask info out of struct filedesc, and put it in a new substructure, `cwdinfo'. Implement optional sharing of this substructure. This is required for clone(2).
Revision 1.41 / (download) - annotate - [select for diffs], Wed Apr 21 02:37:07 1999 UTC (25 years ago) by mrg
Branch: MAIN
Changes since 1.40: +0 -18
lines
Diff to previous 1.40 (colored) to selected 1.170 (colored)
revert previous. oops.
Revision 1.40 / (download) - annotate - [select for diffs], Wed Apr 21 02:31:50 1999 UTC (25 years ago) by mrg
Branch: MAIN
Changes since 1.39: +19 -1
lines
Diff to previous 1.39 (colored) to selected 1.170 (colored)
properly test the msgsz as "msgsz - len". from PR#7386
Revision 1.39 / (download) - annotate - [select for diffs], Mon Mar 22 17:54:39 1999 UTC (25 years, 1 month ago) by sommerfe
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.38: +152 -30
lines
Diff to previous 1.38 (colored) to selected 1.170 (colored)
Disallow descriptor-passing of descriptors which are open on directories which aren't under the recipient's root. Clean up of many error conditions involving descriptor passing, to eliminate infinite loops, panics, premature garbage collection of sockets, and descriptor leaks: - Avoid letting unp_gc() see descriptors with a refcount of zero by removing them from the socket's queue before releasing them. - Avoid socket leak in PRU_ABORT (this will also gc descriptors queued on a not-yet accepted socket when the accepting socket goes away). - Put in block comment explaining how unp_gc() should work. - Correctly manage unp_defer count so we don't get stuck in an infinite loop with nothing to do. - Don't tie MARK and DEFER bits so closely together. - Mark descriptors queued on not-yet-accepted sockets as well. - Don't call sorflush on non-socket, it doesn't work very well. - Deal with discard of NULL file pointer. - Hopefully cause GC to converge faster by only deferring sockets in unp_mark().
Revision 1.38 / (download) - annotate - [select for diffs], Mon Dec 21 23:12:19 1998 UTC (25 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +13 -1
lines
Diff to previous 1.37 (colored) to selected 1.170 (colored)
In unp_internalize(), add a comment explaining why we must ALIGN() the data after the cmsghdr when accessing internalized SCM_RIGHTS messages (i.e. array of struct file *s). The historic interface does not align the externalized SCM_RIGHTS messages (i.e. array of ints).
Revision 1.37 / (download) - annotate - [select for diffs], Mon Dec 21 23:03:02 1998 UTC (25 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.36: +2 -2
lines
Diff to previous 1.36 (colored) to selected 1.170 (colored)
Fix a fencepost error in unp_scan() which caused a bad pointer deref on the SPARC platform only (ILP32 but ALIGNBYTES of 7), due to a missing ALIGN().
Revision 1.36 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:18 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
CVS Tags: kenh-if-detach-base,
kenh-if-detach,
chs-ubc-base,
chs-ubc
Changes since 1.35: +6 -6
lines
Diff to previous 1.35 (colored) to selected 1.170 (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.35 / (download) - annotate - [select for diffs], Fri Jul 31 22:50:53 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.34: +6 -6
lines
Diff to previous 1.34 (colored) to selected 1.170 (colored)
fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.
Revision 1.34 / (download) - annotate - [select for diffs], Sat Jul 18 05:04:38 1998 UTC (25 years, 9 months ago) by lukem
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.33: +2 -2
lines
Diff to previous 1.33 (colored) to selected 1.170 (colored)
use AF_LOCAL instead of AF_UNIX
Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 16 00:46:50 1998 UTC (25 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +3 -16
lines
Diff to previous 1.32 (colored) to selected 1.170 (colored)
Back out previous, I botched something.
Revision 1.32 / (download) - annotate - [select for diffs], Fri Jul 10 22:15:47 1998 UTC (25 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +17 -4
lines
Diff to previous 1.31 (colored) to selected 1.170 (colored)
For SOCK_STREAM, provide the socket credentials to the accepter as soon as the client connects.
Revision 1.31 / (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.30: +3 -3
lines
Diff to previous 1.30 (colored) to selected 1.170 (colored)
Merge with Lite2 + local changes
Revision 1.30 / (download) - annotate - [select for diffs], Wed Jan 7 22:57:09 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +188 -3
lines
Diff to previous 1.29 (colored) to selected 1.170 (colored)
Implement passing credentials as ancillary data on Unix domain sockets, enabled with the LOCAL_CREDS socket option on the listener. Semantics are similar to BSD/OS's: - Creds are available with first data on SOCK_STREAM, and with every datagram on SOCK_DGRAM. - It is not possible to forge credentials. Different in that: - Different credential data structure (ours does not rely on the format of internal kernel data structures, and does not pass the login name). - We can pass creds and file descriptors at the same time (this does not work in BSD/OS). Luke Mewburn <lukem@netbsd.org> gets credit for inspiring me to implement this. :-)
Revision 1.29 / (download) - annotate - [select for diffs], Wed Jan 7 04:03:38 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +2 -2
lines
Diff to previous 1.28 (colored) to selected 1.170 (colored)
Fix passing of multiple file descriptors (was broken when code was made 64-bit safe).
Revision 1.28 / (download) - annotate - [select for diffs], Fri Oct 17 17:35:08 1997 UTC (26 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-3-base,
netbsd-1-3-RELEASE,
netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.27: +2 -2
lines
Diff to previous 1.27 (colored) to selected 1.170 (colored)
PR/4280: Chris Jones: Sending more than one fd over AF_UNIX sockets causes panic. Bug in the fd -> struct file * conversion...
Revision 1.27 / (download) - annotate - [select for diffs], Thu Jun 26 06:06:40 1997 UTC (26 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-signal-base,
thorpej-signal,
marc-pcmcia-bp,
marc-pcmcia-base,
marc-pcmcia,
bouyer-scsipi
Changes since 1.26: +47 -23
lines
Diff to previous 1.26 (colored) to selected 1.170 (colored)
Several small changes to eliminate kludginess in dealing with unix domain socket names: - In unp_setsockaddr() and unp_setpeeraddr(), if the socket name can't fit into a single mbuf, allocate enough external storage space to hold it. - In unp_bind() and unp_connect(), perform a similar operation, but allocate one extra byte, and ensure that the pathname is nul-terminated. Many thanks to enami tsugutomo <enami@cv.sony.co.jp> for the sanity checking.
Revision 1.26 / (download) - annotate - [select for diffs], Tue Jun 24 19:12:55 1997 UTC (26 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +15 -8
lines
Diff to previous 1.25 (colored) to selected 1.170 (colored)
Eliminate use of dtom() in the handing of UNIX domain sockets. Add an "unp_addrlen" member to the unpcb, and use it when copying the socket name. This eliminates that last uses of dtom() in the system.
Revision 1.25 / (download) - annotate - [select for diffs], Thu May 15 17:01:04 1997 UTC (26 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.24: +7 -1
lines
Diff to previous 1.24 (colored) to selected 1.170 (colored)
When fstat(2)ing a file descriptor of a local communications domain socket, fill the socket's creation time into the stat structure's st_[acm]time fields: POSIX requires this behavior for pipe(2). N.B.: updating the st_[am]time fields when reading/writing the pipe is neither required nor implemented, though.
Revision 1.24 / (download) - annotate - [select for diffs], Thu Apr 10 01:51:21 1997 UTC (27 years ago) by cgd
Branch: MAIN
Changes since 1.23: +73 -21
lines
Diff to previous 1.23 (colored) to selected 1.170 (colored)
Internalize and externalize file descriptors being passed via local domain socket control messages correctly, without assuming that sizeof(int) == sizeof(pointer). Fixes PR#3183.
Revision 1.23 / (download) - annotate - [select for diffs], Thu May 23 17:07:03 1996 UTC (27 years, 11 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-setroot,
mrg-vm-swap,
is-newarp-before-merge,
is-newarp-base,
is-newarp
Changes since 1.22: +2 -1
lines
Diff to previous 1.22 (colored) to selected 1.170 (colored)
Oops. Add missing label.
Revision 1.22 / (download) - annotate - [select for diffs], Thu May 23 16:49:08 1996 UTC (27 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +6 -7
lines
Diff to previous 1.21 (colored) to selected 1.170 (colored)
We can only get a control mbuf for PRU_SEND or PRU_SENDOOB. Add diagnostic code to panic in this case.
Revision 1.21 / (download) - annotate - [select for diffs], Thu May 23 16:41:49 1996 UTC (27 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +8 -12
lines
Diff to previous 1.20 (colored) to selected 1.170 (colored)
Make sure the control and data mbufs are freed in all cases.
Revision 1.20 / (download) - annotate - [select for diffs], Thu May 23 16:03:45 1996 UTC (27 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +90 -65
lines
Diff to previous 1.19 (colored) to selected 1.170 (colored)
Separate some code into separate functions. Make unp_addr be a pointer to the sockaddr, not to the mbuf, as with raw sockets. Other minor cleanup.
Revision 1.19 / (download) - annotate - [select for diffs], Wed May 22 13:55:05 1996 UTC (27 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +3 -3
lines
Diff to previous 1.18 (colored) to selected 1.170 (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.18 / (download) - annotate - [select for diffs], Fri Feb 9 19:00:50 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.17: +1 -2
lines
Diff to previous 1.17 (colored) to selected 1.170 (colored)
More proto fixes
Revision 1.17 / (download) - annotate - [select for diffs], Sun Feb 4 20:32:15 1996 UTC (28 years, 2 months ago) by pk
Branch: MAIN
Changes since 1.16: +2 -2
lines
Diff to previous 1.16 (colored) to selected 1.170 (colored)
unp_detach() return type botch.
Revision 1.16 / (download) - annotate - [select for diffs], Sun Feb 4 02:18:00 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.15: +7 -5
lines
Diff to previous 1.15 (colored) to selected 1.170 (colored)
First pass at prototyping
Revision 1.15 / (download) - annotate - [select for diffs], Thu Aug 17 02:57:20 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.14: +3 -3
lines
Diff to previous 1.14 (colored) to selected 1.170 (colored)
so_pcb should be a void *.
Revision 1.14 / (download) - annotate - [select for diffs], Wed Aug 16 00:29:50 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +11 -11
lines
Diff to previous 1.13 (colored) to selected 1.170 (colored)
Allocate PCBs with malloc(), more mgetclr(). Be more careful to free the PCB after it's done with.
Revision 1.13 / (download) - annotate - [select for diffs], Wed Apr 5 21:26:40 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.12: +3 -3
lines
Diff to previous 1.12 (colored) to selected 1.170 (colored)
Add missing argument to closef().
Revision 1.12 / (download) - annotate - [select for diffs], Tue Dec 13 22:11:25 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +2 -2
lines
Diff to previous 1.11 (colored) to selected 1.170 (colored)
LEASE_CHECK -> VOP_LEASE
Revision 1.11 / (download) - annotate - [select for diffs], Tue Aug 30 03:06:10 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +6 -5
lines
Diff to previous 1.10 (colored) to selected 1.170 (colored)
Convert process, file, and namei lists and hash tables to use queue.h.
Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 29 06:33:43 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.9: +3 -2
lines
Diff to previous 1.9 (colored) to selected 1.170 (colored)
New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
Revision 1.9 / (download) - annotate - [select for diffs], Wed Jun 8 11:28:47 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +16 -22
lines
Diff to previous 1.8 (colored) to selected 1.170 (colored)
Update to 4.4-Lite fs code.
Revision 1.8 / (download) - annotate - [select for diffs], Wed May 4 09:50:11 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +76 -21
lines
Diff to previous 1.7 (colored) to selected 1.170 (colored)
Fix panic when closing a file descriptor on which access rights have been sent but not received.
Revision 1.7 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:34 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +15 -15
lines
Diff to previous 1.6 (colored) to selected 1.170 (colored)
Canonicalize all #includes.
Revision 1.6 / (download) - annotate - [select for diffs], Tue Sep 14 03:35:08 1993 UTC (30 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.5: +2 -2
lines
Diff to previous 1.5 (colored) to selected 1.170 (colored)
Fix from Noriyuki Soda <soda@sra.co.jp>: recvmsg(2) always returns -1 with errno==EMSGSIZE, when trying to pass file descriptors through UNIX domain socket.
Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 27 06:02:02 1993 UTC (30 years, 9 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
Branch point for: magnum
Changes since 1.4: +25 -5
lines
Diff to previous 1.4 (colored) to selected 1.170 (colored)
ANSIfications - removed all implicit function return types and argument definitions. Ensured that all files include "systm.h" to gain access to general prototypes. Casts where necessary.
Revision 1.4 / (download) - annotate - [select for diffs], Sat Jun 12 14:01:23 1993 UTC (30 years, 10 months ago) by andrew
Branch: MAIN
Changes since 1.3: +3 -2
lines
Diff to previous 1.3 (colored) to selected 1.170 (colored)
Yuval Yarom's 'panic:closef: count < 0' fix to unp_discard().
Revision 1.3 / (download) - annotate - [select for diffs], Sat May 22 11:41:56 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -2
lines
Diff to previous 1.2 (colored) to selected 1.170 (colored)
add include of select.h if necessary for protos, or delete if extraneous
Revision 1.2 / (download) - annotate - [select for diffs], Tue May 18 18:19:42 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.1: +3 -1
lines
Diff to previous 1.1 (colored) to selected 1.170 (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.170 (colored)
Initial revision