From owner-svn-src-stable@freebsd.org Fri Jul 17 14:17:14 2020 Return-Path: Delivered-To: svn-src-stable@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 59E94366443; Fri, 17 Jul 2020 14:17:14 +0000 (UTC) (envelope-from kevans@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 4B7Y961hNgz46nw; Fri, 17 Jul 2020 14:17:14 +0000 (UTC) (envelope-from kevans@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 190461AA28; Fri, 17 Jul 2020 14:17:14 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06HEHDJY038531; Fri, 17 Jul 2020 14:17:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06HEHDfl038529; Fri, 17 Jul 2020 14:17:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202007171417.06HEHDfl038529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 17 Jul 2020 14:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r363271 - in stable/12/sys: kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12/sys: kern sys X-SVN-Commit-Revision: 363271 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 14:17:14 -0000 Author: kevans Date: Fri Jul 17 14:17:13 2020 New Revision: 363271 URL: https://svnweb.freebsd.org/changeset/base/363271 Log: MFC r363062: shmfd: make shm_size a vm_ooffset_t On 32-bit platforms, this expands the shm_size to a 64-bit quantity and resolves a mismatch between the shmfd size and underlying vm_object size. The implementation did not account for this kind of mismatch. For compatibility's sake, the old shm_size has been replaced with shm_oldsize (still popualted) and the new member appended to the end. Modified: stable/12/sys/kern/uipc_shm.c stable/12/sys/sys/mman.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_shm.c ============================================================================== --- stable/12/sys/kern/uipc_shm.c Fri Jul 17 06:53:03 2020 (r363270) +++ stable/12/sys/kern/uipc_shm.c Fri Jul 17 14:17:13 2020 (r363271) @@ -531,6 +531,7 @@ retry: object->charge += delta; } shmfd->shm_size = length; + shmfd->shm_oldsize = (size_t)length; mtx_lock(&shm_timestamp_lock); vfs_timestamp(&shmfd->shm_ctime); shmfd->shm_mtime = shmfd->shm_ctime; Modified: stable/12/sys/sys/mman.h ============================================================================== --- stable/12/sys/sys/mman.h Fri Jul 17 06:53:03 2020 (r363270) +++ stable/12/sys/sys/mman.h Fri Jul 17 14:17:13 2020 (r363271) @@ -207,7 +207,7 @@ typedef __size_t size_t; struct file; struct shmfd { - size_t shm_size; + size_t shm_oldsize; vm_object_t shm_object; int shm_refs; uid_t shm_uid; @@ -230,6 +230,7 @@ struct shmfd { struct rangelock shm_rl; struct mtx shm_mtx; + vm_ooffset_t shm_size; }; #endif