Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Josh Poimboeuf
On Fri, Dec 04, 2015 at 10:57:45PM +0100, Jiri Kosina wrote: > On Fri, 4 Dec 2015, Josh Poimboeuf wrote: > > > > (1) I pull your 'modules-next' branch, apply this patch on top, and wait > > > for your merge with Linus and send merge request afterwards > > > (2) If you are okay with rebasing y

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Jiri Kosina
On Fri, 4 Dec 2015, Josh Poimboeuf wrote: > > (1) I pull your 'modules-next' branch, apply this patch on top, and wait > > for your merge with Linus and send merge request afterwards > > (2) If you are okay with rebasing your tree (seems like this is > > ocassionally happening), how abou

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Jiri Kosina
On Fri, 4 Dec 2015, Rusty Russell wrote: > > What do you think? > > Please cherry-pick my whole module-next tree. They have my SOB already. > You can push them to Linus along with your livepatch stuff at your > convenience for the merge window. > > Once you've done that, I'll rebase modules-nex

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Jiri Kosina
On Thu, 3 Dec 2015, Josh Poimboeuf wrote: > Calling set_memory_rw() and set_memory_ro() for every iteration of the > loop in klp_write_object_relocations() is messy, inefficient, and > error-prone. > > Change all the read-only pages to read-write before the loop and convert > them back to read-on

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Petr Mladek
On Thu 2015-12-03 16:33:26, Josh Poimboeuf wrote: > Calling set_memory_rw() and set_memory_ro() for every iteration of the > loop in klp_write_object_relocations() is messy, inefficient, and > error-prone. > > Change all the read-only pages to read-write before the loop and convert > them back to

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Josh Poimboeuf
On Fri, Dec 04, 2015 at 07:27:24AM -0600, Josh Poimboeuf wrote: > On Fri, Dec 04, 2015 at 01:11:29AM +0100, Jiri Kosina wrote: > > On Thu, 3 Dec 2015, Josh Poimboeuf wrote: > > > > > Calling set_memory_rw() and set_memory_ro() for every iteration of the > > > loop in klp_write_object_relocations()

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Josh Poimboeuf
On Fri, Dec 04, 2015 at 01:11:29AM +0100, Jiri Kosina wrote: > On Thu, 3 Dec 2015, Josh Poimboeuf wrote: > > > Calling set_memory_rw() and set_memory_ro() for every iteration of the > > loop in klp_write_object_relocations() is messy, inefficient, and > > error-prone. > > > > Change all the read-

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-03 Thread Rusty Russell
Jiri Kosina writes: > On Thu, 3 Dec 2015, Josh Poimboeuf wrote: > >> Calling set_memory_rw() and set_memory_ro() for every iteration of the >> loop in klp_write_object_relocations() is messy, inefficient, and >> error-prone. >> >> Change all the read-only pages to read-write before the loop and c

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-03 Thread Jiri Kosina
On Thu, 3 Dec 2015, Josh Poimboeuf wrote: > Calling set_memory_rw() and set_memory_ro() for every iteration of the > loop in klp_write_object_relocations() is messy, inefficient, and > error-prone. > > Change all the read-only pages to read-write before the loop and convert > them back to read-on

[PATCH v4] livepatch: Cleanup module page permission changes

2015-12-03 Thread Josh Poimboeuf
Calling set_memory_rw() and set_memory_ro() for every iteration of the loop in klp_write_object_relocations() is messy, inefficient, and error-prone. Change all the read-only pages to read-write before the loop and convert them back to read-only again afterwards. Suggested-by: Miroslav Benes Sig