Subject: Re: procfs cmdline and alpha broken?
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 05/13/2000 00:58:33
Simon Burge wrote:

> I'm nearly there with my sysctl(KERN_PROC)/ps/kvm changes, but have hit
> a snag getting the kernel argv/envp stuff working.  I've based the code
> to do that on the procfs code, and it's working fine on an i386 but not
> on an alpha.  Turns out that the procfs "cmdline" doesn't work on alpha
> either (at least with -current).  I've just started digging - has anyone
> else have problems with procfs cmdline on alpha and looked into it in
> the past?

Ok, this seems to be related to how close to the top of user-mapped
space argv is.  On i386, even though there's only a valid mapping up to
0xbfbfe000, I can still uvm_io a full page from 0xbfbfddbc.  On alpha,
there's a mapping up to 0x200000000, but a uvm_io fails reading a full
page at 0x1fffffda8.  I haven't checked the resid value - is it possible
that on i386 it's only returning a part page but on alpha it's erroring
because the full page is beyond the end of the map?

I've got things more or less working by only doing io up to a page
boundary, but have somehow buggered up an attempt to read an argv
more than a page long and now my graphics console pc164 at work isn't
responding to a ping and is probably sitting at a ddb prompt and any
further work on this will now be on hold until Monday...

Simon.