* [PATCH] alloc_tag: hide execmem_vmap() on !MMU
@ 2024-10-28 14:18 Arnd Bergmann
2024-10-28 14:39 ` Mike Rapoport
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2024-10-28 14:18 UTC (permalink / raw)
To: Andrew Morton, Suren Baghdasaryan, Pasha Tatashin
Cc: Arnd Bergmann, Mike Rapoport (Microsoft),
Luis Chamberlain, Song Liu, Masami Hiramatsu (Google),
linux-mm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The newly added function fails to link on nommu kernels, but is also
not needed there:
ld.lld-20: error: undefined symbol: __get_vm_area_node
>>> referenced by execmem.c
>>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a
>>> referenced by execmem.c
>>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a
Fixes: 57bc3834fb6f ("alloc_tag: populate memory for module tags as needed")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
mm/execmem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/execmem.c b/mm/execmem.c
index 5c0f9f2d6f83..b04cfece7356 100644
--- a/mm/execmem.c
+++ b/mm/execmem.c
@@ -368,6 +368,7 @@ void execmem_free(void *ptr)
vfree(ptr);
}
+#ifdef CONFIG_MMU
struct vm_struct *execmem_vmap(size_t size)
{
struct execmem_range *range = &execmem_info->ranges[EXECMEM_MODULE_DATA];
@@ -383,6 +384,7 @@ struct vm_struct *execmem_vmap(size_t size)
return area;
}
+#endif
void *execmem_update_copy(void *dst, const void *src, size_t size)
{
--
2.39.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] alloc_tag: hide execmem_vmap() on !MMU
2024-10-28 14:18 [PATCH] alloc_tag: hide execmem_vmap() on !MMU Arnd Bergmann
@ 2024-10-28 14:39 ` Mike Rapoport
2024-10-28 18:51 ` Suren Baghdasaryan
0 siblings, 1 reply; 3+ messages in thread
From: Mike Rapoport @ 2024-10-28 14:39 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Morton, Suren Baghdasaryan, Pasha Tatashin, Arnd Bergmann,
Luis Chamberlain, Song Liu, Masami Hiramatsu (Google),
linux-mm, linux-kernel
On Mon, Oct 28, 2024 at 02:18:09PM +0000, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The newly added function fails to link on nommu kernels, but is also
> not needed there:
>
> ld.lld-20: error: undefined symbol: __get_vm_area_node
> >>> referenced by execmem.c
> >>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a
> >>> referenced by execmem.c
> >>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a
>
> Fixes: 57bc3834fb6f ("alloc_tag: populate memory for module tags as needed")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> mm/execmem.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/execmem.c b/mm/execmem.c
> index 5c0f9f2d6f83..b04cfece7356 100644
> --- a/mm/execmem.c
> +++ b/mm/execmem.c
> @@ -368,6 +368,7 @@ void execmem_free(void *ptr)
> vfree(ptr);
> }
>
> +#ifdef CONFIG_MMU
> struct vm_struct *execmem_vmap(size_t size)
> {
> struct execmem_range *range = &execmem_info->ranges[EXECMEM_MODULE_DATA];
> @@ -383,6 +384,7 @@ struct vm_struct *execmem_vmap(size_t size)
>
> return area;
> }
> +#endif
Nit: there is already #ifdef CONFIG_MMU block in execmem.c, better to move
execmem_vmap() there
Other than that
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> void *execmem_update_copy(void *dst, const void *src, size_t size)
> {
> --
> 2.39.5
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] alloc_tag: hide execmem_vmap() on !MMU
2024-10-28 14:39 ` Mike Rapoport
@ 2024-10-28 18:51 ` Suren Baghdasaryan
0 siblings, 0 replies; 3+ messages in thread
From: Suren Baghdasaryan @ 2024-10-28 18:51 UTC (permalink / raw)
To: Mike Rapoport
Cc: Arnd Bergmann, Andrew Morton, Pasha Tatashin, Arnd Bergmann,
Luis Chamberlain, Song Liu, Masami Hiramatsu (Google),
linux-mm, linux-kernel
On Mon, Oct 28, 2024 at 7:43 AM Mike Rapoport <rppt@kernel.org> wrote:
>
> On Mon, Oct 28, 2024 at 02:18:09PM +0000, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > The newly added function fails to link on nommu kernels, but is also
> > not needed there:
> >
> > ld.lld-20: error: undefined symbol: __get_vm_area_node
> > >>> referenced by execmem.c
> > >>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a
> > >>> referenced by execmem.c
> > >>> mm/execmem.o:(execmem_vmap) in archive vmlinux.a
> >
> > Fixes: 57bc3834fb6f ("alloc_tag: populate memory for module tags as needed")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > mm/execmem.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/mm/execmem.c b/mm/execmem.c
> > index 5c0f9f2d6f83..b04cfece7356 100644
> > --- a/mm/execmem.c
> > +++ b/mm/execmem.c
> > @@ -368,6 +368,7 @@ void execmem_free(void *ptr)
> > vfree(ptr);
> > }
> >
> > +#ifdef CONFIG_MMU
> > struct vm_struct *execmem_vmap(size_t size)
> > {
> > struct execmem_range *range = &execmem_info->ranges[EXECMEM_MODULE_DATA];
> > @@ -383,6 +384,7 @@ struct vm_struct *execmem_vmap(size_t size)
> >
> > return area;
> > }
> > +#endif
>
> Nit: there is already #ifdef CONFIG_MMU block in execmem.c, better to move
> execmem_vmap() there
>
> Other than that
>
> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Thanks for the fix but execmem_vmap() is used if
CONFIG_MEM_ALLOC_PROFILING=y. Please give me an hour to post a fix
dealing with that.
>
> > void *execmem_update_copy(void *dst, const void *src, size_t size)
> > {
> > --
> > 2.39.5
> >
>
> --
> Sincerely yours,
> Mike.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-28 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-28 14:18 [PATCH] alloc_tag: hide execmem_vmap() on !MMU Arnd Bergmann
2024-10-28 14:39 ` Mike Rapoport
2024-10-28 18:51 ` Suren Baghdasaryan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox