Project

General

Profile

Submit #2299 ยป vmparam.diff

logan1, 02/04/2012 11:57 AM

View differences:

sys/platform/pc32/include/vmparam.h
#define UPT_MAX_ADDRESS VADDR(PTDPTDI, PTDPTDI)
#define UPT_MIN_ADDRESS VADDR(PTDPTDI, 0)
#define VM_MIN_USER_ADDRESS ((vm_offset_t)0)
#define VM_MIN_USER_ADDRESS ((vm_offset_t)PAGE_SIZE)
#define VM_MAX_USER_ADDRESS VADDR(PTDPTDI, 0)
#define USRSTACK VM_MAX_USER_ADDRESS
sys/vm/vm_mmap.c
return (EINVAL);
if (VM_MAX_USER_ADDRESS > 0 && tmpaddr > VM_MAX_USER_ADDRESS)
return (EINVAL);
if (VM_MIN_USER_ADDRESS > 0 && uap->addr < VM_MIN_USER_ADDRESS)
if (VM_MIN_USER_ADDRESS > 0 && (vm_offset_t) uap->addr < VM_MIN_USER_ADDRESS)
return (EINVAL);
/*
......
return (EINVAL);
if (VM_MAX_USER_ADDRESS > 0 && tmpaddr > VM_MAX_USER_ADDRESS)
return (EINVAL);
if (VM_MIN_USER_ADDRESS > 0 && uap->addr < VM_MIN_USER_ADDRESS)
if (VM_MIN_USER_ADDRESS > 0 && (vm_offset_t) uap->addr < VM_MIN_USER_ADDRESS)
return (EINVAL);
/*
sys/vm/vm_vmspace.c
error = EINVAL;
goto done1;
}
if (VM_MIN_USER_ADDRESS > 0 && uap->addr < VM_MIN_USER_ADDRESS) {
if (VM_MIN_USER_ADDRESS > 0 && (vm_offset_t)uap->addr < VM_MIN_USER_ADDRESS) {
error = EINVAL;
goto done1;
}
    (1-1/1)