]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mte: Tags-aware aware memcmp_pages() implementation
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 27 Nov 2019 09:53:44 +0000 (09:53 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Sep 2020 11:46:07 +0000 (12:46 +0100)
commit16f646791eda169cc96d286923d9eb5ea3ff4b4e
tree86fcb21ff8feb64b59ffaf47756cb2c2353f13cb
parentb87f736d9721c4a5bd31dde6af24460728f17c62
arm64: mte: Tags-aware aware memcmp_pages() implementation

When the Memory Tagging Extension is enabled, two pages are identical
only if both their data and tags are identical.

Make the generic memcmp_pages() a __weak function and add an
arm64-specific implementation which returns non-zero if any of the two
pages contain valid MTE tags (PG_mte_tagged set). There isn't much
benefit in comparing the tags of two pages since these are normally used
for heap allocations and likely to differ anyway.

Co-developed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
arch/arm64/kernel/mte.c
mm/util.c