From nobody Wed Jun 26 20:54:46 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 4W8YqB5sJyz5QDGb; Wed, 26 Jun 2024 20:54:46 +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 4W8YqB3JqSz4LYL; Wed, 26 Jun 2024 20:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719435286; 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=4ipvNgaZIZ+Bbi1Sf1aJGuS4V43IuKHZy8+ye4InP4w=; b=osCmwcHR1w4cBVvwEg4Uk8i257I1ofHewbfp1yj2JMYWUADPe5ugBnCaoomgx4uc7fN+kT 2F1+Hp8e0n0nTyhNoFvodYD6iU3Fh4H6UvUriCHiGnR8w41C/5khL0fCx9AUO+SPGFbKdR Cp7zgikH+QaOsO+bA4lXC0cU51e7I6zd6+waohQaViluDlMrUQU7MlkI38dDmD1pBeXM8l pC9mMkghy29Gx8oGklppfvVK2C8yRyX9iqhJ5jTJyaPt30eF8F0xiMjtawo2l8Owr0Shgh G350tDXXyKCvgyU3jwAffdoUBcJ8woJPpnjJYbrykdRWxpzLpzjhA17ps5oXqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719435286; a=rsa-sha256; cv=none; b=hlDxYiLLgNH6UVB9E5t9URB1tPPpW2IoGvgPGQE1D9j8b4uBDvFGXYgDYUQlIzbP915e6x mee1ok01y6hoVaB/GrQluPdBhNiC0My/g4x9qhfztbaeUbww5/fizv4TgagYwRmraVsv+T bCCqNsxeR4RTPEQ9aZmCTDNz75l2pdouMTB4AZSWmYQV9ZWR3Wt1NcP84NCis8VREdgeL9 3foooe4mmFvn3VskkgpQECwVK2LaetQhz+/oARyeDZwpy2mkCEFumatUAkxRF+crB2SOd7 rwP3T+mZplXEsWZCMOWpnxqRdXkOUaS0dFhXh88iZQk/BjM6lQCggYGYyikyfQ== 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=1719435286; 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=4ipvNgaZIZ+Bbi1Sf1aJGuS4V43IuKHZy8+ye4InP4w=; b=cc9nPKM9cS95EdjU4avZQ0u/oYsWurolc9rQgs75N8ENQiUZ4dfHwrSYIst3z50UO7H+Bj oYH8YZWPFvx+T9JpRB+nBmYjFAfArqMYxKCEST23gbDqh4Kt2iUPPrrIJ1iPlPGMJbCOpM gIm6iV8Vbz/C8dVgYHZ781AJpBL2q1MCjUybyz24aseWp5DM/INv+KMhFq2T2jptQfUESM zgQmIXWtmtY4LbO2srHQBxeBhhaEGJdL9rYFIrxxP93KPWhso+S62pD9821jSW15evG/6P rle/PsWXR45qQ1b6jfLRitM+9OaMP4a/pKo/o5iJ2L2aEkM4b24RFFm8H5602A== 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 4W8YqB2rTkz10kl; Wed, 26 Jun 2024 20:54:46 +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 45QKskrN092627; Wed, 26 Jun 2024 20:54:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45QKskLO092624; Wed, 26 Jun 2024 20:54:46 GMT (envelope-from git) Date: Wed, 26 Jun 2024 20:54:46 GMT Message-Id: <202406262054.45QKskLO092624@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: e1b0f431a109 - main - 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/main X-Git-Reftype: branch X-Git-Commit: e1b0f431a109683ca7c232fb9282f3afabfdf12d Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e1b0f431a109683ca7c232fb9282f3afabfdf12d commit e1b0f431a109683ca7c232fb9282f3afabfdf12d Author: Vladimir Kondratyev AuthorDate: 2024-06-26 20:51:04 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-06-26 20:51:04 +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 --- 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,