mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
[ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
This is a fix for the following crash observed in 2.6.29-rc3: http://lkml.org/lkml/2009/1/29/150 On ARM it doesn't make sense to trace a naked function because then mcount is called without stack and frame pointer being set up and there is no chance to restore the lr register to the value before mcount was called. Reported-by: Matthias Kaehlcke <matthias@kaehlcke.net> Tested-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Abhishek Sagar <sagar.abhishek@gmail.com> Cc: Steven Rostedt <rostedt@home.goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
9311c593f2
commit
446c92b290
9 changed files with 18 additions and 10 deletions
|
@ -52,7 +52,15 @@
|
|||
#define __deprecated __attribute__((deprecated))
|
||||
#define __packed __attribute__((packed))
|
||||
#define __weak __attribute__((weak))
|
||||
#define __naked __attribute__((naked))
|
||||
|
||||
/*
|
||||
* it doesn't make sense on ARM (currently the only user of __naked) to trace
|
||||
* naked functions because then mcount is called without stack and frame pointer
|
||||
* being set up and there is no chance to restore the lr register to the value
|
||||
* before mcount was called.
|
||||
*/
|
||||
#define __naked __attribute__((naked)) notrace
|
||||
|
||||
#define __noreturn __attribute__((noreturn))
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue