OpenBSD CVS

CVS log for src/sys/nfs/krpc_subr.c


[BACK] Up to [local] / src / sys / nfs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.39 / (download) - annotate - [select for diffs], Wed May 1 13:15:59 2024 UTC (5 weeks, 5 days ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.38: +1 -5 lines
Diff to previous 1.38 (colored)

remove unneeded includes
ok miod@ mpi@

Revision 1.38 / (download) - annotate - [select for diffs], Thu Aug 3 09:49:09 2023 UTC (10 months, 1 week ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.37: +1 -9 lines
Diff to previous 1.37 (colored)

Move solock() down to sosetopt(). A part of standalone sblock() work.
This movement required because buffers related SO_SND* and SO_RCV*
socket options should be protected with sblock(). However, standalone
sblock() has different lock order with solock() and `so_snd' and
`so_rcv' buffers. At least sblock() for `so_snd' buffer will always be
taken before solock() in the sosend() path.

The (*pr_ctloutput)() call was removed from the SOL_SOCKET level 'else'
branch. Except the SO_RTABLE case where it handled in the special way,
this is null op call.

For SO_SND* and SO_RCV* cases solock() will be replaced by sblock() in
the future.

Feedback from bluhm

Tested by bluhm naddy

ok bluhm

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jun 6 14:45:41 2022 UTC (2 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.36: +12 -12 lines
Diff to previous 1.36 (colored)

Simplify solock() and sounlock(). There is no reason to return a value
for the lock operation and to pass a value to the unlock operation.
sofree() still needs an extra flag to know if sounlock() should be called
or not. But sofree() is called less often and mostly without keeping the lock.
OK mpi@ mvs@

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 22 22:45:04 2019 UTC (5 years, 4 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.35: +31 -8 lines
Diff to previous 1.35 (colored)

The kernel interpreted bogus lengths in RPC calls during NFS boot.
A malicious rpc.bootparamd could corrupt memory, but the kernel has
to trust the local network anyway in a diskless environment.  Now
in case of an RPC error, the kernel will stop booting with a specific
panic.
OK claudio@ beck@

Revision 1.35 / (download) - annotate - [select for diffs], Mon Sep 10 16:14:08 2018 UTC (5 years, 9 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.34: +2 -8 lines
Diff to previous 1.34 (colored)

Instead of calculating the mbuf packet header length here and there,
put the algorithm into a new function m_calchdrlen().  Also set an
uninitialized m_len to 0 in NFS code.
OK claudio@

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jul 30 12:22:14 2018 UTC (5 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Use FNONBLOCK instead of SS_NBIO to check/indicate that the I/O mode
for sockets is non-blocking.

This allows us to G/C SS_NBIO.  Having to keep the two flags in sync
in a mp-safe way is complicated.

This change introduce a behavior change in sosplice(), it can now
always block.  However this should not matter much due to the socket
lock being taken beforhand.

ok bluhm@, benno@, visa@

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jun 6 06:55:22 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.32: +6 -6 lines
Diff to previous 1.32 (colored)

Pass the socket to sounlock(), this prepare the terrain for per-socket
locking.

ok visa@, bluhm@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Sep 1 15:05:31 2017 UTC (6 years, 9 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.31: +5 -1 lines
Diff to previous 1.31 (colored)

Change sosetopt() to no longer free the mbuf it receives and change
all the callers to call m_freem(9).

Support from deraadt@ and tedu@, ok visa@, bluhm@

Revision 1.31 / (download) - annotate - [select for diffs], Thu Aug 10 19:20:43 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.30: +3 -1 lines
Diff to previous 1.30 (colored)

Move the solock()/sounlock() dance outside of sobind().

ok phessler@, visa@, bluhm@

Revision 1.30 / (download) - annotate - [select for diffs], Wed Aug 9 14:22:58 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.29: +14 -4 lines
Diff to previous 1.29 (colored)

Move the socket lock "above" sosetopt(), sogetopt() and sosplice().

Protect the fields modifieds by sosetopt() and simplify the dance
with the stars.

ok bluhm@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Aug 24 14:00:29 2015 UTC (8 years, 9 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

In kernel initialize struct sockaddr_in and sockaddr_in6 to zero
everywhere to avoid passing around pointers to uninitialized stack
memory.  While there, fix the call to in6_recoverscope() in
fill_drlist().
OK deraadt@ mpi@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jul 15 22:16:42 2015 UTC (8 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.27: +10 -12 lines
Diff to previous 1.27 (colored)

m_freem() can handle NULL, do not check for this condition beforehands.
ok stsp mpi

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jun 16 11:09:40 2015 UTC (8 years, 11 months ago) by mpi
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

Store a unique ID, an interface index, rather than a pointer to the
receiving interface in the packet header of every mbuf.

The interface pointer should now be retrieved when necessary with
if_get().  If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.

Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.

Tested by jmatthew@ and krw@, discussed with many.

ok mikeb@, bluhm@, dlg@

Revision 1.26 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:52 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 18 20:59:21 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

delete a whole mess of unnecessary caddr_t casts

Revision 1.24 / (download) - annotate - [select for diffs], Tue Nov 18 02:37:31 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.23: +1 -2 lines
Diff to previous 1.23 (colored)

move arc4random prototype to systm.h. more appropriate for most code
to include that than rdnvar.h. ok deraadt dlg

Revision 1.23 / (download) - annotate - [select for diffs], Fri Nov 14 23:01:44 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

bzero -> memset

Revision 1.22 / (download) - annotate - [select for diffs], Mon Nov 11 09:15:35 2013 UTC (10 years, 7 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored)

Replace most of our formating functions to convert IPv4/6 addresses from
network to presentation format to inet_ntop().

The few remaining functions will be soon converted.

ok mikeb@, deraadt@ and moral support from henning@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Aug 27 03:32:12 2013 UTC (10 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.20: +6 -6 lines
Diff to previous 1.20 (colored)

Manipulate timevals seperately, not inside a mbuf.  Alignment constraints
miod ran into.
ok miod matthew

Revision 1.20 / (download) - annotate - [select for diffs], Mon Oct 19 22:24:18 2009 UTC (14 years, 7 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.19: +10 -23 lines
Diff to previous 1.19 (colored)

antsy
no binary change apart from nfsm_reqhead() which is clearly correct.

ok thib@

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 22 07:47:22 2009 UTC (15 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

fix PR 6082: do not create more fd's than will fit in the message on
the receiving side when passing fd's. ok deraadt@ kettenis@

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jan 24 11:33:34 2009 UTC (15 years, 4 months ago) by thib
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

make sure the from mbuf gets freed on error to.

from David <dunnoseriously _att_ gmail.com>
ok blambert@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jun 10 23:15:32 2008 UTC (16 years ago) by blambert
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.16: +1 -7 lines
Diff to previous 1.16 (colored)

Remove redundant code that only leaked an mbuf.

ok krw@, deraadt@, thib@

earlier commit for some reason did not go through
prodded by nfs buddy

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 9 22:47:42 2008 UTC (16 years ago) by djm
Branch: MAIN
Changes since 1.15: +21 -4 lines
Diff to previous 1.15 (colored)

Introduce a facility to generate unpredictable 32 bit numbers with
near maximal (2^32) cycle times. These are useful for network
IDs in cases where there are negative consequences to ID prediction
and/or reuse.

Use the idgen32() functions to generate IPv6 IDs and NFS client/server
XIDs.

Pseudorandom permutation code in crypto/idgen.c based on public
domain skip32.c from Greg Rose.

feedback & ok thib@ deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 23 15:51:12 2008 UTC (16 years ago) by thib
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Deal with the situation when TCP nfs mounts timeout and processes
get hung in nfs_reconnect() because they do not have the proper
privilages to bind to a socket, by adding a struct proc * argument
to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind)
and do the sobind() with proc0 in nfs_connect.

OK markus@, blambert@.
"go ahead" deraadt@.

Fixes an issue reported by bernd@ (Tested by bernd@).
Fixes PR5135 too.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Feb 27 19:09:56 2007 UTC (17 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.13: +4 -3 lines
Diff to previous 1.13 (colored)

clarify RPC timeout messages so regular people can understand; ok various

Revision 1.13 / (download) - annotate - [select for diffs], Thu Nov 18 15:09:07 2004 UTC (19 years, 6 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

enable receive() accounting and use uio_procp for send() accounting, too
ok deraadt, jared, djm

Revision 1.9.10.2 / (download) - annotate - [select for diffs], Wed Dec 5 01:02:40 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.9.10.1: +5 -5 lines
Diff to previous 1.9.10.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

Merge in -current

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 14 23:37:33 2001 UTC (22 years, 7 months ago) by mickey
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, UBC_BASE, UBC, SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

allow swaples diskless configs; deradt@ ok

Revision 1.9.10.1 / (download) - annotate - [select for diffs], Wed Jul 4 10:55:44 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.9: +8 -23 lines
Diff to previous 1.9 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 27 05:45:00 2001 UTC (22 years, 11 months ago) by nate
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

recieve -> receive

Revision 1.10 / (download) - annotate - [select for diffs], Wed May 16 12:48:32 2001 UTC (23 years, 1 month ago) by ho
Branch: MAIN
Changes since 1.9: +7 -22 lines
Diff to previous 1.9 (colored)

No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)

Revision 1.9 / (download) - annotate - [select for diffs], Sat Feb 28 14:03:08 1998 UTC (26 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Branch point for: SMP
Changes since 1.8: +29 -14 lines
Diff to previous 1.8 (colored)

krpc_call() should use random reserved ports

Revision 1.8 / (download) - annotate - [select for diffs], Mon Feb 23 09:46:53 1998 UTC (26 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +5 -1 lines
Diff to previous 1.7 (colored)

do not copy from past end of mbuf; found by ivan

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 27 23:06:01 1997 UTC (27 years, 1 month ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.6: +5 -2 lines
Diff to previous 1.6 (colored)

Randomize RPC xid.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Apr 25 09:22:34 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

XXX should do reserved ports

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 10 07:30:04 1996 UTC (28 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.4: +8 -5 lines
Diff to previous 1.4 (colored)

do not lose an mbuf, ensure MCLGET did not give a chain

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 21 22:30:16 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

partial sync with netbsd 960418, more to come

Revision 1.3 / (download) - annotate - [select for diffs], Wed Apr 17 04:50:22 1996 UTC (28 years, 2 months ago) by mickey
Branch: MAIN
Changes since 1.2: +1 -0 lines
Diff to previous 1.2 (colored)

Minor cleanups. Checked against Lite2.
(NetBSD's was really just a Lite2's, but w/ 64bit support)

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 21 14:42:17 1995 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +13 -13 lines
Diff to previous 1.1 (colored)

from cgd; handle 64-bit pointers and longs

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:21 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:21 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN

Initial revision

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