Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 1998 13:09:26 -0700
From:      David Greenman <dg@root.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/cam/scsi scsi_da.c src/sys/i386/i386 busdma_machdep.c vm_machdep.c src/sys/i386/ibcs2 imgact_coff.c src/sys/i386/include param.h src/sys/i386/isa isa.c wd.c src/sys/kern imgact_elf.c sys_pipe.c sysv_shm.c vfs_bio.c ... 
Message-ID:  <199810152009.NAA18162@implode.root.com>
In-Reply-To: Your message of "Wed, 14 Oct 1998 21:29:36 BST." <Pine.BSF.4.01.9810142128170.389-100000@herring.nlsystems.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>   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.
>
>Do I need to track this change in the alpha port?  Can you give me a rough
>idea of the changes to busdma_machdep.c, vm_machdep.c and param.h so that
>I can make the appropriate change (if needed).

   Basically, round_page and trunc_page and the calls to them need to be 64bit
safe. Since a long is 64bits on alpha, I don't think there is a bug there,
except for perhaps the cast being wrong:

param.h:#define round_page(x)   ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK))

   The cast should be removed, and then any compile errors that this creates
with the callers need to be fixed by casting to vm_offset_t.

-DG

David Greenman
Co-founder/Principal Architect, The FreeBSD Project

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810152009.NAA18162>