public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Josh Poimboeuf <jpoimboe@redhat.com>, Petr Mladek <pmladek@suse.com>
Cc: Seth Jennings <sjenning@redhat.com>,
	Jiri Kosina <jikos@kernel.org>, Vojtech Pavlik <vojtech@suse.com>,
	linux-kernel@vger.kernel.org, live-patching@vger.kernel.org,
	"Cyril B." <cbay@alwaysdata.com>, Miroslav Benes <mbenes@suse.cz>
Subject: Re: [PATCH v2 3/3] livepatch: Cleanup module page permission changes
Date: Mon, 09 Nov 2015 09:31:24 +1030	[thread overview]
Message-ID: <871tc02j0b.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20151106171453.GH28254@treble.redhat.com>

Josh Poimboeuf <jpoimboe@redhat.com> 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.

      reply	other threads:[~2015-11-08 23:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 21:18 [PATCH v2 0/3] CONFIG_DEBUG_SET_MODULE_RONX bug fix and cleanups Josh Poimboeuf
2015-11-05 21:18 ` [PATCH v2 1/3] livepatch: Fix crash with !CONFIG_DEBUG_SET_MODULE_RONX Josh Poimboeuf
2015-11-06 10:14   ` Jiri Kosina
2015-11-05 21:18 ` [PATCH v2 2/3] module: Use the same logic for setting and unsetting RO/NX Josh Poimboeuf
2015-11-08 19:40   ` Rusty Russell
2015-11-05 21:18 ` [PATCH v2 3/3] livepatch: Cleanup module page permission changes Josh Poimboeuf
2015-11-06 10:40   ` Petr Mladek
2015-11-06 12:12     ` Josh Poimboeuf
2015-11-06 13:42       ` Petr Mladek
2015-11-06 17:14         ` Josh Poimboeuf
2015-11-08 23:01           ` Rusty Russell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tc02j0b.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=cbay@alwaysdata.com \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.com \
    --cc=sjenning@redhat.com \
    --cc=vojtech@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox