Subject: Re: nathan_sw and proc flags
To: None <>
From: Jason R Thorpe <>
List: tech-kern
Date: 12/07/2001 20:20:00
On Sat, Dec 08, 2001 at 04:17:48PM +1300, Gregory McGarry wrote:

 > In the non-SA world, the proc-dependent flags are inherited from
 > the parent in cpu_fork().  In the SA world, the flags are split
 > between LWP-specific and proc-specific.  ISTM that current
 > implementations of cpu_fork() do ensure the inheritance of the
 > LWP-specific flags, but the proc-specific flags are not
 > initialised and usually filled with junk.  The symptoms I saw
 > where corrupted page tables on NetBSD/hp300.

I guess you mean this assignment:

	p2->p_md.md_flags = p1->p_md.md_flags;

 > Since cpu_fork() doesn't know whether it is handling a process
 > fork or an LWP fork, who is responsible for maintaing proc-specific
 > flags?

Sounds like:

	* cpu_fork() needs to be renamed to cpu_lwp_fork().

	* A new cpu_proc_fork() needs to be added which would
	  be called by uvm_proc_fork().

        -- Jason R. Thorpe <>