mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nick Piggin" <npiggin@novell.com>
To: "Andrea Arcangeli" <andrea@suse.de>, "Hugh Dickins" <hugh@veritas.com>
Cc: "Andrew Morton" <akpm@osdl.org>, <linux-kernel@vger.kernel.org>
Subject: Re: ptrace can't be transparent on readonly MAP_SHARED
Date: Wed, 14 Sep 2005 22:05:02 -0600	[thread overview]
Message-ID: <43297F8E0200008A000032AE@lucius.provo.novell.com> (raw)
In-Reply-To: <20050914212405.GD4966@opteron.random>


 
 
>>>Andrea Arcangeli <andrea@suse.de> 09/15/05 7:24 am >>> 
>
>About generating anonymous pages on top of map_shared that should be 
>fine with the vm, the way anon-vma works, it already happens for 
>map_private and it's not conceputally different for anon-vma to deal 
>with overlap with map-shared or map-private. So I don't think we need
to 
>forbid ptrace (i.e. gdb) to write to a readonly map shared or stuff
like 
>that. 
> 
>Comments welcome. (especially if you see any bug in my simpler approach

>please let me know because that's how I fixed the DoS in some kernel ;)

>thanks! 
>

I like the look of the patch.

I would like to go one step further and simply disallow writing to
MAP_SHARED memory full stop. It eliminates so many corner cases and
weird behaviour (ie. after writing to a readonly MAP_SHARED, the process
will no longer see updates to the file).

Actually, maybe that's too much. I imagine on a shared memory
application
there would be use in changing writeable MAP_SHARED memory in a
debugger.
How about we disallow writing to readonly MAP_SHARED?

However going back a step - I still think Andrea's patch is nicer than
what we have now.


  reply	other threads:[~2005-09-15  4:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 21:24 Andrea Arcangeli
2005-09-15  4:05 ` Nick Piggin [this message]
2005-09-15 13:18 ` Hugh Dickins
2005-09-15 15:12   ` Linus Torvalds
2005-09-15 15:47     ` Andrea Arcangeli
2005-09-15 16:13       ` Linus Torvalds
2005-09-15 16:23         ` Andrea Arcangeli
2005-09-15 16:34           ` Linus Torvalds
2005-09-15 16:51             ` Andrea Arcangeli
2005-09-15 17:52               ` Linus Torvalds
2005-09-15 18:09                 ` Andrea Arcangeli
2005-09-15 21:09                   ` Daniel Jacobowitz
2005-09-15 21:58                     ` Andrea Arcangeli

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=43297F8E0200008A000032AE@lucius.provo.novell.com \
    --to=npiggin@novell.com \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®