lkml.org 
[lkml]   [2005]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ptrace can't be transparent on readonly MAP_SHARED



>>>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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-15 06:07    [W:0.051 / U:2.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site