public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	mm-commits@vger.kernel.org, will@kernel.org, vgupta@kernel.org,
	urezki@gmail.com, tsbogend@alpha.franken.de, tglx@linutronix.de,
	surenb@google.com, song@kernel.org, shorne@gmail.com,
	rostedt@goodmis.org, richard@nod.at, palmer@dabbelt.com,
	oleg@redhat.com, mpe@ellerman.id.au, monstr@monstr.eu,
	mingo@redhat.com, mhiramat@kernel.org, mcgrof@kernel.org,
	mattst88@gmail.com, mark.rutland@arm.com, luto@kernel.org,
	linux@armlinux.org.uk, Liam.Howlett@oracle.com,
	kent.overstreet@linux.dev, kdevops@lists.linux.dev,
	johannes@sipsolutions.net, jcmvbkbc@gmail.com, hch@lst.de,
	guoren@kernel.org, glaubitz@physik.fu-berlin.de,
	geert@linux-m68k.org, dinguyen@kernel.org, deller@gmx.de,
	dave.hansen@linux.intel.com, christophe.leroy@csgroup.eu,
	chenhuacai@kernel.org, catalin.marinas@arm.com, bp@alien8.de,
	bcain@quicinc.com, arnd@arndb.de, ardb@kernel.org,
	andreas@gaisler.com
Subject: Re: [merged mm-stable] x86-module-prepare-module-loading-for-rox-allocations-of-text.patch removed from -mm tree
Date: Fri, 6 Dec 2024 12:39:32 +0200	[thread overview]
Message-ID: <Z1LUZJdsDHrSV6oE@kernel.org> (raw)
In-Reply-To: <20241205084128.GH8562@noisy.programming.kicks-ass.net>

Hi Peter,

On Thu, Dec 05, 2024 at 09:41:28AM +0100, Peter Zijlstra wrote:
> On Wed, Nov 06, 2024 at 08:50:41AM +0200, Mike Rapoport wrote:
> 
> Anyway, while noodling with all that, I think there's a fairly
> fundamental error in all of this. The mem->rw_copy should not be a whole
> second allocation, it should be a (page granular) RW alias of the
> (large) ROX map.

I've made mem->rw_copy an allocation because Andy raised a concern [1] that
we'll have an executable mapping of semi-formed code. 
With an actual copy rather than an alias the ROX pages contain invalid
instructions up to the point we're through with relocations and
alternatives patching and the actual code appears in ROX mappings in one
go.
 
[1] https://lore.kernel.org/all/a17c65c6-863f-4026-9c6f-a04b659e9ab4@app.fastmail.com

> That also gets rid of that whole copy operation.
> 
> I'm having to chase a few regressions of my own first, but after that
> I'll look at reworking all this.

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2024-12-06 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06  1:00 [merged mm-stable] x86-module-prepare-module-loading-for-rox-allocations-of-text.patch removed from -mm tree Andrew Morton
2024-11-06  6:50 ` Mike Rapoport
2024-11-06 21:30   ` Andrew Morton
2024-12-05  8:41   ` Peter Zijlstra
2024-12-06 10:39     ` Mike Rapoport [this message]
2024-12-09  8:38       ` Peter Zijlstra

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=Z1LUZJdsDHrSV6oE@kernel.org \
    --to=rppt@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreas@gaisler.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bcain@quicinc.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dave.hansen@linux.intel.com \
    --cc=deller@gmx.de \
    --cc=dinguyen@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=guoren@kernel.org \
    --cc=hch@lst.de \
    --cc=jcmvbkbc@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=kdevops@lists.linux.dev \
    --cc=kent.overstreet@linux.dev \
    --cc=linux@armlinux.org.uk \
    --cc=luto@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mattst88@gmail.com \
    --cc=mcgrof@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=mpe@ellerman.id.au \
    --cc=oleg@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=richard@nod.at \
    --cc=rostedt@goodmis.org \
    --cc=shorne@gmail.com \
    --cc=song@kernel.org \
    --cc=surenb@google.com \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=urezki@gmail.com \
    --cc=vgupta@kernel.org \
    --cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox