Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: source-changes
Date: 05/16/2000 06:45:26
Module Name:	syssrc
Committed By:	simonb
Date:		Tue May 16 13:45:26 UTC 2000

Modified Files:
	syssrc/sys/miscfs/procfs: procfs_cmdline.c

Log Message:
Apply patch from Robert Elz in PR kern/10113.  This fixes two problems
with procfs's cmdline - from the PR:

	The cmdline implementation in procfs is bogus.  It's possible that
	part of the fix is a workaround of a UVM problem - that is, when
	(internally) accessing the top of the process VM (the end of the
	args) a request for I/0 of a PAGE_SIZE'd block starting at less
	than a PAGE_SIZE from the end of the mem space returns EINVAL
	rather than the data that is available.  Whether this is a bug
	in UVM or not depends upon how it is defined to work, and I was
	unable to determine that.   (Simon Burge found that problem, and
	provided the basis of the workaround/fix).

	Then, the cmdline function is unable to read more than one
	page of args, and a good thing too, as the way it is written
	attempting to get more than that would reference into lala land.

	And, on an attempt to read a lot of data when the above is
	fixed, most of the data won't be returned, only the final block
	of any read.

Tested on alpha, pmax, i386 and sparc.


To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 syssrc/sys/miscfs/procfs/procfs_cmdline.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.