Re: [PATCH v11 00/15] kasan: x86: arm64: KASAN tag-based mode for x86
From: Maciej Wieczor-Retman
Date: Wed Mar 11 2026 - 07:16:58 EST
On 2026-03-11 at 12:05:53 +0100, Peter Zijlstra wrote:
>On Tue, Mar 10, 2026 at 07:30:36PM +0000, Maciej Wieczor-Retman wrote:
>> On 2026-03-10 at 20:00:22 +0100, Peter Zijlstra wrote:
>> >On Tue, Mar 10, 2026 at 05:51:19PM +0000, Maciej Wieczor-Retman wrote:
>> >
>> >> ======= Compilation
>> >> Clang was used to compile the series (make LLVM=1) since gcc doesn't
>> >> seem to have support for KASAN tag-based compiler instrumentation on
>> >> x86. Patchset does seem to compile with gcc without an issue but doesn't
>> >> boot afterwards.
>> >
>> >Can you put all that under a specific CONFIG and make that depend on
>> >CC_IS_CLANG?
>>
>> I made HAVE_ARCH_KASAN_SW_TAGS depend on CC_IS_CLANG, and that controls all the
>> software tags stuff, like ARCH_DISABLE_KASAN_INLINE through KASAN_SW_TAGS.
>> And ARCH_NEEDS_DEFER_KASAN is for if KASAN is compiled but LAM is not available,
>> so that it gets disabled in runtime.
>>
>> But sure, I suppose I can add a separate CONFIG with CC_IS_CLANG to these three
>> so the clang connection is more transparent.
>
>Right, because building but not booting is BAD :-) While compiler
>specific features are a dime a dozen.
I'll make the change and I agree of course, what I meant is that with this patch
I'm pretty sure you already can't hit the condition of 'building but not
booting'. All the 'not booting' options are already hidden behind CC_IS_CLANG
(so really only HAVE_ARCH_KASAN_SW_TAGS which controls all the other ones).
--
Kind regards
Maciej Wieczór-Retman