-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, ker…
…nel}()" This reverts commit a85748e which is commit ec6347b upstream. We had a mistake when merging a later patch in this series due to some file movements, so revert this change for now, as we will add it back in a later commit. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Greg Kroah-Hartman
committed
Nov 4, 2020
1 parent
8406c90
commit 8b5145b
Showing
37 changed files
with
530 additions
and
674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef _MCSAFE_TEST_H_ | ||
#define _MCSAFE_TEST_H_ | ||
|
||
#ifndef __ASSEMBLY__ | ||
#ifdef CONFIG_MCSAFE_TEST | ||
extern unsigned long mcsafe_test_src; | ||
extern unsigned long mcsafe_test_dst; | ||
|
||
static inline void mcsafe_inject_src(void *addr) | ||
{ | ||
if (addr) | ||
mcsafe_test_src = (unsigned long) addr; | ||
else | ||
mcsafe_test_src = ~0UL; | ||
} | ||
|
||
static inline void mcsafe_inject_dst(void *addr) | ||
{ | ||
if (addr) | ||
mcsafe_test_dst = (unsigned long) addr; | ||
else | ||
mcsafe_test_dst = ~0UL; | ||
} | ||
#else /* CONFIG_MCSAFE_TEST */ | ||
static inline void mcsafe_inject_src(void *addr) | ||
{ | ||
} | ||
|
||
static inline void mcsafe_inject_dst(void *addr) | ||
{ | ||
} | ||
#endif /* CONFIG_MCSAFE_TEST */ | ||
|
||
#else /* __ASSEMBLY__ */ | ||
#include <asm/export.h> | ||
|
||
#ifdef CONFIG_MCSAFE_TEST | ||
.macro MCSAFE_TEST_CTL | ||
.pushsection .data | ||
.align 8 | ||
.globl mcsafe_test_src | ||
mcsafe_test_src: | ||
.quad 0 | ||
EXPORT_SYMBOL_GPL(mcsafe_test_src) | ||
.globl mcsafe_test_dst | ||
mcsafe_test_dst: | ||
.quad 0 | ||
EXPORT_SYMBOL_GPL(mcsafe_test_dst) | ||
.popsection | ||
.endm | ||
|
||
.macro MCSAFE_TEST_SRC reg count target | ||
leaq \count(\reg), %r9 | ||
cmp mcsafe_test_src, %r9 | ||
ja \target | ||
.endm | ||
|
||
.macro MCSAFE_TEST_DST reg count target | ||
leaq \count(\reg), %r9 | ||
cmp mcsafe_test_dst, %r9 | ||
ja \target | ||
.endm | ||
#else | ||
.macro MCSAFE_TEST_CTL | ||
.endm | ||
|
||
.macro MCSAFE_TEST_SRC reg count target | ||
.endm | ||
|
||
.macro MCSAFE_TEST_DST reg count target | ||
.endm | ||
#endif /* CONFIG_MCSAFE_TEST */ | ||
#endif /* __ASSEMBLY__ */ | ||
#endif /* _MCSAFE_TEST_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.