Re: [9fans] _tos puzzle

2008-05-08 Thread Anant Narayanan
Hi Russ, You should print AX after every instruction too, to see if you've actually set it up the way you think you did. I did, and to my surprise, AX is 0, even though I set it properly in the loader. It appears as if Linux is setting AX to 0 sometime after the loader finishes, but before

Re: [9fans] infauth factotum bug?

2008-05-08 Thread erik quanstrom
> It seems bizarre that factotum would > volunteer my terminal's user id, which is totally disjoint from the > user id namespace of the cpu server. if the "user id namespace" is disjoint, does that mean you are running more than one auth server? - erik

Re: [9fans] infauth factotum bug?

2008-05-08 Thread Nathaniel W Filardo
On Thu, May 08, 2008 at 10:02:18AM -0400, Russ Cox wrote: > > term% echo delkey > /mnt/factotum/ctl > > term% cpu -h sea.cs.jhu.edu -k 'user=bootes' > > [add key dance] > > sea# > > term% cpu -h sea.cs.jhu.edu -k 'user=nwf' > > [no key dance is necessary] > > cpu% > > term% cpu -h sea.cs.jhu.edu -k

Re: [9fans] _tos puzzle

2008-05-08 Thread Russ Cox
> I set EAX before starting the executable, but still no luck :( > On Plan 9, for /bin/mk: > > acid: symbols("_tos") > _tos D 0x00016084 > acid: mem(0x00016084, "X") > 0xdfffefc8 > > I'm probing address 0x16084 on linux after every instruction (using > ptrace's singlestep), and i

Re: [9fans] _tos puzzle

2008-05-08 Thread Anant Narayanan
So I have to allocate 56 bytes (sizeof(Tos) on 386) of space above the top of stack (before copying argc and argv) and set AX to that address, correct? Yes. And you need to maintain it. At the very least you need to initialize tos->pid and update it on return from rfork. I set EAX before st

Re: [9fans] v9fs/fossil oddity

2008-05-08 Thread Brian L. Stuart
From: "Brian L. Stuart" <[EMAIL PROTECTED]> > From: "Eric Van Hensbergen" <[EMAIL PROTECTED]> > > On Thu, May 8, 2008 at 12:56 PM, Brian L. Stuart <[EMAIL PROTECTED]> > wrote: > > > - v9fs defines P9_OEXCL to be 4, where > > > /sys/include/libc.h defines OEXCL to be 0x1000 > > > > Which versio

Re: [9fans] v9fs/fossil oddity

2008-05-08 Thread Brian L. Stuart
-- Original message -- From: "Eric Van Hensbergen" <[EMAIL PROTECTED]> > > On Thu, May 8, 2008 at 12:56 PM, Brian L. Stuart <[EMAIL PROTECTED]> wrote: > > - v9fs defines P9_OEXCL to be 4, where > > /sys/include/libc.h defines OEXCL to be 0x1000 > > Which ver

Re: [9fans] v9fs/fossil oddity

2008-05-08 Thread Eric Van Hensbergen
On Thu, May 8, 2008 at 12:56 PM, Brian L. Stuart <[EMAIL PROTECTED]> wrote: > I've found something that looks odd in the way v9fs > under Linux interacts with a fossil running on Plan 9. > If I create a file by redirecting output, the shell > seems able to happily create the file. If I try to >

[9fans] v9fs/fossil oddity

2008-05-08 Thread Brian L. Stuart
I've found something that looks odd in the way v9fs under Linux interacts with a fossil running on Plan 9. If I create a file by redirecting output, the shell seems able to happily create the file. If I try to cp a file, then it fails. The logs show the error "unknown mode." As near as I can tel

Re: [9fans] _tos puzzle

2008-05-08 Thread Charles Forsyth
> The clone(2) system call in linux allows for creation of child > processes that share address space with its parent, with the exception > of the stack segment. I believe that should do? >Wouldn't the CLONE_VM flag do this? no. Linux shares the stack segment too: the underlying system call

Re: [9fans] _tos puzzle

2008-05-08 Thread Steven Vormwald
On Thu, 2008-05-08 at 13:24 -0400, Russ Cox wrote: > > So I have to allocate 56 bytes (sizeof(Tos) on 386) of space above the > > top of stack (before copying argc and argv) and set AX to that > > address, correct? > > Yes. And you need to maintain it. > At the very least you need to initial

Re: [9fans] _tos puzzle

2008-05-08 Thread Russ Cox
> So I have to allocate 56 bytes (sizeof(Tos) on 386) of space above the > top of stack (before copying argc and argv) and set AX to that > address, correct? Yes. And you need to maintain it. At the very least you need to initialize tos->pid and update it on return from rfork. > The clone(2

Re: [9fans] _tos puzzle

2008-05-08 Thread Anant Narayanan
Hi Russ, Thanks for your response! When a Plan 9 binary first starts running, the system call return register (AX in this case) contains a pointer to the Tos structure. /sys/src/libc/386/main9.s saves that value in the global variable named _tos. It sounds like you are not setting AX correctly

Re: [9fans] _tos puzzle

2008-05-08 Thread Russ Cox
Tos is a clumsy hack. It refers to a structure stored at the top of the stack that is used to pass data between the kernel and user space without system calls. See /sys/include/tos.h. When a Plan 9 binary first starts running, the system call return register (AX in this case) contains a pointer

[9fans] _tos puzzle

2008-05-08 Thread Anant Narayanan
Good day, I got some plan9 binaries to work on Linux (8c, 8l, cat, sed, cal and a few more were tested), but all others are failing at exactly the same instruction: plock+0x31 MOVL 0x30(CX), CX (which is called whenever malloc is used). For some context: acid: asm(plock+0x20) plock+0x20

Re: [9fans] infauth factotum bug?

2008-05-08 Thread Russ Cox
> term% echo delkey > /mnt/factotum/ctl > term% cpu -h sea.cs.jhu.edu -k 'user=bootes' > [add key dance] > sea# > term% cpu -h sea.cs.jhu.edu -k 'user=nwf' > [no key dance is necessary] > cpu% > term% cpu -h sea.cs.jhu.edu -k 'user=me' > !Adding key: dom=acm.jhu.edu proto=p9sk1 user=me > [I don't k

Re: [9fans] network problem

2008-05-08 Thread erik quanstrom
> On Thu, May 8, 2008 at 1:21 PM, erik quanstrom <[EMAIL PROTECTED]> wrote: >> >if you're going to pxe boot, you should generally be using bootf=9load. >> >> sorry, "bootf=/386/9load". >> > > you mean 9pxeload ? ready, shoot, aim! - erik

Re: [9fans] network problem

2008-05-08 Thread Gorka Guardiola
On Thu, May 8, 2008 at 1:21 PM, erik quanstrom <[EMAIL PROTECTED]> wrote: > >if you're going to pxe boot, you should generally be using bootf=9load. > > sorry, "bootf=/386/9load". > you mean 9pxeload ? -- - curiosity sKilled the cat

Re: [9fans] Help installing Inferno in FreeBSD

2008-05-08 Thread a
While there's certainly significant overlap in users, you might have better luck on Vita Nuova's Inferno list. I forget the subscription information off hand, but I'm certain you'll find it on their web site. Anthony

Re: [9fans] network problem

2008-05-08 Thread erik quanstrom
>if you're going to pxe boot, you should generally be using bootf=9load. sorry, "bootf=/386/9load". - erik

Re: [9fans] network problem

2008-05-08 Thread erik quanstrom
> > the terminals need ipaddresses in /lib/ndb/local.  if you are not pxe > > booting, the minimum requirment is to have an entry like > > > > sys=gnot ip=192.168.0.100 > > > > the man pages ndb(6) and ndb(8) should be helpful. > > > > - erik > > thank you for your answer... > in my /lib/ndb/local

Re: [9fans] network problem

2008-05-08 Thread lupin636
> the terminals need ipaddresses in /lib/ndb/local.  if you are not pxe > booting, the minimum requirment is to have an entry like > > sys=gnot ip=192.168.0.100 > > the man pages ndb(6) and ndb(8) should be helpful. > > - erik thank you for your answer... in my /lib/ndb/local i have all the ip's w

Re: [9fans] Help installing Inferno in FreeBSD

2008-05-08 Thread alpinweis
On May 7, 12:24 pm, [EMAIL PROTECTED] wrote: > Hi. > I am trying to install INFERNO in FreeBSD 7.0 using the downloaded > inferno CD image. Created user 'inferno' with /home/inferno as > directory. Running the install script I get the > following error: > > > > $ /mnt/install/FreeBSD-386.sh /home/