* is this a bug of elf_core_dump
@ 2007-06-29 5:03 ye janboe
2007-06-29 5:22 ` Kyle McMartin
0 siblings, 1 reply; 2+ messages in thread
From: ye janboe @ 2007-06-29 5:03 UTC (permalink / raw)
To: linux-kernel
I found there are codes like following in elf_core_dump
for (addr = vma->vm_start;
addr < vma->vm_end;
addr += PAGE_SIZE) {
struct page *page;
struct vm_area_struct *vma;
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?
thanks
Janboe
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: is this a bug of elf_core_dump
2007-06-29 5:03 is this a bug of elf_core_dump ye janboe
@ 2007-06-29 5:22 ` Kyle McMartin
0 siblings, 0 replies; 2+ messages in thread
From: Kyle McMartin @ 2007-06-29 5:22 UTC (permalink / raw)
To: ye janboe; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-29 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-29 5:03 is this a bug of elf_core_dump ye janboe
2007-06-29 5:22 ` Kyle McMartin
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®