From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451AbbCWKde (ORCPT ); Mon, 23 Mar 2015 06:33:34 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36421 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102AbbCWKdd (ORCPT ); Mon, 23 Mar 2015 06:33:33 -0400 Date: Mon, 23 Mar 2015 11:33:27 +0100 From: Ingo Molnar To: Petr Mladek Cc: Masami Hiramatsu , "David S. Miller" , Anil S Keshavamurthy , Ananth NMavinakayanahalli , Frederic Weisbecker , Steven Rostedt , Ingo Molnar , Jiri Kosina , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] kprobes: Disable Kprobe when ftrace arming fails Message-ID: <20150323103327.GA12213@gmail.com> References: <1426860127-7896-1-git-send-email-pmladek@suse.cz> <20150323085426.GB28965@gmail.com> <20150323101253.GN11869@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150323101253.GN11869@pathway.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Petr Mladek wrote: > On Mon 2015-03-23 09:54:26, Ingo Molnar wrote: > > > > * Petr Mladek wrote: > > > > > arm_kprobe_ftrace() could fail, especially after introducing ftrace > > > IPMODIFY flag and LifePatching. But this situation is not properly > > > handled. > > > > s/LifePatching/LivePatching? > > Great catch! This is well hidden typo. Please, find the fixed version > below. > > > > Why not fix live patching to still allow kprobes that worked before? > > Yup, Kretprobes would work out of box. Masami is working on removing > the conflict there. > > Jprobes are doable but the solution would be rather complicated. > LivePatching would need to tell Jprobe the right address where to > continue (according to the universe). We currently solve this by wth is a 'universe' in this context? > the conflict. I am not sure if a better solution is worth the effort. > IMHO, LivePatch users won't want to have Kprobes on a production > system all the time. They could use Kprobe or attach Jprobe to the > new version of the function when needed. So please outline the current usage limitations, why those limitations are in place and how you see they should be fixed/addressed. > Below is the patch with the fixed typo. So the typo is totally immaterial compared to the above fundamental patch-coordination problems between live patching, ftrace and kprobes ... Thanks, Ingo