From nobody Thu Aug 01 22:27:53 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 4WZkB3092Hz5RZfM; Thu, 01 Aug 2024 22:27:55 +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 4WZkB16M93z4ZTH; Thu, 1 Aug 2024 22:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722551273; 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=bXCtb//uvpHJiledPqWtSzt6ZkDl0IbHYXV2cNgIiVw=; b=pOW2pf7Mw4fjcc1olKUVx/eKI6pj5PZngre6IbF6p4KY/L08vjfXrU1IsFYiy1iVSPrOcs k9ml98fMKCQg7IFyACurk1RycC8BDDLSjXYIWoKonqQyYGOPXbttSp+6gFCbhRS4Ts/6Ip q72ZUrdRaaLmVAQYLLmFqBdA+WEM7YxUhdRLFEryukZ7hdUdlqP/18XwUbqGAPIVILq7dZ UaYHCrymHVuFQYVy5p2dBd0QCzoxgQ54EJLb97+waYStjkQUtmrmzS4DCaElE53xYc7QbT HfC0xfsCsdbMRu5LMu0hqKisSMEA6YF/HPNH1doE4gfW8CsDG3QETnZGmbegLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722551273; a=rsa-sha256; cv=none; b=GXUwrQ1a3++Z9XEmy4MPqeq3BLSYmx22r8iYyrF/jeBuXahfxCyy+F7OxEIw1T4f41jhEk yAEhMRg3ijoGPVRnrcTqIz8ZIhbacuys8Wqjxa3rz5WMq4wUeosasa4A2jsRD78DZ8h0ie ZTa6ZnbEw1N9yWSHNaPF5YylSPX/sc0vXK1nUPLMD44dVPQE5Ht+zkdmQvDWmAh/bj85Ds DVv2CNhY/sOe0PebX/LJIjGJr/89MvhodT5HAX064VXFePkmV2g+fPbRCW6JYLmKufwwE8 hrjLlPVaDiMIxQdG7bfFsNPB8sEkzaikDLmElEWjvT1lF/WYyysr+ZMuJwaIHQ== 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=1722551273; 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=bXCtb//uvpHJiledPqWtSzt6ZkDl0IbHYXV2cNgIiVw=; b=pxgF8/lYmE4mFKLCH0LBs/zbcLLYiXS3xw9ZPBxNl3A5Xa3Oik2nMugmz7LM8EC5lYqbNi O6TP3rJhkHuerc+WNs2WsBjwSYjkjtUYMS0iKGFuqg+ZhXlZYkFKPVenIno740mf0ifWwU 8IKgzMCA0dPJw9jiS0g/USxf+qebrvOFF+rzrjvQZSf35ab3g4hsD0VxQ+SPRX+IRXpWRE z57+kJjVNW9UEFlg7tH7wT+QFMCcQDYnn9Wtgai0Jh8l5afhWsq4nVfjXxRUEUUEZsKVwu 4dtKZbxD+Sbd6+xj/0JuAxn6hMfCdVZXiCd7WSW9ZOEIxxRGxEJ5KRYV8wbGKA== 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 4WZkB15z45z12tN; Thu, 1 Aug 2024 22:27:53 +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 471MRrEr028230; Thu, 1 Aug 2024 22:27:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471MRrL6028227; Thu, 1 Aug 2024 22:27:53 GMT (envelope-from git) Date: Thu, 1 Aug 2024 22:27:53 GMT Message-Id: <202408012227.471MRrL6028227@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: 3eb02936927e - stable/14 - LinuxKPI: Remove vmas argument from get_user_pages on KPI layer 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: 3eb02936927e0977ef6d17fb47187aa4d9309c76 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=3eb02936927e0977ef6d17fb47187aa4d9309c76 commit 3eb02936927e0977ef6d17fb47187aa4d9309c76 Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:51:04 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-01 21:09:41 +0000 LinuxKPI: Remove vmas argument from get_user_pages on KPI layer To chase Linux kernel 6.5 Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45614 (cherry picked from commit e1b0f431a109683ca7c232fb9282f3afabfdf12d) --- sys/compat/linuxkpi/common/include/linux/mm.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index e2bda799dc77..56c849b02c32 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -279,14 +279,27 @@ extern long get_user_pages(unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **, struct vm_area_struct **); +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500 +#define get_user_pages(start, nr_pages, gup_flags, pages) \ + get_user_pages(start, nr_pages, gup_flags, pages, NULL) +#endif +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500 +static inline long +pin_user_pages(unsigned long start, unsigned long nr_pages, + unsigned int gup_flags, struct page **pages) +{ + return (get_user_pages(start, nr_pages, gup_flags, pages)); +} +#else static inline long pin_user_pages(unsigned long start, unsigned long nr_pages, unsigned int gup_flags, struct page **pages, struct vm_area_struct **vmas) { - return get_user_pages(start, nr_pages, gup_flags, pages, vmas); + return (get_user_pages(start, nr_pages, gup_flags, pages, vmas)); } +#endif extern int __get_user_pages_fast(unsigned long start, int nr_pages, int write,