vmparam.diff

logan1, 02/04/2012 11:57 AM

Download (1.71 KB)

View differences:

sys/platform/pc32/include/vmparam.h
99 99
#define UPT_MAX_ADDRESS		VADDR(PTDPTDI, PTDPTDI)
100 100
#define UPT_MIN_ADDRESS		VADDR(PTDPTDI, 0)
101 101

  
102
#define VM_MIN_USER_ADDRESS	((vm_offset_t)0)
102
#define VM_MIN_USER_ADDRESS	((vm_offset_t)PAGE_SIZE)
103 103
#define VM_MAX_USER_ADDRESS	VADDR(PTDPTDI, 0)
104 104

  
105 105
#define USRSTACK		VM_MAX_USER_ADDRESS
sys/vm/vm_mmap.c
697 697
		return (EINVAL);
698 698
	if (VM_MAX_USER_ADDRESS > 0 && tmpaddr > VM_MAX_USER_ADDRESS)
699 699
		return (EINVAL);
700
	if (VM_MIN_USER_ADDRESS > 0 && uap->addr < VM_MIN_USER_ADDRESS)
700
	if (VM_MIN_USER_ADDRESS > 0 && (vm_offset_t) uap->addr < VM_MIN_USER_ADDRESS)
701 701
		return (EINVAL);
702 702

  
703 703
	/*
......
740 740
		return (EINVAL);
741 741
	if (VM_MAX_USER_ADDRESS > 0 && tmpaddr > VM_MAX_USER_ADDRESS)
742 742
		return (EINVAL);
743
	if (VM_MIN_USER_ADDRESS > 0 && uap->addr < VM_MIN_USER_ADDRESS)
743
	if (VM_MIN_USER_ADDRESS > 0 && (vm_offset_t) uap->addr < VM_MIN_USER_ADDRESS)
744 744
		return (EINVAL);
745 745

  
746 746
	/*
sys/vm/vm_vmspace.c
502 502
		error = EINVAL;
503 503
		goto done1;
504 504
	}
505
        if (VM_MIN_USER_ADDRESS > 0 && uap->addr < VM_MIN_USER_ADDRESS) {
505
        if (VM_MIN_USER_ADDRESS > 0 && (vm_offset_t)uap->addr < VM_MIN_USER_ADDRESS) {
506 506
		error = EINVAL;
507 507
		goto done1;
508 508
	}