Bug 218703 - KASAN: make compatible with USE_X86_SEG_SUPPORT
Summary: KASAN: make compatible with USE_X86_SEG_SUPPORT
Status: RESOLVED CODE_FIX
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Sanitizers (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: MM/Sanitizers virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-10 11:11 UTC by Andrey Konovalov
Modified: 2024-04-10 11:24 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Andrey Konovalov 2024-04-10 11:11:04 UTC
USE_X86_SEG_SUPPORT [1] (enabled by default) is incompatible with KASAN [2] due to a bug in the GCC instrumentation module [3].

While the bug is being fixed in GCC, USE_X86_SEG_SUPPORT is marked as "depends on !KASAN". Once the bug is resolved, we need something like CC_HAS_WORKING_NAMED_AS (defined to match GCC 13+ versions where the issue is fixed?) and make USE_X86_SEG_SUPPORT depend on that config instead.

I'm not sure what's the state of things with Clang, but USE_X86_SEG_SUPPORT is only supported with GCC right now.

KCSAN seems to suffer from the same issue [4].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1ca3683cc6d2c2ce4204df519c4e4730d037905a
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e29aad08b1da7772b362537be32335c0394e65fe
[3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111736
[4] https://lore.kernel.org/all/CANpmjNOsZydmYVU-waN1BdA=2RH0fhjmZcjnaf4JiObA++1p2w@mail.gmail.com/

Note You need to log in before you can comment on or make changes to this bug.