All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Matt Mackall <mpm@selenic.com>
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 14:28:50 +1000	[thread overview]
Message-ID: <1184041730.6005.480.camel@localhost.localdomain> (raw)
In-Reply-To: <20070709223101.GW11115@waste.org>

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.  You could argue it would be more correct to check
at the open, in fact.

Cheers,
Rusty.


  reply	other threads:[~2007-07-10  4:29 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   ` Rusty Russell [this message]
2007-07-10  6:27     ` maps2-add-proc-pid-pagemap-interface.patch Matt Mackall
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=1184041730.6005.480.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=rientjes@google.com \
    /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.