Thread (18 messages) 18 messages, 3 authors, 2021-01-27

Re: [PATCH v15 07/11] secretmem: use PMD-size pages to amortize direct map fragmentation

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-01-21 01:02:28
Also in: linux-api, linux-arch, linux-fsdevel, linux-kselftest, linux-mm, linux-riscv, lkml, nvdimm

On Wed, Jan 20, 2021 at 08:06:08PM +0200, Mike Rapoport wrote:
+static int secretmem_pool_increase(struct secretmem_ctx *ctx, gfp_t gfp)
 {
+	unsigned long nr_pages = (1 << PMD_PAGE_ORDER);
+	struct gen_pool *pool = ctx->pool;
+	unsigned long addr;
+	struct page *page;
+	int err;
+
+	page = cma_alloc(secretmem_cma, nr_pages, PMD_SIZE, gfp & __GFP_NOWARN);
+	if (!page)
+		return -ENOMEM;
Does cma_alloc() zero the pages it allocates?  If not, where do we avoid
leaking kernel memory to userspace?


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help