File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -353,13 +353,18 @@ STACK_FRAME_NON_STANDARD_FP(__fentry__)
353353SYM_CODE_START(return_to_handler)
354354 UNWIND_HINT_UNDEFINED
355355 ANNOTATE_NOENDBR
356+ push $return_to_handler
357+ UNWIND_HINT_FUNC
356358
357359 /* Save ftrace_regs for function exit context */
358360 subq $(FRAME_SIZE), %rsp
359361
360362 movq %rax , RAX(%rsp )
361363 movq %rdx , RDX(%rsp )
362364 movq %rbp , RBP(%rsp )
365+ movq %rsp , RSP(%rsp )
366+ movq $0 , EFLAGS(%rsp )
367+ movq $__KERNEL_CS, CS (%rsp )
363368 movq %rsp , %rdi
364369
365370 call ftrace_return_to_handler
@@ -368,7 +373,8 @@ SYM_CODE_START(return_to_handler)
368373 movq RDX(%rsp ), %rdx
369374 movq RAX(%rsp ), %rax
370375
371- addq $(FRAME_SIZE), %rsp
376+ addq $(FRAME_SIZE) + 8 , %rsp
377+
372378 /*
373379 * Jump back to the old return address. This cannot be JMP_NOSPEC rdi
374380 * since IBT would demand that contain ENDBR, which simply isn't so for
You can’t perform that action at this time.
0 commit comments