From: Mike Rapoport <rppt@kernel.org>
To: Maciej Wieczor-Retman <m.wieczorretman@pm.me>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Uladzislau Rezki <urezki@gmail.com>,
Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
Alexander Potapenko <glider@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 06/13] mm/execmem: Untag addresses in EXECMEM_ROX related pointer arithmetic
Date: Thu, 22 Jan 2026 12:32:33 +0200 [thread overview]
Message-ID: <aXH8wQbyjFqlueNS@kernel.org> (raw)
In-Reply-To: <50701245bae3d2c543f518d206539ba71367075c.1768845098.git.m.wieczorretman@pm.me>
On Tue, Jan 20, 2026 at 02:41:43PM +0000, Maciej Wieczor-Retman wrote:
> From: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
>
> ARCH_HAS_EXECMEM_ROX was re-enabled in x86 at Linux 6.14 release.
> vm_reset_perms() calculates range's start and end addresses using min()
> and max() functions. To do that it compares pointers but, with KASAN
> software tags mode enabled, some are tagged - addr variable is, while
> start and end variables aren't. This can cause the wrong address to be
> chosen and result in various errors in different places.
>
> Reset tags in the address used as function argument in min(), max().
>
> execmem_cache_add() adds tagged pointers to a maple tree structure,
> which then are incorrectly compared when walking the tree. That results
> in different pointers being returned later and page permission violation
> errors panicking the kernel.
>
> Reset tag of the address range inserted into the maple tree inside
> execmem_vmalloc() which then gets propagated to execmem_cache_add().
>
> Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
> Acked-by: Alexander Potapenko <glider@google.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-01-22 10:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 14:40 [PATCH v9 00/13] kasan: x86: arm64: KASAN tag-based mode for x86 Maciej Wieczor-Retman
2026-01-20 14:40 ` Maciej Wieczor-Retman
2026-01-20 14:41 ` [PATCH v9 01/13] kasan: sw_tags: Use arithmetic shift for shadow computation Maciej Wieczor-Retman
2026-01-20 14:41 ` [PATCH v9 02/13] kasan: arm64: x86: Make special tags arch specific Maciej Wieczor-Retman
2026-01-20 14:41 ` [PATCH v9 03/13] kasan: Fix inline mode for x86 tag-based mode Maciej Wieczor-Retman
2026-01-20 14:41 ` [PATCH v9 04/13] x86/kasan: Add arch specific kasan functions Maciej Wieczor-Retman
2026-01-20 14:41 ` [PATCH v9 05/13] x86/mm: Reset tag for virtual to physical address conversions Maciej Wieczor-Retman
2026-02-23 20:33 ` Dave Hansen
2026-02-25 8:17 ` Maciej Wieczor-Retman
2026-02-25 14:48 ` Dave Hansen
2026-01-20 14:41 ` [PATCH v9 06/13] mm/execmem: Untag addresses in EXECMEM_ROX related pointer arithmetic Maciej Wieczor-Retman
2026-01-22 10:32 ` Mike Rapoport [this message]
2026-01-23 9:37 ` Maciej Wieczor-Retman
2026-01-20 14:41 ` [PATCH v9 07/13] x86/mm: Use physical address comparisons in fill_p*d/pte Maciej Wieczor-Retman
2026-01-20 14:41 ` [PATCH v9 08/13] x86/kasan: Initialize KASAN raw shadow memory Maciej Wieczor-Retman
2026-01-20 14:42 ` [PATCH v9 09/13] x86/mm: Reset tags in a canonical address helper call Maciej Wieczor-Retman
2026-01-20 14:42 ` [PATCH v9 10/13] x86/mm: Initialize LAM_SUP Maciej Wieczor-Retman
2026-01-20 14:42 ` [PATCH v9 11/13] x86: Increase minimal SLAB alignment for KASAN Maciej Wieczor-Retman
2026-01-20 14:42 ` [PATCH v9 12/13] x86/kasan: Use a logical bit shift for kasan_mem_to_shadow Maciej Wieczor-Retman
2026-01-20 14:42 ` [PATCH v9 13/13] x86/kasan: Make software tag-based kasan available Maciej Wieczor-Retman
2026-01-20 17:54 ` [PATCH v9 00/13] kasan: x86: arm64: KASAN tag-based mode for x86 Andrey Konovalov
2026-01-20 19:18 ` 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=aXH8wQbyjFqlueNS@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=glider@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.wieczorretman@pm.me \
--cc=maciej.wieczor-retman@intel.com \
--cc=urezki@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.