HomeFreeBSD

amd64 pmap: potential integer overflowing expression

Description

amd64 pmap: potential integer overflowing expression

Coverity has identified the line in this change as "Potential integer
overflowing expression" due to the variable i declared as an int
and used in an expression with vm_paddr_t, a 64bit variable.

This change has very little effect as when this line is execute
nkpt is small and phys_addr is a the beginning of physical memory.
But there is no explicit protection that the above is true.

Submitted by: bret_ketchum@dell.com
Reported by: Coverity
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D26141

Details

Provenance
vangyzenAuthored on Aug 21 2020, 2:22 PM
Parents
rG2a99bea5784f: Merge commit 95e18b2d9d5f from llvm git (by Kang Zhang):
Branches
Unknown
Tags
Unknown

Event Timeline