aboutsummaryrefslogtreecommitdiff
path: root/fs/fcntl.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2009-05-10 23:57:41 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-11 07:51:01 -0700
commitfd18de50b9e7965f93d231e7390436fb8900c0e6 (patch)
treedcf09dbd8d07fd55f2777c9224173039c4a1f1fd /fs/fcntl.c
parenta4d7749be5de4a7261bcbe3c7d96c748792ec455 (diff)
intel-iommu: PAE memory corruption fix
PAGE_MASK is 0xFFFFF000 on i386 -- even with PAE. So it's not sufficient to ensure that you use phys_addr_t or uint64_t everywhere you handle physical addresses -- you also have to avoid using the construct 'addr & PAGE_MASK', because that will strip the high 32 bits of the address. This patch avoids that problem by using PHYSICAL_PAGE_MASK instead of PAGE_MASK where appropriate. It leaves '& PAGE_MASK' in a few instances that don't matter -- where it's being used on the virtual bus addresses we're dishing out, which are 32-bit anyway. Since PHYSICAL_PAGE_MASK is not present on other architectures, we have to define it (to PAGE_MASK) if it's not already defined. Maybe it would be better just to fix PAGE_MASK for i386/PAE? Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fcntl.c')
0 files changed, 0 insertions, 0 deletions