[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e273571e-ab8f-46d6-a44e-c1d0d06d3cbf@gmail.com>
Date: Mon, 19 Jan 2026 17:33:35 +0100
From: Andrey Ryabinin <ryabinin.a.a@...il.com>
To: Maciej Wieczor-Retman <m.wieczorretman@...me>, corbet@....net,
morbo@...gle.com, rppt@...nel.org, lorenzo.stoakes@...cle.com,
ubizjak@...il.com, mingo@...hat.com, vincenzo.frascino@....com,
maciej.wieczor-retman@...el.com, maz@...nel.org, catalin.marinas@....com,
yeoreum.yun@....com, will@...nel.org, jackmanb@...gle.com,
samuel.holland@...ive.com, glider@...gle.com, osandov@...com,
nsc@...nel.org, luto@...nel.org, jpoimboe@...nel.org,
akpm@...ux-foundation.org, Liam.Howlett@...cle.com, kees@...nel.org,
jan.kiszka@...mens.com, thomas.lendacky@....com, jeremy.linton@....com,
dvyukov@...gle.com, axelrasmussen@...gle.com, leitao@...ian.org,
bigeasy@...utronix.de, peterz@...radead.org, mark.rutland@....com,
urezki@...il.com, brgerst@...il.com, hpa@...or.com, mhocko@...e.com,
andreyknvl@...il.com, weixugc@...gle.com, kbingham@...nel.org,
vbabka@...e.cz, nathan@...nel.org, trintaeoitogc@...il.com,
samitolvanen@...gle.com, tglx@...nel.org, thuth@...hat.com,
surenb@...gle.com, anshuman.khandual@....com, smostafa@...gle.com,
yuanchu@...gle.com, ada.coupriediaz@....com, dave.hansen@...ux.intel.com,
kas@...nel.org, nick.desaulniers+lkml@...il.com, david@...nel.org,
bp@...en8.de, ardb@...nel.org, justinstitt@...gle.com
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
kasan-dev@...glegroups.com, llvm@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
linux-kbuild@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH v8 00/14] kasan: x86: arm64: KASAN tag-based mode for x86
On 1/12/26 6:26 PM, 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.
>
It appears that GCC nominally supports this, but in practice it does not work.
Here is a minimal reproducer: https://godbolt.org/z/s85e11T5r
As far as I understand, calling a function through a tagged pointer is not
supported by the hardware, so GCC attempts to clear the tag before the call.
This behavior seems to be inherited from the userspace implementation of HWASan (-fsanitize=hwaddress).
I have filed a GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123696
For the kernel, we probably do not want this masking at all, as effectively 99.9–100%
of function pointer calls are expected to be untagged anyway.
Clang does not appear to do this, not even for userspace.
Powered by blists - more mailing lists