From nobody Tue Oct 15 15:05:22 2024 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 4XScpq11b5z5YYbM; Tue, 15 Oct 2024 15:05:23 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XScpq0DYFz45x8; Tue, 15 Oct 2024 15:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004723; 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=S8DWzIZ0NEcZiXvIiYbE3ySqQCq0wKQ03zRNZ6HpdbI=; b=iAOwjXwXCmXqSDxHzXLUVWLOI4H1TgjhczO7dLO0L0STB6YDfzIIzuBZmiRNLnod/WAqSV nrIuCXX7MhHDEVbXSJqsisd/2xHlploAdcRxs/B6TdP1yl5Mj9Bvq4SHfkycUm79nl+JQl EDAFKm4AY4QjtyJqV/yVhdvPo7tjlSoluxJAEQVtSO/6YTocXMY4BTYNxdigm8Lybpnx2d SPCHTYWZMqQWQD6CM5LSAr+v9voV/iKq/XKPoVvM7ICD35o/QonOl9W+zkOT/8djvkj7zt zESfIJSQymS8zNWvsz4VGDddKYIfc1/744OtTDa4mvfPC6zvg1XL3jDR60CRIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729004723; 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=S8DWzIZ0NEcZiXvIiYbE3ySqQCq0wKQ03zRNZ6HpdbI=; b=qbtHK0tjSRUL6eLjZqIcHlQ8aZYs2Izu2b2dCViWLTC50Oi6kcukprCEDdMiZsUxIQEFc0 pNDr2xUqx5Hop9djs/0nsm57H+D2MhtcqNFaVdr9jDrhUtzd0eKPZ1EBw2dLPfC7Y6J8Y8 IYzqrGxPRkDGMC5Cuyg80WfUV2C5/8262wYBq0XTQDVrPDZsvJdOcTGKjcUUBfr2l3ZCdR 7VOmUS6YTZdd5amQfbMGJKEj7ws02SnyktWwWs1VfVZjGevb6A0/mcbCQ/Wuy4yqtln6hM EWYy4RCOXybsdiniJxBTkgCOMrA3n6MZYZuupTsRVqISWJ7UbOLjlFgz9/8A1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729004723; a=rsa-sha256; cv=none; b=xOzfnPM9B3e0Uxkkcxt4ksO/UvF+CuFGQAoe5kYOjsPMH7Rq7ZzKACUm+tRpKoQAy87HN1 a+Uf7spn5oBuZ+jsJKpmW5tpG5ByPLuWMCyETfsLmgcmAIUmAj+f8gZbPxIjKaAFZIJ7IW Gpf2rjMr6ccqwqD43q/oUwHYhWjWybzhvUW7XZXLBJe1Wlzi//h95V2xo/+jAdROr3pE9R 9sHUQzY7DqfqLDnoVurvDAx+VXGLtMHlh1Vk53KPzg5cNTg5NJj48R4hXk/pcSO5wWnGss vsU5balZUoCeuu7P4+OvMyTrbELFar8SqNTFvhrsbYplJYrFVn/XbiosxtQxvQ== 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 4XScpp6rSbzRbP; Tue, 15 Oct 2024 15:05:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49FF5M2W089099; Tue, 15 Oct 2024 15:05:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49FF5Mo5089096; Tue, 15 Oct 2024 15:05:22 GMT (envelope-from git) Date: Tue, 15 Oct 2024 15:05:22 GMT Message-Id: <202410151505.49FF5Mo5089096@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: 1ef669ae413e - stable/14 - vm_object: add OBJ_SYSVSHM flag to indicate SysV shm backing object 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/14 X-Git-Reftype: branch X-Git-Commit: 1ef669ae413eaf5517e9cbdd53ff2fe20bb3044c Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1ef669ae413eaf5517e9cbdd53ff2fe20bb3044c commit 1ef669ae413eaf5517e9cbdd53ff2fe20bb3044c Author: Konstantin Belousov AuthorDate: 2024-10-05 09:08:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-15 14:50:16 +0000 vm_object: add OBJ_SYSVSHM flag to indicate SysV shm backing object (cherry picked from commit f186252e0d6ef970a23c6af12ec34003df56055d) --- sys/kern/sysv_shm.c | 4 ++++ sys/vm/vm_object.h | 1 + 2 files changed, 5 insertions(+) diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 90b95c7db8e7..4dbe77f19b07 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -742,6 +742,10 @@ shmget_allocate_segment(struct thread *td, key_t key, size_t size, int mode) return (ENOMEM); } + VM_OBJECT_WLOCK(shm_object); + vm_object_set_flag(shm_object, OBJ_SYSVSHM); + VM_OBJECT_WUNLOCK(shm_object); + shmseg->object = shm_object; shmseg->u.shm_perm.cuid = shmseg->u.shm_perm.uid = cred->cr_uid; shmseg->u.shm_perm.cgid = shmseg->u.shm_perm.gid = cred->cr_gid; diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 0a6b8de6574c..c63a52260baf 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -203,6 +203,7 @@ struct vm_object { mapping flag */ #define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ +#define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ /* * Helpers to perform conversion between vm_object page indexes and offsets.