[SRU][N][PATCH 0/1] Noble kernel 6.8.0-108 does not compile when KASAN enabled

Massimiliano Pellizzer massimiliano.pellizzer at canonical.com
Thu Mar 19 15:14:01 UTC 2026


BugLink: https://bugs.launchpad.net/bugs/2144914

[ Impact ]

When trying to compile Noble’s kernel 6.8.0-108 with KASAN enabled the following compile-time error appears:

/build/noble/mm/kasan/common.c: In function '__kasan_unpoison_vmap_areas':
/build/noble/mm/kasan/common.c:566:34: error: 'KASAN_VMALLOC_KEEP_TAG' undeclared (first use in this function); did you mean 'KASAN_VMALLOC_INIT'?
  566 | if (WARN_ON_ONCE(flags & KASAN_VMALLOC_KEEP_TAG))
      | ^~~~~~~~~~~~~~~~~~~~~~
/build/noble/include/asm-generic/bug.h:111:32: note: in definition of macro 'WARN_ON_ONCE'
  111 | int __ret_warn_on = !!(condition); \
      | ^~~~~~~~~
/build/noble/mm/kasan/common.c:566:34: note: each undeclared identifier is reported only once for each function it appears in
  566 | if (WARN_ON_ONCE(flags & KASAN_VMALLOC_KEEP_TAG))
      | ^~~~~~~~~~~~~~~~~~~~~~
/build/noble/include/asm-generic/bug.h:111:32: note: in definition of macro 'WARN_ON_ONCE'
  111 | int __ret_warn_on = !!(condition); \
      | ^~~~~~~~~
  CC [M] samples/ftrace/ftrace-direct-too.o

[ Fix ]

The error is due to an upstream stable update which missed the very first commit of the patchset:
- https://lore.kernel.org/all/a2a1889754be3d97b8919cb2d3d099d12461f814.1765978969.git.m.wieczorretman@pm.me/T/#u

To fix it, it is necessary to backport
- 007f5da43b3d (“mm/kasan: fix incorrect unpoisoning in vrealloc for KASAN”).

[ Test Case ]

Compile the kernel with KASAN enabled.

[ Regression Potential ]

No regression potential. The kernel is already
not compiling with kasan enabled.
The fix allows the kernel to compile correctly.


Jiayuan Chen (1):
  mm/kasan: fix incorrect unpoisoning in vrealloc for KASAN

 include/linux/kasan.h | 1 +
 mm/kasan/hw_tags.c    | 2 +-
 mm/kasan/shadow.c     | 4 +++-
 3 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.51.0




More information about the kernel-team mailing list