komische kernel-fehler

Florian Lohoff flo at rfc822.org
Sun Jun 1 10:49:22 CEST 2003


On Sat, May 31, 2003 at 12:40:26PM +0200, Pierre Bernhardt wrote:

> |>May 30 02:02:04 orthanc kernel: memory.c:98: bad pmd 00000040.
> |>May 30 02:02:04 orthanc kernel: memory.c:98: bad pmd 00000040.
> |>May 30 02:55:02 orthanc kernel: swap_free: Bad swap file entry 00000040
> |>May 30 02:55:02 orthanc kernel: swap_free: Bad swap file entry 00000040
> |>May 30 03:02:02 orthanc kernel: swap_free: Bad swap file entry 00000040
> |>May 30 03:02:02 orthanc kernel: memory.c:98: bad pmd 00000040.
> |>May 30 03:02:02 orthanc kernel: swap_free: Bad swap file entry 00000040
> |>May 30 03:02:02 orthanc kernel: memory.c:98: bad pmd 00000040.

> Hallo,
> 
> woran erkennst Du, dass es 0x00 sein sollte?
> 

pmd -> Page Middle Directory

Siehe auch 2.4er VM Dokumentation - 3 level mm

kernel/mm.c
     89 /*
     90  * Note: this doesn't free the actual pages themselves. That
     91  * has been handled earlier when unmapping all the memory regions.
     92  */
     93 static inline void free_one_pmd(pmd_t * dir)
     94 {
     95         pte_t * pte;
     96
     97         if (pmd_none(*dir))
     98                 return;
     99         if (pmd_bad(*dir)) {
    100                 pmd_ERROR(*dir);
    101                 pmd_clear(dir);
    102                 return;
    103         }
    104         pte = pte_offset(dir, 0);
    105         pmd_clear(dir);
    106         pte_free(pte);
    107 }

include/linux/pgtable.h
    187 #define _PAGE_PRESENT   0x001
    188 #define _PAGE_RW        0x002
    189 #define _PAGE_USER      0x004
    190 #define _PAGE_PWT       0x008
    191 #define _PAGE_PCD       0x010
    192 #define _PAGE_ACCESSED  0x020
    193 #define _PAGE_DIRTY     0x040
    194 #define _PAGE_PSE       0x080   /* 4 MB (or 2MB) page, Pentium+, if present.. */
    195 #define _PAGE_GLOBAL    0x100   /* Global TLB entry PPro+ */
    196
    197 #define _PAGE_PROTNONE  0x080   /* If not present */
    198
    199 #define _PAGE_TABLE     (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
    200 #define _KERNPG_TABLE   (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
    201 #define _PAGE_CHG_MASK  (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
[...]
    270 #define pmd_none(x)     (!pmd_val(x))
[...]
    273 #define pmd_bad(x)      ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)


include/asm-i386/page.h

      4 /* PAGE_SHIFT determines the page size */
      5 #define PAGE_SHIFT      12
      6 #define PAGE_SIZE       (1UL << PAGE_SHIFT)
      7 #define PAGE_MASK       (~(PAGE_SIZE-1))


D.h. das PMD ist "bad" wenn die untern 12 Bit des pointer exclusive bit 3 nicht gleich
_KERNPG_TABLE sind. D.h. es muessten eigentlich die bits 1,2,6,7 gesetzt sein.

Da "multi-bit-flips" eher unwahrscheinlich sind wird vermutlich dieser Eintrag null gewesen
sein und waere so an "if (pmd_none(*dir))" schon abgewiesen worden.

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-5201-669912
                        Heisenberg may have been here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20030601/cb1f7ee4/attachment.sig>


More information about the Linux mailing list