forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork1
Commite2ac83d
x86/ftrace: Fix ORC unwinding from ftrace handlers
Steven Rostedt discovered that the ftrace stack tracer is broken whenit's used with the ORC unwinder. The problem is that objtool isinstructed by the Makefile to ignore the ftrace_64.S code, so it doesn'tgenerate any ORC data for it.Fix it by making the asm code objtool-friendly:- Objtool doesn't like the fact that save_mcount_regs pushes RBP at the beginning, but it's never restored (directly, at least). So just skip the original RBP push, which is only needed for frame pointers anyway.- Annotate some functions as normal callable functions with ENTRY/ENDPROC.- Add an empty unwind hint to return_to_handler(). The return address isn't on the stack, so there's nothing ORC can do there. It will just punt in the unlikely case it tries to unwind from that code.With all that fixed, remove the OBJECT_FILES_NON_STANDARD Makefileannotation so objtool can read the file.Link:http://lkml.kernel.org/r/20180123040746.ih4ep3tk4pbjvg7c@trebleReported-by: Steven Rostedt <rostedt@goodmis.org>Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>1 parent0c5b9b5 commite2ac83d
2 files changed
+19
-10
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
33 | 32 |
| |
34 | 33 |
| |
35 | 34 |
| |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 |
| |
37 | 40 |
| |
38 | 41 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| 11 | + | |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
| |||
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
23 |
| - | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 |
| - | |
| 34 | + | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
| 67 | + | |
| 68 | + | |
68 | 69 |
| |
69 | 70 |
| |
70 |
| - | |
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
| |||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
| 108 | + | |
108 | 109 |
| |
| 110 | + | |
| 111 | + | |
| 112 | + | |
109 | 113 |
| |
110 | 114 |
| |
111 | 115 |
| |
| |||
148 | 152 |
| |
149 | 153 |
| |
150 | 154 |
| |
151 |
| - | |
| 155 | + | |
152 | 156 |
| |
153 | 157 |
| |
154 | 158 |
| |
| |||
184 | 188 |
| |
185 | 189 |
| |
186 | 190 |
| |
187 |
| - | |
| 191 | + | |
188 | 192 |
| |
189 | 193 |
| |
190 | 194 |
| |
| |||
255 | 259 |
| |
256 | 260 |
| |
257 | 261 |
| |
258 |
| - | |
| 262 | + | |
259 | 263 |
| |
260 | 264 |
| |
261 | 265 |
| |
| |||
313 | 317 |
| |
314 | 318 |
| |
315 | 319 |
| |
316 |
| - | |
| 320 | + | |
317 | 321 |
| |
318 |
| - | |
| 322 | + | |
| 323 | + | |
319 | 324 |
| |
320 | 325 |
| |
321 | 326 |
| |
| |||
330 | 335 |
| |
331 | 336 |
| |
332 | 337 |
| |
| 338 | + | |
333 | 339 |
|
0 commit comments
Comments
(0)