From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
To: Maciej Wieczor-Retman <m.wieczorretman@pm.me>,
corbet@lwn.net, morbo@google.com, rppt@kernel.org,
lorenzo.stoakes@oracle.com, ubizjak@gmail.com, mingo@redhat.com,
vincenzo.frascino@arm.com, maciej.wieczor-retman@intel.com,
maz@kernel.org, catalin.marinas@arm.com, yeoreum.yun@arm.com,
will@kernel.org, jackmanb@google.com, samuel.holland@sifive.com,
glider@google.com, osandov@fb.com, nsc@kernel.org,
luto@kernel.org, jpoimboe@kernel.org, akpm@linux-foundation.org,
Liam.Howlett@oracle.com, kees@kernel.org, jan.kiszka@siemens.com,
thomas.lendacky@amd.com, jeremy.linton@arm.com,
dvyukov@google.com, axelrasmussen@google.com, leitao@debian.org,
bigeasy@linutronix.de, peterz@infradead.org,
mark.rutland@arm.com, urezki@gmail.com, brgerst@gmail.com,
hpa@zytor.com, mhocko@suse.com, andreyknvl@gmail.com,
weixugc@google.com, kbingham@kernel.org, vbabka@suse.cz,
nathan@kernel.org, trintaeoitogc@gmail.com,
samitolvanen@google.com, tglx@kernel.org, thuth@redhat.com,
surenb@google.com, anshuman.khandual@arm.com,
smostafa@google.com, yuanchu@google.com, ada.coupriediaz@arm.com,
dave.hansen@linux.intel.com, kas@kernel.org,
nick.desaulniers+lkml@gmail.com, david@kernel.org, bp@alien8.de,
ardb@kernel.org, justinstitt@google.com
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
kasan-dev@googlegroups.com, llvm@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
linux-kbuild@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH v8 00/14] kasan: x86: arm64: KASAN tag-based mode for x86
Date: Mon, 19 Jan 2026 17:33:35 +0100 [thread overview]
Message-ID: <e273571e-ab8f-46d6-a44e-c1d0d06d3cbf@gmail.com> (raw)
In-Reply-To: <cover.1768233085.git.m.wieczorretman@pm.me>
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.
next prev parent reply other threads:[~2026-01-19 18:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 17:26 Maciej Wieczor-Retman
2026-01-12 17:27 ` [PATCH v8 01/14] kasan: sw_tags: Use arithmetic shift for shadow computation Maciej Wieczor-Retman
2026-01-15 22:42 ` Andrey Ryabinin
2026-01-16 13:11 ` Maciej Wieczor-Retman
2026-01-12 17:27 ` [PATCH v8 02/14] kasan: arm64: x86: Make special tags arch specific Maciej Wieczor-Retman
2026-01-13 1:21 ` Andrey Konovalov
2026-01-13 17:32 ` Maciej Wieczor-Retman
2026-01-16 13:32 ` Andrey Ryabinin
2026-01-12 17:27 ` [PATCH v8 04/14] x86/kasan: Add arch specific kasan functions Maciej Wieczor-Retman
2026-01-13 1:21 ` Andrey Konovalov
2026-01-13 16:12 ` Maciej Wieczor-Retman
2026-01-16 13:35 ` Andrey Ryabinin
2026-01-12 17:27 ` [PATCH v8 06/14] mm/execmem: Untag addresses in EXECMEM_ROX related pointer arithmetic Maciej Wieczor-Retman
2026-01-12 17:28 ` [PATCH v8 13/14] x86/kasan: Logical bit shift for kasan_mem_to_shadow Maciej Wieczor-Retman
2026-01-13 1:21 ` Andrey Konovalov
2026-01-14 16:52 ` Maciej Wieczor-Retman
2026-01-15 3:57 ` Andrey Konovalov
2026-01-15 16:43 ` Maciej Wieczor-Retman
2026-01-17 1:21 ` Andrey Konovalov
2026-01-17 6:53 ` Maciej Wieczór-Retman
2026-01-19 11:40 ` Maciej Wieczor-Retman
2026-01-12 18:29 ` [PATCH v8 00/14] kasan: x86: arm64: KASAN tag-based mode for x86 Andrew Morton
2026-01-12 20:08 ` Maciej Wieczór-Retman
2026-01-12 20:53 ` Andrew Morton
2026-01-13 1:47 ` Andrey Konovalov
2026-01-12 20:27 ` Dave Hansen
2026-01-13 11:47 ` Borislav Petkov
2026-01-13 17:34 ` Andrew Morton
2026-01-22 17:25 ` Maciej Wieczor-Retman
2026-01-13 1:44 ` Andrey Konovalov
2026-01-19 16:33 ` Andrey Ryabinin [this message]
2026-01-19 19:43 ` Maciej Wieczor-Retman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e273571e-ab8f-46d6-a44e-c1d0d06d3cbf@gmail.com \
--to=ryabinin.a.a@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=ada.coupriediaz@arm.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=anshuman.khandual@arm.com \
--cc=ardb@kernel.org \
--cc=axelrasmussen@google.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=hpa@zytor.com \
--cc=jackmanb@google.com \
--cc=jan.kiszka@siemens.com \
--cc=jeremy.linton@arm.com \
--cc=jpoimboe@kernel.org \
--cc=justinstitt@google.com \
--cc=kas@kernel.org \
--cc=kasan-dev@googlegroups.com \
--cc=kbingham@kernel.org \
--cc=kees@kernel.org \
--cc=leitao@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=lorenzo.stoakes@oracle.com \
--cc=luto@kernel.org \
--cc=m.wieczorretman@pm.me \
--cc=maciej.wieczor-retman@intel.com \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=nsc@kernel.org \
--cc=osandov@fb.com \
--cc=peterz@infradead.org \
--cc=rppt@kernel.org \
--cc=samitolvanen@google.com \
--cc=samuel.holland@sifive.com \
--cc=smostafa@google.com \
--cc=surenb@google.com \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=thuth@redhat.com \
--cc=trintaeoitogc@gmail.com \
--cc=ubizjak@gmail.com \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=vincenzo.frascino@arm.com \
--cc=weixugc@google.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=yeoreum.yun@arm.com \
--cc=yuanchu@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox