]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fixed two potentially serious classes of bugs:
authordg <dg@FreeBSD.org>
Tue, 13 Oct 1998 08:24:45 +0000 (08:24 +0000)
committerdg <dg@FreeBSD.org>
Tue, 13 Oct 1998 08:24:45 +0000 (08:24 +0000)
commit3defb6d13f481d8c8bb2d9014db42c8a5ee19f9d
tree64822d97637c55a2d7aeb4a999c847a5869bac46
parent3280e5edc1739224a3e662ea57aa1746d1eb9105
Fixed two potentially serious classes of bugs:

1) The vnode pager wasn't properly tracking the file size due to
   "size" being page rounded in some cases and not in others.
   This sometimes resulted in corrupted files. First noticed by
   Terry Lambert.
   Fixed by changing the "size" pager_alloc parameter to be a 64bit
   byte value (as opposed to a 32bit page index) and changing the
   pagers and their callers to deal with this properly.
2) Fixed a bogus type cast in round_page() and trunc_page() that
   caused some 64bit offsets and sizes to be scrambled. Removing
   the cast required adding casts at a few dozen callers.
   There may be problems with other bogus casts in close-by
   macros. A quick check seemed to indicate that those were okay,
   however.
27 files changed:
sys/amd64/amd64/busdma_machdep.c
sys/amd64/amd64/vm_machdep.c
sys/amd64/isa/isa.c
sys/cam/scsi/scsi_da.c
sys/i386/i386/busdma_machdep.c
sys/i386/i386/vm_machdep.c
sys/i386/ibcs2/imgact_coff.c
sys/i386/include/param.h
sys/i386/isa/isa.c
sys/i386/isa/wd.c
sys/kern/imgact_elf.c
sys/kern/sys_pipe.c
sys/kern/sysv_shm.c
sys/kern/vfs_bio.c
sys/kern/vfs_export.c
sys/kern/vfs_subr.c
sys/vm/default_pager.c
sys/vm/device_pager.c
sys/vm/swap_pager.c
sys/vm/vm_glue.c
sys/vm/vm_map.c
sys/vm/vm_mmap.c
sys/vm/vm_pager.c
sys/vm/vm_pager.h
sys/vm/vm_unix.c
sys/vm/vnode_pager.c
sys/vm/vnode_pager.h