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

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