From nobody Thu Aug 01 22:27:25 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 4WZk9T4v6Kz5RZ74; Thu, 01 Aug 2024 22:27:25 +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 4WZk9T3mDGz4YVm; Thu, 1 Aug 2024 22:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551245; 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=YjsSQxv1CtgI3nFHb5MEHienGpoSde8jFUKIVbR/f4M=; b=k10TMFFfUrfnkp1g+u7/eT01tnEltWOY66CR9RxmHzvDor4KmpQn9V1ZfZApCcJPOD1pbi DkdxhFXYbKgTuCX6XA7bL8u9lZAC62BV6AGijbqWBtXSF+1IL9fmeKd5ZXPHsLrQ47pggl DPWQKKW3cLqT6iSPrDMJSEbiEI7XEPNohvkL++HqMEMQTIgKvYFLRXP0gg9pvzfUAHG4vA wAZlnfQf5Py2nf25M1FhvPKF0y+MVteIj4YjfsHSXw4XB+ux6BaajpybiVXQjuok6Zkv3i iijd+srZk6kg4r5CmEb27RkOtrGs1o5SSn73mlRxyW0s+GVfKhCQIW42OkUWyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551245; a=rsa-sha256; cv=none; b=aLTWxA81hXAKPk/4i9sNv/efG7Vug1us/paRJRVfuGHd+GTYl6qnQ+J737G0z3B61uSmdv si0K0hNBlcnBLIpkOVK4z+QzpOsHrmrEg7GJmmqd4MITn1Uk7OxSBRuk8gF2j1K+E4jkhm TcQur2SjsVw4FUTbQ/MCYlUdfN14y1VYk6wmyBOQ70Qn7Bqj9MMYuxRvrpoEpydtL5fGpF QP4s2bYTWRklHSM82T7eJnrOjQvYgtB/G+NIST+IAI4rGQDed5rd6veees+IQmg0ThuELF DdahhPfnaZTS++mzpGG8u67XMKkwZZ3R0xHqBtUsG1Vxtd9x7ci6e3vXD+MY+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551245; 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=YjsSQxv1CtgI3nFHb5MEHienGpoSde8jFUKIVbR/f4M=; b=wHJPkYLZW7cdEZnUdS5GxJVvVOT5LF/W4+9curgq7rl5GokRfZf2rxKUL4B/8lWj6GA6Qo vvBo83RMzXXs0SOcKbJgQXbegFq1osuT/WoC9bY+izTh4bhk/ikhyBwijCsbGsG6Vaq+ZL IS1oNJFqHBbe/z6jykXUxJVq4vlOWn5tw8XNBt7eVpql4lxg9vPfdN2AApMt9ZwdLuDtBN fwjB9mAOUN1rj+9PZLugp3g563qmOZffs8cL3i0ZBxpDJwDziTA+f6VzqNwIfxLUR65/S1 tBjaMvu9BqfGs5JQCc6rs1kGkNlDeodFx8n/QM3FDWfLz8WwIwBzlfbcY88saQ== 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 4WZk9T3Msjz13Ct; Thu, 1 Aug 2024 22:27:25 +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 471MRPb4027006; Thu, 1 Aug 2024 22:27:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRPnu027003; Thu, 1 Aug 2024 22:27:25 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:25 GMT Message-Id: <202408012227.471MRPnu027003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: b4fb139e286b - stable/14 - LinuxKPI: Add vm_flags_(clear|set) functions 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b4fb139e286baf742095716e8dabcbc3553eccb4 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b4fb139e286baf742095716e8dabcbc3553eccb4 commit b4fb139e286baf742095716e8dabcbc3553eccb4 Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:38 +0000 LinuxKPI: Add vm_flags_(clear|set) functions Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week (cherry picked from commit 06902a447934e855dc8f7eaf95b4235c684b264d) --- sys/compat/linuxkpi/common/include/linux/mm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 1a7bae27fa8b..0030cc6fb7a9 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -324,6 +324,18 @@ vm_get_page_prot(unsigned long vm_flags) return (vm_flags & VM_PROT_ALL); } +static inline void +vm_flags_set(struct vm_area_struct *vma, unsigned long flags) +{ + vma->vm_flags |= flags; +} + +static inline void +vm_flags_clear(struct vm_area_struct *vma, unsigned long flags) +{ + vma->vm_flags &= ~flags; +} + static inline struct page * vmalloc_to_page(const void *addr) {