freebsd-nq/sys/netsmb
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
..
netbios.h Finish driving a stake through the heart of netns and the associated 2003-03-05 19:24:24 +00:00
smb_conn.c Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
smb_conn.h Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
smb_crypt.c Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
smb_dev.c Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
smb_dev.h Use automatic major number allocation for nsmb devices. 2004-02-11 12:49:49 +00:00
smb_iod.c Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
smb_rq.c Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
smb_rq.h Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
smb_smb.c Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
smb_subr.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
smb_subr.h Add support for SMB request signing, which prevents "man in the middle" 2004-01-02 22:38:42 +00:00
smb_tran.h
smb_trantcp.c Use __FBSDID(). 2003-06-11 05:37:42 +00:00
smb_trantcp.h Increase send/receive queue to accomodate large readx/writex requests. 2002-09-18 07:38:10 +00:00
smb_usr.c size_t != int. Make this compile on 64 bit platforms (eg: amd64). 2003-07-24 01:59:18 +00:00
smb.h Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00