From owner-svn-src-head@freebsd.org Fri Aug 21 14:22:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 446C33BEB90; Fri, 21 Aug 2020 14:22:33 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BY3d515sVz40VW; Fri, 21 Aug 2020 14:22:33 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08FD626C8A; Fri, 21 Aug 2020 14:22:33 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07LEMWHs093745; Fri, 21 Aug 2020 14:22:32 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07LEMWVL093744; Fri, 21 Aug 2020 14:22:32 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202008211422.07LEMWVL093744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 21 Aug 2020 14:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364457 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 364457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2020 14:22:33 -0000 Author: vangyzen Date: Fri Aug 21 14:22:32 2020 New Revision: 364457 URL: https://svnweb.freebsd.org/changeset/base/364457 Log: 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 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Aug 21 13:11:33 2020 (r364456) +++ head/sys/amd64/amd64/pmap.c Fri Aug 21 14:22:32 2020 (r364457) @@ -2111,7 +2111,7 @@ pmap_init(void) * Collect the page table pages that were replaced by a 2MB * page in create_pagetables(). They are zero filled. */ - if (i << PDRSHIFT < KERNend && + if ((vm_paddr_t)i << PDRSHIFT < KERNend && pmap_insert_pt_page(kernel_pmap, mpte, false)) panic("pmap_init: pmap_insert_pt_page failed"); }