Re: memory management issues

"Ollie Wild" <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
> Give me more of a clue on this one ... afterwards *who* sees the pages
> as zero'd?  The user or the kernel ... if the user, I think it's a
> simple coherency problem.

Ah, I should have been more clear.  I scattered a bunch of code
similar to this throughout the kernel:

  {
    struct page *page;
    char * addr;

    get_user_pages(current, bprm->mm, bprm->p, 1, 0, 1, &page, NULL);
    addr = kmap(page);
    printk("page = %p, bprm->p = %016lx\n", page, bprm->p);
    printk("%s: %d: \"%s\"\n", __FUNCTION__, __LINE__, addr);
    kunmap(page);
    put_page(page);
  }

I observed that after the activate_mm() call, page and bprm->p were
unchanged, but the string at addr switched from the executable name to
the null string.

I thought that caching might play a role, so I added
flush_dcache_page() calls after the kunmap's, but that didn't help.

Ollie
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.