Skip to content

Commit 31d2e6b

Browse files
committed
tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench'
We also continue with SYM_TYPED_FUNC_START() in util/include/linux/linkage.h and with an exception in tools/perf/check_headers.sh's diff check to ignore the include cfi_types.h line when checking if the kernel original files drifted from the copies we carry. This is to get the changes from: 69d4c0d ("entry, kasan, x86: Disallow overriding mem*() functions") That addresses these perf tools build warning: Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S' diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S' diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/lkml/ZAH%[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 25f69c6 commit 31d2e6b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tools/arch/x86/lib/memcpy_64.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <asm/alternative.h>
88
#include <asm/export.h>
99

10-
.pushsection .noinstr.text, "ax"
10+
.section .noinstr.text, "ax"
1111

1212
/*
1313
* We build a jump to memcpy_orig by default which gets NOPped out on
@@ -42,7 +42,7 @@ SYM_TYPED_FUNC_START(__memcpy)
4242
SYM_FUNC_END(__memcpy)
4343
EXPORT_SYMBOL(__memcpy)
4444

45-
SYM_FUNC_ALIAS_WEAK(memcpy, __memcpy)
45+
SYM_FUNC_ALIAS(memcpy, __memcpy)
4646
EXPORT_SYMBOL(memcpy)
4747

4848
/*
@@ -183,4 +183,3 @@ SYM_FUNC_START_LOCAL(memcpy_orig)
183183
RET
184184
SYM_FUNC_END(memcpy_orig)
185185

186-
.popsection

tools/arch/x86/lib/memset_64.S

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <asm/alternative.h>
77
#include <asm/export.h>
88

9+
.section .noinstr.text, "ax"
10+
911
/*
1012
* ISO C memset - set a memory block to a byte value. This function uses fast
1113
* string to get better performance than the original function. The code is
@@ -43,7 +45,7 @@ SYM_FUNC_START(__memset)
4345
SYM_FUNC_END(__memset)
4446
EXPORT_SYMBOL(__memset)
4547

46-
SYM_FUNC_ALIAS_WEAK(memset, __memset)
48+
SYM_FUNC_ALIAS(memset, __memset)
4749
EXPORT_SYMBOL(memset)
4850

4951
/*

0 commit comments

Comments
 (0)