freebsd-dev/sys/netncp
Don Lewis 47934cef8f Split the mlock() kernel code into two parts, mlock(), which unpacks
the syscall arguments and does the suser() permission check, and
kern_mlock(), which does the resource limit checking and calls
vm_map_wire().  Split munlock() in a similar way.

Enable the RLIMIT_MEMLOCK checking code in kern_mlock().

Replace calls to vslock() and vsunlock() in the sysctl code with
calls to kern_mlock() and kern_munlock() so that the sysctl code
will obey the wired memory limits.

Nuke the vslock() and vsunlock() implementations, which are no
longer used.

Add a member to struct sysctl_req to track the amount of memory
that is wired to handle the request.

Modify sysctl_wire_old_buffer() to return an error if its call to
kern_mlock() fails.  Only wire the minimum of the length specified
in the sysctl request and the length specified in its argument list.
It is recommended that sysctl handlers that use sysctl_wire_old_buffer()
should specify reasonable estimates for the amount of data they
want to return so that only the minimum amount of memory is wired
no matter what length has been specified by the request.

Modify the callers of sysctl_wire_old_buffer() to look for the
error return.

Modify sysctl_old_user to obey the wired buffer length and clean up
its implementation.

Reviewed by:	bms
2004-02-26 00:27:04 +00:00
..
ncp_cfg.h
ncp_conn.c Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
ncp_conn.h Catch up with KSE changes. 2003-02-26 21:25:55 +00:00
ncp_crypt.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
ncp_file.h use __packed. 2002-09-23 18:54:32 +00:00
ncp_lib.h
ncp_login.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
ncp_mod.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
ncp_ncp.c size_t != int. Make this compile on 64 bit platforms (eg: amd64). 2003-07-24 01:59:18 +00:00
ncp_ncp.h Catch up with KSE changes. 2003-02-26 21:25:55 +00:00
ncp_nls.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
ncp_nls.h
ncp_rcfile.h
ncp_rq.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
ncp_rq.h Catch up with KSE changes. 2003-02-26 21:25:55 +00:00
ncp_sock.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
ncp_sock.h Catch up with KSE changes. 2003-02-26 21:25:55 +00:00
ncp_subr.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
ncp_subr.h Catch up with KSE changes. 2003-02-26 21:25:55 +00:00
ncp_user.h
ncp.h Use a character device and ioctl() for communication between libncp 2003-02-28 04:31:29 +00:00
ncpio.h Use a character device and ioctl() for communication between libncp 2003-02-28 04:31:29 +00:00
nwerror.h