]> git.ipfire.org Git - thirdparty/glibc.git/commit
aarch64: MTE compatible strncmp release/2.28/master
authorAlex Butler <Alex.Butler@arm.com>
Tue, 16 Jun 2020 12:44:24 +0000 (12:44 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Mon, 4 Nov 2024 16:36:14 +0000 (16:36 +0000)
commit92d25389c255b0da9b56bc05694f0702cd22921a
tree78d6e37ac738a5771a9fbafb9d6ad4b4a8681212
parentc32bd29854f91e51b3541d8a3ab38b638f6e91b4
aarch64: MTE compatible strncmp

Add support for MTE to strncmp. Regression tested with xcheck and benchmarked
with glibc's benchtests on the Cortex-A53, Cortex-A72, and Neoverse N1.

The existing implementation assumes that any access to the pages in which the
string resides is safe. This assumption is not true when MTE is enabled. This
patch updates the algorithm to ensure that accesses remain within the bounds
of an MTE tag (16-byte chunks) and improves overall performance.

Co-authored-by: Branislav Rankov <branislav.rankov@arm.com>
Co-authored-by: Wilco Dijkstra <wilco.dijkstra@arm.com>
(cherry picked from commit 03e1378f94173fc192a81e421457198f7b8a34a0)
sysdeps/aarch64/strncmp.S