Skip to content

Commit e33c892

Browse files
jgoulywilldeacon
authored andcommitted
Revert "arm64: Mitigate MTE issues with str{n}cmp()"
This reverts commit 59a68d4. Now that the str{n}cmp functions have been updated to handle MTE properly, the workaround to use the generic functions is no longer needed. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20220301101435.19327-4-joey.gouly@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 387d828 commit e33c892

4 files changed

Lines changed: 2 additions & 9 deletions

File tree

arch/arm64/include/asm/assembler.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,6 @@ alternative_endif
535535
#define EXPORT_SYMBOL_NOKASAN(name) EXPORT_SYMBOL(name)
536536
#endif
537537

538-
#ifdef CONFIG_KASAN_HW_TAGS
539-
#define EXPORT_SYMBOL_NOHWKASAN(name)
540-
#else
541-
#define EXPORT_SYMBOL_NOHWKASAN(name) EXPORT_SYMBOL_NOKASAN(name)
542-
#endif
543538
/*
544539
* Emit a 64-bit absolute little endian symbol reference in a way that
545540
* ensures that it will be resolved at build time, even when building a

arch/arm64/include/asm/string.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ extern char *strrchr(const char *, int c);
1212
#define __HAVE_ARCH_STRCHR
1313
extern char *strchr(const char *, int c);
1414

15-
#ifndef CONFIG_KASAN_HW_TAGS
1615
#define __HAVE_ARCH_STRCMP
1716
extern int strcmp(const char *, const char *);
1817

1918
#define __HAVE_ARCH_STRNCMP
2019
extern int strncmp(const char *, const char *, __kernel_size_t);
21-
#endif
2220

2321
#define __HAVE_ARCH_STRLEN
2422
extern __kernel_size_t strlen(const char *);

arch/arm64/lib/strcmp.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ L(done):
187187
ret
188188

189189
SYM_FUNC_END_PI(strcmp)
190-
EXPORT_SYMBOL_NOHWKASAN(strcmp)
190+
EXPORT_SYMBOL_NOKASAN(strcmp)

arch/arm64/lib/strncmp.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,4 +306,4 @@ L(ret0):
306306
mov result, #0
307307
ret
308308
SYM_FUNC_END_PI(strncmp)
309-
EXPORT_SYMBOL_NOHWKASAN(strncmp)
309+
EXPORT_SYMBOL_NOKASAN(strncmp)

0 commit comments

Comments
 (0)