Home | History | Annotate | Download | only in nfs
History log of /src/sys/nfs/nfs_boot.c
RevisionDateAuthorComments
 1.90  05-Jul-2024  rin sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@
 1.89  20-Sep-2022  knakahara Remove routes on an address removal if the routes referencing to the address. Implemented by ozaki-r@n.o.

A route that has a gateway is on a connected route can be invalid if the
connected route is deleted, i.e., an associated address is removed.
Traditionally NetBSD doesn't sweep such a route on the address removal. Sending
packets over the route fails with "No route to host". Also the route holds an
orphan ifaddr as rt_ifa that is destructed say by in_purgeaddr.

If the same address is assgined again in such a state, there can be two
different ifaddr objects with the same address. Until recently it's not a
big problem because we can send packets anyway. However after MP-ification
of the network stack, we can't send packets because we strictly check if rt_ifa
(i.e., the (old) ifaddr) is valid.

This change automatically removes such routes on a removal of an associated
address to avoid keeping inconsistent routes.
 1.88  17-May-2018  thorpej Default NFS mounts to using TCP transport instead of UDP.
PR kern/53166
 1.87  15-Nov-2016  ozaki-r branches: 1.87.14;
Don't use rt_walktree to delete routes

Some functions use rt_walktree to scan the routing table and delete
matched routes. However, we shouldn't use rt_walktree to delete
routes because rt_walktree is recursive to the routing table (radix
tree) and isn't friendly to MP-ification. rt_walktree allows a caller
to pass a callback function to delete an matched entry. The callback
function is called from an API of the radix tree (rn_walktree) but
also calls an API of the radix tree to delete an entry.

This change adds a new API of the radix tree, rn_search_matched,
which returns a matched entry that is selected by a callback
function passed by a caller and the caller itself deletes the
entry. By using the API, we can avoid the recursive form.
 1.86  07-Jul-2016  msaitoh branches: 1.86.2;
KNF. Remove extra spaces. No functional change.
 1.85  21-May-2015  rtr change nfs_boot_sendrecv to take sockaddr_in * instead of mbuf *

fixes m_serv (single mbuf leak) leak in kern/subr_tftproot.c
 1.84  09-May-2015  rtr change sosend() to accept sockaddr * instead of mbuf * for nam.

bump to 7.99.16
 1.83  03-Apr-2015  rtr * 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@
 1.82  27-Mar-2015  hikaru m_pullup() is called in rcvproc callback functions,
so nfs_boot_sendrecv() should keep track of the head of mbuf chain.
fixes kern/48746
 1.81  25-Oct-2013  martin branches: 1.81.4; 1.81.6;
Mark a potentially unused variable
 1.80  04-Oct-2010  cyber branches: 1.80.8; 1.80.14; 1.80.18; 1.80.22;
Add support to honor MTU settings from DHCP during netboot.

Defines IP_MIN_MTU as 576.

Glanced over quickly by martin@ and joerg@.
 1.79  04-Mar-2009  nisimura branches: 1.79.2; 1.79.4;
Update comments to reflect realities; the filenames were changed in 1997
and another one was added years ago.
 1.78  19-Nov-2008  ad branches: 1.78.4;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.77  27-Oct-2008  cegger make this build again without having
NFS_BOOT_BOOTSTATIC, NFS_BOOT_BOOTP, NFS_BOOT_DHCP or NFS_BOOT_BOOTPARAM
defined.

I uncovered this case when compiling rump.
 1.76  27-Oct-2008  cegger change nfs boot behaviour to automatically try next boot method if boot information are incomplete to succeed.
That way, it is possible combine static and dhcp boot:
For example, to boot diskless you can specify the nfs-server and the rootpath statically. All other information will be taken via dhcp.

Patch has been presented on port-xen, tech-kern and tech-net:
http://mail-index.netbsd.org/port-xen/2008/10/24/msg004488.html
http://mail-index.netbsd.org/tech-kern/2008/10/24/msg003255.html
http://mail-index.netbsd.org/tech-net/2008/10/24/msg000864.html

No comments, no objections.
 1.75  24-Oct-2008  cegger branches: 1.75.2;
- ansify function definition
- de- __P
- u_int32_t -> uint32_t

No functional changes.
 1.74  06-Aug-2008  plunky Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core
 1.73  22-May-2008  dyoung branches: 1.73.4;
Delete unnecessary cast to void *.
 1.72  28-Apr-2008  martin branches: 1.72.2;
Remove clause 3 and 4 from TNF licenses
 1.71  24-Apr-2008  ad branches: 1.71.2;
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@.
 1.70  05-Apr-2008  cegger branches: 1.70.2;
use aprint_*_dev and device_xname
 1.69  31-Aug-2007  dyoung branches: 1.69.20;
Use sockaddr_in_init() and ifreq_setaddr() to initialize a sockaddr_in
and an ifreq.ifr_addr, respectively. Get rid of an extraneous
cast---down the elevator shaft! Change 'ireq' to 'ifr', which is
what the kernel calls a temporary struct ifreq virtually everywhere
else.
 1.68  19-Jul-2007  dyoung branches: 1.68.4; 1.68.6; 1.68.8;
Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

Introduce rt_walktree() for walking the routing table and
applying a function to each rtentry. Replace most
rn_walktree() calls with it.

Use rt_getkey()/rt_setkey() to get/set a route's destination.
Keep a pointer to the sockaddr key in the rtentry, so that
rtentry users do not have to grovel in the radix_node for
the key.

Add a RTM_GET method to rtrequest. Use that instead of
radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

Constify. KNF. Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
et cetera. Use NULL instead of 0 for null pointers. Use
__arraycount(). Reduce gratuitous parenthesization.

Stop using variadic arguments for rip6_output(), it is
unnecessary.

Remove the unnecessary rtentry member rt_genmask and the
code to maintain it, since nothing actually used it.

Make rt_maskedcopy() easier to read by using meaningful variable
names.

Extract a subroutine intern_netmask() for looking up a netmask in
the masks table.

Start converting backslash-ridden IPv6 macros in
sys/netinet6/in6_var.h into inline subroutines that one
can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.
 1.67  09-Jun-2007  dyoung branches: 1.67.2;
Cosmetic: de-__P() et cetera.
 1.66  08-May-2007  manu Fix buid (broken by a fix introduced in the wrong file...)
 1.65  08-May-2007  manu Add the TFTPROOT kernel option for TFTP'ing root RAMdisk at root mount time.
This allows working around situations where a kernel with embedded RAMdisk
cannot be booted by the bootloader because the RAMdisk is too big.
 1.64  04-Mar-2007  christos branches: 1.64.2; 1.64.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.63  01-Mar-2006  yamt branches: 1.63.18; 1.63.20;
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
the latter is more natural to specify an address space.
(and less likely to be abused for random purposes.)
- fix a swdmover race.
 1.62  11-Dec-2005  christos branches: 1.62.2; 1.62.4; 1.62.6;
merge ktrace-lwp.
 1.61  22-May-2004  jonathan branches: 1.61.12;
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.
 1.60  11-Mar-2004  cl Add static nfs boot configuration, from the kernel config file or from
a driver selectable callback function. This is used in the Xen port to
allow controlling the domain's network setup from the domain building
environment at domain creation (vs. having to maintain/change this on a
dhcp server). The Xen network driver parses a command line passed in
from the domain builder.
 1.59  29-Jun-2003  fvdl branches: 1.59.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.58  28-Jun-2003  darrenr 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
 1.57  10-Nov-2001  lukem add RCSIDs
 1.56  19-Jan-2001  enami branches: 1.56.2; 1.56.4; 1.56.8;
Use tsleep instead of dalay; since we're mounting root, we can sleep
and no reason to use delay.
 1.55  10-Dec-2000  fvdl Make sobind() take a struct proc *. It already took curproc and
passed it down to the appropriate usrreq function, and this
allows usage for contexts that need to be explicitly different
from curproc (like in the NFS code when binding to a reserved port).
 1.54  19-Sep-2000  bjh21 New kernel option, NFS_V2_ONLY, which aims to reduce the NFS client to just
that required to support NFSv2 mounts. Not finished yet, but already
provides some 44k of saving in code size on arm26. More savings, and some
documentation, are still to come.
 1.53  29-Mar-2000  simonb branches: 1.53.4;
Don't need to include <sys/conf.h> here.
 1.52  03-Sep-1999  drochner branches: 1.52.2;
Wait some seconds after the interface is brought up before packets
are sent. Needed at least for if_ti to get the link up.
 1.51  07-Jul-1999  drochner mount diskless root with "NFSMNT_NOCONN" (which is default in "mount_nfs"
for quite a while) to allow certain servers (multihomed, as our DEC NSE
cluster) to be used as root filesystem without special tweaks
 1.50  21-Feb-1999  drochner branches: 1.50.2; 1.50.4;
restructure the diskless NFS boot code to keep track of the used
interface and the address allocated, to roll everything back if the
mount fails:
-put an interface pointer into "struct nfs_diskless" to have it
available for cleanup, don't pass it around anymore where the
"struct nfs_diskless" is already passed
-add a "cleanup" function which shuts the interface down
-in the protocol-specific parts, either return with "everything
ready" or "completely shut down"
-use common functions for interface initialization and shutdown
-add a function to delete all routes associate to an interface
(why is this necessary and not done by ~IFF_UP?)
g/c diskless swap stuff
general cleanup
 1.49  13-Sep-1998  christos Fix copyright spacing.
 1.48  09-Aug-1998  perry bzero->memset, bcopy->memcpy, bcmp->memcmp
 1.47  13-Jun-1998  drochner Fix last change: If BOOTP/DHCP was successful, don't try RARP/BOOTPARAM.
 1.46  13-Jun-1998  tv Clean up boogered gcc warning workaround (remove goto completely) and remove
a redundant `if'.
 1.45  25-Apr-1998  matt Adapt to new sosend/soreceive and upcall (now down in sowakeup)
 1.44  01-Mar-1998  fvdl Merge with Lite2 + local changes
 1.43  28-Feb-1998  cgd be a bit more clear about what protocols will be tried in the
BOOTP/DHCP case.
 1.42  12-Jan-1998  scottr Consolidate NFS_BOOT_* options into opt_nfs_boot.h
 1.41  11-Jan-1998  scottr Make NFS_BOOT_DHCP work as expected.
 1.40  09-Jan-1998  drochner Use new options "NFS_BOOT_BOOTP" and "NFS_BOOT_BOOTPARAM" for parts
conditional on a particular configuration method.
The global flags "nfs_boot_rfc951" and "nfs_boot_bootparam" control
independantly if the functions are actually called. (Previous meaning
of "nfs_boot_rfc951" was "either-or".)
 1.39  30-Sep-1997  drochner Factor out some functions used by bootparam and DHCP boot.
 1.38  13-Sep-1997  thorpej Correct a comment regarding the sense of the nfs_boot_rfc951 global.
 1.37  09-Sep-1997  gwr Move the call to nfs_boot_getfh() from nfs_vfsops.c to nfs_boot.c
(just for better isolation - it can now be static)
 1.36  02-Sep-1997  gwr Change test from NETHER to NARP (revarpwhoami is in if_arp.c)
 1.35  29-Aug-1997  gwr Supporting changes for the new BOOTP support in nfs_mountroot.
 1.34  14-Aug-1997  drochner 1. Allow to set a netmask (option NFS_BOOT_NETMASK) for the booting
interface. Without this, NFS_BOOT_NETMASK could be useless in
subnetting envirinment.
2. Comment out unneeded NFS swap related stuff.
Closes PR kern/3918.
 1.33  27-May-1997  gwr branches: 1.33.4;
Minor reorganization of nfs_mountroot code to simplify BOOTP support.
The RPC/bootparamd calls to get the root and swap paths are now done
in nfs_boot_init() instead of nfs_boot_getfh(), so the latter now just
does the RPC/mountd call. Also changed some panics into error returns.
 1.32  17-Mar-1997  thorpej Add some missing "\n"'s.
 1.31  15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.30  31-Jan-1997  thorpej branches: 1.30.2;
- Don't look for a "suitable interface"; we're now given the name of the
network interface to use.
- If any part of the NFS root mount process fails, don't panic.
Simply return the appropriate error and let the caller recover.
 1.29  20-Oct-1996  fvdl branches: 1.29.2;
Enhancements from Matthias Drochner:
- Try V3 first for diskless booting. Fall back to V2 if V3 fails.
- optionally (option NFS_BOOT_TCP) try a TCP mount first
for diskless booting. Fall back to UDP if it fails.
- Enable switching between UDP and TCP for remounts.
 1.28  13-Oct-1996  christos revert kprintf changes
 1.27  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.26  07-May-1996  thorpej Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
 1.25  18-Feb-1996  fvdl Bring in a merge of Rick Macklem's NFSv3 code from Lite2
 1.24  16-Feb-1996  gwr Add stub for nfs_boot_getfh if NETHER==0
 1.23  13-Feb-1996  gwr Do the RPC to bootparamd a little later (just before the mountd call)
so that we do not ask for the "swap" path when swapping on disk.
 1.22  10-Feb-1996  pk Don't return EBADRPC if we have something else.
 1.21  09-Feb-1996  christos nfs prototype changes
 1.20  19-Dec-1995  cgd changes to make this work on systems where pointers & longs are 64 bits.
This is mostly just changes to make the stuff that goes over the wire
use fixed-size types.
 1.19  12-Jun-1995  mycroft Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.
 1.18  23-May-1995  cgd don't blindly set IFF_UP; or it with old flags
 1.17  20-May-1995  mycroft Use fxdr_*() and txdr_*() macros to do byte order conversions.
 1.16  24-Apr-1995  gwr Fixed RPC code to deal with RPC messages larger than one mbuf.
 1.15  28-Mar-1995  gwr Cosmetic changes suggested by Adam.
 1.14  18-Mar-1995  gwr Do the printf "root/swap on" elsewhere to avoid confusion.
 1.13  16-Feb-1995  pk Working "config generic" support; from Theo.
 1.12  29-Oct-1994  cgd fix a couple of obvious, painful endianness bugs introduced in last commit.
 1.11  26-Sep-1994  gwr Do the first BOOTPARAM RPC call to the broadcast address instead of
using the address of the RARP server because a BOOTPARAM server
might not be running on the machine that sent the RARP reply.
 1.10  11-Aug-1994  mycroft char * --> caddr_t, where appropriate.
 1.9  11-Aug-1994  gwr Diskless boot will now bind the local socket to a reserved port to
satisfy picky servers. Also fix some missing initializations.
(Thanks to Chuck Cranor for PR#394 -- now fixed.)
 1.8  19-Jul-1994  gwr Fix the conditionally compiled code inside #ifdef NFS_BOOT_GATEWAY
and make some printf args use host byteorder.
 1.7  16-Jul-1994  paulus If we don't have ethernet, nfs_boot_init reduces to just a panic.
This is so I don't get an undefined symbol compiling a kernel with
NFSCLIENT but no ethernet.
 1.6  29-Jun-1994  deraadt branches: 1.6.2;
knf
 1.5  29-Jun-1994  cgd New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
 1.4  21-Jun-1994  pk Construct mountpath for remote root.
 1.3  13-Jun-1994  gwr New diskless boot code (uses RARP, bootparamd).
 1.2  05-May-1994  cgd lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around. kill some unnecessary type and macro
definitions. standardize clock handling. More changes than you'd want.
 1.1  18-Apr-1994  glass revised nfs diskless support. uses bootp+rpc to gather parameters
 1.6.2.3  11-Aug-1994  mycroft update from trunk
 1.6.2.2  19-Jul-1994  cgd from trunk, per gwr.
 1.6.2.1  16-Jul-1994  cgd update from trunk, per paulus
 1.29.2.1  14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection. Notable features:

- All ports behave in a consistent manner regarding root
device selection.
- No more "options GENERIC"; all kernels have the ability
to boot with RB_ASKNAME to select root device and file system
type.
- Root file system type can be wildcarded; a machine-independent
function will try all possible file systems for the selected
root device until one succeeds.
- If the root file system fails to mount, the operator will
be given the chance to select a new root device and file
system type, rather than having the machine simply panic.
- nfs_mountroot() no longer panics if any part of the NFS
mount process fails; it now returns an error, giving the
operator a chance to recover.
- New, more consistent, config(8) grammar. The constructs:

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

config netbsd root on ? type ?
config netbsd root on ? type nfs

Additionally, the operator may select or wildcard root file
system type in the kernel configuration file:

config netbsd root on cd0a type cd9660

config(8) now requires that a "root" specification be
made. "root" may be wired down or wildcarded. "swap" and
"dump" specifications are optional, and follow previous
semantics.

- config(8) has a new "file-system" keyword, used to configure
file systems into the kernel. Eventually, this will be used
to generate the default vfssw[].

- "options NFSCLIENT" is obsolete, and is replaced by
"file-system NFS". "options NFSSERVER" still exists, since
NFS server support is independent of the NFS file system
client.

- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot(). Only SPARC, i386, and Alpha ports have been
tested at this time. Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.30.2.2  10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.30.2.1  07-Feb-1997  is Snapshot of new ARP code.

Our old ARP code was hardwired for 6-byte length medium
addresses, while the protocol is designed for any size.

This snapshot contains a first hack at getting rid of
Ethernet specific data structures. The ep driver is updated
(and tested on the PCI bus), the iy and fpa drivers have been
updated, but not real life tested yet.

If you want to test this with other drivers, you have to update
them first yourself, and probably tag the relevant directories.
Better contact me if you want to do this.
 1.33.4.5  14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.33.4.4  16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.33.4.3  04-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.33.4.2  01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.33.4.1  23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.50.4.1  02-Aug-1999  thorpej Update from trunk.
 1.50.2.1  05-Oct-1999  he Pull up revisions 1.51-1.52 (requested by drochner):
Mount diskless root with "noconn" option to allow easier use of
multi-homed servers.
Wait a while between bringing up interface and using it, to allow
e.g. if_ti driver to establish the link.
 1.52.2.3  11-Feb-2001  bouyer Sync with HEAD.
 1.52.2.2  13-Dec-2000  bouyer Sync with HEAD (for UBC fixes).
 1.52.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.53.4.1  15-Dec-2000  he Pull up revision 1.55 (requested by fvdl):
Fix NFS+tcp client hangs on server or network outage. Again,
please note that this introduces yet another kernel interface
change: sobind() gains an argument.
 1.56.8.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.56.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.56.2.4  12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.56.2.3  24-Jun-2002  nathanw Curproc->curlwp renaming.

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

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.56.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.56.2.1  05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.59.2.5  04-Feb-2005  skrll Adapt to branch.
 1.59.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.59.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.59.2.2  03-Aug-2004  skrll Sync with HEAD
 1.59.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.61.12.2  03-Sep-2007  yamt sync with head.
 1.61.12.1  21-Jun-2006  yamt sync with head.
 1.62.6.1  22-Apr-2006  simonb Sync with head.
 1.62.4.1  09-Sep-2006  rpaulo sync with head
 1.62.2.1  31-Dec-2005  yamt - adapt nfs.
- nfs_doio_read: #if 0 out "killproc if text is modified" part of
the code as it's broken. (a process reading the modified text is not
necessarily a process which is using the file as a text.)
 1.63.20.2  17-May-2007  yamt sync with head.
 1.63.20.1  12-Mar-2007  rmind Sync with HEAD.
 1.63.18.1  13-May-2007  jdc Pull up revisions 1.65-1.66 (requested by manu in ticket #635).

Add the TFTPROOT kernel option for TFTP'ing root RAMdisk at root mount time.
This allows working around situations where a kernel with embedded RAMdisk
cannot be booted by the bootloader because the RAMdisk is too big.

Fix build (broken by a fix introduced in the wrong file...)
 1.64.4.1  11-Jul-2007  mjf Sync with head.
 1.64.2.4  09-Oct-2007  ad Sync with head.
 1.64.2.3  20-Aug-2007  ad Sync with HEAD.
 1.64.2.2  15-Jul-2007  ad Sync with head.
 1.64.2.1  08-Jun-2007  ad Sync with head.
 1.67.2.2  03-Sep-2007  skrll Sync with HEAD.
 1.67.2.1  15-Aug-2007  skrll Sync with HEAD.
 1.68.8.2  19-Jul-2007  dyoung Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

Introduce rt_walktree() for walking the routing table and
applying a function to each rtentry. Replace most
rn_walktree() calls with it.

Use rt_getkey()/rt_setkey() to get/set a route's destination.
Keep a pointer to the sockaddr key in the rtentry, so that
rtentry users do not have to grovel in the radix_node for
the key.

Add a RTM_GET method to rtrequest. Use that instead of
radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

Constify. KNF. Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
et cetera. Use NULL instead of 0 for null pointers. Use
__arraycount(). Reduce gratuitous parenthesization.

Stop using variadic arguments for rip6_output(), it is
unnecessary.

Remove the unnecessary rtentry member rt_genmask and the
code to maintain it, since nothing actually used it.

Make rt_maskedcopy() easier to read by using meaningful variable
names.

Extract a subroutine intern_netmask() for looking up a netmask in
the masks table.

Start converting backslash-ridden IPv6 macros in
sys/netinet6/in6_var.h into inline subroutines that one
can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.
 1.68.8.1  19-Jul-2007  dyoung file nfs_boot.c was added on branch matt-mips64 on 2007-07-19 20:49:01 +0000
 1.68.6.1  06-Nov-2007  matt sync with HEAD
 1.68.4.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.69.20.3  17-Jan-2009  mjf Sync with HEAD.
 1.69.20.2  28-Sep-2008  mjf Sync with HEAD.
 1.69.20.1  02-Jun-2008  mjf Sync with HEAD.
 1.70.2.2  04-Jun-2008  yamt sync with head
 1.70.2.1  18-May-2008  yamt sync with head.
 1.71.2.3  09-Oct-2010  yamt sync with head
 1.71.2.2  04-May-2009  yamt sync with head.
 1.71.2.1  16-May-2008  yamt sync with head.
 1.72.2.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.72.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.73.4.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.73.4.1  19-Oct-2008  haad Sync with HEAD.
 1.75.2.2  28-Apr-2009  skrll Sync with HEAD.
 1.75.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.78.4.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.79.4.1  05-Mar-2011  rmind sync with head
 1.79.2.1  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.80.22.1  18-May-2014  rmind sync with head
 1.80.18.2  03-Dec-2017  jdolecek update from HEAD
 1.80.18.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.80.14.1  16-Apr-2015  msaitoh Pull up following revision(s) (requested by hikaru in ticket #1287):
sys/kern/subr_tftproot.c: revision 1.14 via patch
sys/nfs/nfsdiskless.h: revision 1.31
sys/nfs/nfs_boot.c: revision 1.82
sys/nfs/krpc_subr.c: revision 1.39
sys/nfs/nfs_bootdhcp.c: revision 1.53
m_pullup() is called in rcvproc callback functions,
so nfs_boot_sendrecv() should keep track of the head of mbuf chain.
fixes kern/48746
 1.80.8.1  22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.81.6.3  05-Dec-2016  skrll Sync with HEAD
 1.81.6.2  06-Jun-2015  skrll Sync with HEAD
 1.81.6.1  06-Apr-2015  skrll Sync with HEAD
 1.81.4.1  06-Apr-2015  snj Pull up following revision(s) (requested by hikaru in ticket #656):
sys/kern/subr_tftproot.c: revision 1.14
sys/nfs/krpc_subr.c: revision 1.39
sys/nfs/nfs_boot.c: revision 1.82
sys/nfs/nfs_bootdhcp.c: revision 1.53
sys/nfs/nfsdiskless.h: revision 1.31
m_pullup() is called in rcvproc callback functions,
so nfs_boot_sendrecv() should keep track of the head of mbuf chain.
fixes kern/48746
 1.86.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.87.14.1  21-May-2018  pgoyette Sync with HEAD

RSS XML Feed