Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm
In directory usw-pr-cvs1:/tmp/cvs-serv23019
Modified Files:
fault.c pgalloc.c
Log Message:
Bit more debugging in fault.c, change pgalloc.c to handle slot sizes
properly, and fix stupid p1 section page table bug.
Index: fault.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/fault.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- fault.c 2001/08/20 21:29:07 1.9
+++ fault.c 2001/08/21 20:09:34 1.10
@@ -123,7 +123,12 @@
up(&mm->mmap_sem);
if (user_mode(regs)) {
+ printk(KERN_ALERT "Unable to do USER paging request: "
+ "pid %d, virtual address %08lx, reason mask %08x, "
+ "PC %08x, PSL %08x\n",
+ current->pid, address, reason, info->pc, info->psl);
printk("do_page_fault: sending SIGSEGV\n");
+
force_sig(SIGSEGV, current);
/* signals arent implemented yet */
/* They are now atp aug 17 2001 */
Index: pgalloc.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/pgalloc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pgalloc.c 2001/08/20 21:29:07 1.3
+++ pgalloc.c 2001/08/21 20:09:34 1.4
@@ -2,12 +2,16 @@
*
* pgalloc.c Routines from include/asm-vax/mm/pgalloc.h
* Allocation of page table entries and so forth.
+ *
+ * This is the main part of the VAX specific memory layer.
*
* Copyright atp Jun 2001 - complete rewrite.
- * atp aug 2001 - add in stuff for vmalloc to work (pmd_alloc_kernel)
- * fix mistake in pte_alloc_kernel.
- * GNU GPL
-*/
+ * atp aug 2001 - add in stuff for vmalloc to work (pmd_alloc_kernel)
+ * fix mistake in pte_alloc_kernel.
+ * atp 21 aug 01 - make TASK_WSMAX what was intended, add in segv stuff.
+ *
+ * License: GNU GPL
+ */
#include <linux/sched.h>
#include <linux/mm.h>
@@ -73,7 +77,7 @@
/* this comes in handy later */
ret[0].slot = taskslot;
/* p1br points at what would be page mapping 0x40000000 (i.e. the _end_ of the slot)*/
- ret[1].br = taskslot+ (P1PTE_OFFSET) /*+ (N_HWPTE_TASK_P1<<2)*/ - 0x800000 ;
+ ret[1].br = taskslot+ (P1PTE_OFFSET) - 0x800000 ;
/* This is the unmapped number of PTEs */
ret[1].lr = 0x40000;
ret[1].slot = taskslot;
@@ -289,7 +293,7 @@
/* sanity checks */
if (!s0addr) {
- printk(KERN_ERR "VAXMM: null S0 address in remap_and_clear_pte_page!\n");
+ vaxpanic(KERN_ERR "VAXMM: null S0 address in remap_and_clear_pte_page!\n");
return;
}
/* locate the S0 pte that describes the page pointed to by s0addr */
@@ -299,8 +303,7 @@
set_pte(s0pte, pte_mkinvalid(*s0pte));
// print_pte(s0pte);
/* FIXME: these flush_tlb_alls need replacing with flush_tlb_8 */
- flush_tlb_all();
-
+ flush_tlb_all();
// __flush_tlb_one(s0addr);
}
@@ -451,10 +454,16 @@
/* enforce wsmax memory limits */
if (is_p1){
adjusted_address |= 0x40000000;
- if (adjusted_address <= (PAGE_OFFSET-TASK_STKMAX)) goto give_segv;
+ if (adjusted_address <= (PAGE_OFFSET-TASK_STKMAX)) {
+ printk(KERN_NOTICE "VAXMM: process %p exceeded TASK_STKMAX (%dMB)\n",current,(TASK_STKMAX>>10));
+ goto give_segv;
+ }
pte_number = (adjusted_address - 0x40000000) >> PAGE_SHIFT;
} else {
- if (adjusted_address >= (TASK_WSMAX+TASK_MMAPMAX)) goto give_segv;
+ if (adjusted_address >= (TASK_WSMAX)) {
+ printk(KERN_NOTICE "VAXMM: process %p exceeded TASK_WSMAX (%dMB)\n",current,(TASK_WSMAX>>10));
+ goto give_segv;
+ }
pte_number = (adjusted_address>>PAGE_SHIFT);
}
@@ -531,7 +540,7 @@
return pte_offset(pmd, adjusted_address);
give_segv:
- printk(KERN_ERR "pte_alloc: sending SIGSEGV to process %p\n",current);
+ printk(KERN_NOTICE "VAXMM pte_alloc: sending SIGSEGV to process %p\n",current);
force_sig(SIGSEGV,current);
return NULL;
|