Skip to content

Commit 2f1d4e2

Browse files
fenghusthuwildea01
authored andcommitted
firmware: arm_sdei: Prohibit probing in '_sdei_handler'
Functions called in '_sdei_handler' are needed to be marked as 'nokprobe'. Because these functions are called in NMI context and neither the arch-code's debug infrastructure nor kprobes core supports this. Signed-off-by: Xiongfeng Wang <[email protected]> Reviewed-by: James Morse <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent f08cae2 commit 2f1d4e2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/firmware/arm_sdei.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ static int invoke_sdei_fn(unsigned long function_id, unsigned long arg0,
165165

166166
return err;
167167
}
168+
NOKPROBE_SYMBOL(invoke_sdei_fn);
168169

169170
static struct sdei_event *sdei_event_find(u32 event_num)
170171
{
@@ -879,6 +880,7 @@ static void sdei_smccc_smc(unsigned long function_id,
879880
{
880881
arm_smccc_smc(function_id, arg0, arg1, arg2, arg3, arg4, 0, 0, res);
881882
}
883+
NOKPROBE_SYMBOL(sdei_smccc_smc);
882884

883885
static void sdei_smccc_hvc(unsigned long function_id,
884886
unsigned long arg0, unsigned long arg1,
@@ -887,6 +889,7 @@ static void sdei_smccc_hvc(unsigned long function_id,
887889
{
888890
arm_smccc_hvc(function_id, arg0, arg1, arg2, arg3, arg4, 0, 0, res);
889891
}
892+
NOKPROBE_SYMBOL(sdei_smccc_hvc);
890893

891894
int sdei_register_ghes(struct ghes *ghes, sdei_event_callback *normal_cb,
892895
sdei_event_callback *critical_cb)

0 commit comments

Comments
 (0)