From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758811AbcHYQIw (ORCPT ); Thu, 25 Aug 2016 12:08:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52460 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752978AbcHYQIu (ORCPT ); Thu, 25 Aug 2016 12:08:50 -0400 Date: Thu, 25 Aug 2016 11:08:14 -0500 From: Josh Poimboeuf To: Petr Mladek Cc: Jessica Yu , Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: livepatch/kprobes incompatibility Message-ID: <20160825160814.5gawgk4222vusrj5@treble> References: <20160824011300.GA31704@packer-debian-8-amd64.digitalocean.com> <20160824093959.GG4866@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160824093959.GG4866@pathway.suse.cz> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 25 Aug 2016 16:08:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 24, 2016 at 11:39:59AM +0200, Petr Mladek wrote: > + kretprobe is safe as well; the kprobe handler does not modify regs->ip; > it just modifies the return address from the function; it does not affect > livepatching because the address is defined by the function caller > and livepatching keeps it as is BTW, I think there's still a kretprobe issue which affects the accuracy of the unwinder and the consistency model. The unwinder will report kretprobe_trampoline instead of the real caller's return address. It can probably be fixed similarly to how ftrace function_graph tracing does it with a ftrace_graph_ret_addr() helper: https://lkml.kernel.org/r/cover.1471607358.git.jpoimboe@redhat.com -- Josh