lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191025234834.28214-2-john.stultz@linaro.org>
Date:   Fri, 25 Oct 2019 23:48:33 +0000
From:   John Stultz <john.stultz@...aro.org>
To:     lkml <linux-kernel@...r.kernel.org>
Cc:     Sandeep Patil <sspatil@...gle.com>,
        Laura Abbott <labbott@...hat.com>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Liam Mark <lmark@...eaurora.org>,
        Pratik Patel <pratikp@...eaurora.org>,
        Brian Starkey <Brian.Starkey@....com>,
        "Andrew F . Davis" <afd@...com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yue Hu <huyue2@...ong.com>, Mike Rapoport <rppt@...ux.ibm.com>,
        Chenbo Feng <fengc@...gle.com>,
        Alistair Strachan <astrachan@...gle.com>,
        Hridya Valsaraju <hridya@...gle.com>,
        dri-devel@...ts.freedesktop.org,
        John Stultz <john.stultz@...aro.org>
Subject: [RFC][PATCH 1/2] mm: cma: Export cma symbols for cma heap as a module

From: Sandeep Patil <sspatil@...gle.com>

Export cma_get_name, cma_alloc, cma_release, cma_for_each_area
and dma_contiguous_default_area so that we can use these from
the dmabuf cma heap when it is built as module.

Cc: Laura Abbott <labbott@...hat.com>
Cc: Benjamin Gaignard <benjamin.gaignard@...aro.org>
Cc: Sumit Semwal <sumit.semwal@...aro.org>
Cc: Liam Mark <lmark@...eaurora.org>
Cc: Pratik Patel <pratikp@...eaurora.org>
Cc: Brian Starkey <Brian.Starkey@....com>
Cc: Andrew F. Davis <afd@...com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Yue Hu <huyue2@...ong.com>
Cc: Mike Rapoport <rppt@...ux.ibm.com>
Cc: Chenbo Feng <fengc@...gle.com>
Cc: Alistair Strachan <astrachan@...gle.com>
Cc: Sandeep Patil <sspatil@...gle.com>
Cc: Hridya Valsaraju <hridya@...gle.com>
Cc: dri-devel@...ts.freedesktop.org
Signed-off-by: Sandeep Patil <sspatil@...gle.com>
[jstultz: Rewrote commit message, added
 dma_contiguous_default_area to the set of exported symbols]
Signed-off-by: John Stultz <john.stultz@...aro.org>
---
 kernel/dma/contiguous.c | 1 +
 mm/cma.c                | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
index 69cfb4345388..ff6cba63ea6f 100644
--- a/kernel/dma/contiguous.c
+++ b/kernel/dma/contiguous.c
@@ -31,6 +31,7 @@
 #endif
 
 struct cma *dma_contiguous_default_area;
+EXPORT_SYMBOL(dma_contiguous_default_area);
 
 /*
  * Default global CMA area size can be defined in kernel's .config.
diff --git a/mm/cma.c b/mm/cma.c
index 7fe0b8356775..db4642e58058 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -24,6 +24,7 @@
 #include <linux/memblock.h>
 #include <linux/err.h>
 #include <linux/mm.h>
+#include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/sizes.h>
 #include <linux/slab.h>
@@ -54,6 +55,7 @@ const char *cma_get_name(const struct cma *cma)
 {
 	return cma->name ? cma->name : "(undefined)";
 }
+EXPORT_SYMBOL_GPL(cma_get_name);
 
 static unsigned long cma_bitmap_aligned_mask(const struct cma *cma,
 					     unsigned int align_order)
@@ -500,6 +502,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
 	pr_debug("%s(): returned %p\n", __func__, page);
 	return page;
 }
+EXPORT_SYMBOL_GPL(cma_alloc);
 
 /**
  * cma_release() - release allocated pages
@@ -533,6 +536,7 @@ bool cma_release(struct cma *cma, const struct page *pages, unsigned int count)
 
 	return true;
 }
+EXPORT_SYMBOL_GPL(cma_release);
 
 int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data)
 {
@@ -547,3 +551,4 @@ int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data)
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(cma_for_each_area);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ