diff options
| author | Hao Ge <hao.ge@linux.dev> | 2026-09-16 15:55:57 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-12 21:26:31 -0700 |
| commit | c6e5c0b9a493891634d0a413c3485930a28a8903 (patch) | |
| tree | c935733ca9a6ddb84f95adae002f230c0d847d76 /tools/perf/scripts/python | |
| parent | 48bd5dc504cca77b3c3d0df0683c9d29460109d5 (diff) | |
mm/alloc_tag: account for reserved tag ids in the kernel tag check
The tag ids stored in the page flags include two reserved markers.
Id 0 means the page has no tag and id 1 means the tag was cleared,
so real tags start at CODETAG_ID_FIRST. The kernel-side check in
alloc_tag_sec_init() compared kernel_tags.count alone against the
addressable limit, so with the count at or just under the limit
the last tag ids wrapped into those markers. Pages allocated
through them then look the same as untagged pages on free, nothing
is ever subtracted from the real tag and /proc/allocinfo shows
that memory as still allocated.
Add the missing CODETAG_ID_FIRST, same as tags_addressable().
Link: https://lore.kernel.org/20260916075557.121316-1-hao.ge@linux.dev
Fixes: 4835f747d3ed ("alloc_tag: support for page allocation tag compression")
Signed-off-by: Hao Ge <hao.ge@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Suren Baghdasaryan <surenb@google.com>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
