From nobody Fri Aug 25 01:08:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RX1zb2l6Pz4qZmB; Fri, 25 Aug 2023 01:08:27 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RX1zb2HBKz4SCF; Fri, 25 Aug 2023 01:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692925707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PFUs3TjSK/INqStQm0ods6LNAyGDoXubXBR4o5L6nYo=; b=RYNEfpbepnXZO/lDxgOKTpqiMWB2qd9SUkax1d+IQ7DJ4NEnjWGhheWVqUppqB6hT0YTjB DB9s2P8ARdsNtTiLw4pCEK83k2DWvLKaNn4et0Gvg8uNk4AlPhH+YtJcVDkxusiIV6Rkle zB9tqoWjlET5ZGPkwKjKjX9cHDYwAozizdob/bBu6GVuSH/0xtBAGqxhSJ8nwhDxMaTJ0+ UmljoxNC7NLQ4lZTnHYiOWPyEfzJQS9Ea25BCZvMsZ+RjkREPx9m8MfEHRpw4LbPegmff8 NFNh3Y7ZxlHLMPxEBkeA5Gx0hSVSivfHSgRmsc579VcPGc3rz7BOz2+aDtKvjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692925707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PFUs3TjSK/INqStQm0ods6LNAyGDoXubXBR4o5L6nYo=; b=Sr5hQ+Ve0O1IJbfx+nfas/efrQKpHknFZDpv8yz4yfAHJxv3TCrbArYxosnD2bfkBjvHkt 1yIdjfVcUdqjbxR0neD9hqKNFUCnSnGasKE8RvyjoLr7m7bNuzENuL6AOwfrsHkDgZzaaP gc9Smk5G6G9c0mW94hv8bTkqOm87gE6SwgRK9NKFw4lrma3fUYsQfClKVQzDVKDYFx+fhb GVHqATPnsppzRYxFjekb4AYexwlzhgt4SDjIWHUVAgqMNvARzLFJgewrxTGG7Z6dTebsCD DT3IZcys+fwrp+Gx4iYXOHZ7A9s0mgXIwcUt71v9ubGn4CsJR45HAmn3ksicMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692925707; a=rsa-sha256; cv=none; b=CuOp8f15gUczk26ZRb9YZkEZ8M++wI3l4K9WEmT/szITFiM0IIwWR9KreoMrBsieD75j7A OVKYtIc/0oKHUWMytimutjfC1TQ5Hz5tH9t5PNu4qb8pFlhWCzMTkOxcFidES2HrbRa1sG yYQZwaJZ/4q3aQnekEWCTFoVk8wEDvthrtkfvKgrvnrC50b71i5tV/RmF7y/qrBFPPEzdT eh+MV2in7qsxXEPIELuJrqxHRzSigZvMgQWAAtifc3X/GxoNeSjte/D/efCaYaFS2PY1/N jHthxxPe8tIJfPiF6o2513EhYwxMiBbuMJKDoPMpyTk0X6yYoo0Xc1nviWlvIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RX1zb14bVzpYw; Fri, 25 Aug 2023 01:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37P18Rgo058061; Fri, 25 Aug 2023 01:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37P18RBh058058; Fri, 25 Aug 2023 01:08:27 GMT (envelope-from git) Date: Fri, 25 Aug 2023 01:08:27 GMT Message-Id: <202308250108.37P18RBh058058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 596c93a96ec8 - stable/13 - vmspace_fork(): do not override offset for the guard entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 596c93a96ec82f7d1132030f9c86a7de27584458 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=596c93a96ec82f7d1132030f9c86a7de27584458 commit 596c93a96ec82f7d1132030f9c86a7de27584458 Author: Konstantin Belousov AuthorDate: 2023-07-20 17:45:01 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-25 01:06:43 +0000 vmspace_fork(): do not override offset for the guard entries (cherry picked from commit db6c7c7f8d870f377fcd1cc98e4832681bb5bdf0) --- sys/vm/vm_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index c8f3c72302fc..18763ad2f2bf 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4178,7 +4178,8 @@ vm_map_copy_entry( src_entry->start); } else { dst_entry->object.vm_object = NULL; - dst_entry->offset = 0; + if ((dst_entry->eflags & MAP_ENTRY_GUARD) == 0) + dst_entry->offset = 0; if (src_entry->cred != NULL) { dst_entry->cred = curthread->td_ucred; crhold(dst_entry->cred);