linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
[parent not found: <1345860830.2030761285581270894.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>]
[parent not found: <86925983.2027701285578620865.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>]
* [PATCH 0/3] Generic support for revoking mappings
@ 2010-09-25 23:33 Eric W. Biederman
  2010-09-27  8:52 ` CAI Qian
  0 siblings, 1 reply; 8+ messages in thread
From: Eric W. Biederman @ 2010-09-25 23:33 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Hugh Dickins, linux-mm, linux-kernel, Rik van Riel


During hotplug or rmmod if a device or file is mmaped, it's mapping
needs to be removed and future access need to return SIGBUS almost like
truncate.  This case is rare enough that it barely gets tested, and
making a generic implementation warranted.  I have tried with sysfs but
a complete and generic implementation does not seem possible without mm
support.

It looks like a fully generic implementation with mm knowledge
is shorter and easier to get right than what I have in sysfs today.

So here is that fully generic implementation.

Eric W. Biederman (3):
      mm: Introduce revoke_mappings.
      mm: Consolidate vma destruction into remove_vma.
      mm: Cause revoke_mappings to wait until all close methods have completed.
---
 include/linux/fs.h |    2 +
 include/linux/mm.h |    2 +
 mm/Makefile        |    2 +-
 mm/mmap.c          |   34 +++++-----
 mm/nommu.c         |    5 ++
 mm/revoke.c        |  192 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 219 insertions(+), 18 deletions(-)

Eric

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2010-09-28  8:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1586726953.2193271285663810410.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-09-28  8:51 ` [PATCH 0/3] Generic support for revoking mappings caiqian
     [not found] <1345860830.2030761285581270894.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-09-27  9:55 ` caiqian
2010-09-27 13:52   ` Eric W. Biederman
2010-09-28  6:25   ` Eric W. Biederman
     [not found] <86925983.2027701285578620865.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-09-27  9:10 ` caiqian
2010-09-25 23:33 Eric W. Biederman
2010-09-27  8:52 ` CAI Qian
2010-09-27  9:12   ` Américo Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).