diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-05-31 12:52:35 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-06-01 10:43:11 -0400 |
commit | 753fb14dfb0662e1d38758ffc6876c0ab1c7bd9e (patch) | |
tree | d03e024cfd3d815e039a4c2d55f7c35108271af8 /arch | |
parent | 62c186fde48926a30f4e61332a805430dc1325cd (diff) |
Make platform-specific Feather-Trace depend on !CONFIG_DEBUG_RODATA
Feather-Trace rewrites instructions in the kernel's .text segment.
This segment may be write-protected if CONFIG_DEBUG_RODATA is selected.
In this case, fall back to the default flag-based Feather-Trace
implementation. In the future, we could either adopt the ftrace method
of rewriting .text addresses using non-.text mappings or we could
consider replacing Feather-Trace with ftrace altogether.
For now, this patch avoids unexpected runtime errors.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/ft_event.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/ft_event.c b/arch/x86/kernel/ft_event.c index da9b3ccb7259..6552e2741ecf 100644 --- a/arch/x86/kernel/ft_event.c +++ b/arch/x86/kernel/ft_event.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * exclusive access to the event table | 6 | * exclusive access to the event table |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef CONFIG_DEBUG_RODATA | ||
9 | 10 | ||
10 | #define BYTE_JUMP 0xeb | 11 | #define BYTE_JUMP 0xeb |
11 | #define BYTE_JUMP_LEN 0x02 | 12 | #define BYTE_JUMP_LEN 0x02 |
@@ -106,3 +107,5 @@ int ft_is_event_enabled(unsigned long id) | |||
106 | } | 107 | } |
107 | return 0; | 108 | return 0; |
108 | } | 109 | } |
110 | |||
111 | #endif | ||