[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150710120715.GK26095@linux.vnet.ibm.com>
Date: Fri, 10 Jul 2015 17:37:15 +0530
From: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Ananth Mavinakayanahalli <ananth@...ibm.com>,
Anton Arapov <arapov@...il.com>,
David Long <dave.long@...aro.org>,
Denys Vlasenko <dvlasenk@...hat.com>,
"Frank Ch. Eigler" <fche@...hat.com>,
Ingo Molnar <mingo@...nel.org>,
Jan Willeke <willeke@...ibm.com>,
Jim Keniston <jkenisto@...ibm.com>,
Mark Wielaard <mjw@...hat.com>,
Pratyush Anand <panand@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 11/11] uprobes/x86: Make
arch_uretprobe_is_alive(RP_CHECK_CALL) more clever
> 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 <oleg@...hat.com>
Looks good to me.
Acked-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
--
Thanks and Regards
Srikar Dronamraju
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists