Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754248AbbETPyI (ORCPT ); Wed, 20 May 2015 11:54:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43132 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753983AbbETPyF (ORCPT ); Wed, 20 May 2015 11:54:05 -0400 Date: Wed, 20 May 2015 17:51:56 +0200 From: Oleg Nesterov To: Pratyush Anand Cc: Ananth N Mavinakayanahalli , Anton Arapov , David Long , Denys Vlasenko , "Frank Ch. Eigler" , Ingo Molnar , Jan Willeke , Jim Keniston , Mark Wielaard , Srikar Dronamraju , linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/10] uprobes/x86: Introduce arch_uretprobe_is_alive() Message-ID: <20150520155156.GA1343@redhat.com> References: <20150504124914.GA22512@redhat.com> <5559D627.7080201@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5559D627.7080201@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1085 Lines: 38 Hi Pratyush, sorry for delay, vacation. On 05/18, Pratyush Anand wrote: > Hi Oleg, > > On Monday 04 May 2015 06:19 PM, Oleg Nesterov wrote: >> +bool __weak arch_uretprobe_is_alive(struct arch_uretprobe *auret, struct pt_regs *regs) >> +{ >> + return true; >> +} > > IIUC, then this function should return false when both auret and regs > are corresponding to same retprobe, else we need to return true, right? Not sure I understand what you mean... This function should return false when we know that this return_instance was invalidated by longjmp(). > If that is the case, then should n't following work for all the cases: > > return sp != auret->sp; No, this can't work. On x86 "sp == auret->sp" only right after the "call" insn, the stack can grow after that but this does not mean that this instance is no longer valid. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/