]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64 pmap: potential integer overflowing expression
authorvangyzen <vangyzen@FreeBSD.org>
Fri, 21 Aug 2020 14:22:32 +0000 (14:22 +0000)
committervangyzen <vangyzen@FreeBSD.org>
Fri, 21 Aug 2020 14:22:32 +0000 (14:22 +0000)
commiteb625288c9eb9140303d41425af63b6c4e15cb0d
tree3b2a37cf2777cde58c54578c6a443f70dc2a490f
parentcb5a0f1b93d8fac394c6e155aeea119ea4986240
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
sys/amd64/amd64/pmap.c