From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754467AbbGJL45 (ORCPT ); Fri, 10 Jul 2015 07:56:57 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:49798 "EHLO e23smtp01.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753419AbbGJL4t (ORCPT ); Fri, 10 Jul 2015 07:56:49 -0400 X-Helo: d23dlp02.au.ibm.com X-MailFrom: srikar@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Date: Fri, 10 Jul 2015 17:25:38 +0530 From: Srikar Dronamraju To: Oleg Nesterov Cc: Ananth Mavinakayanahalli , Anton Arapov , David Long , Denys Vlasenko , "Frank Ch. Eigler" , Ingo Molnar , Jan Willeke , Jim Keniston , Mark Wielaard , Pratyush Anand , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 08/11] uprobes: Change handle_trampoline() to flush the frames invalidated by longjmp() Message-ID: <20150710115538.GH26095@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20150707012210.GA7466@redhat.com> <20150707012302.GA7540@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20150707012302.GA7540@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15071011-1618-0000-0000-0000025D9960 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Change handle_trampoline() to unwind ->return_instances until we know > that the next chain is alive or NULL, this ensures that the current > chain is the last we need to report and free. > > Alternatively, every return_instance could use unique trampoline_vaddr, > in this case we could use it as a key. And this could solve the problem > with sigaltstack() automatically. > > But this approach needs more changes, and it puts the "hard" limit on > MAX_URETPROBE_DEPTH. Plus it can not solve another problem partially > fixed by the next patch. > > Note: this change has no effect on !x86, the arch-agnostic version of > arch_uretprobe_is_alive() just returns "true". > > TODO: as documented by the previous change, arch_uretprobe_is_alive() > can be fooled by sigaltstack/etc. > > Signed-off-by: Oleg Nesterov Looks good to me. Acked-by: Srikar Dronamraju -- Thanks and Regards Srikar Dronamraju