mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
9a6fb28a35
Use the mcsafe_key defined in the previous patch to make decisions on which copy function to use. We can't use the FEATURE bit any more because PCI quirks run too late to affect the patching of code. So we use a static key. Turn memcpy_mcsafe() into an inline function to make life easier for callers. The assembly code that actually does the copy is now named memcpy_mcsafe_unrolled() Signed-off-by: Tony Luck <tony.luck@intel.com> Acked-by: Borislav Petkov <bp@suse.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Boris Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/bfde2fc774e94f53d91b70a4321c85a0d33e7118.1472754712.git.tony.luck@intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
86 lines
2.1 KiB
C
86 lines
2.1 KiB
C
/* Exports for assembly files.
|
|
All C exports should go in the respective C files. */
|
|
|
|
#include <linux/export.h>
|
|
#include <linux/spinlock_types.h>
|
|
#include <linux/smp.h>
|
|
|
|
#include <net/checksum.h>
|
|
|
|
#include <asm/processor.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/desc.h>
|
|
#include <asm/ftrace.h>
|
|
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
/* mcount and __fentry__ are defined in assembly */
|
|
#ifdef CC_USING_FENTRY
|
|
EXPORT_SYMBOL(__fentry__);
|
|
#else
|
|
EXPORT_SYMBOL(mcount);
|
|
#endif
|
|
#endif
|
|
|
|
EXPORT_SYMBOL(__get_user_1);
|
|
EXPORT_SYMBOL(__get_user_2);
|
|
EXPORT_SYMBOL(__get_user_4);
|
|
EXPORT_SYMBOL(__get_user_8);
|
|
EXPORT_SYMBOL(__put_user_1);
|
|
EXPORT_SYMBOL(__put_user_2);
|
|
EXPORT_SYMBOL(__put_user_4);
|
|
EXPORT_SYMBOL(__put_user_8);
|
|
|
|
EXPORT_SYMBOL(copy_user_generic_string);
|
|
EXPORT_SYMBOL(copy_user_generic_unrolled);
|
|
EXPORT_SYMBOL(copy_user_enhanced_fast_string);
|
|
EXPORT_SYMBOL(__copy_user_nocache);
|
|
EXPORT_SYMBOL(_copy_from_user);
|
|
EXPORT_SYMBOL(_copy_to_user);
|
|
|
|
EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled);
|
|
|
|
EXPORT_SYMBOL(copy_page);
|
|
EXPORT_SYMBOL(clear_page);
|
|
|
|
EXPORT_SYMBOL(csum_partial);
|
|
|
|
EXPORT_SYMBOL(__sw_hweight32);
|
|
EXPORT_SYMBOL(__sw_hweight64);
|
|
|
|
/*
|
|
* Export string functions. We normally rely on gcc builtin for most of these,
|
|
* but gcc sometimes decides not to inline them.
|
|
*/
|
|
#undef memcpy
|
|
#undef memset
|
|
#undef memmove
|
|
|
|
extern void *__memset(void *, int, __kernel_size_t);
|
|
extern void *__memcpy(void *, const void *, __kernel_size_t);
|
|
extern void *__memmove(void *, const void *, __kernel_size_t);
|
|
extern void *memset(void *, int, __kernel_size_t);
|
|
extern void *memcpy(void *, const void *, __kernel_size_t);
|
|
extern void *memmove(void *, const void *, __kernel_size_t);
|
|
|
|
EXPORT_SYMBOL(__memset);
|
|
EXPORT_SYMBOL(__memcpy);
|
|
EXPORT_SYMBOL(__memmove);
|
|
|
|
EXPORT_SYMBOL(memset);
|
|
EXPORT_SYMBOL(memcpy);
|
|
EXPORT_SYMBOL(memmove);
|
|
|
|
#ifndef CONFIG_DEBUG_VIRTUAL
|
|
EXPORT_SYMBOL(phys_base);
|
|
#endif
|
|
EXPORT_SYMBOL(empty_zero_page);
|
|
#ifndef CONFIG_PARAVIRT
|
|
EXPORT_SYMBOL(native_load_gs_index);
|
|
#endif
|
|
|
|
#ifdef CONFIG_PREEMPT
|
|
EXPORT_SYMBOL(___preempt_schedule);
|
|
EXPORT_SYMBOL(___preempt_schedule_notrace);
|
|
#endif
|