alloc_tag: Export memory allocation profiling symbols used by modules
Subsystems (3)
Suren Baghdasaryan
reviewerPATCH 1/1 alloc_tag: Export memory allocation profiling symbols used by modules
Export mem_alloc_profiling_key, page_ext_get() and page_ext_set() symbols as they can be used by modules (mem_alloc_profiling_key is used indirectly via mem_alloc_profiling_enabled()).
--- lib/alloc_tag.c | 1 + mm/page_ext.c | 2 ++ 2 files changed, 3 insertions(+)
lib/alloc_tag.c +1 -0
@@ -15,6 +15,7 @@ EXPORT_SYMBOL(_shared_alloc_tag);DEFINE_STATIC_KEY_MAYBE (CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT , mem_alloc_profiling_key); +EXPORT_SYMBOL (mem_alloc_profiling_key);struct allocinfo_private {struct codetag_iterator iter;
mm/page_ext.c +2 -0
@@ -527,6 +527,7 @@ struct page_ext *page_ext_get(const struct page *page)return page_ext; } +EXPORT_SYMBOL (page_ext_get);/** * page_ext_put() - Working with page extended information is done.
@@ -545,3 +546,4 @@ void page_ext_put(struct page_ext *page_ext)rcu_read_unlock (); } +EXPORT_SYMBOL (page_ext_put);
base-commit: 9d9a2f29aefdadc86e450308ff056017a209c755
Signature · 1 line
2.45.2.993.g49e7a77208-goog
Andrew Morton
maintainerQuoted 3 lines · On Thu, 11 Jul 2024 13:46:26 -0700 Suren Baghdasaryan <[email protected]> wrote:
Export
mem_alloc_profiling_key,page_ext_get()andpage_ext_set()symbols as they can be used by modules (mem_alloc_profiling_keyis used indirectly viamem_alloc_profiling_enabled()).
Thanks, I'll add
Suren Baghdasaryan
reviewerQuoted 10 lines · Andrew Morton
Quoted 3 lines · On Thu, 11 Jul 2024 13:46:26 -0700 Suren Baghdasaryan <[email protected]> wrote:
Export
mem_alloc_profiling_key,page_ext_get()andpage_ext_set()symbols as they can be used by modules (mem_alloc_profiling_keyis used indirectly viamem_alloc_profiling_enabled()).Thanks, I'll add
Fixes 22d407b164ff ("lib: add allocation tagging support for memory allocation profiling").
Perfect. Thank you!
mm/page_ext.c struct page_ext *page_ext_get(const struct page *page)
Quoted 3 lines · Suren Baghdasaryan
mm/page_ext.c +2
-0+EXPORT_SYMBOL (page_ext_get); +EXPORT_SYMBOL (page_ext_put);
These really have no business being exported, especially non-GPL. Please rework whatever interfaces need them to be be moved out of line.
Suren Baghdasaryan
reviewerQuoted 8 lines · Christoph Hellwig
mm/page_ext.c struct page_ext *page_ext_get(const struct page *page)
Quoted 3 lines · Suren Baghdasaryan
mm/page_ext.c +2
-0+EXPORT_SYMBOL (page_ext_get); +EXPORT_SYMBOL (page_ext_put);These really have no business being exported, especially non-GPL. Please rework whatever interfaces need them to be be moved out of line.
Ok, I can do that. Thanks for the feedback!
Quoted 1 line
Suren Baghdasaryan
reviewerQuoted 4 lines · Suren Baghdasaryan
Quoted 2 lines · Christoph Hellwig
On Thu, Jul 11, 2024 at 01:46:26PM -0700, Suren Baghdasaryan wrote:
Quoted 8 lines
Quoted 6 lines
mm/page_ext.c struct page_ext *page_ext_get(const struct page *page)
Quoted 3 lines
mm/page_ext.c +2
-0+EXPORT_SYMBOL (page_ext_get); +EXPORT_SYMBOL (page_ext_put);These really have no business being exported, especially non-GPL. Please rework whatever interfaces need them to be be moved out of line.
Ok, I can do that. Thanks for the feedback!
Replacement patches are posted at
https://lore.kernel.org/all/[email protected]
Andrew, could you please replace this older patch with the new patchset (2 patches now)? I can see the old patch in mm-unstable as ac5ca7954e4e ("alloc_tag: export memory allocation profiling symbols used by modules") and I think it's also in your mm-hotfixes-stable. Please replace it with new patches.
Thanks,
Suren.
Quoted 2 lines
Quoted 2 lines