Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 13/27] mm: export access_remote_vm symbol for debugger use
@ 2025-01-13 13:25 Mika Kuoppala
  0 siblings, 0 replies; 2+ messages in thread
From: Mika Kuoppala @ 2025-01-13 13:25 UTC (permalink / raw)
  To: intel-xe
  Cc: dri-devel, Mika Kuoppala, Matthew Brost, Andrzej Hajda,
	Thomas Hellström, Christian König, Joonas Lahtinen,
	Simona Vetter

Export access_remote_vm as GPL symbol to allow debuggers (eudebug)
to access and modify memory in target VMs by tracking VM_BIND
operations. While access_process_vm() is already exported, it would
require maintaining task references in the debugger.

Since the mm reference is already present in the userptr's mm notifier
implementation, exporting access_remote_vm allows that existing reference
to be used directly without needing to obtain and maintain additional
task references just for memory access.

Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Simona Vetter <simona@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 mm/memory.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memory.c b/mm/memory.c
index 398c031be9ba..9b7c71c83db5 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -6690,6 +6690,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
 {
 	return __access_remote_vm(mm, addr, buf, len, gup_flags);
 }
+EXPORT_SYMBOL_GPL(access_remote_vm);
 
 /*
  * Access another process' address space.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 13/27] mm: export access_remote_vm symbol for debugger use
  2024-12-23 10:31 [PATCH 13/26] RFC drm/xe/eudebug: userptr vm pread/pwrite Thomas Hellström
@ 2025-01-13 13:32 ` Mika Kuoppala
  0 siblings, 0 replies; 2+ messages in thread
From: Mika Kuoppala @ 2025-01-13 13:32 UTC (permalink / raw)
  To: intel-xe
  Cc: dri-devel, Mika Kuoppala, Matthew Brost, Andrzej Hajda,
	Thomas Hellström, Christian König, Joonas Lahtinen,
	Simona Vetter

Export access_remote_vm as GPL symbol to allow debuggers (eudebug)
to access and modify memory in target VMs by tracking VM_BIND
operations. While access_process_vm() is already exported, it would
require maintaining task references in the debugger.

Since the mm reference is already present in the userptr's mm notifier
implementation, exporting access_remote_vm allows that existing reference
to be used directly without needing to obtain and maintain additional
task references just for memory access.

Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Simona Vetter <simona@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 mm/memory.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memory.c b/mm/memory.c
index 398c031be9ba..9b7c71c83db5 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -6690,6 +6690,7 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
 {
 	return __access_remote_vm(mm, addr, buf, len, gup_flags);
 }
+EXPORT_SYMBOL_GPL(access_remote_vm);
 
 /*
  * Access another process' address space.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-13 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 13:25 [PATCH 13/27] mm: export access_remote_vm symbol for debugger use Mika Kuoppala
  -- strict thread matches above, loose matches on Subject: below --
2024-12-23 10:31 [PATCH 13/26] RFC drm/xe/eudebug: userptr vm pread/pwrite Thomas Hellström
2025-01-13 13:32 ` [PATCH 13/27] mm: export access_remote_vm symbol for debugger use Mika Kuoppala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox