2006-06-26 18:59:44 +07:00
|
|
|
/* Exports for assembly files.
|
|
|
|
All C exports should go in the respective C files. */
|
|
|
|
|
2016-07-14 07:18:56 +07:00
|
|
|
#include <linux/export.h>
|
2016-07-18 15:23:24 +07:00
|
|
|
#include <linux/spinlock_types.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
#include <linux/smp.h>
|
|
|
|
|
2008-05-14 13:10:31 +07:00
|
|
|
#include <net/checksum.h>
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#include <asm/processor.h>
|
|
|
|
#include <asm/pgtable.h>
|
2008-05-14 13:10:31 +07:00
|
|
|
#include <asm/uaccess.h>
|
2008-01-30 19:31:10 +07:00
|
|
|
#include <asm/desc.h>
|
2008-06-22 01:17:27 +07:00
|
|
|
#include <asm/ftrace.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2008-10-07 06:06:12 +07:00
|
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
ftrace/x86: Add support for -mfentry to x86_64
If the kernel is compiled with gcc 4.6.0 which supports -mfentry,
then use that instead of mcount.
With mcount, frame pointers are forced with the -pg option and we
get something like:
<can_vma_merge_before>:
55 push %rbp
48 89 e5 mov %rsp,%rbp
53 push %rbx
41 51 push %r9
e8 fe 6a 39 00 callq ffffffff81483d00 <mcount>
31 c0 xor %eax,%eax
48 89 fb mov %rdi,%rbx
48 89 d7 mov %rdx,%rdi
48 33 73 30 xor 0x30(%rbx),%rsi
48 f7 c6 ff ff ff f7 test $0xfffffffff7ffffff,%rsi
With -mfentry, frame pointers are no longer forced and the call looks
like this:
<can_vma_merge_before>:
e8 33 af 37 00 callq ffffffff81461b40 <__fentry__>
53 push %rbx
48 89 fb mov %rdi,%rbx
31 c0 xor %eax,%eax
48 89 d7 mov %rdx,%rdi
41 51 push %r9
48 33 73 30 xor 0x30(%rbx),%rsi
48 f7 c6 ff ff ff f7 test $0xfffffffff7ffffff,%rsi
This adds the ftrace hook at the beginning of the function before a
frame is set up, and allows the function callbacks to be able to access
parameters. As kprobes now can use function tracing (at least on x86)
this speeds up the kprobe hooks that are at the beginning of the
function.
Link: http://lkml.kernel.org/r/20120807194100.130477900@goodmis.org
Acked-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-02-10 01:32:18 +07:00
|
|
|
/* mcount and __fentry__ are defined in assembly */
|
|
|
|
#ifdef CC_USING_FENTRY
|
|
|
|
EXPORT_SYMBOL(__fentry__);
|
|
|
|
#else
|
2008-05-14 13:10:31 +07:00
|
|
|
EXPORT_SYMBOL(mcount);
|
|
|
|
#endif
|
ftrace/x86: Add support for -mfentry to x86_64
If the kernel is compiled with gcc 4.6.0 which supports -mfentry,
then use that instead of mcount.
With mcount, frame pointers are forced with the -pg option and we
get something like:
<can_vma_merge_before>:
55 push %rbp
48 89 e5 mov %rsp,%rbp
53 push %rbx
41 51 push %r9
e8 fe 6a 39 00 callq ffffffff81483d00 <mcount>
31 c0 xor %eax,%eax
48 89 fb mov %rdi,%rbx
48 89 d7 mov %rdx,%rdi
48 33 73 30 xor 0x30(%rbx),%rsi
48 f7 c6 ff ff ff f7 test $0xfffffffff7ffffff,%rsi
With -mfentry, frame pointers are no longer forced and the call looks
like this:
<can_vma_merge_before>:
e8 33 af 37 00 callq ffffffff81461b40 <__fentry__>
53 push %rbx
48 89 fb mov %rdi,%rbx
31 c0 xor %eax,%eax
48 89 d7 mov %rdx,%rdi
41 51 push %r9
48 33 73 30 xor 0x30(%rbx),%rsi
48 f7 c6 ff ff ff f7 test $0xfffffffff7ffffff,%rsi
This adds the ftrace hook at the beginning of the function before a
frame is set up, and allows the function callbacks to be able to access
parameters. As kprobes now can use function tracing (at least on x86)
this speeds up the kprobe hooks that are at the beginning of the
function.
Link: http://lkml.kernel.org/r/20120807194100.130477900@goodmis.org
Acked-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-02-10 01:32:18 +07:00
|
|
|
#endif
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2009-12-18 23:12:56 +07:00
|
|
|
EXPORT_SYMBOL(copy_user_generic_string);
|
|
|
|
EXPORT_SYMBOL(copy_user_generic_unrolled);
|
2012-05-25 08:19:45 +07:00
|
|
|
EXPORT_SYMBOL(copy_user_enhanced_fast_string);
|
2007-02-13 19:26:19 +07:00
|
|
|
EXPORT_SYMBOL(__copy_user_nocache);
|
2009-09-26 19:33:01 +07:00
|
|
|
EXPORT_SYMBOL(_copy_from_user);
|
2009-11-16 21:42:18 +07:00
|
|
|
EXPORT_SYMBOL(_copy_to_user);
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2016-02-19 02:47:26 +07:00
|
|
|
EXPORT_SYMBOL_GPL(memcpy_mcsafe);
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
EXPORT_SYMBOL(copy_page);
|
|
|
|
EXPORT_SYMBOL(clear_page);
|
|
|
|
|
2008-05-13 15:36:22 +07:00
|
|
|
EXPORT_SYMBOL(csum_partial);
|
|
|
|
|
2016-05-30 17:56:27 +07:00
|
|
|
EXPORT_SYMBOL(__sw_hweight32);
|
|
|
|
EXPORT_SYMBOL(__sw_hweight64);
|
|
|
|
|
2008-02-20 05:34:02 +07:00
|
|
|
/*
|
|
|
|
* Export string functions. We normally rely on gcc builtin for most of these,
|
|
|
|
* but gcc sometimes decides not to inline them.
|
|
|
|
*/
|
2005-04-17 05:20:36 +07:00
|
|
|
#undef memcpy
|
|
|
|
#undef memset
|
|
|
|
#undef memmove
|
|
|
|
|
2015-02-14 05:39:56 +07:00
|
|
|
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);
|
2008-02-20 05:34:02 +07:00
|
|
|
extern void *memset(void *, int, __kernel_size_t);
|
|
|
|
extern void *memcpy(void *, const void *, __kernel_size_t);
|
2015-02-14 05:39:56 +07:00
|
|
|
extern void *memmove(void *, const void *, __kernel_size_t);
|
|
|
|
|
|
|
|
EXPORT_SYMBOL(__memset);
|
|
|
|
EXPORT_SYMBOL(__memcpy);
|
|
|
|
EXPORT_SYMBOL(__memmove);
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
EXPORT_SYMBOL(memset);
|
|
|
|
EXPORT_SYMBOL(memcpy);
|
2011-01-18 08:39:15 +07:00
|
|
|
EXPORT_SYMBOL(memmove);
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2012-11-17 04:53:51 +07:00
|
|
|
#ifndef CONFIG_DEBUG_VIRTUAL
|
|
|
|
EXPORT_SYMBOL(phys_base);
|
|
|
|
#endif
|
2005-04-17 05:20:36 +07:00
|
|
|
EXPORT_SYMBOL(empty_zero_page);
|
2009-12-16 05:28:13 +07:00
|
|
|
#ifndef CONFIG_PARAVIRT
|
|
|
|
EXPORT_SYMBOL(native_load_gs_index);
|
|
|
|
#endif
|
2013-08-14 19:51:00 +07:00
|
|
|
|
|
|
|
#ifdef CONFIG_PREEMPT
|
|
|
|
EXPORT_SYMBOL(___preempt_schedule);
|
2015-06-04 22:39:08 +07:00
|
|
|
EXPORT_SYMBOL(___preempt_schedule_notrace);
|
2013-08-14 19:51:00 +07:00
|
|
|
#endif
|