linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH RFP-V4 00/13] remap_file_pages protection support - 4th attempt
@ 2006-08-26 17:33 Blaisorblade
  2006-08-28 20:49 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Blaisorblade @ 2006-08-26 17:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Nick Piggin, user-mode-linux-devel, Jeff Dike, LKML, linux-mm,
	Ingo Molnar, Val Henson, Hugh Dickins

[-- Attachment #1: Type: text/plain, Size: 2723 bytes --]

Again, about 4 month since last time (for lack of time) I'm sending for final 
review and for inclusion into -mm protection support for remap_file_pages (in 
short "RFP prot support"), i.e. setting per-pte protections (beyond file 
offset) through this syscall.

Since last release, I've changed the PTE bits encoding I've used to avoid 
adding overhead in pte_present() - I don't remember complaints other than this 
one. UML support should follow in a short time.

Below there is the commentary I included last time, with some updates.
I've also attached the program I use for unit testing of the patch.

The patches themselves will only go to akpm, LKML and linux-mm, to avoid an 
invasion of your mailboxes :-)

After this batch of patches has been merged, I will be able to start further 
work basing on those - optimizations, restructuring and such, but the 
functionality is already present; since I had little time I decided to work 
on the basic set first, to avoid too many ports to newer releases.

== Notes ==

Arch-specific bits are provided for i386, x86_64 and UML, and for some other 
archs I have patches I will send, based on the ones which were in -mm when 
Ingo sent the first version of this work.

You shouldn't worry for the number of patches, most of them are very little.
I've last tested them in UML, i386 x86-64 against 2.6.18-rc3/rc4 (where 
_tested_ means compile, boot and unit-tested).

== How it works ==

Protections are set in the page tables when the page is loaded, are saved into 
the PTE when the page is swapped out and restored when the page is faulted 
back in.

Additionally, we modify the fault handler since the VMA protections aren't 
valid for PTE with modified protections.

Finally, we must also provide, for each arch, macros to store also the 
protections into the PTE; to make the kernel compile for any arch, I've added 
since last time dummy default macros to keep the same functionality.

== What is this for ==

The first idea is to use this for UML - it must create a lot of single page 
mappings, and managing them through separate VMAs is slow (in last discussion 
Ingo Molnar provided impressive numbers about this).

With a little additional change (to allow limited usage on MAP_PRIVATE 
readonly VMAs) it will be possible to use this also for shared objects guard 
pages on x86_64; guard pages for thread stacks can also be easily addressed; 
handling read/write private vmas (which was in Ulrich's wish list) was also 
maybe possible but there are limitations for that so I've left that totally 
apart.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade

[-- Attachment #2: fremap-test-complete.c.bz2 --]
[-- Type: application/x-bzip2, Size: 5510 bytes --]

[-- Attachment #3: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #4: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [uml-devel] [PATCH RFP-V4 00/13] remap_file_pages protection support - 4th attempt
  2006-08-26 17:33 [uml-devel] [PATCH RFP-V4 00/13] remap_file_pages protection support - 4th attempt Blaisorblade
@ 2006-08-28 20:49 ` Andrew Morton
  2006-08-29  8:22   ` Paolo Giarrusso
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2006-08-28 20:49 UTC (permalink / raw)
  To: Blaisorblade
  Cc: Nick Piggin, user-mode-linux-devel, Jeff Dike, LKML, linux-mm,
	Ingo Molnar, Val Henson, Hugh Dickins

On Sat, 26 Aug 2006 19:33:35 +0200
Blaisorblade <blaisorblade@yahoo.it> wrote:

> Again, about 4 month since last time (for lack of time) I'm sending for final 
> review and for inclusion into -mm protection support for remap_file_pages (in 
> short "RFP prot support"), i.e. setting per-pte protections (beyond file 
> offset) through this syscall.

This all looks a bit too fresh and TODO-infested for me to put it in -mm at
this time.

I could toss them in to get some testing underway, but that makes life
complex for other ongoing MM work.  (And there's a _lot_ of that - I
presently have >180 separate patches which alter ./mm/*).

Also, it looks like another round of detailed review is needed before this
work will really start to settle into its final form.

So..   I'll await version 5, sorry.   Please persist.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [uml-devel] [PATCH RFP-V4 00/13] remap_file_pages protection support - 4th attempt
  2006-08-28 20:49 ` Andrew Morton
@ 2006-08-29  8:22   ` Paolo Giarrusso
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Giarrusso @ 2006-08-29  8:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Nick Piggin, user-mode-linux-devel, Jeff Dike, LKML, linux-mm,
	Ingo Molnar, Val Henson, Hugh Dickins

Andrew Morton <akpm@osdl.org> ha scritto: 

> On Sat, 26 Aug 2006 19:33:35 +0200
> Blaisorblade <blaisorblade@yahoo.it> wrote:
> 
> > Again, about 4 month since last time (for lack of time) I'm
> sending for final 
> > review and for inclusion into -mm protection support for
> remap_file_pages (in 
> > short "RFP prot support"), i.e. setting per-pte protections
> (beyond file 
> > offset) through this syscall.

> This all looks a bit too fresh and TODO-infested for me to put it
> in -mm at
> this time.

It is possible, subsequent rounds of review should be near to each
other, but calling the code "new" is maybe exaggerate. I do not
remember all these TODOs but I may forget (and I don't have my box
right now, so I can't check).

> I could toss them in to get some testing underway, but that makes
> life
> complex for other ongoing MM work.  (And there's a _lot_ of that -
> I
> presently have >180 separate patches which alter ./mm/*).

That's fine. If this can help I could try to base next version
against -mm.

> Also, it looks like another round of detailed review is needed
> before this
> work will really start to settle into its final form.

That's ok, I prefer reviews to testing right now. Almost all but 1
patch (which is marked) is unit tested on i386, x86_64 and uml (but
if I don't have a multithreaded concurrent fault tester), so it's
time to catch remaining bugs by review.

> So..   I'll await version 5, sorry.   Please persist.

I'll try. I just hope we'll not have it next summer (I know it's my
problem, I'm not complaining on you).

Thanks!
Bye
--
Paolo Giarrusso 

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-29  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-26 17:33 [uml-devel] [PATCH RFP-V4 00/13] remap_file_pages protection support - 4th attempt Blaisorblade
2006-08-28 20:49 ` Andrew Morton
2006-08-29  8:22   ` Paolo Giarrusso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox