mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: minyard@acm.org (Corey Minyard)
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to open files a process has mmapped
Date: Sat, 6 Apr 2002 18:50:39 +0100 (BST)	[thread overview]
Message-ID: <E16tuKm-0002Kp-00@the-village.bc.nu> (raw)
In-Reply-To: <3CADC998.9060501@acm.org> from "Corey Minyard" at Apr 05, 2002 09:58:16 AM

> a file a process has mmap-ed.  The trouble is that the file might be 
> deleted (this is actually likely in this scenario) so I can't just open 
> the file listed in /proc/<pid>/maps.

Well perhaps they should not have deleted it

> I have looked some at this, and I haven't come up with a good solution 
> for this.  I have come up with the following solutions:

You forgot fix the program to do sensible things. You can pass file handles
over AF_UNIX sockets for example, or you could rename the file so you can
find it then delete it later

> The last solution I could think of was to provide a way to open a file 
> with using the major/minor/inode (since these are listed for the mapped 
> files in the /proc/<pid>/maps file).  This is kind of ugly, but it's 
> probably the best one I've thought of.

Nice way to do security holes

  reply	other threads:[~2002-04-06 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-05 15:58 Corey Minyard
2002-04-06 17:50 ` Alan Cox [this message]
2002-04-07 20:19   ` Corey Minyard

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=E16tuKm-0002Kp-00@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.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®