mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kyle McMartin <kyle@mcmartin.ca>
To: ye janboe <janboe.ye@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: is this a bug of elf_core_dump
Date: Fri, 29 Jun 2007 01:22:43 -0400	[thread overview]
Message-ID: <20070629052243.GA9495@fattire.cabal.ca> (raw)
In-Reply-To: <af3ea28a0706282203r16764118vd163cb48a25d9d99@mail.gmail.com>

On Fri, Jun 29, 2007 at 01:03:06PM +0800, ye janboe wrote:
> 			if (get_user_pages(current, current->mm, addr, 1, 0, 
> 			1,
> 						&page, &vma) <= 0) {
> 				DUMP_SEEK(PAGE_SIZE);
> 			} else {
> 
> 
> does get_user_pages directly use page variable which is not
> initialized is a bug?
> 

Why not look at mm/memory.c::get_user_pages and look at how it uses the
**pages argument? The fact that it is passing in the address of a
pointer to a struct page, along with the function name should be a big
hint as to what it is doing...

<spoiler>
more or less it is looking up the struct page pointer for the user address
passed in and returning it to the calling function via &page...
</spoiler>

Chees,
	Kyle M

      reply	other threads:[~2007-06-29  5:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29  5:03 ye janboe
2007-06-29  5:22 ` Kyle McMartin [this message]

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=20070629052243.GA9495@fattire.cabal.ca \
    --to=kyle@mcmartin.ca \
    --cc=janboe.ye@gmail.com \
    --cc=linux-kernel@vger.kernel.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®