> If you ret-probe func_1() and func_2() prepare_uretprobe() hits the > MAX_URETPROBE_DEPTH limit and "return" from func_2() is not reported. > > When we know that the new call is not chained, we can do the more > strict check. In this case "sp" points to the new ret-addr, so every > frame which uses the same "sp" must be dead. The only complication is > that arch_uretprobe_is_alive() needs to know was it chained or not, so > we add the new RP_CHECK_CHAIN_CALL enum and change prepare_uretprobe() > to pass RP_CHECK_CALL only if !chained. > > Note: arch_uretprobe_is_alive() could also re-read *sp and check if > this word is still trampoline_vaddr. This could obviously improve the > logic, but I would like to avoid another copy_from_user() especially > in the case when we can't avoid the false "alive == T" positives. > > Signed-off-by: Oleg Nesterov <[email protected]>
Looks good to me. Acked-by: Srikar Dronamraju <[email protected]> -- Thanks and Regards Srikar Dronamraju -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

