Re: [PATCH] module: Remove unused DISCARD_EH_FRAME definition from module.lds.S

Sami Tolvanen <[email protected]>
Newsgroups org.kernel.vger.linux-modules,org.kernel.vger.linux-kernel
Message-ID <CABCJKueO3NkVrsR9H6JxFpEf=UsGZ2PCPSrs6hXJh+cdBjikVg@mail.gmail.com>
On Fri, Jun 12, 2026 at 6:40 AM Petr Pavlu <[email protected]> wrote:
>
> The linker script scripts/module.lds.S contains an unused DISCARD_EH_FRAME
> definition introduced by commit 68c76ad4a957 ("arm64: unwind: add
> asynchronous unwind tables to kernel and modules").
>
> As shown in an earlier version of that patch [1], DISCARD_EH_FRAME was
> meant to be used by SANITIZER_DISCARDS in the same file, as follows:
>
> -# define SANITIZER_DISCARDS    *(.eh_frame)
> +# define SANITIZER_DISCARDS    DISCARD_EH_FRAME
>
> However, in the meantime, SANITIZER_DISCARDS was removed entirely from
> module.lds.S by commit 89245600941e ("cfi: Switch to -fsanitize=kcfi").
> Eventually, the mentioned commit 68c76ad4a957 only added the new
> DISCARD_EH_FRAME definition to this file without actually using it.
>
> The file include/asm-generic/vmlinux.lds.h contains a similar
> DISCARD_EH_FRAME definition for vmlinux to discard .eh_frame sections that
> may be present when CONFIG_GCOV_KERNEL, CONFIG_KASAN_GENERIC or
> CONFIG_KCSAN is enabled. Testing these options on arm64 with LLVM 19.1 did
> not show any unexpected .eh_frame sections in modules.
>
> Remove the unused DISCARD_EH_FRAME definition from scripts/module.lds.S.
>
> Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/ [1]
> Signed-off-by: Petr Pavlu <[email protected]>

Reviewed-by: Sami Tolvanen <[email protected]>

Sami
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.