From: Igor Putko <igorpetindev@gmail.com>
To: ryabinin.a.a@gmail.com, glider@google.com, andreyknvl@gmail.com,
dvyukov@google.com, vincenzo.frascino@arm.com,
akpm@linux-foundation.org
Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Igor Putko <igorpetindev@gmail.com>
Subject: [PATCH 3/3] kasan: common: replace magic number with KASAN_TAG_KERNEL
Date: Sat, 4 Jul 2026 12:20:07 +0300 [thread overview]
Message-ID: <20260704092007.3483-4-igorpetindev@gmail.com> (raw)
In-Reply-To: <20260704092007.3483-1-igorpetindev@gmail.com>
Replace the literal 0xff in assign_tag()
with KASAN_TAG_KERNEL to eliminate the
magic number and improve code clarity.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
mm/kasan/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index 5faf73c8f..3e9b6b8f5 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -188,7 +188,7 @@ static inline u8 assign_tag(struct kmem_cache *cache,
const void *object, bool init)
{
if (IS_ENABLED(CONFIG_KASAN_GENERIC))
- return 0xff;
+ return KASAN_TAG_KERNEL;
/*
* If the cache neither has a constructor nor has SLAB_TYPESAFE_BY_RCU
--
2.47.3
next prev parent reply other threads:[~2026-07-04 9:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 9:20 [PATCH 0/3] kasan: common: cleanups and deduplication Igor Putko
2026-07-04 9:20 ` [PATCH 1/3] kasan: deduplicate quarantine reduction logic Igor Putko
2026-07-06 14:13 ` Andrey Konovalov
2026-07-04 9:20 ` [PATCH 2/3] kasan: common: use ALIGN_DOWN macro for stack alignment Igor Putko
2026-07-06 14:13 ` Andrey Konovalov
2026-07-04 9:20 ` Igor Putko [this message]
2026-07-06 14:13 ` [PATCH 3/3] kasan: common: replace magic number with KASAN_TAG_KERNEL Andrey Konovalov
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=20260704092007.3483-4-igorpetindev@gmail.com \
--to=igorpetindev@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.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.