Problem booting l4linux

Adam Lackorzynski adam at os.inf.tu-dresden.de
Fri Jun 10 19:28:35 CEST 2005


Hi,

On Fri Jun 10, 2005 at 17:28:49 +0200, fabs0028 at free.fr wrote:
> simplets| Configured for 300 tasks.
> loader  | L4RM: [PF] read at 0x00000000, eip 01316df5, src F.01
> loader  | [F.0] l4rm/lib/src/pagefault.c:78:__unknown_pf():
> loader  |  unhandled page fault
> 
>     --PANIC-------------------------------------------------EIP: 01311aca
> 
> 
> 
> so i did disassembled the task to find the problem and here is the result:
> 
> 
> /home/fab/ws/l4-linux-env/l4/pkg/thread/lib/src/l4.c:113
> 01316df4        in     (%dx),%eax
> /home/fab/ws/l4-linux-env/l4/pkg/thread/lib/include/__asm.h:40
> 01316df1        mov    %esp,%ebp
> <l4th_thread_entry>:
> 01316de9        lea    0x0(%edi,1),%edi
> <l4th_thread_entry>:
> /home/fab/ws/l4-linux-env/l4/pkg/thread/lib/src/l4.c:108
> 01316df0        push   %ebp
> 01316df1        mov    %esp,%ebp
> /home/fab/ws/l4-linux-env/l4/pkg/thread/lib/include/__asm.h:40
> 01316df3        xor    %ebp,%ebp
> /home/fab/ws/l4-linux-env/l4/pkg/thread/lib/src/l4.c:113
> 01316df5        leave
> 01316df6        jmp    0x1314980 <l4th_thread_start>

Thanks for the backtrace, this makes things more clear.

The important part here is that the 'leave' instruction copies ebp to
esp and then pops ebp but epb was cleared before. So 'leave' pops with
esp=0. So there's no suprise for the page fault at 0.

My gcc versions (Debian 3.3, Debian 3.4, stock 3.4.5-pre, stock
4.0.1-pre and stock gcc-4.1 exp) all place an 'pop %epb' instead of a
'leave' there. You were running FC3, right? Well, no comment...

Anyway, to fix this, just comment out the l4th_clear_base_pointer()
call, this should fix the problem.



> so the leave instruction lead to a page fault :
> 
> i took a look to the source and here is the fonction concerned :
> 
> void
> l4th_thread_entry(void)
> {
>   /* clear base pointer to make stack backtrace work */
>   l4th_clear_base_pointer();
> 
>   /* nothing special to do in native L4 version, just start the thread */
>   l4th_thread_start();
> }
> 



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list