public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
	Manfred Spraul <manfred@colorfullife.com>,
	Andrea Arcangeli <andrea@suse.de>,
	lkml <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@redhat.com>
Subject: Re: [patch] VM_IO fixes
Date: Thu, 07 Feb 2002 12:51:34 -0800	[thread overview]
Message-ID: <3C62E8D6.9FDAF382@zip.com.au> (raw)
In-Reply-To: <3C621B44.10C424B9@zip.com.au> <Pine.LNX.4.33.0202071259510.5900-100000@serv>

Roman Zippel wrote:
> 
> Hi,
> 
> On Wed, 6 Feb 2002, Andrew Morton wrote:
> 
> > Any filesystem which implements its own mmap() method, and which
> > does not call generic_file_mmap() needs to be changed to clear
> > VM_IO inside its mmap function.  All in-kernel filesystems are
> > OK, as is XFS.  And the only breakage this can cause to out-of-kernel
> > filesystems is failure to include mappings in core files, and
> > inability to use PEEKUSR.
> 
> You forgot shared memory via mm/shmem.c and ipc/shm.c.
> Another possibility is to test whether the driver provides a nopage
> function, as i/o areas are usually mapped with io_remap_page_range. The
> only exception I found are drivers under drivers/sgi/char, which use some
> really dirty tricks in their nopage function.

ugh.  This just isn't working out.

Sure, inverting the default value of VM_IO is much safer, because
the penalty for getting it wrong is broken coredumps and ptrace,
rather than kernel crashes.

But there are still many areas which need changing, and thinking
about.  Stuff like ftape_mmap, sound_mmap, packet_mmap, mmap_mem,
mmap_zero, ...

I'm wondering if we can automagically determine whether the
mapping is safe to peek and coredump within the mmap and mremap
functions themselves?  All this would take is the ability to
determine that the entire vma is backed by valid page structs.

Is there a fast and portable way of doing this?

-

  parent reply	other threads:[~2002-02-07 20:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-07  6:14 [patch] VM_IO fixes Andrew Morton
2002-02-07  6:50 ` David S. Miller
2002-02-07 12:06 ` Roman Zippel
2002-02-07 16:34   ` Marcelo Tosatti
2002-02-07 20:51   ` Andrew Morton [this message]
2002-02-08  5:05     ` Andrew Morton
2002-02-08  5:16       ` David S. Miller
2002-02-08  5:23         ` David Mosberger
2002-02-07 21:34 ` Manfred Spraul
2002-02-07 22:19   ` 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=3C62E8D6.9FDAF382@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=andrea@suse.de \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=marcelo@conectiva.com.br \
    --cc=zippel@linux-m68k.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