From: Matt Mackall <mpm@selenic.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: maps2-add-proc-pid-pagemap-interface.patch
Date: Tue, 10 Jul 2007 01:27:36 -0500 [thread overview]
Message-ID: <20070710062736.GF11115@waste.org> (raw)
In-Reply-To: <1184041730.6005.480.camel@localhost.localdomain>
On Tue, Jul 10, 2007 at 02:28:50PM +1000, Rusty Russell wrote:
> On Mon, 2007-07-09 at 17:31 -0500, Matt Mackall wrote:
> > > And how about "cpu_to_le16(1) == 1" instead of "ntohl(1) != 1"?
> >
> > Why?
>
> Using a networking macro to detect endianness is old school: we have the
> nice explicit macros these days...
>
> > > > + while (pm.count > 0 && vma) {
> > > > + if (!ptrace_may_attach(task)) {
> > > > + ret = -EIO;
> > > > + goto out_mm;
> > > > + }
> > >
> > > You already checked ptrace_may_attach() earlier in this function; do you
> > > need to do that again?
> >
> > I think so. Consider exec(). This whole area is full of interesting
> > traps and it pays to be paranoid.
>
> I don't think normal ptraces get cut on exec, so I'm not sure why this
> should be different.
They absolutely do, if UID changes. Consider ptracing a shell
launching a setuid binary. For something more closely analogous,
consider opening /proc/pid/mem on the same shell...
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2007-07-10 6:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-08 11:33 maps2-add-proc-pid-pagemap-interface.patch Rusty Russell
2007-07-09 22:31 ` maps2-add-proc-pid-pagemap-interface.patch Matt Mackall
2007-07-10 4:28 ` maps2-add-proc-pid-pagemap-interface.patch Rusty Russell
2007-07-10 6:27 ` Matt Mackall [this message]
2007-07-10 7:00 ` maps2-add-proc-pid-pagemap-interface.patch Rusty Russell
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=20070710062736.GF11115@waste.org \
--to=mpm@selenic.com \
--cc=akpm@linux-foundation.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=rusty@rustcorp.com.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.