All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] elfcore: um: Fix CONFIG_UM typo in linux/elfcore.h
@ 2021-10-06 18:11 Catalin Marinas
  2021-10-06 21:57 ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: Catalin Marinas @ 2021-10-06 18:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, Nathan Chancellor, Nick Desaulniers, Barret Rhoden,
	Andrew Morton

There is no CONFIG_UM, only UML. In addition, the arch/x86/um/elfcore.c
file is only compiled if CONFIG_X86_32. Fix the #if conditions in the
linux/elfcore.h header accordingly.

Fixes: 6e7b64b9dd6d ("elfcore: fix building with clang")
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---

I'm doing some arm64 changes to allow MTE tags to be dumped in the core
file and I came across this. In a subsequent patch I'll change the #if
check with a dedicated Kconfig option but I thought I'd send the fix
first in case anyone deems it important to backport.

 include/linux/elfcore.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 2aaa15779d50..957ebec35aad 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -109,7 +109,7 @@ static inline int elf_core_copy_task_fpregs(struct task_struct *t, struct pt_reg
 #endif
 }
 
-#if defined(CONFIG_UM) || defined(CONFIG_IA64)
+#if (defined(CONFIG_UML) && defined(CONFIG_X86_32)) || defined(CONFIG_IA64)
 /*
  * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
  * extra segments containing the gate DSO contents.  Dumping its

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

* Re: [PATCH] elfcore: um: Fix CONFIG_UM typo in linux/elfcore.h
  2021-10-06 18:11 [PATCH] elfcore: um: Fix CONFIG_UM typo in linux/elfcore.h Catalin Marinas
@ 2021-10-06 21:57 ` Nick Desaulniers
  2021-10-07  0:57   ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Desaulniers @ 2021-10-06 21:57 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Arnd Bergmann, linux-kernel, Nathan Chancellor, Barret Rhoden,
	Andrew Morton, Lukas Bulwahn

On Wed, Oct 6, 2021 at 11:11 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> There is no CONFIG_UM, only UML. In addition, the arch/x86/um/elfcore.c
> file is only compiled if CONFIG_X86_32. Fix the #if conditions in the
> linux/elfcore.h header accordingly.
>
> Fixes: 6e7b64b9dd6d ("elfcore: fix building with clang")
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Arnd Bergmann <arnd@arndb.de>

Lukas noticed and sent a patch coincidentally just before you:
https://lore.kernel.org/lkml/20211006082209.417-1-lukas.bulwahn@gmail.com/

Let me cc' you and Arnd into that thread.

> ---
>
> I'm doing some arm64 changes to allow MTE tags to be dumped in the core
> file and I came across this. In a subsequent patch I'll change the #if
> check with a dedicated Kconfig option but I thought I'd send the fix
> first in case anyone deems it important to backport.
>
>  include/linux/elfcore.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
> index 2aaa15779d50..957ebec35aad 100644
> --- a/include/linux/elfcore.h
> +++ b/include/linux/elfcore.h
> @@ -109,7 +109,7 @@ static inline int elf_core_copy_task_fpregs(struct task_struct *t, struct pt_reg
>  #endif
>  }
>
> -#if defined(CONFIG_UM) || defined(CONFIG_IA64)
> +#if (defined(CONFIG_UML) && defined(CONFIG_X86_32)) || defined(CONFIG_IA64)
>  /*
>   * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
>   * extra segments containing the gate DSO contents.  Dumping its



-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] elfcore: um: Fix CONFIG_UM typo in linux/elfcore.h
  2021-10-06 21:57 ` Nick Desaulniers
@ 2021-10-07  0:57   ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2021-10-07  0:57 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Catalin Marinas, Arnd Bergmann, linux-kernel, Nathan Chancellor,
	Barret Rhoden, Lukas Bulwahn

On Wed, 6 Oct 2021 14:57:56 -0700 Nick Desaulniers <ndesaulniers@google.com> wrote:

> On Wed, Oct 6, 2021 at 11:11 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
> >
> > There is no CONFIG_UM, only UML. In addition, the arch/x86/um/elfcore.c
> > file is only compiled if CONFIG_X86_32. Fix the #if conditions in the
> > linux/elfcore.h header accordingly.
> >
> > Fixes: 6e7b64b9dd6d ("elfcore: fix building with clang")
> > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> 
> Lukas noticed and sent a patch coincidentally just before you:
> https://lore.kernel.org/lkml/20211006082209.417-1-lukas.bulwahn@gmail.com/
> 
> Let me cc' you and Arnd into that thread.

I grabbed Lukas's version, as it seemed more complete.

Also I added cc:stable.

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

end of thread, other threads:[~2021-10-07  0:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 18:11 [PATCH] elfcore: um: Fix CONFIG_UM typo in linux/elfcore.h Catalin Marinas
2021-10-06 21:57 ` Nick Desaulniers
2021-10-07  0:57   ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.