From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681AbbLCRyj (ORCPT ); Thu, 3 Dec 2015 12:54:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51012 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762AbbLCRyh (ORCPT ); Thu, 3 Dec 2015 12:54:37 -0500 Date: Thu, 3 Dec 2015 11:54:36 -0600 From: Josh Poimboeuf To: Seth Jennings , Jiri Kosina , Vojtech Pavlik Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Rusty Russell , Miroslav Benes Subject: Re: [PATCH v3] livepatch: Cleanup module page permission changes Message-ID: <20151203175436.GD11394@treble.redhat.com> References: <71aa85cf0ab95f95af8b2dcded2eba4e5bfa1874.1449162208.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <71aa85cf0ab95f95af8b2dcded2eba4e5bfa1874.1449162208.git.jpoimboe@redhat.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2015 at 11:07:28AM -0600, 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-only again afterwards. > > Suggested-by: Miroslav Benes > Signed-off-by: Josh Poimboeuf > --- > > Based on linux-next. > > - v3: use new module_{disable,enable}_ro() functions (in linux-next) Please ignore this patch. I just realized that it conflicts with Chris's patch set. I'll post v4 after Chris's gets merged. -- Josh