From nobody Mon Apr 08 06:49:14 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 4VCfp31d1pz5GKxq; Mon, 8 Apr 2024 06:49:15 +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 4VCfp3022hz4mD7; Mon, 8 Apr 2024 06:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712558955; 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=u1WxkWAf0mzeiULDXY7tm1JQGnAdmZp4PT9xhRR3Yxo=; b=lr42yGZbzSwI3tg59yZ2XuyHkZu+Swp2F6IhT0so6mVZ4S/9Ai1QBk/Pn9i4HoC9JA3zbm O5DQKc5SsqJuYnwMsq9B4VsfAOkVTdiNJM6m9SJFLtCajDUKVPAnb4LVcVx+iyb3LK0M2c ATkHnRQ0AP0yzoMTGD3+5E1UBQesATTtMMpl8UZfCdnoOMBY9ab+vae17HjNL8VuxQNYMW s2O4zjUvTHuNiDYEKAVzJn8sYt1iiKAvkJTsfvNSngj4B41RhJaC01TYfXMreCLUyWsfNV mFbsidw9ycaWWmDOnWaJ3IR4MUhOAeGuDUHtXcmKnigoPcKdafShBlwxmctyeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712558955; a=rsa-sha256; cv=none; b=GgEOrvz38EIrEPB9psVvQDMX3p/641ua3lAnRKS8WwSieW88fv0ttNIq4PlhqsnaRlEwrO mMR28FHOXQwT8aTOoUgLABrVjKsHwUVsCzTuiJ1g219HrMQa53v+ynH95yBJHq8/N6Xban h+KwNVOBpCPyUai5kWdkHQzvRMIycmViDK1Ej1ggCfqnQm1kmVZIInlDXRJeDuX2MfE/fZ SyspggvEHdUIUvMXRR089yqGbOgGl6hH9lC2waCvZvaPcrK+AHLQzML9D1Fp5WFIRcisAK I7FH43p1s8e3f6KJgaQQQFJeh9I8PxRmZpkjwZ13X5B+UJl3yAY4kEI734hytQ== 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=1712558955; 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=u1WxkWAf0mzeiULDXY7tm1JQGnAdmZp4PT9xhRR3Yxo=; b=Fkze3o511j8g03VeROww4yzEwi3BMUWuNM0MhuB1CWujNtSebtqdlejcay+YBlDohB05HJ BTRX4dvRDDLzyRKEDvWXNwcZzHL7kNDBXO8Swg1lryhjcZlVkxbtKNHHK1HMTqjwenE2cJ H5Sw0XDLFwr9BePfOx+5ypNatRs9+dkawnC123T6z4wHbFLv184EQ+P2YVLlRmvomwMbN0 90O4nEug582LirSfBKgjuJLSLVOpo4zA7c+I23/YHUjccMs6uM1ukXGGrxJkk+tEHFP0n0 e79O6a3M0r1x70u3TAbDbsHcOEGGRAlb/qpf5Q5WJtnzXxPgfEmArRjsm2af+A== 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 4VCfp26dhvz11kZ; Mon, 8 Apr 2024 06:49:14 +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 4386nEEG032889; Mon, 8 Apr 2024 06:49:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4386nE4G032886; Mon, 8 Apr 2024 06:49:14 GMT (envelope-from git) Date: Mon, 8 Apr 2024 06:49:14 GMT Message-Id: <202404080649.4386nE4G032886@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 06902a447934 - main - 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: 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06902a447934e855dc8f7eaf95b4235c684b264d Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=06902a447934e855dc8f7eaf95b4235c684b264d commit 06902a447934e855dc8f7eaf95b4235c684b264d Author: Vladimir Kondratyev AuthorDate: 2024-04-08 06:47:42 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-04-08 06:47:42 +0000 LinuxKPI: Add vm_flags_(clear|set) functions Sponsored by: Serenity Cyber Security, LLC Reviewed by: emaste MFC after: 1 week --- 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) {