Re: [PATCH] mm: move phys_mem_access_prot_allowed to header

From: Nathan Chancellor

Date: Wed May 06 2026 - 01:48:59 EST


On Tue, May 05, 2026 at 11:22:13AM +0200, Arnd Bergmann wrote:
> On Tue, May 5, 2026, at 10:54, Rosen Penev wrote:
> > On Tue, May 5, 2026 at 1:29 AM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> >>
> >> Does this happen with both ld.bfd and ld.lld? Which version of clang
> >> and lld are you using?
> > clang version 22.1.3
> > Target: x86_64-pc-linux-gnu
> > Thread model: posix
> > InstalledDir: /usr/bin
> >
> > lld the same.
>
> Ok. I've tried to reproduce this with Nathan's llvm-22.1.3 build
> from https://mirrors.edge.kernel.org/pub/tools/llvm/, but don't
> see this problem on mips defconfig. Are you using a particular
> configuration, or do you see this on every build?

This is just the same old integrated assembler vs. recordmcount bug:

https://github.com/ClangBuiltLinux/linux/issues/981
https://github.com/ClangBuiltLinux/linux/issues/1830

It requires CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y with ftrace, which
MIPS allmodconfig enables. PowerPC worked around this in commit
f8b2336f15f3 ("powerpc: Avoid dead code/data elimination when using
recordmcount"). Maybe something along the same lines should be done for
MIPS.

Cheers,
Nathan