Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751741AbbKHXBr (ORCPT ); Sun, 8 Nov 2015 18:01:47 -0500 Received: from ozlabs.org ([103.22.144.67]:34569 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbbKHXBn (ORCPT ); Sun, 8 Nov 2015 18:01:43 -0500 From: Rusty Russell To: Josh Poimboeuf , Petr Mladek Cc: Seth Jennings , Jiri Kosina , Vojtech Pavlik , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, "Cyril B." , Miroslav Benes Subject: Re: [PATCH v2 3/3] livepatch: Cleanup module page permission changes In-Reply-To: <20151106171453.GH28254@treble.redhat.com> References: <20151106104055.GL2599@pathway.suse.cz> <20151106121247.GF28254@treble.redhat.com> <20151106134246.GM2599@pathway.suse.cz> <20151106171453.GH28254@treble.redhat.com> User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 09 Nov 2015 09:31:24 +1030 Message-ID: <871tc02j0b.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 Content-Length: 1308 Lines: 33 Josh Poimboeuf writes: > On Fri, Nov 06, 2015 at 02:42:46PM +0100, Petr Mladek wrote: >> naming schemes. What about adding into the public API? >> >> set_module_ro() >> set_module_rw() >> >> It should modify everything: init, core, text, and data but only >> the ro/rw flags. > > Even that naming is not without its problems. For example, > set_module_ro() is false advertising -- it wouldn't change *all* module > memory to be read-only. (It wouldn't touch the r/w data areas.) > > But I don't really care what the interfaces are called. It's really > Rusty's call. I just stuck to the existing naming convention in the > module code with the set/unset ro_nx stuff. I'm looking at the ro/nx stuff now, and it seems like a mess. For example, set_all_modules_text_rw() and set_all_modules_text_ro() use mod->core_text_size instead of mod->core_ro_size. Which is probably what they want (ftrace doesn't care about rodata) but pretty damn confusing. So I'll extend your cleanup. Expect a patch for testing RSN... Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/