All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: live-patching@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Jessica Yu <jeyu@kernel.org>,
	Joe Lawrence <joe.lawrence@redhat.com>
Subject: [PATCH v3 08/10] livepatch: Remove module_disable_ro() usage
Date: Sat, 25 Apr 2020 06:07:28 -0500	[thread overview]
Message-ID: <36eaeb7551e06e90dbb07e1bdaad8b0f4ff890da.1587812518.git.jpoimboe@redhat.com> (raw)
In-Reply-To: <cover.1587812518.git.jpoimboe@redhat.com>

With arch_klp_init_object_loaded() gone, and apply_relocate_add() now
using text_poke(), livepatch no longer needs to use module_disable_ro().

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 kernel/livepatch/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index f9ebb54affab..6b8b3c067be0 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -777,7 +777,6 @@ static int klp_init_object_loaded(struct klp_patch *patch,
 	if (klp_is_module(obj)) {
 
 		mutex_lock(&text_mutex);
-		module_disable_ro(patch->mod);
 
 		/*
 		 * Only write module-specific relocations here
@@ -787,7 +786,6 @@ static int klp_init_object_loaded(struct klp_patch *patch,
 		 */
 		ret = klp_apply_object_relocs(patch, obj);
 
-		module_enable_ro(patch->mod, true);
 		mutex_unlock(&text_mutex);
 
 		if (ret)
-- 
2.21.1


  parent reply	other threads:[~2020-04-25 11:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 11:07 [PATCH v3 00/10] livepatch,module: Remove .klp.arch and module_disable_ro() Josh Poimboeuf
2020-04-25 11:07 ` [PATCH v3 01/10] livepatch: Disallow vmlinux.ko Josh Poimboeuf
2020-04-25 11:07 ` [PATCH v3 02/10] livepatch: Apply vmlinux-specific KLP relocations early Josh Poimboeuf
2020-04-28  9:20   ` Miroslav Benes
2020-04-25 11:07 ` [PATCH v3 03/10] livepatch: Remove .klp.arch Josh Poimboeuf
2020-04-25 11:07 ` [PATCH v3 04/10] livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols Josh Poimboeuf
2020-04-25 11:07 ` [PATCH v3 05/10] s390: Change s390_kernel_write() return type to match memcpy() Josh Poimboeuf
2020-04-25 11:07 ` [PATCH v3 06/10] s390/module: Use s390_kernel_write() for late relocations Josh Poimboeuf
2020-04-25 11:14   ` Josh Poimboeuf
2020-04-25 11:07 ` [PATCH v3 07/10] x86/module: Use text_poke() " Josh Poimboeuf
2020-04-25 11:07 ` Josh Poimboeuf [this message]
2020-04-25 11:07 ` [PATCH v3 09/10] module: Remove module_disable_ro() Josh Poimboeuf
2020-04-28 16:25   ` Jessica Yu
2020-04-28 16:36     ` Josh Poimboeuf
2020-04-28 16:41       ` Jessica Yu
2020-04-28 17:03         ` Josh Poimboeuf
2020-04-28 18:56           ` Jessica Yu
2020-04-25 11:07 ` [PATCH v3 10/10] x86/module: Use text_mutex in apply_relocate_add() Josh Poimboeuf
2020-04-27 12:22 ` [PATCH v3 00/10] livepatch,module: Remove .klp.arch and module_disable_ro() Joe Lawrence
2020-04-27 12:32   ` Miroslav Benes
2020-04-27 16:52   ` Joe Lawrence
2020-04-28 13:48 ` Miroslav Benes
2020-04-28 14:35   ` Josh Poimboeuf

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=36eaeb7551e06e90dbb07e1bdaad8b0f4ff890da.1587812518.git.jpoimboe@redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=jeyu@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.