Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\uprobes.c Create Date:2022-07-28 08:47:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:arch_uretprobe_hijack_return_addr

Proto:unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs)

Type:unsigned long

Parameter:

TypeParameterName
unsigned longtrampoline_vaddr
struct pt_regs *regs
1062  rasize = sizeof_long(regs)
1063  orig_ret_vaddr = 0
1065  If copy_from_user( & orig_ret_vaddr, (void__user * )sp, rasize) Then Return -1
1069  If orig_ret_vaddr == trampoline_vaddr Then Return orig_ret_vaddr
1072  nleft = copy_to_user((void__user * )sp, & trampoline_vaddr, rasize)
1073  If Value is more likely to compile time(!nleft) Then Return orig_ret_vaddr
1076  If nleft != rasize Then
1077  pr_err("return address clobbered: pid=%d, %%sp=%#lx, %%ip=%#lx\n", pid, sp, Return frame for iretq )
1080  force_sig(SIGSEGV)
1083  Return -1