public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel•org>
To: Andrew Morton <akpm@linux-foundation•org>
Cc: Mark Rutland <mark.rutland@arm•com>,
	David Hildenbrand <david@redhat•com>,
	Peter Zijlstra <peterz@infradead•org>,
	Catalin Marinas <catalin.marinas@arm•com>,
	Dave Hansen <dave.hansen@linux•intel.com>,
	linux-mm@kvack•org, linux-kselftest@vger•kernel.org,
	"H. Peter Anvin" <hpa@zytor•com>,
	Christopher Lameter <cl@linux•com>, Shuah Khan <shuah@kernel•org>,
	Thomas Gleixner <tglx@linutronix•de>,
	Elena Reshetova <elena.reshetova@intel•com>,
	linux-arch@vger•kernel.org, Tycho Andersen <tycho@tycho•ws>,
	linux-nvdimm@lists•01.org, Will Deacon <will@kernel•org>,
	x86@kernel•org, Matthew Wilcox <willy@infradead•org>,
	Mike Rapoport <rppt@linux•ibm.com>,
	Ingo Molnar <mingo@redhat•com>,
	Michael Kerrisk <mtk.manpages@gmail•com>,
	Arnd Bergmann <arnd@arndb•de>,
	James Bottomley <jejb@linux•ibm.com>,
	Borislav Petkov <bp@alien8•de>,
	Alexander Viro <viro@zeniv•linux.org.uk>,
	Andy Lutomirski <luto@kernel•org>,
	Paul Walmsley <paul.walmsley@sifive•com>,
	"Kirill A. Shutemov" <kirill@shutemov•name>,
	Dan Williams <dan.j.williams@intel•com>,
	linux-arm-kernel@lists•infradead.org, linux-api@vger•kernel.org,
	linux-kernel@vger•kernel.org, linux-riscv@lists•infradead.org,
	Palmer Dabbelt <palmer@dabbelt•com>,
	linux-fsdevel@vger•kernel.org, Shakeel Butt <shakeelb@google•com>,
	Rick Edgecombe <rick.p.edgecombe@intel•com>,
	Roman Gushchin <guro@fb•com>, Mike Rapoport <rppt@kernel•org>
Subject: [PATCH v13 02/10] mmap: make mlock_future_check() global
Date: Tue,  1 Dec 2020 09:45:51 +0200	[thread overview]
Message-ID: <20201201074559.27742-3-rppt@kernel.org> (raw)
In-Reply-To: <20201201074559.27742-1-rppt@kernel.org>

From: Mike Rapoport <rppt@linux•ibm.com>

It will be used by the upcoming secret memory implementation.

Signed-off-by: Mike Rapoport <rppt@linux•ibm.com>
---
 mm/internal.h | 3 +++
 mm/mmap.c     | 5 ++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/mm/internal.h b/mm/internal.h
index c43ccdddb0f6..ae146a260b14 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -348,6 +348,9 @@ static inline void munlock_vma_pages_all(struct vm_area_struct *vma)
 extern void mlock_vma_page(struct page *page);
 extern unsigned int munlock_vma_page(struct page *page);
 
+extern int mlock_future_check(struct mm_struct *mm, unsigned long flags,
+			      unsigned long len);
+
 /*
  * Clear the page's PageMlocked().  This can be useful in a situation where
  * we want to unconditionally remove a page from the pagecache -- e.g.,
diff --git a/mm/mmap.c b/mm/mmap.c
index 61f72b09d990..c481f088bd50 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1348,9 +1348,8 @@ static inline unsigned long round_hint_to_min(unsigned long hint)
 	return hint;
 }
 
-static inline int mlock_future_check(struct mm_struct *mm,
-				     unsigned long flags,
-				     unsigned long len)
+int mlock_future_check(struct mm_struct *mm, unsigned long flags,
+		       unsigned long len)
 {
 	unsigned long locked, lock_limit;
 
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-12-01  7:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  7:45 [PATCH v13 00/10] mm: introduce memfd_secret system call to create "secret" memory areas Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 01/10] mm: add definition of PMD_PAGE_ORDER Mike Rapoport
2020-12-01  7:45 ` Mike Rapoport [this message]
2020-12-01  7:45 ` [PATCH v13 03/10] set_memory: allow set_direct_map_*_noflush() for multiple pages Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 04/10] set_memory: allow querying whether set_direct_map_*() is actually enabled Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 05/10] mm: introduce memfd_secret system call to create "secret" memory areas Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 06/10] secretmem: use PMD-size pages to amortize direct map fragmentation Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 07/10] secretmem: add memcg accounting Mike Rapoport
2020-12-01 16:26   ` Shakeel Butt
2020-12-01 16:44     ` Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 08/10] PM: hibernate: disable when there are active secretmem users Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 09/10] arch, mm: wire up memfd_secret system call were relevant Mike Rapoport
2020-12-01  7:45 ` [PATCH v13 10/10] secretmem: test: add basic selftest for memfd_secret(2) Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201074559.27742-3-rppt@kernel.org \
    --to=rppt@kernel$(echo .)org \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=arnd@arndb$(echo .)de \
    --cc=bp@alien8$(echo .)de \
    --cc=catalin.marinas@arm$(echo .)com \
    --cc=cl@linux$(echo .)com \
    --cc=dan.j.williams@intel$(echo .)com \
    --cc=dave.hansen@linux$(echo .)intel.com \
    --cc=david@redhat$(echo .)com \
    --cc=elena.reshetova@intel$(echo .)com \
    --cc=guro@fb$(echo .)com \
    --cc=hpa@zytor$(echo .)com \
    --cc=jejb@linux$(echo .)ibm.com \
    --cc=kirill@shutemov$(echo .)name \
    --cc=linux-api@vger$(echo .)kernel.org \
    --cc=linux-arch@vger$(echo .)kernel.org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-fsdevel@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-kselftest@vger$(echo .)kernel.org \
    --cc=linux-mm@kvack$(echo .)org \
    --cc=linux-nvdimm@lists$(echo .)01.org \
    --cc=linux-riscv@lists$(echo .)infradead.org \
    --cc=luto@kernel$(echo .)org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=mingo@redhat$(echo .)com \
    --cc=mtk.manpages@gmail$(echo .)com \
    --cc=palmer@dabbelt$(echo .)com \
    --cc=paul.walmsley@sifive$(echo .)com \
    --cc=peterz@infradead$(echo .)org \
    --cc=rick.p.edgecombe@intel$(echo .)com \
    --cc=rppt@linux$(echo .)ibm.com \
    --cc=shakeelb@google$(echo .)com \
    --cc=shuah@kernel$(echo .)org \
    --cc=tglx@linutronix$(echo .)de \
    --cc=tycho@tycho$(echo .)ws \
    --cc=viro@zeniv$(echo .)linux.org.uk \
    --cc=will@kernel$(echo .)org \
    --cc=willy@infradead$(echo .)org \
    --cc=x86@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox