Subject: a5k crash news

From: Philip Blundell <[email-masked]>
Date: Sun, 31 Jan 1999 14:16:20 +0000

Hi,

I found the cause of the frequent address exceptions on my A5000 under 2.2.

What was happening was that the pte for a data page was disappearing but the 
mm area remained intact.  This meant that the next time the process faulted in 
that page the kernel thought it was an anonymous mapping and provided a zero 
page instead.  This tends to lead to a NULL dereference pretty quickly.

The root cause is an assumption in copy_page_range that pagetable structures 
are naturally aligned.  Because 26-bit machines have fake pagetables that 
aren't used by the hardware, this isn't necessarily true.  The logic that 
works out how large an area is by masking address bits was getting confused.

Things now seem a lot more stable.  I'll include a fix for this in my next 
kernel patch.

p.

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Sun, 31 Jan 1999 21:08:08 +0000 (GMT)

> works out how large an area is by masking address bits was getting confused.

There's nothing wrong with this assumption.  Keep looking at the memory allocation
in the A5k and you'll find some more bits to clean up which will reduce kernel
memory usage dramatically (do we need 64k for the kernel stack and task_struct?)

You may want to try using the small_page stuff to allocate an 8k block from a 32k
page, for example.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Philip Blundell <[email-masked]>
Date: Sun, 31 Jan 1999 21:57:41 +0000

>Keep looking at the memory allocation in the A5k and you'll find some 
>more bits to clean up which will reduce kernel memory usage dramatically 
>(do we need 64k for the kernel stack and task_struct?)

Yes, I know about that.  My first priority (in as much as you can consider the 
A5000 a priority) is stability though.

p.