kernel stacks [eas: Re: G5 Bridge-mode MMU]

Peter Grehan grehan at freebsd.org
Wed Apr 16 00:53:56 UTC 2008


Hi Marcel,

>> Are you sure it isn't a genuine stack overflow ?
> 
> Positive. The panic happens after 4KB of stack has been used.
> 
>> You may be able to tell by bumping the size of tmpstk on a non-kstack0 
>> boot and see how far up it's been used.
> 
> The backtrace also shows that. From inner-most to out-most function in
> the backtrace the stack pointers are roughly 4KB apart.

  Can you send the code snippet that you're using to set up the stack ? 
I can desk-check that, and then use it for my testing so we have the 
exact same setup.

> Hmm, It looks like you're right. Odd...
> 
> Is it possible that the hash computation we use is not one
> used by the CPU so that we end up adding PTE where the CPU
> isn't looking?

  No. If the primary hash didn't work, the system wouldn't work at all. 
For a long time there was a bug in the calculation of the secondary 
hash, but that has been fixed for a while now. Overflow of the secondary 
hash isn't handled at the moment, but since no-one has hit the panic, it 
isn't really a problem (yet).

later,

Peter.


More information about the freebsd-ppc mailing list