[PATCH 1/3] mm: Export vmf_insert_mixed_mkwrite()

mhkelley58@gmail.com posted 3 patches 10 months ago
There is a newer version of this series
[PATCH 1/3] mm: Export vmf_insert_mixed_mkwrite()
Posted by mhkelley58@gmail.com 10 months ago
From: Michael Kelley <mhklinux@outlook.com>

Export vmf_insert_mixed_mkwrite() for use by fbdev deferred I/O code,
which can be built as a module. For consistency with the related function
vmf_insert_mixed(), export without the GPL qualifier.

Commit cd1e0dac3a3e ("mm: unexport vmf_insert_mixed_mkwrite") is
effectively reverted.

Signed-off-by: Michael Kelley <mhklinux@outlook.com>
---
 mm/memory.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memory.c b/mm/memory.c
index 9d0ba6fe73c1..883ad53d077e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2660,6 +2660,7 @@ vm_fault_t vmf_insert_mixed_mkwrite(struct vm_area_struct *vma,
 {
 	return __vm_insert_mixed(vma, addr, pfn, true);
 }
+EXPORT_SYMBOL(vmf_insert_mixed_mkwrite);
 
 /*
  * maps a range of physical memory into the requested pages. the old
-- 
2.25.1
Re: [PATCH 1/3] mm: Export vmf_insert_mixed_mkwrite()
Posted by Christoph Hellwig 10 months ago
On Tue, Apr 08, 2025 at 11:36:44AM -0700, mhkelley58@gmail.com wrote:
> From: Michael Kelley <mhklinux@outlook.com>
> 
> Export vmf_insert_mixed_mkwrite() for use by fbdev deferred I/O code,

But they are using this on dma coherent memory, where you can't legally
get at the page.  As told last time you need to fix that first before
hacking around that code.

> which can be built as a module. For consistency with the related function
> vmf_insert_mixed(), export without the GPL qualifier.

No.  All advanced new Linux functionality must be _GPL.  Don't try to
sneak around that.