From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756809AbcA2TvN (ORCPT ); Fri, 29 Jan 2016 14:51:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54028 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753640AbcA2TvL (ORCPT ); Fri, 29 Jan 2016 14:51:11 -0500 Date: Fri, 29 Jan 2016 14:51:08 -0500 From: Jessica Yu To: Steven Rostedt Cc: Miroslav Benes , Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik , Ingo Molnar , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Rusty Russell Subject: Re: livepatch: Implement separate coming and going module notifiers Message-ID: <20160129195107.GA14026@packer-debian-8-amd64.digitalocean.com> References: <1454049827-3726-1-git-send-email-jeyu@redhat.com> <1454049827-3726-2-git-send-email-jeyu@redhat.com> <20160129173010.GA19101@treble.redhat.com> <20160129124014.204020ed@gandalf.local.home> <20160129175834.GB19101@treble.redhat.com> <20160129142950.0f6a6e62@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20160129142950.0f6a6e62@gandalf.local.home> X-OS: Linux eisen.io 3.16.0-4-amd64 x86_64 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 +++ Steven Rostedt [29/01/16 14:29 -0500]: >On Fri, 29 Jan 2016 20:25:15 +0100 (CET) >Miroslav Benes wrote: > >> It is possible to achieve the same goal even with the notifiers. They are >> processed synchronously in complete_formation(). So we can put our klp >> hook after that, right? Or better, put it to load_module() after >> complete_formation() call. There is an error handling code even today >> (that is, parse_args() or mod_sysfs_setup() can fail). Moreover, we'll >> have a hook there with Jessica's relocation rework patch set. > >The problem with notifiers is that you don't know what is being called. >A function call directly in the code, where it will always be needed if >configured in, is a reasonable need to not use a notifier. That's a pretty good reason. This bug popped up in the first place due to a lack of clarity on which notifier gets called when. >Although, I have to admit, if live kernel patching is configured in, >it's not always needed to be called here, does it? With ftrace, the >call has to be done when ftrace is configured in regardless if tracing >is used or not. Livepatch has to check if any of its patches affect the coming module, so hardcoded or not it will still need to loop through the klp_patches list like it does in the current notifiers. Jessica