Skip to content
Commit 998b17d4 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Huacai Chen
Browse files

LoongArch: Make the users of larch_insn_gen_break() constant



LoongArch defines UPROBE_SWBP_INSN as a function call and this breaks
arch_uprobe_trampoline() which uses it to initialize a static variable.

Add the new "__builtin_constant_p" helper, __emit_break(), and redefine
the current users of larch_insn_gen_break() to use it.

Fixes: ff474a78 ("uprobe: Add uretprobe syscall to speed up return probe")
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/all/20240614174822.GA1185149@thelio-3990X/


Suggested-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Tested-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 3892b11e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment