From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756335AbcBJA3N (ORCPT ); Tue, 9 Feb 2016 19:29:13 -0500 Received: from ozlabs.org ([103.22.144.67]:35104 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754046AbcBJA3J (ORCPT ); Tue, 9 Feb 2016 19:29:09 -0500 From: Rusty Russell To: Jessica Yu , Josh Poimboeuf , Seth Jennings , Jiri Kosina , Vojtech Pavlik , Miroslav Benes , Petr Mladek , Steven Rostedt , Ingo Molnar Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Jessica Yu Subject: Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier In-Reply-To: <1454993424-31031-5-git-send-email-jeyu@redhat.com> References: <1454993424-31031-1-git-send-email-jeyu@redhat.com> <1454993424-31031-5-git-send-email-jeyu@redhat.com> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 10 Feb 2016 10:13:12 +1030 Message-ID: <87r3glzbzj.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jessica Yu writes: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during module load, and that klp_module_going() is > run before ftrace_release_mod() during module unload. This way, ftrace > and livepatch code is run in the correct order during the module > load/unload sequence without dependence on the module notifier call chain. > > This fixes a notifier ordering issue in which the ftrace module notifier > (and hence ftrace_module_enable()) for coming modules was being called > after klp_module_notify(), which caused livepatch modules to initialize > incorrectly. Without a Fixes: line, it's not absolutely clear whether this needs CC:stable, needs to go to Linus now, or can wait for the next merge window. I *think* you want all four merged this merge window, and 3 and 4 are required to fix a regression introduced since 4.4... Sorry for being obtuse! Rusty.