[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is it a bug in init?
From: |
Da Zheng |
Subject: |
Is it a bug in init? |
Date: |
Mon, 20 Apr 2009 21:32:30 +0100 |
User-agent: |
Thunderbird 2.0.0.21 (Macintosh/20090302) |
Hi,
I see init has the code as follows in frob_kernel_process():
vm_address_t kargv, kenvp;
err = proc_get_arg_locations (kbs, &kargv, &kenvp);
mach_port_deallocate (mach_task_self (), kbs);
if (err)
error (0, err, "kernel task bootstrap port (ignoring)");
else
{
err = proc_set_arg_locations (proc, kargv, kenvp);
if (err)
error (0, err, "cannot propagate original kernel command line");
else
{
mach_port_deallocate (mach_task_self (), proc);
mach_port_deallocate (mach_task_self (), task);
if (! fakeboot)
error (0, 0, "warning: "
"I see another Hurd, but --fake-boot was not given");
return;
}
}
The init in a second Hurd reads the addresses of arguments and
environment variables of the kernel task from the main Hurd's proc
server and sends them to its own proc server.
The addresses returned from proc_get_arg_locations() are the locations
in the address space of the main Hurd's proc server. When we pass these
locations to the second Hurd's proc server, it shouldn't work because
the arguments and environment variables of the kernel task aren't at
these locations in the address space of the second proc server and are
even not in the second proc server's memory.
Am I right?
Zheng Da
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Is it a bug in init?,
Da Zheng <=