root/fs/umsdos/check.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. check_one_table
  2. check_page_tables

   1 #ifdef MODULE
   2 #include <linux/module.h>
   3 #endif
   4 
   5 #include <asm/system.h>
   6 
   7 #include <linux/signal.h>
   8 #include <linux/sched.h>
   9 #include <linux/head.h>
  10 #include <linux/kernel.h>
  11 #include <linux/errno.h>
  12 #include <linux/string.h>
  13 #include <linux/types.h>
  14 #include <linux/ptrace.h>
  15 #include <linux/mman.h>
  16 
  17 extern unsigned long high_memory;
  18 
  19 static int check_one_table(struct pde * page_dir)
     /* [previous][next][first][last][top][bottom][index][help] */
  20 {
  21         if (pgd_none(*page_dir))
  22                 return 0;
  23         if (pgd_bad(*page_dir))
  24                 return 1;
  25         return 0;
  26 }
  27 
  28 /*
  29  * This function checks all page tables of "current"
  30  */
  31 void check_page_tables(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  32 {
  33         struct pgd * pg_dir;
  34         static int err = 0;
  35 
  36         int stack_level = (long)(&pg_dir)-current->kernel_stack_page;
  37         if (stack_level < 1500) printk ("** %d ** ",stack_level);
  38         pg_dir = PAGE_DIR_OFFSET(current, 0);
  39         if (err == 0) {
  40                 int i;
  41                 for (i = 0 ; i < PTRS_PER_PAGE ; i++,page_dir++){
  42                         int notok = check_one_table(page_dir);
  43                         if (notok){
  44                                 err++;
  45                                 printk ("|%d:%08lx| ",i, page_dir->pgd);
  46                         }
  47                 }
  48                 if (err) printk ("\nErreur MM %d\n",err);
  49         }
  50 }

/* [previous][next][first][last][top][bottom][index][help] */