Commit 28e7cbd
committed
livepatch: Allow architectures to specify an alternate ftrace location
When livepatch tries to patch a function it takes the function address
and asks ftrace to install the livepatch handler at that location.
ftrace will look for an mcount call site at that exact address.
On powerpc the mcount location is not the first instruction of the
function, and in fact it's not at a constant offset from the start of
the function. To accommodate this add a hook which arch code can
override to customise the behaviour.
Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>1 parent 04cf31a commit 28e7cbd
1 file changed
+31
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
301 | 314 | | |
302 | 315 | | |
303 | 316 | | |
| |||
312 | 325 | | |
313 | 326 | | |
314 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
315 | 334 | | |
316 | | - | |
| 335 | + | |
317 | 336 | | |
318 | 337 | | |
319 | 338 | | |
| |||
338 | 357 | | |
339 | 358 | | |
340 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
341 | 369 | | |
342 | 370 | | |
343 | 371 | | |
| |||
352 | 380 | | |
353 | 381 | | |
354 | 382 | | |
355 | | - | |
| 383 | + | |
356 | 384 | | |
357 | 385 | | |
358 | 386 | | |
| |||
363 | 391 | | |
364 | 392 | | |
365 | 393 | | |
366 | | - | |
| 394 | + | |
367 | 395 | | |
368 | 396 | | |
369 | 397 | | |
| |||
0 commit comments