lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 17 Jul 2014 16:57:58 +0300
From:	Oded Gabbay <>
To:	David Airlie <>,
	Jerome Glisse <>,
	"Alex Deucher" <>,
	Andrew Morton <>
CC:	John Bridgman <>,
	Joerg Roedel <>,
	Andrew Lewycky <>,
	Christian König <>,
	Michel Dänzer <>,
	Ben Goz <>,
	Alexey Skidanov <>,
	Evgeny Pinchuk <>,
	"Oded Gabbay" <>,
	"Kirill A. Shutemov" <>,
	Rik van Riel <>,
	"Peter Zijlstra" <>,
	Mel Gorman <>,
	Joonsoo Kim <>,
	Jérôme Glisse <>,
	<>, linux-mm <>
Subject: [PATCH v2 01/25] mm: Add kfd_process pointer to mm_struct

Forgot to add mm mailing list. Sorry.

This patch enables the amdkfd driver to retrieve the kfd_process
object from the process's mm_struct. This is needed because kfd_process
lifespan is bound to the process's mm_struct lifespan.

When amdkfd is notified about an mm_struct tear-down, it checks if the
kfd_process pointer is valid. If so, it releases the kfd_process object
and all relevant resources.

In v3 of the patchset I will update the binding to match the final discussions
on [PATCH 1/8] mmput: use notifier chain to call subsystem exit handler.
In the meantime, I'm going to try and see if I can drop the kfd_process
in mm_struct and remove the use of the new notification chain in mmput.
Instead, I will try to use the mmu release notifier.

Signed-off-by: Oded Gabbay <>
  include/linux/mm_types.h | 14 ++++++++++++++
  1 file changed, 14 insertions(+)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 678097c..ff71496 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -20,6 +20,10 @@
  struct hmm;
+struct kfd_process;
@@ -439,6 +443,16 @@ struct mm_struct {
  	struct hmm *hmm;
+	/*
+	 * kfd always register an mmu_notifier we rely on mmu notifier to keep
+	 * refcount on mm struct as well as forbiding registering kfd on a
+	 * dying mm
+	 *
+	 * This field is set with mmap_sem old in write mode.
+	 */
+	struct kfd_process *kfd_process;
  	pgtable_t pmd_huge_pte; /* protected by page_table_lock */

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists