Subject: [REGRESSION] stable-rc/linux-5.4.y: (build) ./arch/arm64/include/asm/memory.h:85:50: error: ‘KASAN_SHADOW_SCAL...

From: KernelCI bot <[email-masked]>
Date: Fri, 03 Oct 2025 16:59:03 -0000

Hello,

New build issue found on stable-rc/linux-5.4.y:

---
 ./arch/arm64/include/asm/memory.h:85:50: error: ‘KASAN_SHADOW_SCALE_SHIFT’ undeclared (first use in this function) in arch/arm64/kernel/vdso32/vgettimeofday.o (arch/arm64/kernel/vdso32/Makefile:166) [logspec:kbuild,kbuild.compiler.error]
---

- dashboard: https://d.kernelci.org/i/maestro:35fc997ccf1864d670c66eb7815463e470fe1fa9
- giturl: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
- commit HEAD:  2c0548712531f8b879edccf67949a8e5abe4e5e4

Log excerpt:
=====================================================
  CC32    arch/arm64/kernel/vdso32/vgettimeofday.o
  AS32    arch/arm64/kernel/vdso32/sigreturn.o
  HOSTCC  arch/arm64/kernel/vdso32/../../../arm/vdso/vdsomunge
In file included from ./arch/arm64/include/asm/thread_info.h:17,
                 from ./include/linux/thread_info.h:39,
                 from ./arch/arm64/include/asm/preempt.h:5,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/seqlock.h:36,
                 from ./include/linux/time.h:6,
                 from /tmp/kci/linux/lib/vdso/gettimeofday.c:7,
                 from <command-line>:
./arch/arm64/include/asm/memory.h: In function ‘kaslr_offset’:
./arch/arm64/include/asm/memory.h:85:50: error: ‘KASAN_SHADOW_SCALE_SHIFT’ undeclared (first use in this function)
   85 | #define KASAN_SHADOW_END        ((UL(1) << (64 - KASAN_SHADOW_SCALE_SHIFT)) \
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:50:34: note: in expansion of macro ‘KASAN_SHADOW_END’
   50 | #define BPF_JIT_REGION_START    (KASAN_SHADOW_END)
      |                                  ^~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:52:34: note: in expansion of macro ‘BPF_JIT_REGION_START’
   52 | #define BPF_JIT_REGION_END      (BPF_JIT_REGION_START + BPF_JIT_REGION_SIZE)
      |                                  ^~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:54:34: note: in expansion of macro ‘BPF_JIT_REGION_END’
   54 | #define MODULES_VADDR           (BPF_JIT_REGION_END)
      |                                  ^~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:53:34: note: in expansion of macro ‘MODULES_VADDR’
   53 | #define MODULES_END             (MODULES_VADDR + MODULES_VSIZE)
      |                                  ^~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:49:34: note: in expansion of macro ‘MODULES_END’
   49 | #define KIMAGE_VADDR            (MODULES_END)
      |                                  ^~~~~~~~~~~
./arch/arm64/include/asm/memory.h:193:31: note: in expansion of macro ‘KIMAGE_VADDR’
  193 |         return kimage_vaddr - KIMAGE_VADDR;
      |                               ^~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:85:50: note: each undeclared identifier is reported only once for each function it appears in
   85 | #define KASAN_SHADOW_END        ((UL(1) << (64 - KASAN_SHADOW_SCALE_SHIFT)) \
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:50:34: note: in expansion of macro ‘KASAN_SHADOW_END’
   50 | #define BPF_JIT_REGION_START    (KASAN_SHADOW_END)
      |                                  ^~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:52:34: note: in expansion of macro ‘BPF_JIT_REGION_START’
   52 | #define BPF_JIT_REGION_END      (BPF_JIT_REGION_START + BPF_JIT_REGION_SIZE)
      |                                  ^~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:54:34: note: in expansion of macro ‘BPF_JIT_REGION_END’
   54 | #define MODULES_VADDR           (BPF_JIT_REGION_END)
      |                                  ^~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:53:34: note: in expansion of macro ‘MODULES_VADDR’
   53 | #define MODULES_END             (MODULES_VADDR + MODULES_VSIZE)
      |                                  ^~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:49:34: note: in expansion of macro ‘MODULES_END’
   49 | #define KIMAGE_VADDR            (MODULES_END)
      |                                  ^~~~~~~~~~~
./arch/arm64/include/asm/memory.h:193:31: note: in expansion of macro ‘KIMAGE_VADDR’
  193 |         return kimage_vaddr - KIMAGE_VADDR;
      |                               ^~~~~~~~~~~~
./arch/arm64/include/asm/memory.h: In function ‘__tag_set’:
./arch/arm64/include/asm/memory.h:238:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  238 |         u64 __addr = (u64)addr & ~__tag_shifted(0xff);
      |                      ^
In file included from ./arch/arm64/include/asm/pgtable-hwdef.h:8,
                 from ./arch/arm64/include/asm/processor.h:34,
                 from ./arch/arm64/include/asm/elf.h:118,
                 from ./include/linux/elf.h:5,
                 from ./include/linux/elfnote.h:62,
                 from arch/arm64/kernel/vdso32/note.c:11:
./arch/arm64/include/asm/memory.h: In function ‘kaslr_offset’:
./arch/arm64/include/asm/memory.h:85:50: error: ‘KASAN_SHADOW_SCALE_SHIFT’ undeclared (first use in this function)
   85 | #define KASAN_SHADOW_END        ((UL(1) << (64 - KASAN_SHADOW_SCALE_SHIFT)) \
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:50:34: note: in expansion of macro ‘KASAN_SHADOW_END’
   50 | #define BPF_JIT_REGION_START    (KASAN_SHADOW_END)
      |                                  ^~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:52:34: note: in expansion of macro ‘BPF_JIT_REGION_START’
   52 | #define BPF_JIT_REGION_END      (BPF_JIT_REGION_START + BPF_JIT_REGION_SIZE)
      |                                  ^~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:54:34: note: in expansion of macro ‘BPF_JIT_REGION_END’
   54 | #define MODULES_VADDR           (BPF_JIT_REGION_END)
      |                                  ^~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:53:34: note: in expansion of macro ‘MODULES_VADDR’
   53 | #define MODULES_END             (MODULES_VADDR + MODULES_VSIZE)
      |                                  ^~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:49:34: note: in expansion of macro ‘MODULES_END’
   49 | #define KIMAGE_VADDR            (MODULES_END)
      |                                  ^~~~~~~~~~~
./arch/arm64/include/asm/memory.h:193:31: note: in expansion of macro ‘KIMAGE_VADDR’
  193 |         return kimage_vaddr - KIMAGE_VADDR;
      |                               ^~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:85:50: note: each undeclared identifier is reported only once for each function it appears in
   85 | #define KASAN_SHADOW_END        ((UL(1) << (64 - KASAN_SHADOW_SCALE_SHIFT)) \
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:50:34: note: in expansion of macro ‘KASAN_SHADOW_END’
   50 | #define BPF_JIT_REGION_START    (KASAN_SHADOW_END)
      |                                  ^~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:52:34: note: in expansion of macro ‘BPF_JIT_REGION_START’
   52 | #define BPF_JIT_REGION_END      (BPF_JIT_REGION_START + BPF_JIT_REGION_SIZE)
      |                                  ^~~~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:54:34: note: in expansion of macro ‘BPF_JIT_REGION_END’
   54 | #define MODULES_VADDR           (BPF_JIT_REGION_END)
      |                                  ^~~~~~~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:53:34: note: in expansion of macro ‘MODULES_VADDR’
   53 | #define MODULES_END             (MODULES_VADDR + MODULES_VSIZE)
      |                                  ^~~~~~~~~~~~~
./arch/arm64/include/asm/memory.h:49:34: note: in expansion of macro ‘MODULES_END’
   49 | #define KIMAGE_VADDR            (MODULES_END)
      |                                  ^~~~~~~~~~~
./arch/arm64/include/asm/memory.h:193:31: note: in expansion of macro ‘KIMAGE_VADDR’
  193 |         return kimage_vaddr - KIMAGE_VADDR;
      |                               ^~~~~~~~~~~~
./arch/arm64/include/asm/memory.h: In function ‘__tag_set’:
./arch/arm64/include/asm/memory.h:238:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  238 |         u64 __addr = (u64)addr & ~__tag_shifted(0xff);
      |                      ^

=====================================================

# Builds where the incident occurred:

## defconfig+arm64-chromebook+kcidebug+lab-setup on (arm64):
- compiler: gcc-12
- dashboard: https://d.kernelci.org/build/maestro:68dffa7e841b167e8d3e0d0c

#kernelci issue maestro:35fc997ccf1864d670c66eb7815463e470fe1fa9

Reported-by: kernelci.org bot <[email-masked]>

--
This is an experimental report format. Please send feedback in!
Talk to us at [email-masked]

Made with love by the KernelCI team - https://kernelci.org