Re: [PATCHv2 perf/core 2/4] uprobe: Do not emulate/sstep original instruction when ip is changed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/08, Jiri Olsa wrote:
>
> If user decided to take execution elsewhere, it makes little sense
> to execute the original instruction, so let's skip it.

...

> @@ -2768,6 +2768,13 @@ static void handle_swbp(struct pt_regs *regs)
>  	/* Try to optimize after first hit. */
>  	arch_uprobe_optimize(&uprobe->arch, bp_vaddr);
>
> +	/*
> +	 * If user decided to take execution elsewhere, it makes little sense
> +	 * to execute the original instruction, so let's skip it.
> +	 */
> +	if (instruction_pointer(regs) != bp_vaddr)
> +		goto out;
> +

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux